|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Represents an element declaration in the resolved schema.
| Method Summary | |
Object |
createNewOccurrence()
Creates a new Java object that depends on this node definition. |
String |
displayOccurrence(Object aValue,
boolean useLabels,
ValueContext aValueContext,
Locale aLocale)
Returns a user-friendly representation of the value specified. |
Object |
executeRead(Object aContainerOccurrence)
Reads an occurrence of the parent node so as to return the value corresponding to this node. |
String |
formatToXsString(Object aValue)
Returns the string that corresponds to the value specified. |
Object |
getDefaultValue()
Returns the default value that is defined in schema (attribute xs:default),
or null if no value is specified. |
String |
getDescription(Locale aLocale)
Returns the localized description defined in schema. |
List |
getEnumerationList(ValueContext aContext)
Looks for an enumeration of values that may be taken by this node. |
Nomenclature |
getEnumerationNomenclature(ValueContext aContext)
Looks for an underlying Nomenclature. |
String |
getLabel(Locale aLocale)
Returns the localized label defined in schema. |
UserMessage |
getMandatoryUserMessage()
Returns the mandatory error message (defined by schema 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 path specified, or null if no node exists at the path
specified.
|
SchemaNode |
getNode(Path aPath,
boolean isTolerantRead,
boolean absolutePathBeginsAtOccurrenceRoot)
Returns the node at the path specified. |
SchemaNode[] |
getNodeChildren()
Returns the schema nodes defined directly under this node. |
Class |
getOccurrencesJavaClass()
Returns the default Class of the Java occurrences of this schema node,
null if this node is above a terminal node. |
Path |
getPathInAdaptation()
Returns the local absolute path. |
Path |
getPathInSchema()
Returns the full absolute path of this node in the schema. |
SchemaLocation |
getSchemaLocation()
Returns the location of the schema that defines this node. |
SchemaNode |
getTableOccurrenceRootNode()
For a table node (see method isTableNode()), returns
the root node of the occurrences' structure.
|
SchemaTypeName |
getXsTypeName()
Returns the type name of this node, or null if this node is associated
to an anonymous type definition. |
boolean |
isComplex()
Returns true if this node is a complex element declaration. |
boolean |
isSelectNode()
Returns true if this node is a select node.
|
boolean |
isTableNode()
Returns true if this node is a table node.
|
boolean |
isTableOccurrenceNode()
Returns true if this node is in a table occurrence. |
boolean |
isTerminalValue()
Returns true if this node is adaptation terminal.
|
boolean |
isTerminalValueDescendant()
Returns true if this node is the descendant of a terminal value node. |
boolean |
isValueEqual(Object aFirstValue,
Object aSecondValue)
Returns true if values specified are equal, according to the underlying XML Schema type.
|
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 first value is stricty less than the second value,
according to the underlying XML Schema type. |
Object |
parseXsString(String aString)
Returns the value that corresponds to the string specified. |
| Method Detail |
public int getMinOccurs()
xs:minOccurs.
public int getMaxOccurs()
xs:maxOccurs.
public Path getPathInAdaptation()
In a table occurrence, the local absolute path is the path that starts from the table root
node (without including it), otherwise it is the one starting from the instance root node
(including it). In the later case it is the same as getPathInSchema().
getPathInSchema()public Path getPathInSchema()
getPathInAdaptation()public boolean isComplex()
true if this node is a complex element declaration.
public boolean isValueEqual(Object aFirstValue,
Object aSecondValue)
true if values specified are equal, according to the underlying XML Schema type.
For example, if the underlying type is xs:date, both occurrences specified must
be Date instances. In addition, equality checking will not take into account the hours,
minutes, etc. of the Java Date. However a xs:dateTime type would take
into account hours and minutes.
ClassCastException - if a specified value is not an instance of underlying type.
public 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.
public boolean isValueStrictlyLessThan(Object aFirstValue,
Object aSecondValue)
true if first value is stricty less than 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.public boolean isTerminalValue()
true if this node is adaptation terminal.
An adaptation terminal node is a node that holds a Java value in adaptation instances
and this value can be inherited.
A node is terminal when:
isTerminalValueDescendant());
maxOccurs > 1 (required for a osd:table)
osd:function (see Computed Values)
osd:access (see Access Properties)
isTerminalValueDescendant()public boolean isTerminalValueDescendant()
true if this node is the descendant of a terminal value node.
isTerminalValue()public boolean isTableNode()
true if this node is a table node.
A table root is specified in schema by means of osd:table
declaration (see Table definition).
getTableOccurrenceRootNode()public boolean isSelectNode()
true if this node is a select node.
A select node is specified in schema by means of osd:select extension.
public SchemaNode getTableOccurrenceRootNode()
isTableNode()), returns
the root node of the occurrences' structure.
This method is needed for accessing to the internal structure of a table.
Explanation: Since a table node is considered as a terminal node, it does not provide a direct access to the table node children. Instead those children can only be accessed through the root node of the occurrences' structure (the object returned by this method).
null if this node is not a table node, the root node of the occurrences'
structure otherwise.isTableNode()public boolean isTableOccurrenceNode()
true if this node is in a table occurrence.
public List getEnumerationList(ValueContext aContext)
If a nomenclature facet is defined, it returns the selection of its values.
null if no enumeration facet is defined on the schema.public Nomenclature getEnumerationNomenclature(ValueContext aContext)
Nomenclature. It is searched through facets. If no
nomenclature is found, it returns null.
null if no nomenclature facet is defined on the schema.public Object getDefaultValue()
xs:default),
or null if no value is specified.
public String getLabel(Locale aLocale)
public String getDescription(Locale aLocale)
public UserMessage getMandatoryUserMessage()
osd:mandatoryErrorMessage).
public SchemaNode getNode(Path aPath)
null if no node exists at the path
specified.
If path is relative, it is interpreted regarding this node location. This method is
equivalent as getNode(aPath, true, false).
getPathInSchema()
public SchemaNode getNode(Path aPath,
boolean isTolerantRead,
boolean absolutePathBeginsAtOccurrenceRoot)
throws PathAccessException
aPath - if relative, it is interpreted regarding this node location.isTolerantRead - if true, returns null when no node exists at the location specified;
otherwise it throws PathAccessException.absolutePathBeginsAtOccurrenceRoot - if true and aPath is absolute and this node is in a table, then
the path root is the table root node.
PathAccessException - if no node exists at the path specified and isTolerantRead is false.public SchemaNode[] getNodeChildren()
isTerminalValue()). As a table node is also considered
as a terminal node, it will also return an empty array (for getting the structure of the
table, it is necessary to use method getTableOccurrenceRootNode())
public SchemaLocation getSchemaLocation()
public SchemaTypeName getXsTypeName()
null if this node is associated
to an anonymous type definition.
public String displayOccurrence(Object aValue,
boolean useLabels,
ValueContext aValueContext,
Locale aLocale)
A value can have a display that is different from the standard XML formatted value
(see method formatToXsString):
xs:int, xs:decimal,
etc.), or a date (xs:date, xs:dateTime,
xs:time), it is formatted according to the formatting policy
associated to the locale specified.
useLabels is true and element has a declaration that
enables value labeling.
Value labeling is possible for:
osd:tableRefosd:label inside xs:enumeration);osd:enumeration);osd:constraintEnumeration,
this display is furthermore localized since it calls
ConstraintEnumeration.displayOccurrence)osd:constraintNomenclature,
display used is NomenclatureItem.getDefaultLabel).
If ValueContext specified is retrieved on ProcedureContext
this method will throw an IllegalArgumentException when dynamic or programmatic
labeling involves a call to ValueContext.getValue(Path)
with a relative path.
aValue - The value must be compatible with the current node's type. If the current node
has its maxOccurs > 1,
then value passed as argument must be an element of the List instance,
not the List itself.useLabels - If true and labeling is enabled (see above), specifies that the label
associated to the value must be returned. Otherwise the formatted value is returned.aValueContext - Context holding the value. It must be specified and positionned to this SchemaNode
if label to return depends on a contextual and dynamic resolution based on a relative path (see above).
Otherwise, null is accepted.aLocale - Locale for formatting numbers, dates or getting localized labels (if enabled).getEnumerationList(ValueContext),
getEnumerationNomenclature(ValueContext)public String formatToXsString(Object aValue)
For example, if the underlying type is xs:date, the occurrence specified must
be a Date instance and this method will return the XML Schema representation
of this date.
parseXsString(String)public Object parseXsString(String aString)
For example, if the underlying type is xs:date, the string must conform to
the XML Schema representation of dates (eg "1999-05-31") and this method returns a
Date instance.
formatToXsString(Object)public Class getOccurrencesJavaClass()
Class of the Java occurrences of this schema node,
null if this node is above a terminal node.
isTerminalValue()public Object createNewOccurrence()
The returned value is in conformity with the following rules:
maxOccurs > 1, it does not take account
this fact (that is it returns an occurrence 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)).
public Object executeRead(Object aContainerOccurrence)
The parent element has maxOccurs > 1 and it refers to a
complex content. Hence, the parent value will be a Java List of Java objects.
For each object in the list, this method is able to get the value that is associated to this
child node.
The parent element must be a terminal value (see isTerminalValue()) or
the descendant of a terminal value.
aContainerOccurrence - must be an instance (in XML Schema meaning) of the parent node.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
(report a bug)
EBX.Platform 4.5.3 [0607:0003]
Copyright Orchestra Networks 2000-2008. All rights reserved.