Oxygen XML Editor 12.2 Author API

ro.sync.ecss.extensions.api
Interface AuthorReferenceResolver

All Superinterfaces:
Extension
All Known Subinterfaces:
DITAMapReferencesResolver, ValidatingAuthorReferenceResolver
All Known Implementing Classes:
DITAConRefResolver, DITAMapRefResolver

public interface AuthorReferenceResolver
extends Extension

Interface for the custom handlers used to expand content references.


Method Summary
 java.lang.String getDisplayName(AuthorNode node)
          Returns the name of the node that contains the expanded referred content.
 java.lang.String getReferenceSystemID(AuthorNode node, AuthorAccess authorAccess)
          Return the systemID of the referred content.
 java.lang.String getReferenceUniqueID(AuthorNode node)
          Get an unique identifier for the node reference.
 boolean hasReferences(AuthorNode node)
          Verifies if the handler considers the node to have references.
 boolean isReferenceChanged(AuthorNode node, java.lang.String attributeName)
          Verifies if the references of the given node must be refreshed when the attribute with the specified name has changed.
 javax.xml.transform.sax.SAXSource resolveReference(AuthorNode node, java.lang.String systemID, AuthorAccess authorAccess, org.xml.sax.EntityResolver entityResolver)
          Resolve the references of the node.
 
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
 

Method Detail

hasReferences

boolean hasReferences(AuthorNode node)
Verifies if the handler considers the node to have references.
For example the method should return true for a DITA element that has conref attribute set.

Parameters:
node - The node to be analyzed.
Returns:
true if it has references.

isReferenceChanged

boolean isReferenceChanged(AuthorNode node,
                           java.lang.String attributeName)
Verifies if the references of the given node must be refreshed when the attribute with the specified name has changed.
For example the DITA implementation returns true when the attribute name is equal to 'conref'.

Parameters:
node - The AuthorNode with the references.
attributeName - The name of the changed attribute.
Returns:
true if the references must be refreshed.

resolveReference

javax.xml.transform.sax.SAXSource resolveReference(AuthorNode node,
                                                   java.lang.String systemID,
                                                   AuthorAccess authorAccess,
                                                   org.xml.sax.EntityResolver entityResolver)
Resolve the references of the node. The returning SAXSource will be used for creating the referred content using the parser and the source inside it.
For example the DITA implementation resolves the content referred by the conref attribute.

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 InputSource will contain the editor content.
  • Resources resolved through XML catalog.
Returns:
The SAXSource including the parser and the parser's InputSource.

getDisplayName

java.lang.String getDisplayName(AuthorNode node)
Returns the name of the node that contains the expanded referred content.
For example the value of the conref attribute is returned by the DITA implementation.

Parameters:
node - The node that contains references.
Returns:
The display name of the node.

getReferenceUniqueID

java.lang.String getReferenceUniqueID(AuthorNode node)
Get 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 the conref attribute as the unique identifier.

Parameters:
node - The node that has reference.
Returns:
An unique identifier for the reference node.

getReferenceSystemID

java.lang.String getReferenceSystemID(AuthorNode node,
                                      AuthorAccess authorAccess)
Return the systemID of the referred content.

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.

Oxygen XML Editor 12.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.