Package com.saxonica.ee.jaxp
Class TypedContentHandler.TypeInfoProviderImpl
java.lang.Object
javax.xml.validation.TypeInfoProvider
com.saxonica.ee.jaxp.TypedContentHandler.TypeInfoProviderImpl
- Enclosing class:
TypedContentHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeTypeInfo(int index) Returns the immutableTypeInfoobject for the specified attribute of the current element.Returns the immutableTypeInfoobject for the current element.booleanisIdAttribute(int index) Returnstrueif the specified attribute is determined to be an ID.booleanisSpecified(int index) Returnsfalseif the attribute was added by the validator.
-
Constructor Details
-
TypeInfoProviderImpl
public TypeInfoProviderImpl()
-
-
Method Details
-
getElementTypeInfo
Returns the immutableTypeInfoobject for the current element.- Specified by:
getElementTypeInfoin classTypeInfoProvider- Returns:
- An immutable
TypeInfoobject that represents the type of the current element. Note that the caller can keep references to the obtainedTypeInfolonger than the callback scope.Otherwise, this method returns null if the validator is unable to determine the type of the current element for some reason
-
getAttributeTypeInfo
Returns the immutableTypeInfoobject for the specified attribute of the current element.The method may only be called by the startElement event of the
ContentHandlerthat the application sets to theValidatorHandler.- Specified by:
getAttributeTypeInfoin classTypeInfoProvider- Parameters:
index- The index of the attribute. The same index for theAttributesobject passed to thestartElementcallback.- Returns:
- An immutable
TypeInfoobject that represents the type of the specified attribute. Note that the caller can keep references to the obtainedTypeInfolonger than the callback scope.Otherwise, this method returns null if the validator is unable to determine the type.
- Throws:
IndexOutOfBoundsException- If the index is invalid.IllegalStateException- If this method is called from otherContentHandlermethods.
-
isIdAttribute
public boolean isIdAttribute(int index) Returnstrueif the specified attribute is determined to be an ID.- Specified by:
isIdAttributein classTypeInfoProvider- Parameters:
index- The index of the attribute. The same index for theAttributesobject passed to thestartElementcallback.- Returns:
- true if the type of the specified attribute is ID.
-
isSpecified
public boolean isSpecified(int index) Returnsfalseif the attribute was added by the validator.- Specified by:
isSpecifiedin classTypeInfoProvider- Parameters:
index- The index of the attribute. The same index for theAttributesobject passed to thestartElementcallback.- Returns:
trueif the attribute was present before the validator processes input.falseif the attribute was added by the validator.
-