Interface SchemaFacetEnumeration
- All Superinterfaces:
SchemaFacet
- All Known Subinterfaces:
SchemaFacetTableRef
This interface represents enumeration facets associated with a node.
The general definition of an enumeration facet is that it constrains the possible
values to a specified set of values. It can be:
- a
foreign keyconstraint (osd:tableRef); - a static enumeration defined by the standard XML Schema facet
xs:enumeration; - a dynamic enumeration defined by the extended facet
osd:enumeration; - an
enumeration constraintdefined in a Java class; - a static nomenclature defined by the extended facet
osd:nomenclature(deprecated); - a dynamic nomenclature defined by the extended facet
osd:nomenclature osd:path="pathToNomenclature"(deprecated); - a
nomenclature constraintdefined in a Java class (deprecated); - a
osd:FacetOResourceconstraint.
- See Also:
-
SchemaNode.getEnumerationList(com.orchestranetworks.instance.ValueContext)SchemaNode.getEnumerationNomenclature(com.orchestranetworks.instance.ValueContext)SchemaFacet.isFacetEnumeration()SchemaFacet.isEnumerationNomenclature()SchemaFacet.isEnumerationList()SchemaFacet.isEnumerationTableRef()- XML Schema, W3C Recommendation
- FacetOResource constraint
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsValue(Object aValue, ValueContext aValueContext) Returnstrueif the current enumeration or nomenclature contains the given value.If this facet is dynamic, returns the node whose value is aListthat contains the enumeration.<T> Nomenclature<T>Returns the nomenclature defined in the data model.If this facet is dynamic, returns thepathdefined in the data model.Returns thepathdefined in the data model, if this facet is dynamic.<T> List<T>Returns the values of this enumeration if it is statically defined in the data model.booleanReturnstrueif this enumeration is programmatic (declared using the elementosd:constraintEnumeration).booleanReturnstrueif this enumeration is static (declared using the elementxs:enumeration).Methods inherited from interface com.orchestranetworks.schema.info.SchemaFacet
getDocumentation, getFacetValidationMessage, getSchemaNode, getValidationPolicy, isEnumerationList, isEnumerationNomenclature, isEnumerationTableRef, isFacetBoundaryMaxExclusive, isFacetBoundaryMaxInclusive, isFacetBoundaryMinExclusive, isFacetBoundaryMinInclusive, isFacetEnumeration, isFacetExcludeSegment, isFacetExcludeValue, isFacetFractionDigits, isFacetLength, isFacetMaxLength, isFacetMinLength, isFacetOnMandatoryField, isFacetOResource, isFacetPattern, isFacetTotalDigits
-
Method Details
-
isEnumerationStatic
boolean isEnumerationStatic()Returnstrueif this enumeration is static (declared using the elementxs:enumeration). -
isConstraintEnumeration
boolean isConstraintEnumeration()Returnstrueif this enumeration is programmatic (declared using the elementosd:constraintEnumeration).- See Also:
-
getValues
Returns the values of this enumeration if it is statically defined in the data model. Returnsnullif this enumeration is dynamic or is aSchemaFacetTableRef. -
getPathToValues
Path getPathToValues()Returns thepathdefined in the data model, if this facet is dynamic. Returnsnullif this enumeration:- is static,
- is a foreign key constraint,
- defines a java class.
-
getEnumerationNode
SchemaNode getEnumerationNode()If this facet is dynamic, returns the node whose value is aListthat contains the enumeration. Returnsnullif this enumeration:- is static,
- is a foreign key constraint,
- defines a Java class.
-
getNomenclature
Returns the nomenclature defined in the data model. Returnsnullif this enumeration is dynamic or is not a nomenclature. -
getPathToNomenclature
Path getPathToNomenclature()If this facet is dynamic, returns thepathdefined in the data model. Returnsnullif this enumeration:- is not a nomenclature,
- is a static nomenclature,
- defines a Java class.
-
containsValue
Returnstrueif the current enumeration or nomenclature contains the given value.
-