public interface SchemaNode
Modifier and Type | Method and Description |
---|---|
Object |
createNewOccurrence()
Creates a new Java object that complies to this node definition.
|
String |
displayOccurrence(Object aValue,
boolean useLabels,
ValueContext aValueContext,
Locale aLocale)
Returns a user-friendly representation of the specified value.
|
Object |
executeRead(Object aContainerOccurrence)
Reads the specified occurrence of the parent node and returns the value corresponding to this node.
|
void |
executeWrite(Object aValue,
Object aContainerOccurrence)
Modifies the specified occurrence of the parent node by setting the
specified value.
|
String |
formatToXsString(Object aValue)
Returns the string that corresponds to the specified value.
|
AccessPermission |
getAccessMode()
Returns the static access mode of the current node.
|
AssociationLink |
getAssociationLink()
Returns the information for an association.
|
com.orchestranetworks.schema.businessObjects.BusinessObjectModel |
getBusinessObjectModel()
Returns the business object model associated to this table node.
|
com.orchestranetworks.schema.businessObjects.BusinessObjectModel |
getBusinessObjectModel(Adaptation aDataset,
Session aSession)
Returns the business object model associated to this node
if it is a table node.
|
String |
getCategory()
Returns the category that is defined in data model (attribute
osd:category );
returns null if no category is specified on the current node,
nor on its ancestors. |
Object |
getDefaultValue()
Returns the default value for the node that is defined in data model
(attribute
xs:default ), or null if no value is specified. |
SchemaNodeDefaultView |
getDefaultViewProperties()
Returns the default view properties
for this node, as defined in the data model
(element
osd:defaultView
under the element xs:annotation/xs:appinfo ). |
String |
getDescription(Locale aLocale)
Returns the localized description of this node.
|
String |
getDescription(Session aSession)
Returns the localized description of this node in the context of a
user session.
|
<T> List<T> |
getEnumerationList(ValueContext aValueContext)
If the data model specifies an enumeration,
returns the values that this node may take on.
|
<T> Nomenclature<T> |
getEnumerationNomenclature(ValueContext aValueContext)
Returns the underlying
Nomenclature , if found by searching
through facets. |
SchemaFacetEnumeration |
getFacetEnumeration()
Returns the first
enumeration facet declared on this node. |
SchemaFacetExcludeSegment |
getFacetExcludeSegment()
Returns the first
excludeSegment facet declared on this node. |
SchemaFacetExcludeValue |
getFacetExcludeValue()
Returns the first
excludeValue facet declared on this node. |
SchemaFacetFractionDigits |
getFacetFractionDigits()
Returns the first
fractionDigits facet declared on this node. |
SchemaFacetLength |
getFacetLength()
Returns the first
length facet declared on this node. |
SchemaFacetBoundaryMaxExclusive |
getFacetMaxBoundaryExclusive()
Returns the first
maxExclusive facet declared on this node. |
SchemaFacetBoundaryMaxInclusive |
getFacetMaxBoundaryInclusive()
Returns the first
maxInclusive facet declared on this node. |
SchemaFacetMaxLength |
getFacetMaxLength()
Returns the first
maxlength facet declared on this node. |
SchemaFacetBoundaryMinExclusive |
getFacetMinBoundaryExclusive()
Returns the first
minExclusive facet declared on this node. |
SchemaFacetBoundaryMinInclusive |
getFacetMinBoundaryInclusive()
Returns the first
minInclusive facet declared on this node. |
SchemaFacetMinLength |
getFacetMinLength()
Returns the first
minLength facet declared on this node. |
SchemaFacetOnMandatoryField |
getFacetOnMandatoryField()
Returns the facet corresponding to the cardinality
constraint related to a mandatory field (declares
both
minOccurs=1 and maxOccurs=1 ). |
SchemaFacetTableRef |
getFacetOnTableReference()
Returns the
osd:tableRef facet (foreign key constraint)
declared on this node. |
SchemaFacetOResource |
getFacetOResource()
Returns the
OResource facet held by this node. |
SchemaFacetPattern |
getFacetPattern()
Returns the first
pattern facet declared on this node. |
Iterator<SchemaFacet> |
getFacets()
Returns an iterator over the
facets
defined by this data model node. |
SchemaFacetTotalDigits |
getFacetTotalDigits()
Returns the first
totalDigits facet declared on this node. |
SchemaNodeInformation |
getInformation()
Returns the additional information (element
osd:information )
for this node, as defined in the data model. |
SchemaInheritanceProperties |
getInheritanceProperties()
Returns the inheritance properties (element
osd:inheritance )
for this node, as defined in the data model. |
Class<?> |
getJavaBeanClass()
Returns the specific Java Bean
class defined on this data model node
(attribute osd:class ) or null
if no Java Bean has been defined and/or this node is not terminal. |
String |
getLabel(Locale aLocale)
Returns the localized label of this node.
|
String |
getLabel(Session aSession)
Returns the label of this node for the specified session.
|
UserMessage |
getMandatoryUserMessage()
Returns the mandatory error message
(defined by the data model element
osd:mandatoryErrorMessage ). |
int |
getMaxOccurs()
Returns the value of
xs:maxOccurs . |
int |
getMinOccurs()
Returns the value of
xs:minOccurs . |
SchemaNode |
getNode(Path aPath)
Returns the node at the specified path, or
null if no node exists at the specified
path. |
SchemaNode |
getNode(Path aPath,
boolean tolerantRead,
boolean absolutePathBeginsAtRecordRoot)
Returns the node at the specified path, or
null if the node does not exist
and isTolerantRead is true . |
SchemaNode[] |
getNodeChildren()
Returns the data model nodes defined directly under this node.
|
Class<?> |
getOccurrencesJavaClass()
Returns the default
Class of the Java records of this data model node,
null if this node is above a terminal node. |
SchemaNode |
getParent()
Returns the parent node of this node.
|
Path |
getPathInAdaptation()
Returns the local absolute path.
|
Path |
getPathInSchema()
Returns the absolute path of this node in the data model.
|
SchemaNodeExplicitRelationship |
getRelationship()
Returns the information for the relationship
defined by this node.
|
SchemaNodeRelationships |
getRelationships()
Returns all the relationships defined by this node.
|
SchemaNodeRelationships |
getRelationships(Adaptation aDataset,
Session aSession)
Returns the relationships defined by this node.
|
Locale |
getSchemaDefaultLocale()
Deprecated.
Since 5.9.0 it is not possible to define locales
for a module anymore.
Repository.getDefaultLocale()
should be used instead. |
SchemaLinkedField |
getSchemaLinkedField()
Returns the information for a linked field.
|
List<Locale> |
getSchemaLocales()
Deprecated.
Since 5.9.0 it is not possible to define locales
for a module anymore.
Repository.getLocales()
should be used instead. |
SchemaLocation |
getSchemaLocation()
Returns the location of the data model that defines this node.
|
SelectionLink |
getSelectionLink()
Returns the information for a selection link.
|
SchemaNode |
getTableNode()
If this node is in a table record, returns the node of the containing table,
which defines
osd:table . |
SchemaNode |
getTableOccurrenceRootNode()
If this node is a table node (see method
isTableNode() ), returns
the root node of the record structure. |
SchemaNode[] |
getTablePrimaryKeyNodes()
Returns the primary key that is defined in
the data model if this node is a table node.
|
Object[] |
getTablePrimaryKeyValues(PrimaryKey aPrimaryKey)
If this node is a table node, decomposes
the specified primary key object into the
primary key field values in the referenced table.
|
Object[] |
getTablePrimaryKeyValues(String aTableRefValue)
If this node is a table node, decomposes
the specified
osd:tableRef value into the
primary key field values in the referenced table. |
List<UniquenessConstraint> |
getUniquenessConstraints()
Returns the
uniqueness constraints applied
on this table using the property xs:unique . |
SchemaTypeName |
getXsTypeName()
Returns the type name of this node, or
null if this node is associated
with an anonymous type definition. |
boolean |
isAncestorMultiOccurrenced()
Returns
true if an
ancestor of this node is a list. |
boolean |
isAncestorOrSelfMultiOccurrenced()
Returns
true if this node or one
of its ancestors is a list. |
boolean |
isAssociationNode()
Returns
true if this node is an association. |
boolean |
isAutoIncrement()
Returns
true if this node defines an auto-increment. |
boolean |
isCheckNullInput()
Returns the value of the property
osd:checkNullInput . |
boolean |
isComplex()
Returns
true if this node is a complex element declaration. |
boolean |
isHistoryDisabled()
Specifies if the history is disabled for this node.
|
boolean |
isLinkedNode()
Returns
true if this node is a linked node. |
boolean |
isSelectNode()
Returns
true if this node is a selection link. |
boolean |
isTableNode()
Returns
true if this node is a table node. |
boolean |
isTableOccurrenceNode()
Returns
true if this node is in a table record. |
boolean |
isTerminalValue()
Returns
true if this node is terminal. |
boolean |
isTerminalValueComputed()
Returns
true if this node is a terminal node whose value is not
directly stored in EBX® repository. |
boolean |
isTerminalValueDescendant()
Returns
true if this node is the descendant of a terminal value node. |
boolean |
isValidationDisabled()
Returns
true if the validation is disabled on this node. |
boolean |
isValueEqual(Object aFirstValue,
Object aSecondValue)
Returns
true if the specified values are equal, according to the underlying XML Schema type. |
boolean |
isValueFunction()
Returns
true if this node holds a function. |
boolean |
isValueLessOrEqualTo(Object aFirstValue,
Object aSecondValue)
Returns
true if first value is less than or equal to the second
value, according to the underlying XML Schema type. |
boolean |
isValueStrictlyLessThan(Object aFirstValue,
Object aSecondValue)
Returns
true if the first value is strictly less than the second value,
according to the underlying XML Schema type. |
Object |
parseXsString(String aString)
Returns the value that corresponds to the specified string.
|
int getMinOccurs()
xs:minOccurs
.int getMaxOccurs()
xs:maxOccurs
.boolean isCheckNullInput()
osd:checkNullInput
.Path getPathInAdaptation()
In a table record, the local absolute path is the path that begins at the table root
node (non-inclusive); otherwise, it is the path that starts at the dataset root node
(inclusive). In the latter case, the path is the same as the one returned by
getPathInSchema()
.
getPathInSchema()
Path getPathInSchema()
getPathInAdaptation()
boolean isComplex()
true
if this node is a complex element declaration.boolean isValueEqual(Object aFirstValue, Object aSecondValue)
true
if the specified values are equal, according to the underlying XML Schema type.
For example, if the data model type is xs:date
, both specified values must instances of
Date
. Also, equality checking for xs:date
does not take time into account,
due to the Java equality checking for Date
. In contrast, equality checking for the type
xs:dateTime
in the data model would compare time.
ClassCastException
- if a specified value is not an instance of the underlying type.boolean isValueLessOrEqualTo(Object aFirstValue, Object aSecondValue)
true
if first value is less than or equal to the second
value, according to the underlying XML Schema type.UnsupportedOperationException
- if underlying type does not support comparison.ClassCastException
- if a specified value is not an instance of underlying type.boolean isValueStrictlyLessThan(Object aFirstValue, Object aSecondValue)
true
if the first value is strictly less than the second value,
according to the underlying XML Schema type.UnsupportedOperationException
- if the underlying type does not support comparison.ClassCastException
- if a specified value is not an instance of the underlying type.boolean isTerminalValue()
true
if this node is terminal.
A node is terminal when:
isTerminalValueDescendant()
);
maxOccurs > 1
(either an aggregated list or a osd:table
);
osd:function
(see Computed Values);
osd:access
(see Access Properties).
Note: if inheritance is enabled, a terminal node value can be inherited.
isTerminalValueDescendant()
boolean isTerminalValueDescendant()
true
if this node is the descendant of a terminal value node.
This implies that the parent node is of a complex type and it is itself
either terminal or a descendant of a terminal node.isTerminalValue()
boolean isTerminalValueComputed()
true
if this node is a terminal node whose value is not
directly stored in EBX® repository.
This is the case for a node declaring an osd:function
,
osd:association
and osd:table
.
boolean isAutoIncrement()
true
if this node defines an auto-increment.
An auto-incremented node is specified in the data model using the
the osd:autoIncrement
element.
boolean isSelectNode()
true
if this node is a selection link.
A select node is specified in the data model using the
osd:select
element.
getSelectionLink()
SelectionLink getSelectionLink()
null
if the node has no selection link defined.isSelectNode()
boolean isAssociationNode()
true
if this node is an association.
An association node is specified in the data model using the
osd:association
element.
AssociationLink getAssociationLink()
null
if the node is not an association.isAssociationNode()
boolean isLinkedNode()
true
if this node is a linked node.
A linked node is specified in the data model using the
osd:function linkedField="aPath"
element.
getSchemaLinkedField()
SchemaLinkedField getSchemaLinkedField()
Returns null
if this node is
does not define the element
osd:function linkedField="aPath"
.
isLinkedNode()
SchemaNodeExplicitRelationship getRelationship()
null
if the node has
no relationship defined.SchemaNodeRelationships getRelationships(Adaptation aDataset, Session aSession)
The relationships returned by this method are filtered according to the permissions defined for the end-user associated to the specified session and in the context of the given dataset that is an instance of the data model containing this node.
IllegalArgumentException
- if the specified Adaptation
is null
.IllegalStateException
- if the specified Adaptation
is not a dataset.IllegalStateException
- if the specified Adaptation
has severe error.IllegalStateException
- if the specified dataset is not
an instance of the data model containing this node.IllegalArgumentException
- is the specified Session
is null
.getRelationships()
,
Adaptation.hasSevereError()
SchemaNodeRelationships getRelationships()
The method getRelationships(Adaptation, Session)
can
be used if the relationships held by this node must be filtered
according to the permissions defined for a specific end-user,
in the context of a dataset which is an instance of the data model
containing this node.
getRelationships(Adaptation, Session)
com.orchestranetworks.schema.businessObjects.BusinessObjectModel getBusinessObjectModel(Adaptation aDataset, Session aSession)
Permissions are resolved using this method. As a consequence,
this method returns null
if the main table of the related
business object model associated cannot be viewed by the end-user associated
with the given session and in the context of the specified dataset.
The dimensions of the business object model are filtered as well. That is,
a dimension (including its child dimensions) are not visible if the related relationship
cannot be viewed by the end-user associated with the given session and
in the context of the specified dataset.
See SchemaNodeRelationships.getExplicitRelationships()
for
more information about the resolution of the permissions.
IllegalArgumentException
- if the specified SchemaNode
is not a table node.IllegalArgumentException
- if the specified Adaptation
is null
.IllegalStateException
- if the specified Adaptation
is not a dataset.IllegalStateException
- if the specified Adaptation
has a severe error.IllegalStateException
- if the specified dataset is not an instance of the data model containing this
node.IllegalArgumentException
- if the specified Session
is null
.com.orchestranetworks.schema.businessObjects.BusinessObjectModel getBusinessObjectModel()
The method getBusinessObjectModel(Adaptation, Session)
can
be used if the business object model associated to this node must be filtered
according to the permissions defined for a specific end-user,
in the context of a dataset which is an instance of the data model
containing this node.
IllegalArgumentException
- if the current node is not a table node.getBusinessObjectModel(Adaptation, Session)
SchemaNode getTableNode()
osd:table
.
Returns either the table node containing the osd:table
declaration,
or null
if this node is not inside a table.isTableNode()
,
getTableOccurrenceRootNode()
boolean isTableNode()
true
if this node is a table node.
A table node is specified in the data model using the element osd:table
(see Table definition).
getTableOccurrenceRootNode()
SchemaNode[] getTablePrimaryKeyNodes()
osd:table/primaryKeys
(in their declared
order), or null
if this node is not a table node.Object[] getTablePrimaryKeyValues(String aTableRefValue) throws InvalidPrimaryKeyException, IllegalArgumentException
osd:tableRef
value into the
primary key field values in the referenced table.
The following table gives some examples of decomposition:
Key fields | String representation (aTableRefValue ) |
returns |
---|---|---|
(xs:string) | "abc" | "abc" |
(xs:int) | "123" | [Integer(123)] |
(xs:int) | "" | throws an InvalidPrimaryKeyException . |
(xs:int) | "aa" | throws an InvalidPrimaryKeyException . |
(xs:int | xs:string) | "123|abc" | [Integer(123), "abc"] |
(xs:int | xs:string) | "123|abc|abc" | [Integer(123), "abc|abc"] (the second field is itself a foreign key, the second value can hence be itself decomposed) |
(xs:int | xs:string) | "aa|aaa" (invalid integer field) | throws an InvalidPrimaryKeyException . |
(xs:int | xs:string) | "|aaa" | throws an InvalidPrimaryKeyException . |
(xs:int | xs:string) | "" (empty string) | throws an InvalidPrimaryKeyException . |
(xs:int | xs:string) | "aaa" | Invalid, throws an InvalidPrimaryKeyException . |
aTableRefValue
- a string value that conforms to the primary key syntax.InvalidPrimaryKeyException
- if the specified value does not have the expected primary key syntax, or
if a field value is null
.IllegalStateException
- if this node is not a table node.IllegalArgumentException
- if the specified value is null
.getTablePrimaryKeyNodes()
,
PrimaryKey syntax,
SchemaFacetTableRef.getTablePrimaryKeyValues(String)
Object[] getTablePrimaryKeyValues(PrimaryKey aPrimaryKey) throws InvalidPrimaryKeyException, IllegalArgumentException
This method is equivalent to:
this.getTablePrimaryKeyValues(aPrimaryKey.format());
SchemaNode getTableOccurrenceRootNode()
isTableNode()
), returns
the root node of the record structure.
This method is used for accessing the internal structure of a table.
Since a table node is considered to be a terminal node, it does not provide direct access to its children. Instead, the child nodes can only be accessed through the root node of the record structure (the object that is returned by this method).
null
if this node is not a table nodeisTableNode()
boolean isTableOccurrenceNode()
true
if this node is in a table record.boolean isHistoryDisabled()
true
if:
historyProfile
is not set in the data model;osd:password
;AdaptationTable.getHistory()
AccessPermission getAccessMode()
For example, a function
is
read-only
.
Note: If the node is neither terminal
nor a
terminal descendant
, the returned mode
is hidden
. This does not
imply that the node is not visible, but rather that it does not directly hold a value.
isTerminalValue()
String getCategory()
osd:category
);
returns null
if no category is specified on the current node,
nor on its ancestors.Object getDefaultValue()
xs:default
), or null
if no value is specified.
This default value is typed according to type of the current node. That is, the default value specified in the data model must comply with the type of the associated element.
If the current node is an aggregated list (an element defining maxOccurs > 1
)
then the returned default value will be a new List
instance containing
a single occurrence of the default value defined in the data model.
String getLabel(Locale aLocale)
The label is computed as follows:
SchemaDocumentation
,
then the computed label is returned, if not, returns null
;SchemaDocumentation
,
getLabel(Session)
String getDescription(Locale aLocale)
The description is computed as follows:
SchemaDocumentation
,
then the description it computes is returned, if not, returns null
;getDescription(Session)
String getLabel(Session aSession)
The label is computed as follows:
SchemaDocumentation
,
then the label it computes is returned, if not, returns null
;String getDescription(Session aSession)
The description is computed as follows:
SchemaDocumentation
,
then the computed description is returned, if not, returns null
;UserMessage getMandatoryUserMessage()
osd:mandatoryErrorMessage
).SchemaNode getParent()
This method returns the root node of the record structure if the current node is a direct child of a table node.
getTableOccurrenceRootNode()
SchemaNode getNode(Path aPath)
null
if no node exists at the specified
path.
If the path is relative, it is interpreted based on the location of this node. This method is
equivalent to getNode(aPath, true, false)
.
If the path begins with "//
", this method returns the first node that
matches what follows. This syntax is not as efficient as absolute or relative notations.
getPathInSchema()
SchemaNode getNode(Path aPath, boolean tolerantRead, boolean absolutePathBeginsAtRecordRoot) throws PathAccessException
null
if the node does not exist
and isTolerantRead
is true
.
aPath
- if relative, it is interpreted based on the location of this node.tolerantRead
- if true
, returns null
when no node exists at the
specified location;
otherwise it throws PathAccessException
.absolutePathBeginsAtRecordRoot
- if value is true
, aPath
is absolute, and this
node is in a table,
the root of the path is the table root node.PathAccessException
- if no node exists at the specified path and tolerantRead
is
false
.SchemaNode[] getNodeChildren()
This method returns an empty array if the underlying type is a simple type
or if this is a table node (see isTableNode()
). If this is a table node,
the method getTableOccurrenceRootNode()
must be used to
get the structure of the table.
Note: A node can have children and still be considered as "terminal"
based on the definition given by the method isTerminalValue()
.
boolean isAncestorMultiOccurrenced()
true
if an
ancestor of this node is a list.isAncestorOrSelfMultiOccurrenced()
boolean isAncestorOrSelfMultiOccurrenced()
true
if this node or one
of its ancestors is a list.
Returns false
if this node is a table
node.getMaxOccurs()
,
isAncestorMultiOccurrenced()
,
isTableNode()
SchemaLocation getSchemaLocation()
@Deprecated Locale getSchemaDefaultLocale()
Repository.getDefaultLocale()
should be used instead.@Deprecated List<Locale> getSchemaLocales()
Repository.getLocales()
should be used instead.SchemaTypeName getXsTypeName()
null
if this node is associated
with an anonymous type definition.String displayOccurrence(Object aValue, boolean useLabels, ValueContext aValueContext, Locale aLocale)
formatToXsString
) in order
to be more relevant to the user:
xs:int
, xs:decimal
,
etc.), or a date (xs:date
, xs:dateTime
,
xs:time
), it is formatted according to the formatting policy
associated with the specified locale.
useLabels
is true
and the element has a declaration that
enables value labeling, as described in the table below.
Data model definition | Value label (if useLabels = true ) |
xs:enumeration |
Label is either
the value of the attribute osd:label
or the content of the localized element xs:documentation , as
specified in the data model.
|
osd:tableRef |
For a foreign key constraint, the label is computed from the referenced record, if it exists, and
its data model declaration. In order of preference:
|
osd:enumeration |
For a dynamic enumeration, the label comes from the target node, if it defines such labels. |
osd:constraintEnumeration |
For a programmatic enumeration constraint,
the label is the string returned by the method
ConstraintEnumeration.displayOccurrence .
As a consequence, it may be localized.
|
osd:constraintNomenclature (deprecated) |
For a programmatic nomenclature constraint,
the label is the string returned by the method
NomenclatureItem.getLabel ,
if the nomenclature item exists for the specified value.
|
other cases | No value labeling is performed, the method returns the formatted value. |
ValueContext
is a ProcedureContext
,
this method will throw an IllegalArgumentException
when dynamic or programmatic
labeling calls ValueContext.getValue(Path)
using a relative path.aValue
- The value must be compatible with the type of the current node. If the current node
specifies maxOccurs > 1
,
then the value must be an element of the List
instance,
not the List
itself.useLabels
- If true
and labeling is enabled, specifies to return the label
associated with the value. See the table above.aValueContext
- Context that contains the value. It is used when the label to be returned depends on a
contextual and dynamic resolution based on a relative path (see above).aLocale
- Locale for formatting numbers, dates or localized labels.getEnumerationList(ValueContext)
,
getEnumerationNomenclature(ValueContext)
String formatToXsString(Object aValue)
Object
-to-String
conversion.
For example, if the underlying type is xs:date
, the specified record must
be a Date
instance and this method will return the XML Schema representation
of this date.
IllegalArgumentException
- If the resulting string is not a valid XML string (this happens if a specified
xs:string
contains invalid XML characters).ClassCastException
- if the value is not of the expected Java type.parseXsString(String)
Object parseXsString(String aString) throws ConversionException
String
-to-Object
conversion.
For example, if the underlying type is xs:date
, the string must conform to
the XML Schema representation of dates (for example, "1999-05-31"). This method then returns a
Date
instance.
ConversionException
- if specified string is invalid with respect to the underlying XML Schema type.formatToXsString(Object)
Class<?> getOccurrencesJavaClass()
Class
of the Java records of this data model node,
null
if this node is above a terminal node.isTerminalValue()
,
Mapping to JavaClass<?> getJavaBeanClass()
class
defined on this data model node
(attribute osd:class
) or null
if no Java Bean has been defined and/or this node is not terminal.
The difference with getOccurrencesJavaClass()
is the fact that it returns null
if no specific Java Bean has been defined in the data model.
Therefore for simple types, it returns always null
.isTerminalValue()
,
isComplex()
,
Mapping to JavaObject createNewOccurrence()
The returned value conforms to the following rules:
maxOccurs > 1
,
the method does not take this fact into account
(that is, it returns an element of
the List
, not a List
instance).null
.osd:class=""
attribute, or of a default internal class
(such an instance may be accessed by executeRead(Object)
).Object executeRead(Object aContainerOccurrence)
Precondition: This node must be a
descendant of a terminal node
.
A parent node declares maxOccurs > 1
and it refers to a
complex. Hence, the parent value will be a Java List
.
For each object (occurrence) in the list, this method gets the value associated with this
child node.
aContainerOccurrence
- must be an occurrence complying with the data model definition of the parent node.executeWrite(Object, Object)
,
getOccurrencesJavaClass()
,
Mapping to Javavoid executeWrite(Object aValue, Object aContainerOccurrence)
Precondition: This node must be a
descendant of a terminal node
.
aValue
- value to be set on the parent object, it must comply with the data model
definition of this node; if it specifies maxOccurs > 1
,
the specified value must be a List
.aContainerOccurrence
- parent object to be modified, it must be an occurrence complying with the data model
definition of the parent node; the parent node must be a complex type; if it
specifies maxOccurs > 1
, the specified object must be an element of
List
, not the List
itself.executeRead(Object)
,
createNewOccurrence()
,
getOccurrencesJavaClass()
,
Mapping to JavaIterator<SchemaFacet> getFacets()
facets
defined by this data model node.
This method can be useful for retrieving all facets of a certain type.
For example, using this method to get both the static and dynamic
length
facets on this node.
SchemaFacet
SchemaFacetOnMandatoryField getFacetOnMandatoryField()
minOccurs=1
and maxOccurs=1
).SchemaFacetOnMandatoryField
SchemaFacetLength getFacetLength()
length
facet declared on this node.
Returns null
if the node has no length
facets defined.
If multiple length
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetLength
SchemaFacetMaxLength getFacetMaxLength()
maxlength
facet declared on this node.
Returns null
if the node has no maxlength
facets defined.
If multiple maxlength
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetMaxLength
SchemaFacetMinLength getFacetMinLength()
minLength
facet declared on this node.
Returns null
if the node has no minLength
facets defined.
If multiple minLength
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetMinLength
SchemaFacetBoundaryMaxExclusive getFacetMaxBoundaryExclusive()
maxExclusive
facet declared on this node.
Returns null
if the node has no maxExclusive
facets defined.
If multiple maxExclusive
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetBoundaryMaxExclusive
SchemaFacetBoundaryMaxInclusive getFacetMaxBoundaryInclusive()
maxInclusive
facet declared on this node.
Returns null
if the node has no maxInclusive
facets defined.
If multiple maxInclusive
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetBoundaryMaxInclusive
SchemaFacetBoundaryMinExclusive getFacetMinBoundaryExclusive()
minExclusive
facet declared on this node.
Returns null
if the node has no minExclusive
facets defined.
If multiple minExclusive
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetBoundaryMinExclusive
SchemaFacetBoundaryMinInclusive getFacetMinBoundaryInclusive()
minInclusive
facet declared on this node.
Returns null
if the node has no minInclusive
facets defined.
If multiple minInclusive
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetBoundaryMinInclusive
SchemaFacetPattern getFacetPattern()
pattern
facet declared on this node.
Returns null
if the node has no pattern
facets defined.
If multiple pattern
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetPattern
SchemaFacetTotalDigits getFacetTotalDigits()
totalDigits
facet declared on this node.
Returns null
if the node has no totalDigits
facets defined.
If multiple totalDigits
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetTotalDigits
SchemaFacetExcludeValue getFacetExcludeValue()
excludeValue
facet declared on this node.
Returns null
if the node has no excludeValue
facets
defined.
If multiple excludeValue
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetExcludeValue
SchemaFacetExcludeSegment getFacetExcludeSegment()
excludeSegment
facet declared on this node.
Returns null
if the node has no excludeSegment
facets
defined.
If multiple excludeSegment
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetExcludeSegment
SchemaFacetFractionDigits getFacetFractionDigits()
fractionDigits
facet declared on this node.
Returns null
if the node has no fractionDigits
facets
defined.
If multiple fractionDigits
facets are defined,
the method getFacets()
can be called instead to
retrieve all facets declared on this node.
SchemaFacetFractionDigits
SchemaFacetTableRef getFacetOnTableReference()
osd:tableRef
facet (foreign key constraint)
declared on this node.
Returns null
if the node does not have a foreign key constraint
or if it has errors due to a non-existent container dataset or dataspace.SchemaFacetOResource getFacetOResource()
OResource
facet held by this node.
Returns null
if the node does not have an OResource
facet.SchemaFacetOResource
SchemaFacetEnumeration getFacetEnumeration()
enumeration
facet declared on this node. That is,
one the following facets: xs:enumeration
, osd:tableRef
,
osd:enumeration
, osd:constraintEnumeration
,
or osd:constraintNomenclature
(deprecated).
Returns null
if the node does not
define an enumeration.<T> List<T> getEnumerationList(ValueContext aValueContext)
null
.
When a label is associated with a value, this label may be displayed by invoking
displayOccurrence
.
The supported cases are as follows:
Data model definition | Result |
xs:enumeration |
For a static enumeration, this method returns the list of static objects defined in the data model. |
osd:tableRef |
For a foreign key constraint, this method returns
the list of primary keys defined by the target table, in their
String representation (see PrimaryKey.format() ).
|
osd:enumeration |
For a dynamic enumeration, this method returns the list of objects defined by the target node. |
osd:constraintEnumeration |
For a programmatic enumeration constraint, this method returns
the list of objects as returned by
ConstraintEnumeration.getValues(ValueContext) .
|
osd:constraintNomenclature (deprecated) |
For a programmatic nomenclature constraint, this method returns
the list of the values of the nomenclature returned by
ConstraintNomenclature.getNomenclature(ValueContext) .
|
other cases |
This method returns null .
|
aValueContext
- Context containing the enumeration, used when the enumeration
to be returned depends on a contextual and dynamic resolution.displayOccurrence(Object, boolean, ValueContext, Locale)
,
getFacetEnumeration()
List<UniquenessConstraint> getUniquenessConstraints()
uniqueness constraints
applied
on this table using the property xs:unique
.
Returns null
if this node is not a table or does not
contain uniqueness constraints
.isTableNode()
,
UniquenessConstraint
<T> Nomenclature<T> getEnumerationNomenclature(ValueContext aValueContext)
Nomenclature
, if found by searching
through facets. If no nomenclature is found, returns null
.
The supported cases are as follows:
Data model definition | Result |
osd:enumeration |
For a dynamic enumeration whose target node itself has a nomenclature, this method returns the nomenclature that corresponds to the values of the target node. |
osd:constraintNomenclature (deprecated) |
For a programmatic nomenclature constraint, this method returns
the nomenclature, as returned by
ConstraintNomenclature.getNomenclature(ValueContext) .
|
other cases |
Returns null .
|
aValueContext
- Context containing the nomenclature, used when the nomenclature
to be returned depends on a contextual and dynamic resolution.getFacetEnumeration()
boolean isValueFunction()
true
if this node holds a function.
A function is specified in the data model using an osd:function
extension.
ValueFunction
boolean isValidationDisabled()
true
if the validation is disabled on this node.
Validation is disabled if this node is computed and defines in the data model
the attribute osd:disableValidation = true
.
isValueFunction()
SchemaNodeInformation getInformation()
osd:information
)
for this node, as defined in the data model.SchemaNodeDefaultView getDefaultViewProperties()
osd:defaultView
under the element xs:annotation/xs:appinfo
).
If no default view is specified, this method returns a default SchemaNodeDefaultView
with the following values:
SchemaInheritanceProperties getInheritanceProperties()
osd:inheritance
)
for this node, as defined in the data model.
If no inheritance is specified, this method returns null
.