Package com.orchestranetworks.schema.info

# Interface SchemaFacetEnumeration

All Superinterfaces:
  `SchemaFacet`

All Known Subinterfaces:
  `SchemaFacetTableRef`

public interface SchemaFacetEnumeration extends SchemaFacet
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 key` constraint (`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 constraint` defined 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 constraint` defined in a Java class (deprecated);
- a `osd:FacetOResource` constraint.

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 Type
  Method
  Description
  `boolean`
  `containsValue(Object aValue, ValueContext aValueContext)`
  Returns `true` if the current enumeration or nomenclature contains the given value.
  `SchemaNode`
  `getEnumerationNode()`
  If this facet is dynamic, returns the node whose value is a `List` that contains the enumeration.
  `<T> Nomenclature<T>`
  `getNomenclature()`
  Returns the nomenclature defined in the data model.
  `Path`
  `getPathToNomenclature()`
  If this facet is dynamic, returns the `path` defined in the data model.
  `Path`
  `getPathToValues()`
  Returns the `path` defined in the data model, if this facet is dynamic.
  `<T> List<T>`
  `getValues()`
  Returns the values of this enumeration if it is statically defined in the data model.
  `boolean`
  `isConstraintEnumeration()`
  Returns `true` if this enumeration is programmatic (declared using the element `osd:constraintEnumeration`).
  `boolean`
  `isEnumerationStatic()`
  Returns `true` if this enumeration is static (declared using the element `xs: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()
    Returns `true` if this enumeration is static (declared using the element `xs:enumeration`).

  - ### isConstraintEnumeration

    boolean isConstraintEnumeration()
    Returns `true` if this enumeration is programmatic (declared using the element `osd:constraintEnumeration`).
    See Also:
      - `ConstraintEnumeration`

  - ### getValues

    <T> List<T> getValues()
    Returns the values of this enumeration if it is statically defined in the data model. Returns `null` if this enumeration is dynamic or is a `SchemaFacetTableRef`.

  - ### getPathToValues

    Path getPathToValues()
    Returns the `path` defined in the data model, if this facet is dynamic. Returns `null` if 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 a `List` that contains the enumeration. Returns `null` if this enumeration:
    - is static,
    - is a foreign key constraint,
    - defines a Java class.

  - ### getNomenclature

    <T> Nomenclature<T> getNomenclature()
    Returns the nomenclature defined in the data model. Returns `null` if this enumeration is dynamic or is not a nomenclature.
    See Also:
      - `SchemaFacet.isEnumerationNomenclature()`
      - `Nomenclature`

  - ### getPathToNomenclature

    Path getPathToNomenclature()
    If this facet is dynamic, returns the `path` defined in the data model. Returns `null` if this enumeration:
    - is not a nomenclature,
    - is a static nomenclature,
    - defines a Java class.

  - ### containsValue

    boolean containsValue(Object aValue, ValueContext aValueContext)
    Returns `true` if the current enumeration or nomenclature contains the given value.