@API(type=INTERNAL, src=PUBLIC) public class DITAMapRefResolver extends DITAConRefResolver implements DITAMapReferencesResolver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXPAND_PSEUDO_CLASS
Reference elements (like topicref, mapref, etc) will be expanded if:
have this pseudo class
this pseudo class is set on root
See also
setResolveAllTopicReferences(boolean) . |
keyManagerProvider
Constructor and Description |
---|
DITAMapRefResolver()
Deprecated.
use
DITAMapRefResolver(ContextKeyManagerProvider) instead,
otherwise key resolution will not work in Web Author. |
DITAMapRefResolver(ContextKeyManager keyManager)
Deprecated.
use
DITAMapRefResolver(ContextKeyManagerProvider) instead. |
DITAMapRefResolver(ContextKeyManagerProvider keyManagerProvider)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsValidatationForEditableReference(java.lang.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.
|
void |
checkTarget(AuthorNode node,
AuthorDocument targetDocument)
Check if the referenced target can be inserted in the source document
|
java.lang.String |
getDisplayName(AuthorNode node)
Returns the value of the
href attribute. |
java.lang.Object |
getGrammarCache()
Get the grammar cache to be reused in another references resolver.
|
java.lang.String |
getReferenceSystemID(AuthorNode node,
AuthorAccess authorAccess)
Get the reference System ID
|
java.lang.String |
getReferenceUniqueID(AuthorNode node)
The value of
conref attribute is used as the unique identifier. |
boolean |
hasEditableReference(java.lang.String systemID,
AuthorNode referenceNodeParent)
Check if the node is editable.
|
boolean |
hasReferences(AuthorNode node)
An element that has
href attribute
is an element with references. |
boolean |
isReferenceChanged(AuthorNode node,
java.lang.String attributeName)
Returns
true when the attribute name is equal to 'conref' . |
void |
replaceReference(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.
|
javax.xml.transform.sax.SAXSource |
resolveReference(AuthorNode node,
java.lang.String systemID,
AuthorAccess authorAccess,
org.xml.sax.EntityResolver entityResolver)
Resolve the content referred by
conref attribute. |
void |
setExpandMapReferences(boolean isExpand)
Decide whether to expand or not the references of DITA maps.
|
void |
setGrammarCache(java.lang.Object grammarCache)
Set the grammar cache to be reused in another references resolver.
|
void |
setResolveAllTopicReferences(boolean resolveAllTopicRefs)
Try to resolve all topic references
|
getDescription, getTopicPath, setResolveKeyrefsToMetaContentAsConrefs
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription
public static final java.lang.String EXPAND_PSEUDO_CLASS
setResolveAllTopicReferences(boolean)
.@Deprecated public DITAMapRefResolver(ContextKeyManager keyManager)
DITAMapRefResolver(ContextKeyManagerProvider)
instead.keyManager
- The context-aware key manager.public DITAMapRefResolver(ContextKeyManagerProvider keyManagerProvider)
keyManagerProvider
- The context-aware key manager provider.@Deprecated public DITAMapRefResolver()
DITAMapRefResolver(ContextKeyManagerProvider)
instead,
otherwise key resolution will not work in Web Author.public boolean hasReferences(AuthorNode node)
href
attribute
is an element with references.hasReferences
in interface AuthorReferenceResolver
hasReferences
in class DITAConRefResolver
node
- The node to be analyzed.true
if it has references.AuthorReferenceResolver.hasReferences(ro.sync.ecss.extensions.api.node.AuthorNode)
public java.lang.String getDisplayName(AuthorNode node)
href
attribute.getDisplayName
in interface AuthorReferenceResolver
getDisplayName
in class DITAConRefResolver
node
- The node that contains references.AuthorReferenceResolver.getDisplayName(ro.sync.ecss.extensions.api.node.AuthorNode)
public javax.xml.transform.sax.SAXSource resolveReference(AuthorNode node, java.lang.String systemID, AuthorAccess authorAccess, org.xml.sax.EntityResolver entityResolver)
conref
attribute.resolveReference
in interface AuthorReferenceResolver
resolveReference
in class DITAConRefResolver
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:
InputSource
will contain the editor content.SAXSource
including the parser and the parser's InputSource
.
AuthorReferenceResolver.resolveReference(ro.sync.ecss.extensions.api.node.AuthorNode, java.lang.String, AuthorAccess, EntityResolver)
public boolean hasEditableReference(java.lang.String systemID, AuthorNode referenceNodeParent)
AuthorReferenceResolver
hasEditableReference
in interface AuthorReferenceResolver
systemID
- System ID of the document in which the current node is located.referenceNodeParent
- The parent of the future referene nodetrue
if the node is editable.AuthorReferenceResolver.hasEditableReference(java.lang.String, ro.sync.ecss.extensions.api.node.AuthorNode)
public boolean allowsValidatationForEditableReference(java.lang.String systemID, AuthorNode referenceNodeParent)
AuthorReferenceResolver
allowsValidatationForEditableReference
in interface AuthorReferenceResolver
systemID
- System ID of the document in which the current node is located.referenceNodeParent
- The parent of the future reference nodetrue
if the editable node reference can be validated by Oxygen on its own, based on its own schema information.AuthorReferenceResolver.allowsValidatationForEditableReference(java.lang.String, ro.sync.ecss.extensions.api.node.AuthorNode)
public void replaceReference(AuthorDocumentProvider targetProvider, AuthorAccess authorAccess, AuthorReferenceNode referenceNode) throws java.io.IOException
AuthorReferenceResolver
replaceReference
in interface AuthorReferenceResolver
targetProvider
- The provider if the target document.authorAccess
- Access to the current document.referenceNode
- The reference node to get the modified content from.java.io.IOException
- If the save process failsAuthorReferenceResolver.replaceReference(ro.sync.ecss.extensions.api.node.AuthorDocumentProvider, ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.node.AuthorReferenceNode)
public java.lang.String getReferenceSystemID(AuthorNode node, AuthorAccess authorAccess)
getReferenceSystemID
in interface AuthorReferenceResolver
getReferenceSystemID
in class DITAConRefResolver
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.AuthorReferenceResolver.getReferenceSystemID(ro.sync.ecss.extensions.api.node.AuthorNode, AuthorAccess)
public void checkTarget(AuthorNode node, AuthorDocument targetDocument) throws ValidatingReferenceResolverException
ValidatingAuthorReferenceResolver
checkTarget
in interface ValidatingAuthorReferenceResolver
checkTarget
in class DITAConRefResolver
node
- The source node for which the target node was resolved.targetDocument
- The target documentValidatingReferenceResolverException
- If the source does not accept the target expanded in place.ValidatingAuthorReferenceResolver.checkTarget(ro.sync.ecss.extensions.api.node.AuthorNode, ro.sync.ecss.extensions.api.node.AuthorDocument)
public java.lang.String getReferenceUniqueID(AuthorNode node)
conref
attribute is used as the unique identifier.getReferenceUniqueID
in interface AuthorReferenceResolver
getReferenceUniqueID
in class DITAConRefResolver
node
- The node that has reference.AuthorReferenceResolver.getReferenceUniqueID(ro.sync.ecss.extensions.api.node.AuthorNode)
public boolean isReferenceChanged(AuthorNode node, java.lang.String attributeName)
true
when the attribute name is equal to 'conref'
.isReferenceChanged
in interface AuthorReferenceResolver
isReferenceChanged
in class DITAConRefResolver
node
- The AuthorNode
with the references.attributeName
- The name of the changed attribute.true
if the references must be refreshed.AuthorReferenceResolver.isReferenceChanged(ro.sync.ecss.extensions.api.node.AuthorNode, java.lang.String)
public void setResolveAllTopicReferences(boolean resolveAllTopicRefs)
DITAMapReferencesResolver
setResolveAllTopicReferences
in interface DITAMapReferencesResolver
resolveAllTopicRefs
- If true, will resolve both map references and topic references.
If false, will resolve only map references, defaults to falseDITAMapReferencesResolver.setResolveAllTopicReferences(boolean)
public void setExpandMapReferences(boolean isExpand)
DITAMapReferencesResolver
setExpandMapReferences
in interface DITAMapReferencesResolver
isExpand
- true
to expand the references.DITAMapReferencesResolver.setExpandMapReferences(boolean)
public java.lang.Object getGrammarCache()
DITAMapReferencesResolver
getGrammarCache
in interface DITAMapReferencesResolver
DITAMapReferencesResolver.getGrammarCache()
public void setGrammarCache(java.lang.Object grammarCache)
DITAMapReferencesResolver
setGrammarCache
in interface DITAMapReferencesResolver
grammarCache
- The grammar cache to be used.DITAMapReferencesResolver.setGrammarCache(java.lang.Object)
© Copyright Syncro Soft SRL 2002 - 2022. All rights reserved.