org.apache.xmlbeans.impl.validator
Class Validator

java.lang.Object
  extended by org.apache.xmlbeans.impl.validator.Validator
All Implemented Interfaces:
ValidatorListener

public final class Validator
extends java.lang.Object
implements ValidatorListener


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.xmlbeans.impl.common.ValidatorListener
ValidatorListener.Event
 
Field Summary
 
Fields inherited from interface org.apache.xmlbeans.impl.common.ValidatorListener
ATTR, BEGIN, END, ENDATTRS, TEXT
 
Constructor Summary
Validator(SchemaType type, SchemaField field, SchemaTypeLoader globalLoader, XmlOptions options, java.util.Collection defaultErrorListener)
           
 
Method Summary
 boolean getBooleanValue()
           
 byte[] getByteArrayValue()
           
 SchemaLocalAttribute getCurrentAttribute()
           
 SchemaLocalElement getCurrentElement()
           
 SchemaType getCurrentElementSchemaType()
           
 SchemaAttributeModel getCurrentWildcardAttribute()
           
 SchemaParticle getCurrentWildcardElement()
           
 java.math.BigDecimal getDecimalValue()
           
 double getDoubleValue()
           
 float getFloatValue()
           
 GDate getGDateValue()
           
 GDuration getGDurationValue()
           
 java.util.List getListTypes()
           
 java.util.List getListValue()
           
 javax.xml.namespace.QName getQNameValue()
           
 java.lang.String getStringValue()
           
 SchemaType getUnionType()
           
 boolean isValid()
           
 void nextEvent(int kind, ValidatorListener.Event event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

public Validator(SchemaType type,
                 SchemaField field,
                 SchemaTypeLoader globalLoader,
                 XmlOptions options,
                 java.util.Collection defaultErrorListener)
Method Detail

isValid

public boolean isValid()

nextEvent

public void nextEvent(int kind,
                      ValidatorListener.Event event)
Specified by:
nextEvent in interface ValidatorListener

getCurrentElementSchemaType

public SchemaType 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 an XmlBeans.NO_TYPE, see SchemaType.isNoType(). Or can be the parent type, for unrecognized elements that are part of wildcards.

getCurrentElement

public SchemaLocalElement getCurrentElement()
Returns:
Returns the curent local element, null if one is not available, see getCurrentWildcardElement().

getCurrentWildcardElement

public SchemaParticle getCurrentWildcardElement()
Returns:
Returns the current particle, if this is a wildcard particle SchemaParticle.WILDCARD method getCurrentElement() might return null if wildcard's processContents is skip or lax.

getCurrentAttribute

public SchemaLocalAttribute 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

public SchemaAttributeModel getCurrentWildcardAttribute()
Returns:
Returns the attribute model for attributes if available, else null is returned.

getStringValue

public java.lang.String getStringValue()

getDecimalValue

public java.math.BigDecimal getDecimalValue()

getBooleanValue

public boolean getBooleanValue()

getFloatValue

public float getFloatValue()

getDoubleValue

public double getDoubleValue()

getQNameValue

public javax.xml.namespace.QName getQNameValue()

getGDateValue

public GDate getGDateValue()

getGDurationValue

public GDuration getGDurationValue()

getByteArrayValue

public byte[] getByteArrayValue()

getListValue

public java.util.List getListValue()

getListTypes

public java.util.List getListTypes()

getUnionType

public SchemaType getUnionType()