XML Schema API: Interface XSFacet

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xerces.xs
Interface XSFacet

All Superinterfaces:
  XSObject

public interface XSFacet
extends XSObject

Describes a constraining facet. Enumeration and pattern facets are exposed via `XSMultiValueFacet` interface.

Method Summary
`java.lang.Object` | `getActualFacetValue()` If this facet is minInclusive, maxInclusive, minExclusive, or maxExclusive, then return the actual value of the facet.
`XSAnnotation` | `getAnnotation()` An annotation if it exists, otherwise `null`.
`XSObjectList` | `getAnnotations()` A sequence of [annotations] or an empty `XSObjectList`.
`short` | `getFacetKind()` The name of the facet, e.g.
`boolean` | `getFixed()` [Facets]: check whether a facet is fixed.
`int` | `getIntFacetValue()` If this facet is length, minLength, maxLength, totalDigits, or fractionDigits, and if the value can fit in "int", then return the value of the facet as an int.
`java.lang.String` | `getLexicalFacetValue()` A value of this facet.

Methods inherited from interface org.apache.xerces.xs.XSObject
`getName, getNamespace, getNamespaceItem, getType`

Method Detail

### getFacetKind

    public short getFacetKind()

  The name of the facet, e.g. `FACET_LENGTH, FACET_TOTALDIGITS` (see `XSSimpleTypeDefinition`).

### getLexicalFacetValue

    public java.lang.String getLexicalFacetValue()

  A value of this facet.

### getIntFacetValue

    public int getIntFacetValue()

  If this facet is length, minLength, maxLength, totalDigits, or fractionDigits, and if the value can fit in "int", then return the value of the facet as an int. If the value can't fit, return -1. Use getActualFacetValue() to get the BigInteger representation. For all other facets, return 0.

### getActualFacetValue

    public java.lang.Object getActualFacetValue()

  If this facet is minInclusive, maxInclusive, minExclusive, or maxExclusive, then return the actual value of the facet. If this facet is length, minLength, maxLength, totalDigits, or fractionDigits, then return a BigInteger representation of the value. If this facet is whiteSpace, then return the String representation of the facet.

### getFixed

    public boolean getFixed()

  [Facets]: check whether a facet is fixed.

### getAnnotation

    public XSAnnotation getAnnotation()

  An annotation if it exists, otherwise `null`. If not null then the first [annotation] from the sequence of annotations.

### getAnnotations

    public XSObjectList getAnnotations()

  A sequence of [annotations] or an empty `XSObjectList`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2018 The Apache Software Foundation. All Rights Reserved.