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:
  • 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:
    • 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:
    • isFacetLength

      boolean isFacetLength()
      Returns true if this facet is a length facet.
      See Also:
    • isFacetMinLength

      boolean isFacetMinLength()
      Returns true if this facet is a minLength facet.
      See Also:
    • isFacetMaxLength

      boolean isFacetMaxLength()
      Returns true if this facet is a maxLength facet.
      See Also:
    • isFacetPattern

      boolean isFacetPattern()
      Returns true if this facet is a pattern facet.
      See Also:
    • isFacetOResource

      boolean isFacetOResource()
      Returns true if this facet is a resource constraint.
      See Also:
    • 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:
    • 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:
    • isFacetEnumeration

      boolean isFacetEnumeration()
      Returns true if this facet defines either an enumeration or a nomenclature.
      See Also:
    • isEnumerationTableRef

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

      boolean isFacetBoundaryMaxInclusive()
      Returns true if this facet is a maxInclusive facet.
      See Also:
    • isFacetBoundaryMaxExclusive

      boolean isFacetBoundaryMaxExclusive()
      Returns true if this facet is a maxExclusive facet.
      See Also:
    • isFacetBoundaryMinExclusive

      boolean isFacetBoundaryMinExclusive()
      Returns true if this facet is a minExclusive facet.
      See Also:
    • isFacetBoundaryMinInclusive

      boolean isFacetBoundaryMinInclusive()
      Returns true if this facet is a minInclusive facet.
      See Also:
    • isFacetTotalDigits

      boolean isFacetTotalDigits()
      Returns true if this facet is a totalDigits facet.
      See Also:
    • isFacetFractionDigits

      boolean isFacetFractionDigits()
      Returns true if this facet is a fractionDigits facet.
      See Also:
    • isFacetExcludeValue

      boolean isFacetExcludeValue()
      Returns true if this facet is an excludeValue facet.
      See Also:
    • isFacetExcludeSegment

      boolean isFacetExcludeSegment()
      Returns true if this facet is an excludeSegment facet.
      See Also:
    • 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:
    • 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: