@API(type=INTERNAL,
     src=PUBLIC)
public abstract class DefaultUniqueAttributesRecognizer
extends java.lang.Object
implements UniqueAttributesRecognizer, ClipboardFragmentProcessor
| Modifier and Type | Field and Description | 
|---|---|
protected AuthorAccess | 
authorAccess
The author access 
 | 
protected java.lang.String | 
idAttrQname
The ID attribute qname 
 | 
| Constructor and Description | 
|---|
DefaultUniqueAttributesRecognizer(java.lang.String idAttrQname)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
activated(AuthorAccess authorAccess)
Method called when the Author extension was activated. 
 | 
void | 
assignUniqueIDs(int startOffset,
               int endOffset,
               boolean forceGeneration)
Assigns unique IDs between a start and an end offset in the document. 
 | 
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. 
 | 
void | 
deactivated(AuthorAccess authorAccess)
Method called when the Author extension was deactivated. 
 | 
protected java.lang.String | 
generateUniqueIDFor(java.lang.String idGenerationPattern,
                   AuthorElement element)
Generate an unique ID for an element 
 | 
protected abstract GenerateIDElementsInfo | 
getDefaultOptions()  | 
protected java.lang.String | 
getGenerateIDAttributeQName(AuthorElement element,
                           java.lang.String[] elemsWithAutoGeneration,
                           boolean forceGeneration)  | 
GenerateIDElementsInfo | 
getGenerateIDElementsInfo()  | 
boolean | 
isAutoIDGenerationActive()  | 
void | 
process(ClipboardFragmentInformation fragmentInformation)
Process a fragment in the clipboard before inserting it in the document. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescriptionprotected final java.lang.String idAttrQname
protected AuthorAccess authorAccess
public DefaultUniqueAttributesRecognizer(java.lang.String idAttrQname)
idAttrQname - The ID attribute qnamepublic boolean copyAttributeOnSplit(java.lang.String attrQName,
                           AuthorElement element)
UniqueAttributesProcessorcopyAttributeOnSplit in interface UniqueAttributesProcessorattrQName - The attribute qualified name.element - The element.true if the attribute should be copied when Split is performed.UniqueAttributesProcessor.copyAttributeOnSplit(java.lang.String, ro.sync.ecss.extensions.api.node.AuthorElement)public void activated(AuthorAccess authorAccess)
AuthorExtensionStateListenerAuthorMouseListener or AuthorListener 
 can be added at this point.activated in interface AuthorExtensionStateListenerauthorAccess - The AuthorAccess of the Author page where the 
 listener was activated.AuthorExtensionStateListener.activated(ro.sync.ecss.extensions.api.AuthorAccess)public void deactivated(AuthorAccess authorAccess)
AuthorExtensionStateListenerdeactivated in interface AuthorExtensionStateListenerauthorAccess - The AuthorAccess of the Author page where the
 listener was deactivated.AuthorExtensionStateListener.deactivated(ro.sync.ecss.extensions.api.AuthorAccess)protected abstract GenerateIDElementsInfo getDefaultOptions()
public boolean isAutoIDGenerationActive()
isAutoIDGenerationActive in interface UniqueAttributesRecognizerprotected java.lang.String getGenerateIDAttributeQName(AuthorElement element, java.lang.String[] elemsWithAutoGeneration, boolean forceGeneration)
element - The current element.elemsWithAutoGeneration - The array of elements for which generation is activatedforceGeneration - Force ID generation if there is no selection.protected java.lang.String generateUniqueIDFor(java.lang.String idGenerationPattern,
                                   AuthorElement element)
idGenerationPattern - The pattern for id generation.element - The elementpublic void assignUniqueIDs(int startOffset,
                   int endOffset,
                   boolean forceGeneration)
UniqueAttributesProcessorassignUniqueIDs in interface UniqueAttributesProcessorstartOffset - Start offset.endOffset - End offset.forceGeneration - true to generate ID even if the ID generation pattern list
                        does not match.UniqueAttributesProcessor.assignUniqueIDs(int, int, boolean)public GenerateIDElementsInfo getGenerateIDElementsInfo()
public void process(ClipboardFragmentInformation fragmentInformation)
ClipboardFragmentProcessorprocess in interface ClipboardFragmentProcessorfragmentInformation - Information about a fragment in the clipboard.ClipboardFragmentProcessor.process(ro.sync.ecss.extensions.api.content.ClipboardFragmentInformation)© Copyright SyncRO Soft SRL 2002 - 2014. All rights reserved.