@API(type=EXTENDABLE,
src=PUBLIC)
public abstract class IDTypeRecognizer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static short |
MODE_LOCATE_DECLARATIONS
Mode used when locate an ID.
|
static short |
MODE_LOCATE_REFERENCES
Mode used when locate an ID.
|
Constructor and Description |
---|
IDTypeRecognizer() |
Modifier and Type | Method and Description |
---|---|
abstract java.util.List<IDTypeIdentifier> |
detectIDType(java.lang.String systemID,
Context context,
java.lang.String attrName,
java.lang.String attrNs,
java.lang.String attributeValue,
int offset)
Detect the ID declaration or reference for the provided attribute context and offset.
|
abstract boolean |
isDefaultIDTypeRecognitionAvailable()
If
false then disable the default recognition of the IDs based on the current associated schema. |
abstract boolean |
isIDTypeRecognitionAvailable()
If true then ID type recognition is available.
|
abstract int[] |
locateIDType(java.lang.String systemID,
Context context,
java.lang.String attrName,
java.lang.String attrNs,
java.lang.String attributeValue,
IDTypeIdentifier idIdentifier,
short mode)
Detect if the given ID is located in the specified attribute.
|
public static final short MODE_LOCATE_DECLARATIONS
public static final short MODE_LOCATE_REFERENCES
public abstract java.util.List<IDTypeIdentifier> detectIDType(java.lang.String systemID, Context context, java.lang.String attrName, java.lang.String attrNs, java.lang.String attributeValue, int offset) throws CannotRecognizeIDException
systemID
- The systemID of the resource that specifies the attribute.context
- The element content to detect the ID.
The top element from the context element stack represents the parent element.attrName
- The attribute name.attrNs
- The attribute namespace.attributeValue
- The attribute value.offset
- The offset that is relative to the attribute value. It is zero based.
If it is -1 and the attribute type is IDREFS then all the IDs should be returned.CannotRecognizeIDException
- Exception that can be thrown when an ID cannot be identified in the given context.public abstract int[] locateIDType(java.lang.String systemID, Context context, java.lang.String attrName, java.lang.String attrNs, java.lang.String attributeValue, IDTypeIdentifier idIdentifier, short mode)
systemID
- The systemID of the resource that specifies the attribute.context
- The element content to detect the ID.
The top element from the context element stack represents the parent element.attrName
- The attribute name.attrNs
- The attribute namespace.attributeValue
- The attribute value.idIdentifier
- The ID identifier.mode
- The detection mode that is represented as a bitwise mask.
Supported modes are MODE_LOCATE_REFERENCES
and MODE_LOCATE_DECLARATIONS
.public abstract boolean isDefaultIDTypeRecognitionAvailable()
false
then disable the default recognition of the IDs based on the current associated schema.
Otherwise the IDs declaration and references will be detected for document with DTD, XML Schema or
RelaxNG schemas.public abstract boolean isIDTypeRecognitionAvailable()
© Copyright SyncRO Soft SRL 2002 - 2014. All rights reserved.