Oxygen XML Editor 11.2 Author API

ro.sync.ecss.extensions.dita.map.topicref
Class DITAMapRefResolver

java.lang.Object
  extended by ro.sync.ecss.extensions.dita.conref.DITAConRefResolver
      extended by ro.sync.ecss.extensions.dita.map.topicref.DITAMapRefResolver
All Implemented Interfaces:
AuthorReferenceResolver, DITAMapReferencesResolver, Extension, ValidatingAuthorReferenceResolver

public class DITAMapRefResolver
extends DITAConRefResolver
implements DITAMapReferencesResolver

Resolves the hrefs to other maps.


Constructor Summary
DITAMapRefResolver()
           
 
Method Summary
 void checkTarget(AuthorNode node, AuthorDocument targetDocument)
          Check if the referenced target can be inserted in the source document
 String getDisplayName(AuthorNode node)
          Returns the value of the href attribute.
 String getReferenceSystemID(AuthorNode node, AuthorAccess authorAccess)
          Get the reference System ID
 String getReferenceUniqueID(AuthorNode node)
          The value of conref attribute is used as the unique identifier.
 boolean hasReferences(AuthorNode node)
          An element that has href attribute is an element with references.
 boolean isReferenceChanged(AuthorNode node, String attributeName)
          Returns true when the attribute name is equal to 'conref'.
 SAXSource resolveReference(AuthorNode node, String systemID, AuthorAccess authorAccess, EntityResolver entityResolver)
          Resolve the content referred by conref attribute.
 void setResolveAllTopicReferences(boolean resolveAllTopicRefs)
          Try to resolve all topic references
 
Methods inherited from class ro.sync.ecss.extensions.dita.conref.DITAConRefResolver
getDescription, getTopicPath, parseDITAHref
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
 

Constructor Detail

DITAMapRefResolver

public DITAMapRefResolver()
Method Detail

hasReferences

public boolean hasReferences(AuthorNode node)
An element that has href attribute is an element with references.

Specified by:
hasReferences in interface AuthorReferenceResolver
Overrides:
hasReferences in class DITAConRefResolver
Parameters:
node - The node to be analyzed.
Returns:
true if it has references.
See Also:
AuthorReferenceResolver.hasReferences(ro.sync.ecss.extensions.api.node.AuthorNode)

getDisplayName

public String getDisplayName(AuthorNode node)
Returns the value of the href attribute.

Specified by:
getDisplayName in interface AuthorReferenceResolver
Overrides:
getDisplayName in class DITAConRefResolver
Parameters:
node - The node that contains references.
Returns:
The display name of the node.
See Also:
AuthorReferenceResolver.getDisplayName(ro.sync.ecss.extensions.api.node.AuthorNode)

resolveReference

public SAXSource resolveReference(AuthorNode node,
                                  String systemID,
                                  AuthorAccess authorAccess,
                                  EntityResolver entityResolver)
Resolve the content referred by conref attribute.

Specified by:
resolveReference in interface AuthorReferenceResolver
Overrides:
resolveReference in class DITAConRefResolver
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.
See Also:
AuthorReferenceResolver.resolveReference(ro.sync.ecss.extensions.api.node.AuthorNode, java.lang.String, AuthorAccess, EntityResolver)

getReferenceSystemID

public String getReferenceSystemID(AuthorNode node,
                                   AuthorAccess authorAccess)
Get the reference System ID

Specified by:
getReferenceSystemID in interface AuthorReferenceResolver
Overrides:
getReferenceSystemID in class DITAConRefResolver
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:
AuthorReferenceResolver.getReferenceSystemID(ro.sync.ecss.extensions.api.node.AuthorNode, AuthorAccess)

checkTarget

public void checkTarget(AuthorNode node,
                        AuthorDocument targetDocument)
                 throws ValidatingReferenceResolverException
Description copied from interface: ValidatingAuthorReferenceResolver
Check if the referenced target can be inserted in the source document

Specified by:
checkTarget in interface ValidatingAuthorReferenceResolver
Overrides:
checkTarget in class DITAConRefResolver
Parameters:
node - The source node for which the target node was resolved.
targetDocument - The target document
Throws:
ValidatingReferenceResolverException - If the source does not accept the target expanded in place.
See Also:
ValidatingAuthorReferenceResolver.checkTarget(ro.sync.ecss.extensions.api.node.AuthorNode, ro.sync.ecss.extensions.api.node.AuthorDocument)

getReferenceUniqueID

public String getReferenceUniqueID(AuthorNode node)
The value of conref attribute is used as the unique identifier.

Specified by:
getReferenceUniqueID in interface AuthorReferenceResolver
Overrides:
getReferenceUniqueID in class DITAConRefResolver
Parameters:
node - The node that has reference.
Returns:
An unique identifier for the reference node.
See Also:
AuthorReferenceResolver.getReferenceUniqueID(ro.sync.ecss.extensions.api.node.AuthorNode)

isReferenceChanged

public boolean isReferenceChanged(AuthorNode node,
                                  String attributeName)
Returns true when the attribute name is equal to 'conref'.

Specified by:
isReferenceChanged in interface AuthorReferenceResolver
Overrides:
isReferenceChanged in class DITAConRefResolver
Parameters:
node - The AuthorNode with the references.
attributeName - The name of the changed attribute.
Returns:
true if the references must be refreshed.
See Also:
AuthorReferenceResolver.isReferenceChanged(ro.sync.ecss.extensions.api.node.AuthorNode, java.lang.String)

setResolveAllTopicReferences

public void setResolveAllTopicReferences(boolean resolveAllTopicRefs)
Description copied from interface: DITAMapReferencesResolver
Try to resolve all topic references

Specified by:
setResolveAllTopicReferences in interface DITAMapReferencesResolver
Parameters:
resolveAllTopicRefs - If true, will resolve both map references and topic references. If false, will resolve only map references, defaults to false
See Also:
DITAMapReferencesResolver.setResolveAllTopicReferences(boolean)

Oxygen XML Editor 11.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.