Class DITAMapRefResolver
java.lang.Object
ro.sync.ecss.extensions.api.DITAConrefsResolverBase
ro.sync.ecss.extensions.dita.conref.DITAConRefResolver
ro.sync.ecss.extensions.dita.map.topicref.DITAMapRefResolver
- All Implemented Interfaces:
AuthorReferenceResolver,CacheableAuthorReferencesResolver,DITAMapReferencesResolver,Extension,ValidatingAuthorReferenceResolver
@API(type=INTERNAL,
src=PUBLIC)
public class DITAMapRefResolver
extends DITAConRefResolver
implements DITAMapReferencesResolver
Resolves the hrefs to other maps.
-
Field Summary
Fields inherited from class ro.sync.ecss.extensions.dita.conref.DITAConRefResolver
keyManagerProviderFields inherited from interface ro.sync.ecss.extensions.api.DITAMapReferencesResolver
EXPAND_PSEUDO_CLASS -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.DITAMapRefResolver(ContextKeyManager keyManager) Deprecated.useDITAMapRefResolver(ContextKeyManagerProvider)instead.DITAMapRefResolver(ContextKeyManagerProvider keyManagerProvider) 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.voidcheckTarget(AuthorNode node, AuthorDocument targetDocument) Check if the referenced target can be inserted in the source documentgetCacheKey(AuthorNode node) Get an unique cache key for a node which references content which will be expanded.getDisplayName(AuthorNode node) Returns the value of thehrefattribute.Get the grammar cache to be reused in another references resolver.getReferenceSystemID(AuthorNode node, AuthorAccess authorAccess) Get the reference System IDThe value ofconrefattribute is used as the unique identifier.booleanhasEditableReference(String systemID, AuthorNode referenceNodeParent) Check if the node is editable.booleanhasReferences(AuthorNode node) An element that hashrefattribute is an element with references.booleanisReferenceChanged(AuthorNode node, String attributeName) Returnstruewhen the attribute name is equal to'conref'.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 content referred byconrefattribute.voidsetExpandMapReferences(boolean isExpand) Decide whether to expand or not the references of DITA maps.voidsetGrammarCache(Object grammarCache) Set the grammar cache to be reused in another references resolver.voidsetResolveAllTopicReferences(boolean resolveAllTopicRefs) Try to resolve all topic referencesMethods inherited from class ro.sync.ecss.extensions.dita.conref.DITAConRefResolver
getDescription, getTopicPath, setResolveKeyrefsToMetaContentAsConrefsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
-
Constructor Details
-
DITAMapRefResolver
Deprecated.useDITAMapRefResolver(ContextKeyManagerProvider)instead.Constructor.- Parameters:
keyManager- The context-aware key manager.
-
DITAMapRefResolver
Constructor.- Parameters:
keyManagerProvider- The context-aware key manager provider.
-
DITAMapRefResolver
Deprecated.useDITAMapRefResolver(ContextKeyManagerProvider)instead, otherwise key resolution will not work in Web Author.Constructor.
-
-
Method Details
-
hasReferences
An element that hashrefattribute is an element with references.- Specified by:
hasReferencesin interfaceAuthorReferenceResolver- Overrides:
hasReferencesin classDITAConRefResolver- Parameters:
node- The node to be analyzed.- Returns:
trueif it has references.- See Also:
-
getDisplayName
Returns the value of thehrefattribute.- Specified by:
getDisplayNamein interfaceAuthorReferenceResolver- Overrides:
getDisplayNamein classDITAConRefResolver- Parameters:
node- The node that contains references.- Returns:
- The display name of the node.
- See Also:
-
resolveReference
public SAXSource resolveReference(AuthorNode node, String systemID, AuthorAccess authorAccess, EntityResolver entityResolver) Resolve the content referred byconrefattribute.- Specified by:
resolveReferencein interfaceAuthorReferenceResolver- Overrides:
resolveReferencein classDITAConRefResolver- 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:
-
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:
-
getReferenceSystemID
Get the reference System ID- Specified by:
getReferenceSystemIDin interfaceAuthorReferenceResolver- Overrides:
getReferenceSystemIDin classDITAConRefResolver- 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:
-
checkTarget
public void checkTarget(AuthorNode node, AuthorDocument targetDocument) throws ValidatingReferenceResolverException Description copied from interface:ValidatingAuthorReferenceResolverCheck if the referenced target can be inserted in the source document- Specified by:
checkTargetin interfaceValidatingAuthorReferenceResolver- Overrides:
checkTargetin classDITAConRefResolver- 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:
-
getReferenceUniqueID
The value ofconrefattribute is used as the unique identifier.- Specified by:
getReferenceUniqueIDin interfaceAuthorReferenceResolver- Overrides:
getReferenceUniqueIDin classDITAConRefResolver- Parameters:
node- The node that has reference.- Returns:
- An unique identifier for the reference node.
- See Also:
-
isReferenceChanged
Returnstruewhen the attribute name is equal to'conref'.- Specified by:
isReferenceChangedin interfaceAuthorReferenceResolver- Overrides:
isReferenceChangedin classDITAConRefResolver- Parameters:
node- TheAuthorNodewith the references.attributeName- The name of the changed attribute.- Returns:
trueif the references must be refreshed.- See Also:
-
setResolveAllTopicReferences
public void setResolveAllTopicReferences(boolean resolveAllTopicRefs) Description copied from interface:DITAMapReferencesResolverTry to resolve all topic references- Specified by:
setResolveAllTopicReferencesin interfaceDITAMapReferencesResolver- Parameters:
resolveAllTopicRefs- If true, will resolve both map references and topic references. If false, will resolve only map references, defaults to false- See Also:
-
setExpandMapReferences
public void setExpandMapReferences(boolean isExpand) Description copied from interface:DITAMapReferencesResolverDecide whether to expand or not the references of DITA maps.- Specified by:
setExpandMapReferencesin interfaceDITAMapReferencesResolver- Parameters:
isExpand-trueto expand the references.- See Also:
-
getGrammarCache
Description copied from interface:DITAMapReferencesResolverGet the grammar cache to be reused in another references resolver.- Specified by:
getGrammarCachein interfaceDITAMapReferencesResolver- Returns:
- the grammar cache to be reused in another references resolver.
- See Also:
-
setGrammarCache
Description copied from interface:DITAMapReferencesResolverSet the grammar cache to be reused in another references resolver.- Specified by:
setGrammarCachein interfaceDITAMapReferencesResolver- Parameters:
grammarCache- The grammar cache to be used.- See Also:
-
getCacheKey
Description copied from interface:CacheableAuthorReferencesResolverGet an unique cache key for a node which references content which will be expanded.- Specified by:
getCacheKeyin interfaceCacheableAuthorReferencesResolver- Overrides:
getCacheKeyin classDITAConRefResolver- Parameters:
node- The node.- Returns:
- an unique cache key for a node which references expanded content. Can be
nullif the node should not be cached. - See Also:
-
DITAMapRefResolver(ContextKeyManagerProvider)instead, otherwise key resolution will not work in Web Author.