Package ro.sync.ecss.component.resolvers
Class AuthorReferenceResolverWrapper
java.lang.Object
ro.sync.ecss.component.resolvers.AuthorReferenceResolverWrapper
- All Implemented Interfaces:
AuthorReferenceResolver,Extension
@API(type=EXTENDABLE,
src=PUBLIC)
public class AuthorReferenceResolverWrapper
extends Object
implements AuthorReferenceResolver
Adapter used to make wrappers over
AuthorReferenceResolver.- Since:
- 18.1
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorReferenceResolverWrapper(AuthorReferenceResolver wrappedResolver) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowsValidatationForEditableReference(String systemID, AuthorNode referenceNodeParent) Check if the editable node reference can be validated by Oxygen on its own, when modified, based on its own schema information.getDisplayName(AuthorNode node) Returns the name of the node that contains the expanded referred content.getReferenceSystemID(AuthorNode node, AuthorAccess authorAccess) Return the systemID of the referred content.Get an unique identifier for the node reference.booleanhasEditableReference(String systemID, AuthorNode referenceNodeParent) Check if the node is editable.booleanhasReferences(AuthorNode node) Verifies if the handler considers the node to have references.booleanisReferenceChanged(AuthorNode node, String attributeName) Verifies if the references of the given node must be refreshed when the attribute with the specified name has changed.voidreplaceReference(AuthorDocumentProvider targetProvider, AuthorAccess authorAccess, AuthorReferenceNode referenceNode) Replace the content of the referenced node from the target document with the modified content inside the reference node.resolveReference(AuthorNode node, String systemID, AuthorAccess authorAccess, EntityResolver entityResolver) Resolve the references of the node.
-
Constructor Details
-
AuthorReferenceResolverWrapper
Constructor.- Parameters:
wrappedResolver- The wrapped resolver.
-
-
Method Details
-
getDescription
- Specified by:
getDescriptionin interfaceExtension- Returns:
- The description of the extension.
- See Also:
-
hasReferences
Description copied from interface:AuthorReferenceResolverVerifies if the handler considers the node to have references.
For example the method should returntruefor a DITA element that hasconrefattribute set.- Specified by:
hasReferencesin interfaceAuthorReferenceResolver- Parameters:
node- The node to be analyzed.- Returns:
trueif it has references.- See Also:
-
isReferenceChanged
Description copied from interface:AuthorReferenceResolverVerifies if the references of the given node must be refreshed when the attribute with the specified name has changed.
For example the DITA implementation returnstruewhen the attribute name is equal to'conref'.- Specified by:
isReferenceChangedin interfaceAuthorReferenceResolver- Parameters:
node- TheAuthorNodewith the references.attributeName- The name of the changed attribute.- Returns:
trueif the references must be refreshed.- See Also:
-
resolveReference
public SAXSource resolveReference(AuthorNode node, String systemID, AuthorAccess authorAccess, EntityResolver entityResolver) Description copied from interface:AuthorReferenceResolverResolve the references of the node. The returningSAXSourcewill be used for creating the referred content using the parser and the source inside it.
IMPORTANT: the SAXSource needs to have an XMLReader set to it.
For example the DITA implementation resolves the content referred by theconrefattribute.- Specified by:
resolveReferencein interfaceAuthorReferenceResolver- Parameters:
node- The node which has references.systemID- The system ID of the node with references.authorAccess- The author access implementation. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.entityResolver- The entity resolver that can be used to resolve:- Resources that are already opened in editor.
For this case the
InputSourcewill contain the editor content. - Resources resolved through XML catalog.
- Resources that are already opened in editor.
For this case the
- Returns:
- The
SAXSourceincluding the parser and the parser'sInputSource.
IMPORTANT: the SAXSource needs to have an XMLReader set to it. - See Also:
-
getDisplayName
Description copied from interface:AuthorReferenceResolverReturns the name of the node that contains the expanded referred content.
For example the value of theconrefattribute is returned by the DITA implementation.- Specified by:
getDisplayNamein interfaceAuthorReferenceResolver- Parameters:
node- The node that contains references.- Returns:
- The display name of the node.
- See Also:
-
getReferenceUniqueID
Description copied from interface:AuthorReferenceResolverGet an unique identifier for the node reference. The unique identifier is used to avoid resolving the references recursively.
For example the DITA implementation uses the value of theconrefattribute as the unique identifier.- Specified by:
getReferenceUniqueIDin interfaceAuthorReferenceResolver- Parameters:
node- The node that has reference.- Returns:
- An unique identifier for the reference node.
- See Also:
-
getReferenceSystemID
Description copied from interface:AuthorReferenceResolverReturn the systemID of the referred content.- Specified by:
getReferenceSystemIDin interfaceAuthorReferenceResolver- Parameters:
node- The reference node.authorAccess- The author access. It provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.- Returns:
- The systemID of the referred content.
- See Also:
-
getWrappedResolver
- Returns:
- Returns the wrapped resolver.
-
hasEditableReference
Description copied from interface:AuthorReferenceResolverCheck if the node is editable.- Specified by:
hasEditableReferencein interfaceAuthorReferenceResolver- Parameters:
systemID- System ID of the document in which the current node is located.referenceNodeParent- The parent of the future referene node- Returns:
trueif the node is editable.- See Also:
-
allowsValidatationForEditableReference
public boolean allowsValidatationForEditableReference(String systemID, AuthorNode referenceNodeParent) Description copied from interface:AuthorReferenceResolverCheck if the editable node reference can be validated by Oxygen on its own, when modified, based on its own schema information.- Specified by:
allowsValidatationForEditableReferencein interfaceAuthorReferenceResolver- Parameters:
systemID- System ID of the document in which the current node is located.referenceNodeParent- The parent of the future reference node- Returns:
trueif the editable node reference can be validated by Oxygen on its own, based on its own schema information.- See Also:
-
replaceReference
public void replaceReference(AuthorDocumentProvider targetProvider, AuthorAccess authorAccess, AuthorReferenceNode referenceNode) throws IOException Description copied from interface:AuthorReferenceResolverReplace the content of the referenced node from the target document with the modified content inside the reference node.- Specified by:
replaceReferencein interfaceAuthorReferenceResolver- Parameters:
targetProvider- The provider if the target document.authorAccess- Access to the current document.referenceNode- The reference node to get the modified content from.- Throws:
IOException- If the save process fails- See Also:
-