Package ro.sync.ecss.extensions.dita.id
Class DITAUniqueAttributesRecognizer
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.id.DefaultUniqueAttributesRecognizer
-
- ro.sync.ecss.extensions.dita.id.DITAUniqueAttributesRecognizer
-
- All Implemented Interfaces:
AuthorExtensionStateListener
,ClipboardFragmentProcessor
,Extension
,UniqueAttributesProcessor
,UniqueAttributesRecognizer
@API(type=INTERNAL, src=PUBLIC) public class DITAUniqueAttributesRecognizer extends DefaultUniqueAttributesRecognizer
Unique attributes recognizer for DITA.
-
-
Field Summary
-
Fields inherited from class ro.sync.ecss.extensions.commons.id.DefaultUniqueAttributesRecognizer
authorAccess, idAttrQname
-
-
Constructor Summary
Constructors Constructor Description DITAUniqueAttributesRecognizer()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
copyAttributeOnSplit(java.lang.String attrQName, AuthorElement element)
Checks if the attribute specified by QName can be considered as a valid attribute to copy when the element is split.java.lang.String
getDescription()
protected java.lang.String
getGenerateIDAttributeQName(AuthorElement element, java.lang.String[] elemsWithAutoGeneration, boolean forceGeneration)
void
process(ClipboardFragmentInformation fragmentInformation)
Process a fragment in the clipboard before inserting it in the document.-
Methods inherited from class ro.sync.ecss.extensions.commons.id.DefaultUniqueAttributesRecognizer
activated, assignUniqueIDs, deactivated, generateUniqueIDFor, getDefaultOptions, getDefaultOptionsXMLResourceName, getGenerateIDElementsInfo, isAutoIDGenerationActive, preserveIDsWhenPastingBetweenResources
-
-
-
-
Method Detail
-
copyAttributeOnSplit
public boolean copyAttributeOnSplit(java.lang.String attrQName, AuthorElement element)
Description copied from interface:UniqueAttributesProcessor
Checks if the attribute specified by QName can be considered as a valid attribute to copy when the element is split.- Specified by:
copyAttributeOnSplit
in interfaceUniqueAttributesProcessor
- Overrides:
copyAttributeOnSplit
in classDefaultUniqueAttributesRecognizer
- Parameters:
attrQName
- The attribute qualified name.element
- The element.- Returns:
true
if the attribute should be copied when Split is performed.- See Also:
DefaultUniqueAttributesRecognizer.copyAttributeOnSplit(java.lang.String, ro.sync.ecss.extensions.api.node.AuthorElement)
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interfaceExtension
- Overrides:
getDescription
in classDefaultUniqueAttributesRecognizer
- Returns:
- The description of the extension.
- See Also:
Extension.getDescription()
-
getGenerateIDAttributeQName
protected java.lang.String getGenerateIDAttributeQName(AuthorElement element, java.lang.String[] elemsWithAutoGeneration, boolean forceGeneration)
- Overrides:
getGenerateIDAttributeQName
in classDefaultUniqueAttributesRecognizer
- Parameters:
element
- The current element.elemsWithAutoGeneration
- The array of elements for which generation is activatedforceGeneration
- Force ID generation if there is no selection.- Returns:
- The name of the attribute for which to generate the ID or null (default behavior).
- See Also:
DefaultUniqueAttributesRecognizer.getGenerateIDAttributeQName(ro.sync.ecss.extensions.api.node.AuthorElement, java.lang.String[], boolean)
-
process
public void process(ClipboardFragmentInformation fragmentInformation)
Description copied from interface:ClipboardFragmentProcessor
Process a fragment in the clipboard before inserting it in the document.- Specified by:
process
in interfaceClipboardFragmentProcessor
- Overrides:
process
in classDefaultUniqueAttributesRecognizer
- Parameters:
fragmentInformation
- Information about a fragment in the clipboard.- See Also:
DefaultUniqueAttributesRecognizer.process(ro.sync.ecss.extensions.api.content.ClipboardFragmentInformation)
-
-