Package com.orchestranetworks.schema.info

# Interface SchemaFacet

All Known Subinterfaces:
  `SchemaFacetBoundary`, `SchemaFacetBoundaryMaxExclusive`, `SchemaFacetBoundaryMaxInclusive`, `SchemaFacetBoundaryMinExclusive`, `SchemaFacetBoundaryMinInclusive`, `SchemaFacetEnumeration`, `SchemaFacetExcludeSegment`, `SchemaFacetExcludeValue`, `SchemaFacetFractionDigits`, `SchemaFacetLength`, `SchemaFacetMaxLength`, `SchemaFacetMinLength`, `SchemaFacetOnLength`, `SchemaFacetOnMandatoryField`, `SchemaFacetPattern`, `SchemaFacetTableRef`, `SchemaFacetTotalDigits`

public interface SchemaFacet
Common interface for constraints on data types (also known as constraining facets in XML Schema).

See Also:
  - XML Schema, W3C Recommendation
  - dynamic constraints

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDocumentation(Locale aLocale, ValueContext aContext)`
  Returns the end-user documentation for this facet.
  `SchemaFacetValidationMessage`
  `getFacetValidationMessage()`
  Returns the validation message defined in the data model.
  `SchemaNode`
  `getSchemaNode()`
  Returns the node associated to this facet.
  `SchemaFacetValidationPolicy`
  `getValidationPolicy()`
  Returns the validation policy of this facet.
  `boolean`
  `isEnumerationList()`
  Returns `true` if this facet defines an enumeration of possible values.
  `boolean`
  `isEnumerationNomenclature()`
  Returns `true` if this facet defines a nomenclature.
  `boolean`
  `isEnumerationTableRef()`
  Returns `true` if this facet is a foreign key constraint (`osd:tableRef`).
  `boolean`
  `isFacetBoundaryMaxExclusive()`
  Returns `true` if this facet is a `maxExclusive` facet.
  `boolean`
  `isFacetBoundaryMaxInclusive()`
  Returns `true` if this facet is a `maxInclusive` facet.
  `boolean`
  `isFacetBoundaryMinExclusive()`
  Returns `true` if this facet is a `minExclusive` facet.
  `boolean`
  `isFacetBoundaryMinInclusive()`
  Returns `true` if this facet is a `minInclusive` facet.
  `boolean`
  `isFacetEnumeration()`
  Returns `true` if this facet defines either an `enumeration` or a `nomenclature`.
  `boolean`
  `isFacetExcludeSegment()`
  Returns `true` if this facet is an `excludeSegment` facet.
  `boolean`
  `isFacetExcludeValue()`
  Returns `true` if this facet is an `excludeValue` facet.
  `boolean`
  `isFacetFractionDigits()`
  Returns `true` if this facet is a `fractionDigits` facet.
  `boolean`
  `isFacetLength()`
  Returns `true` if this facet is a `length` facet.
  `boolean`
  `isFacetMaxLength()`
  Returns `true` if this facet is a `maxLength` facet.
  `boolean`
  `isFacetMinLength()`
  Returns `true` if this facet is a `minLength` facet.
  `boolean`
  `isFacetOnMandatoryField()`
  Returns `true` if this facet is related to a mandatory field (defines both `minOccurs="1"``maxOccurs="1"`).````
  `boolean`
  `isFacetOResource()`
  Returns `true` if this facet is a `resource` constraint.
  `boolean`
  `isFacetPattern()`
  Returns `true` if this facet is a `pattern` facet.
  `boolean`
  `isFacetTotalDigits()`
  Returns `true` if this facet is a `totalDigits` facet.

- ## Method Details

  - ### getSchemaNode

    SchemaNode getSchemaNode()
    Returns the node associated to this facet.
    Since:
      6.0.0

  - ### getDocumentation

    String getDocumentation(Locale aLocale, ValueContext aContext)
    Returns the end-user documentation for this facet. This method can return `null` on programmatic extended facets if it is called during the compilation of the associated data model.
    Throws:
      `IllegalArgumentException` - if an argument is `null`.
    See Also:
      - `Constraint.toUserDocumentation(Locale, ValueContext)`

  - ### isFacetOnMandatoryField

    boolean isFacetOnMandatoryField()
    Returns `true` if this facet is related to a mandatory field (defines both `minOccurs="1"``maxOccurs="1"`).````
    Since:
      6.0.0
    See Also:
      - `SchemaFacetOnMandatoryField`

  - ### isFacetLength

    boolean isFacetLength()
    Returns `true` if this facet is a `length` facet.
    See Also:
      - `SchemaFacetLength`

  - ### isFacetMinLength

    boolean isFacetMinLength()
    Returns `true` if this facet is a `minLength` facet.
    See Also:
      - `SchemaFacetMinLength`

  - ### isFacetMaxLength

    boolean isFacetMaxLength()
    Returns `true` if this facet is a `maxLength` facet.
    See Also:
      - `SchemaFacetMaxLength`

  - ### isFacetPattern

    boolean isFacetPattern()
    Returns `true` if this facet is a `pattern` facet.
    See Also:
      - `SchemaFacetPattern`

  - ### isFacetOResource

    boolean isFacetOResource()
    Returns `true` if this facet is a `resource` constraint.
    See Also:
      - `SchemaFacetOResource`

  - ### isEnumerationList

    boolean isEnumerationList()
    Returns `true` if this facet defines an enumeration of possible values. This is the case for the following facets:
    - a `foreign key` constraint;
    - a static enumeration defined with the standard XML Schema facet `xs:enumeration`;
    - a dynamic enumeration defined with the extended facet `osd:enumeration`;
    - a programmatic `enumeration constraint`.
    See Also:
      - `SchemaFacetEnumeration`

  - ### isEnumerationNomenclature

    boolean isEnumerationNomenclature()
    Returns `true` if this facet defines a nomenclature. This is the case for the following facets:
    - a static nomenclature defined with the extended facet `osd:nomenclature` (deprecated);
    - a resource facet, `osd:FacetOResource`;
    - a dynamic nomenclature defined with the extended facet `osd:nomenclature` (deprecated);
    - a programmatic `nomenclature constraint` (deprecated).
    See Also:
      - `SchemaFacetEnumeration`

  - ### isFacetEnumeration

    boolean isFacetEnumeration()
    Returns `true` if this facet defines either an `enumeration` or a `nomenclature`.
    See Also:
      - `isEnumerationList()`
      - `isEnumerationNomenclature()`
      - `SchemaFacetEnumeration`

  - ### isEnumerationTableRef

    boolean isEnumerationTableRef()
    Returns `true` if this facet is a foreign key constraint (`osd:tableRef`).
    See Also:
      - `SchemaFacetTableRef`

  - ### isFacetBoundaryMaxInclusive

    boolean isFacetBoundaryMaxInclusive()
    Returns `true` if this facet is a `maxInclusive` facet.
    See Also:
      - `SchemaFacetBoundaryMaxInclusive`

  - ### isFacetBoundaryMaxExclusive

    boolean isFacetBoundaryMaxExclusive()
    Returns `true` if this facet is a `maxExclusive` facet.
    See Also:
      - `SchemaFacetBoundaryMaxExclusive`

  - ### isFacetBoundaryMinExclusive

    boolean isFacetBoundaryMinExclusive()
    Returns `true` if this facet is a `minExclusive` facet.
    See Also:
      - `SchemaFacetBoundaryMinExclusive`

  - ### isFacetBoundaryMinInclusive

    boolean isFacetBoundaryMinInclusive()
    Returns `true` if this facet is a `minInclusive` facet.
    See Also:
      - `SchemaFacetBoundaryMinInclusive`

  - ### isFacetTotalDigits

    boolean isFacetTotalDigits()
    Returns `true` if this facet is a `totalDigits` facet.
    See Also:
      - `SchemaFacetTotalDigits`

  - ### isFacetFractionDigits

    boolean isFacetFractionDigits()
    Returns `true` if this facet is a `fractionDigits` facet.
    See Also:
      - `SchemaFacetFractionDigits`

  - ### isFacetExcludeValue

    boolean isFacetExcludeValue()
    Returns `true` if this facet is an `excludeValue` facet.
    See Also:
      - `SchemaFacetExcludeValue`

  - ### isFacetExcludeSegment

    boolean isFacetExcludeSegment()
    Returns `true` if this facet is an `excludeSegment` facet.
    See Also:
      - `SchemaFacetExcludeSegment`

  - ### getValidationPolicy

    SchemaFacetValidationPolicy getValidationPolicy()
    Returns the validation policy of this facet. Validation policy properties are defined under the element `osd:validation`.
    Since:
      5.8.1
    See Also:
      - `SchemaFacetValidationPolicy`

  - ### getFacetValidationMessage

    SchemaFacetValidationMessage getFacetValidationMessage()
    Returns the validation message defined in the data model. Validation messages are defined within the element `osd:validation`, `osd:enumerationValidation` or `osd:mandatoryErrorMessage`.
    Since:
      6.0.0
    See Also:
      - `SchemaFacetValidationMessage`