org.jbind.xml.schema.element
Class Facet
java.lang.Object
org.jbind.xml.schema.element.Parent
org.jbind.xml.schema.element.Element
org.jbind.xml.schema.element.OpenAttributes
org.jbind.xml.schema.element.Annotated
org.jbind.xml.schema.element.Facet
- All Implemented Interfaces:
- IAnnotated, IElement, IFacet, IHasBindingAttributes, IHasLocation, INode, IOpenAttributes, IParent, ISourceInfo, IXmlElement, IXmlNode
- Direct Known Subclasses:
- DigitsFacet, EnumerationFacet, LengthFacet, OrderFacet, PatternFacet, WhiteSpaceFacet
- public abstract class Facet
- extends Annotated
- implements IFacet
Methods inherited from class org.jbind.xml.schema.element.Element |
acceptAppInfoVisitor, addAttribute, createChild, createGlobalRef, getAttributes, getBindingAttribute, getBoolean, getChildByClass, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalName, getLocalStringBindingAttribute, getLocation, getNamespace, getNamespaceUri, getParent_, getParentHelper, getPrefix, getPrefixToNamespaceMapping, getQName, getSchema, getSchemaDocument, getSchemaElement, getStringBindingAttribute, getSubElement, getTargetNamespace, isTopLevelComponent, iterChildrenByClass, setLocation, setParent_, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Facet
public Facet(CreationParams aCreationParams,
ConstraintType aConstraintType)
doCreateAttribute
protected IAttribute doCreateAttribute(ACParams anACParams)
throws XmlException
- Description copied from class:
Element
- Hook method to create an attribute.
- Overrides:
doCreateAttribute
in class Annotated
- Throws:
XmlException
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interface IFacet
getFixed
public boolean getFixed()
- Specified by:
getFixed
in interface IFacet
validateElement
public void validateElement(IElemValHelper aHelper,
IConstraintViolations aViolations)
- Specified by:
validateElement
in interface IElement
- Overrides:
validateElement
in class Annotated
getIntValue
protected int getIntValue()
throws XmlException
- Throws:
XmlException
createValueData
protected IAnyTypeData createValueData(IAnyType aType)
throws XmlException
- Throws:
XmlException
apply
public final void apply(ISimpleType aType,
IConstraints aConstraints,
IConstraintViolations aViolations)
- Description copied from interface:
IFacet
- Applies the facet on the specified constraints. In order to apply a facet
often its string value must be converted into a data object. This conversion
is done by the supplied type.
- Specified by:
apply
in interface IFacet
- Parameters:
aType
- (required).aViolations
- (required)
doAddConstraint
protected abstract void doAddConstraint(IAnyType aType,
IConstraints aConstraints,
IConstraintViolations aViolations)
throws XmlException
- Throws:
XmlException
getConstraintType
protected ConstraintType getConstraintType()