@API(type=INTERNAL, src=PUBLIC) public class TEIP5IDTypeRecognizer extends IDTypeRecognizer
MODE_LOCATE_DECLARATIONS, MODE_LOCATE_REFERENCES
Constructor and Description |
---|
TEIP5IDTypeRecognizer() |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
isDefaultIDTypeRecognitionAvailable()
If
false then disable the default recognition of the IDs based on the current associated schema. |
boolean |
isIDTypeRecognitionAvailable()
If true then ID type recognition is available.
|
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 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
IDTypeRecognizer
detectIDType
in class IDTypeRecognizer
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.IDTypeRecognizer.detectIDType(java.lang.String, ro.sync.contentcompletion.xml.Context, java.lang.String, java.lang.String, java.lang.String, int)
public int[] locateIDType(java.lang.String systemID, Context context, java.lang.String attrName, java.lang.String attrNs, java.lang.String attributeValue, IDTypeIdentifier idIdentifier, short mode)
IDTypeRecognizer
locateIDType
in class IDTypeRecognizer
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 IDTypeRecognizer.MODE_LOCATE_REFERENCES
and IDTypeRecognizer.MODE_LOCATE_DECLARATIONS
.IDTypeRecognizer.locateIDType(java.lang.String, ro.sync.contentcompletion.xml.Context, java.lang.String, java.lang.String, java.lang.String, ro.sync.ecss.extensions.api.link.IDTypeIdentifier, short)
public boolean isDefaultIDTypeRecognitionAvailable()
IDTypeRecognizer
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.isDefaultIDTypeRecognitionAvailable
in class IDTypeRecognizer
IDTypeRecognizer.isDefaultIDTypeRecognitionAvailable()
public boolean isIDTypeRecognitionAvailable()
IDTypeRecognizer
isIDTypeRecognitionAvailable
in class IDTypeRecognizer
IDTypeRecognizer.isIDTypeRecognitionAvailable()
© Copyright SyncRO Soft SRL 2002 - 2014. All rights reserved.