Class Validator
java.lang.Object
org.apache.xmlbeans.impl.validator.Validator
- All Implemented Interfaces:
ValidatorListener
public final class Validator extends Object implements ValidatorListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.xmlbeans.impl.common.ValidatorListener
ValidatorListener.Event -
Field Summary
-
Constructor Summary
Constructors Constructor Description Validator(SchemaType type, SchemaField field, SchemaTypeLoader globalLoader, XmlOptions options, Collection<XmlError> defaultErrorListener) -
Method Summary
Modifier and Type Method Description booleangetBooleanValue()byte[]getByteArrayValue()SchemaLocalAttributegetCurrentAttribute()SchemaLocalElementgetCurrentElement()SchemaTypegetCurrentElementSchemaType()SchemaAttributeModelgetCurrentWildcardAttribute()SchemaParticlegetCurrentWildcardElement()BigDecimalgetDecimalValue()doublegetDoubleValue()floatgetFloatValue()GDategetGDateValue()GDurationgetGDurationValue()List<SchemaType>getListTypes()List<Object>getListValue()QNamegetQNameValue()StringgetStringValue()SchemaTypegetUnionType()booleanisValid()voidnextEvent(int kind, ValidatorListener.Event event)
-
Constructor Details
-
Validator
public Validator(SchemaType type, SchemaField field, SchemaTypeLoader globalLoader, XmlOptions options, Collection<XmlError> defaultErrorListener)
-
-
Method Details
-
isValid
public boolean isValid() -
nextEvent
- Specified by:
nextEventin interfaceValidatorListener
-
getCurrentElementSchemaType
- Returns:
- Returns the SchemaType of the current element.
This can be different than getCurrentElement().getType() if xsi:type attribute is used.
Null is returned if no schema type is available.
For attribute types use
getCurrentAttribute().getType(). Warning: the returned SchemaType can be anXmlBeans.NO_TYPE, seeSchemaType.isNoType(). Or can be the parent type, for unrecognized elements that are part of wildcards.
-
getCurrentElement
- Returns:
- Returns the curent local element, null if one is not available, see
getCurrentWildcardElement().
-
getCurrentWildcardElement
- Returns:
- Returns the current particle, if this is a wildcard particle
SchemaParticle.WILDCARDmethodgetCurrentElement()might return null if wildcard's processContents is skip or lax.
-
getCurrentAttribute
- Returns:
- Returns the curent local attribute, global attribute if the current attribute is part of an attribute wildcard, or null if none is available.
-
getCurrentWildcardAttribute
- Returns:
- Returns the attribute model for attributes if available, else null is returned.
-
getStringValue
-
getDecimalValue
-
getBooleanValue
public boolean getBooleanValue() -
getFloatValue
public float getFloatValue() -
getDoubleValue
public double getDoubleValue() -
getQNameValue
-
getGDateValue
-
getGDurationValue
-
getByteArrayValue
public byte[] getByteArrayValue() -
getListValue
-
getListTypes
-
getUnionType
-