@API(type=NOT_EXTENDABLE,
src=PRIVATE)
public class DITAAccess
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
DITAAccess.InsertLinkReferenceShortcut
Short cut for the insert link operation.
|
static class |
DITAAccess.PasteInfo
Paste type of clipboard fragments.
|
Modifier and Type | Field and Description |
---|---|
static int |
CONKEYREF_TYPE
Conkeyref
|
static int |
CONREF_TYPE
Conref
|
static java.lang.String |
DEFAULT_CONKEYREF_CONREFEND
Value for conrefend attribute value when a conkeyref is used.
|
static java.lang.String |
DITA_ROOT_MAP_URL_ATTRIBUTE
The attribute name for the dita root map url.
|
static java.lang.String |
ID_ANY
Identifier used in references path, representing that the topic id can be
excluded from the reference.
|
static int |
INHERITANCE_GENERALIZATION
If the source is a generalization of the target
|
static int |
INHERITANCE_NONE
No match between the two classes..
|
static int |
INHERITANCE_SAME
If the source class is the same as the target class.
|
static int |
INHERITANCE_SPECIALIZATION
If the source is a specialization of the target
|
static int |
KEYREF_TYPE
Keyref
|
static java.lang.String |
LINK_TYPE_DITA_TOPIC
The 'href' attribute type DITA topic.
|
static java.lang.String |
LINK_TYPE_NON_DITA_RESOURCE
The 'href' attribute type non DITA resource.
|
static java.lang.String |
LINK_TYPE_WEB_PAGE
The 'href' attribute type web page.
|
protected static ro.sync.exml.MessageBundle |
messages
The messages resource bundle.
|
static java.lang.String[] |
REF_ATTRIBUTES
DITA reference attributes.
|
Constructor and Description |
---|
DITAAccess() |
Modifier and Type | Method and Description |
---|---|
static void |
addEditReference(AuthorAccess authorAccess)
Add a new conref to the current element or edit the existing one.
|
static java.util.List<CIAttribute> |
annotateAttributes(java.util.List<CIAttribute> attributes)
Annotate a list of attributes.
|
protected static int |
checkConsecutiveInsertionWarning(int previousOperationOffset,
int selectionStart,
int selectionEnd,
ro.sync.ecss.dita.reference.ReferenceInfo previousReferenceInfo,
ro.sync.ecss.dita.reference.ReferenceInfo currentReferenceInfo)
Show a warning message when consecutive insertion of the same references are performed.
|
static java.lang.String |
checkValidKeyName(java.lang.String keyName)
Check if a keyref has a valid key name.
|
static java.lang.String |
checkValidKeyRef(java.lang.String keyref)
Check if a keyref has a valid key name.
|
static ro.sync.ecss.dita.ImageInfo |
chooseImageReference(AuthorAccess authorAccess)
Allows the user to choose an image reference, which will be inserted inside the document.
|
static ro.sync.ecss.dita.MediaInfo |
chooseMediaReference(AuthorAccess authorAccess)
Allows the user to choose an media file reference, which will be inserted inside the document.
|
static java.lang.String |
computeElementClazz(WhatPossibleValuesHasAttributeContext context)
Compute the element's clazz
|
static java.lang.String |
computeImageReferenceXMLToInsert(AuthorAccess authorAccess,
java.lang.String refAttrName,
java.lang.String refValue)
Compute the image reference XML fragment to insert.
|
static java.lang.String |
computeLinkText(AuthorNode contextNode,
java.lang.String hrefValue,
java.lang.String baseSystemID)
Obtains information about the referred target.
|
static java.lang.String |
computeLinkText(java.lang.String hrefValue,
java.lang.String baseSystemID)
Obtains information about the referred target.
|
static void |
createNewTopicReference(AuthorAccess authorAccess)
Create a new DITA topic and link to it as a reference.
|
static void |
createReusableComponent(AuthorAccess authorAccess,
ro.sync.ecss.extensions.api.DITAUniqueIDAssigner idsAssigner)
Reuse the selected content.
|
static void |
editProperties(AuthorAccess authorAccess)
Edit properties for the given reference elements.
|
static void |
editProperties(java.net.URL location,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl,
AuthorElement[] elementsToEdit,
ro.sync.ecss.dita.topic.ref.TopicRefInserter topicRefInserter,
java.lang.Object parentFrame,
boolean displayReferenceUrl)
Edit properties for the given reference elements.
|
static void |
editTopicref(AuthorElement[] topicrefNodes,
AuthorAccess authorAccess)
Edits one or more topicref elements inside a specialized dialog.
|
static void |
exportDITAMap(java.net.URL ditamapURL,
java.io.File exportDirectory,
boolean exportAsZip,
java.lang.String zipFileName,
ExportProgressUpdater progressUpdater)
Export DITA Map as zip.
|
static java.util.List<CIValue> |
filterAttributeValues(java.util.List<CIValue> attributeValues,
WhatPossibleValuesHasAttributeContext context,
ContextKeyManager keyManager,
java.lang.String documentTypeName,
AuthorAccess authorAccess)
Propose additional attribute values.
|
static java.util.List<CIValue> |
filterAttributeValues(java.util.List<CIValue> attributeValues,
WhatPossibleValuesHasAttributeContext context,
java.lang.String documentTypeName)
Deprecated.
Please use the equivalent method which also receives the URL of the requestor.
|
static java.util.List<CIValue> |
filterAttributeValues(java.util.List<CIValue> attributeValues,
WhatPossibleValuesHasAttributeContext context,
java.lang.String documentTypeName,
AuthorAccess authorAccess)
Propose additional attribute values.
|
static java.util.List<CIValue> |
filterDITAVALAttributeValues(java.util.List<CIValue> attributeValues,
WhatPossibleValuesHasAttributeContext context)
Filter DITAVAL Attribute values.
|
static java.util.List<CIElement> |
filterElements(java.util.List<CIElement> elements,
WhatElementsCanGoHereContext context)
Filter the given elements according to the given context.
|
static java.lang.String |
getAPIKeysManagerDescription() |
static java.lang.String |
getAutoInsertImageRefElementName(AuthorAccess authorAccess,
int caretPosition)
Get the name of the image element to insert.
|
static java.lang.String |
getAutoInsertRefElementName(AuthorAccess authorAccess,
int caretPosition)
Get the name of the topic ref element to insert
|
static java.lang.String |
getAutoInsertTopicRefElementName(AuthorAccess authorAccess,
int caretPosition)
Get the name of the topic ref element to insert
|
static java.util.List<DitaReferenceTargetDescriptor> |
getDitaReferenceTargets(AuthorAccess authorAccess,
java.net.URL targetURL)
Returns the DITA reference targets in the given topic.
|
static CIElement |
getEquivalentChildCIElement(AuthorAccess authorAccess,
int caretOffset,
java.lang.String tagName)
Get the equivalent child CIElement
|
static java.lang.String |
getFormat(java.lang.String hrefValue,
java.lang.String formatValue,
boolean fillFormatAttr)
Get the format for the specified resource.
|
static HrefInfo |
getHrefInformation(AuthorNode node)
Get the reference information (by analizing attributes like keyref, href, mapref, ...) of a node.
|
static int |
getInheritanceType(java.lang.String sourceClass,
java.lang.String targetClass)
Check what inheritance is between the two classes.
|
static ro.sync.ecss.dita.topic.group.TopicgroupInfo |
getInsertTopicgroup(java.lang.Object parentFrame,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl,
int caretOffset)
Deprecated.
This method is not used anymore from oXygen to insert topic group elements
and it will be removed in a future release.
All topic reference elements are inserted using the same method:
#insertTopicReference(URL, Object, AuthorCCManager, AuthorDocumentController, int, String, TopicRefInserter, String, boolean) |
static ro.sync.ecss.dita.topic.TopicInfo |
getInsertTopichead(java.lang.Object parentFrame,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl,
int caretOffset)
Deprecated.
This method is not used anymore from oXygen to insert topichead elements
and it will be removed in a future release.
All topic reference elements are inserted using the same method:
#insertTopicReference(URL, Object, AuthorCCManager, AuthorDocumentController, int, String, TopicRefInserter, String, boolean) |
static void |
getInsertTopicref(java.net.URL editorLocation,
java.lang.Object parentFrame,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
AuthorDocumentController ctrl,
int caretOffset,
java.lang.String initialTopicRefLocation,
ro.sync.ecss.dita.topic.ref.TopicRefInserter inserter,
java.lang.String preferredElementName,
boolean displayReferenceUrl)
Insert a topic reference.
|
static java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> |
getKeys()
Deprecated.
Please use the equivalent method which also receives the URL of the requestor.
|
static java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> |
getKeys(java.net.URL originatorURL) |
static java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> |
getKeys(java.net.URL originatorURL,
ContextKeyManager keysManager)
Returns the mapped DITA 1.2 keys
|
static java.util.List<ro.sync.ecss.dita.reference.keyref.KeyInfo> |
getKeysForInsertion(java.net.URL originatorURL) |
static ro.sync.ecss.dita.map.TitleInfo |
getNewMapTitle(java.lang.Object parentFrame,
java.lang.String oldTitle,
boolean preferTitleAttribute)
Deprecated.
This method is not used anymore from oXygen to edit map titles
and it will be removed in a future release.
The map root is now edited using the following method:
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl,
AuthorElement[], TopicRefInserter, Object, boolean) |
static java.lang.String |
getPossibleElementQName(AuthorDocumentController ctrl,
java.lang.String clazzFrag,
java.lang.String mostUsed)
Obtain the qualified name of the element with the given class, which will
be inserted in the document.
|
static CIElement[] |
getPossibleElements(ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl,
ro.sync.ecss.contentcompletion.AuthorCCManager ccManager,
int offset,
java.lang.String reqAttr,
java.lang.String... classFrag)
Get the possible elements that can be inserted at a given offset and have
the class 'classFrag' and a 'reqAttr' attribute.
|
static java.net.URL |
getRootMapURL()
Get DITA root map URL.
|
static ro.sync.ecss.dita.topic.group.TopicgroupInfo |
getTopicGroupInfo(java.lang.Object parentFrame,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl,
int caretOffset,
ro.sync.ecss.dita.topic.group.TopicgroupInfo initialTopicrefInfo)
Deprecated.
This method is not used anymore from oXygen to edit topic group elements
and it will be removed in a future release.
All topic reference elements are edited using the same method:
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl, AuthorElement[], TopicRefInserter, Object, boolean) |
static ro.sync.ecss.dita.topic.head.TopicheadInfo |
getTopicHeadInfo(java.lang.Object parentFrame,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl,
int caretOffset,
ro.sync.ecss.dita.topic.head.TopicheadInfo initialHeadInfo)
Deprecated.
This method is not used anymore from oXygen to edit topichead elements
and it will be removed in a future release.
All topic reference elements are edited using the same method:
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl, AuthorElement[], TopicRefInserter, Object, boolean) |
static void |
getTopicRefInfo(java.net.URL location,
java.lang.Object parentFrame,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl,
int caretOffset,
ro.sync.ecss.dita.topic.ref.TopicrefInfo initialTopicrefInfo,
ro.sync.ecss.dita.topic.ref.TopicRefInserter inserter)
Deprecated.
This method is not used anymore from oXygen to insert topic reference elements
and it will be removed in a future release.
All topic reference elements are inserted using the same method:
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl, AuthorElement[], TopicRefInserter, Object, boolean) |
static java.util.LinkedHashMap<java.net.URL,java.util.List<java.util.Stack<java.util.Set<java.lang.String>>>> |
getURLKeyScopeContexts(java.net.URL originatorURL)
Get the URL to key scopes context for the default keys manager.
|
static java.util.LinkedHashMap<java.net.URL,java.util.List<java.util.Stack<java.util.Set<java.lang.String>>>> |
getURLKeyScopeContexts(java.net.URL originatorURL,
ContextKeyManager keysManager)
Returns a mapping between topic URLs and DITA 1.3 key scopes where the URLs are referenced.
|
static void |
handleTopicRefInsertUrl(AuthorAccess authorAccess,
java.net.URL topicUrl)
Insert a topic ref with the given URL.
|
static boolean |
hasAPIKeysManager() |
static void |
insertContentReference(AuthorAccess authorAccess,
java.net.URL initialReferenceURL,
boolean displayReferenceUrl)
Shows a dialog that allows inserting a content reference (conref).
|
static void |
insertHref(AuthorAccess authorAccess,
java.lang.String typeValue,
java.lang.String formatValue,
java.lang.String scopeValue,
boolean isXref,
boolean isHrefTypeDitaTopic)
Insert a Xref.
|
static void |
insertHref(AuthorAccess authorAccess,
java.lang.String typeValue,
java.lang.String formatValue,
java.lang.String scopeValue,
boolean isXref,
boolean isHrefTypeDitaTopic,
java.net.URL initialReferenceURL,
boolean displayReferenceUrl)
Insert a Xref or link element.
|
static void |
insertImage(AuthorAccess authorAccess,
ro.sync.ecss.dita.ImageInfo ref)
Insert a DITA Image.
|
static void |
insertImage(AuthorAccess authorAccess,
java.lang.String ref)
Insert a DITA Image
|
static SchemaAwareHandlerResult |
insertImageSchemaAware(AuthorAccess authorAccess,
ro.sync.ecss.dita.ImageInfo reference)
Insert a DITA image.
|
static SchemaAwareHandlerResult |
insertImageSchemaAware(AuthorAccess authorAccess,
java.lang.String ref)
Insert a DITA Image
|
static SchemaAwareHandlerResult |
insertImageSchemaAware(AuthorAccess authorAccess,
java.lang.String refAttrName,
java.lang.String refValue)
Insert a DITA Image
|
static void |
insertKeydefWithKeyword(java.lang.Object parentFrame,
ro.sync.ecss.contentcompletion.AuthorCCManager ccM,
AuthorDocumentController ctrl,
int caretOffset,
ro.sync.ecss.dita.topic.ref.TopicRefInserter inserter,
boolean append)
Insert a key definition with keyword.
|
static void |
insertLinkReference(AuthorAccess authorAccess,
java.lang.String typeValue,
java.lang.String formatValue,
java.lang.String scopeValue,
boolean isXref,
java.lang.String preferredElName,
java.lang.String hrefType,
java.net.URL initialReferenceURL,
boolean displayReferenceUrl)
Insert a Xref or link element.
|
static void |
insertLinkReference(AuthorAccess authorAccess,
java.lang.String typeValue,
java.lang.String formatValue,
java.lang.String scopeValue,
boolean isXref,
java.lang.String preferredElName,
java.lang.String hrefType,
java.net.URL initialReferenceURL,
boolean displayReferenceUrl,
DITAAccess.InsertLinkReferenceShortcut insertLinkReferenceShortcut)
Insert a Xref or link element.
|
static void |
insertLinkReference(AuthorAccess authorAccess,
java.lang.String typeValue,
java.lang.String formatValue,
java.lang.String scopeValue,
boolean isXref,
java.lang.String hrefType,
java.net.URL initialReferenceURL,
boolean displayReferenceUrl)
Insert a Xref or link element.
|
static void |
insertLinkReference(AuthorAccess authorAccess,
java.lang.String typeValue,
java.lang.String formatValue,
java.lang.String scopeValue,
boolean isXref,
java.lang.String hrefType,
java.net.URL initialReferenceURL,
boolean displayReferenceUrl,
DITAAccess.InsertLinkReferenceShortcut insertLinkReferenceShortcut)
Insert a Xref or link element.
|
static void |
insertLinkReference(java.lang.String referenceValue,
java.lang.String targetElementClass,
java.lang.String targetElementQName,
AuthorAccess authorAccess,
java.lang.String typeValue,
java.lang.String formatValue,
java.lang.String scopeValue,
boolean isXref,
java.lang.String hrefType)
Insert a Xref or link element.
|
static void |
insertMedia(AuthorAccess authorAccess,
ro.sync.ecss.dita.MediaInfo ref)
Insert a media object.
|
static SchemaAwareHandlerResult |
insertMediaSchemaAware(AuthorAccess authorAccess,
ro.sync.ecss.dita.MediaInfo reference)
Insert a DITA media object.
|
static void |
insertReference(AuthorAccess authorAccess,
int refType)
Insert a keyref or a conkeyref.
|
static void |
insertReference(AuthorAccess authorAccess,
java.lang.String referenceValue,
java.lang.String targetElementQName,
java.lang.String elementClass)
Inserts a reference from the information passed in the ArgumentsMap.
|
static void |
insertReusableComponent(AuthorAccess authorAccess)
Insert a reusable component
|
static void |
insertTopicgroup(AuthorAccess authorAccess)
Insert a topic group.
|
static void |
insertTopichead(AuthorAccess authorAccess)
Insert a topic head.
|
static void |
insertTopicref(AuthorAccess authorAccess)
Insert a topic ref.
|
static void |
insertTopicref(AuthorAccess authorAccess,
java.net.URL initialReferenceURL,
boolean displayReferenceUrl)
Insert a topic reference.
|
static void |
insertTopicref(WSDITAMapEditorPage ditaPageAccess,
java.net.URL initialReferenceURL,
java.lang.String preferredElementName,
boolean asChild,
boolean displayReferenceUrl)
Insert a topic reference in the DITA Map tree.
|
static boolean |
isDITA1_3OrNewer(java.lang.String archVersion)
Check if the topic or map with a certain architecture version is DITA 1.3 or newer,
|
static boolean |
isGeneralizationOf(java.lang.String sourceClass,
java.lang.String targetClass)
True if the first class value is a generalization or the same as the second class value.
|
static Reference |
parseDITAHref(java.lang.String baseUrl,
java.lang.String hrefValue)
Parse the
href attribute and returns the absolute URL and the id. |
static Reference |
parseDITAKeyRef(java.lang.String keyref)
Deprecated.
Please use the equivalent method which also receives the URL of the requestor.
|
static Reference |
parseDITAKeyRef(java.lang.String keyref,
ro.sync.ecss.dita.reference.keyref.KeyResolver kr)
Parse the DITA conkeyref value
|
static Reference |
parseDITAKeyRef(java.net.URL originatorURL,
ContextKeyManager keyManager,
java.lang.String keyref)
Parse the DITA conkeyref value
|
static Reference |
parseDITAKeyRef(java.net.URL originatorURL,
java.lang.String keyref)
Parse the DITA conkeyref value
|
static java.lang.String |
pasteAsReference(AuthorAccess authorAccess,
boolean asConref)
Paste as reference
|
static java.lang.String |
pasteAsReference(AuthorAccess authorAccess,
DITAAccess.PasteInfo pasteInfo)
Paste as reference
|
static boolean |
pasteClipboardFragmentsAsReference(AuthorAccess authorAccess,
DITAAccess.PasteInfo pasteInfo,
ro.sync.ecss.component.AuthorDocumentFragmentClipboardObject[] fragments)
Paste the fragments from clipboard as reference.
|
static void |
pushElement(AuthorAccess authorAccess)
Shows a dialog that allows the user to push an element.
|
static void |
removeReference(AuthorAccess authorAccess)
Remove a content reference from a DITA document.
|
static void |
replaceConref(AuthorAccess authorAccess)
Replace the conref at caret position
|
static void |
resolveKeyNotFoundError(AuthorAccess authorAccess,
java.lang.String keyref)
The give key was not found.
|
static java.net.URL |
resolveKeyRef(java.lang.String keyRef)
Deprecated.
Please use the equivalent method which also receives the URL of the requestor.
|
static java.net.URL |
resolveKeyRef(java.lang.String keyRef,
boolean addANYIdentifierForKeys)
Deprecated.
Please use the equivalent method which also receives the URL of the requestor.
|
static java.net.URL |
resolveKeyRef(java.lang.String keyRef,
ro.sync.ecss.dita.reference.keyref.KeyResolver kr)
Resolve a keyref.
|
static java.net.URL |
resolveKeyRef(java.net.URL originatorURL,
java.lang.String keyRef,
boolean addANYIdentifierForKeys)
Resolve a keyref.
|
static java.net.URL |
resolveKeyRef(java.net.URL originatorURL,
java.lang.String keyRef,
ContextKeyManager keysManager,
boolean addANYIdentifierForKeys)
Resolve a keyref.
|
static java.lang.String |
rewriteKeyref(java.util.LinkedHashMap<java.net.URL,java.util.List<java.util.Stack<java.util.Set<java.lang.String>>>> urlKeyScopesMapping,
java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> keys,
AuthorNode contextNode,
java.lang.String keyref)
Rewrite a keyref looking also at key scopes..
|
static void |
searchReferences(AuthorAccess authorAccess)
Search references to a certain element at the caret position.
|
static void |
setDitaAccessCustomizer(ro.sync.ecss.dita.DITAAccessCustomizer ditaAccessCustomizer)
Set the DITA access customizer from SA or EC.
|
static void |
showInsertReferenceDialog(ro.sync.ecss.contentcompletion.AuthorCCManager ccManager,
ro.sync.ecss.ue.AuthorDocumentControllerImpl controller,
int caretOffset,
java.lang.Object parentFrame,
int refType,
boolean showOnlyKeysList,
ro.sync.ecss.dita.topic.ref.ReferenceInserter referenceInserter)
Shows the keyref/conkeyref insert dialog and returns the chosen reference
information.
|
static void |
showInsertReferenceDialog(ro.sync.ecss.contentcompletion.AuthorCCManager ccManager,
ro.sync.ecss.ue.AuthorDocumentControllerImpl controller,
int caretOffset,
java.lang.Object parentFrame,
int refType,
boolean showOnlyKeysList,
ro.sync.ecss.dita.topic.ref.ReferenceInserter referenceInserter,
ro.sync.ecss.dita.IKeyInfoFilter keysFilter,
boolean useModalDialog)
Shows the keyref/conkeyref insert dialog and returns the chosen reference
information.
|
protected static final ro.sync.exml.MessageBundle messages
public static final java.lang.String LINK_TYPE_WEB_PAGE
public static final java.lang.String LINK_TYPE_NON_DITA_RESOURCE
public static final java.lang.String LINK_TYPE_DITA_TOPIC
public static final java.lang.String DITA_ROOT_MAP_URL_ATTRIBUTE
public static final java.lang.String[] REF_ATTRIBUTES
public static final java.lang.String DEFAULT_CONKEYREF_CONREFEND
public static final int KEYREF_TYPE
public static final int CONREF_TYPE
public static final int CONKEYREF_TYPE
public static final java.lang.String ID_ANY
public static final int INHERITANCE_GENERALIZATION
public static final int INHERITANCE_SPECIALIZATION
public static final int INHERITANCE_SAME
public static final int INHERITANCE_NONE
public static void insertTopicref(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author access.AuthorOperationException
public static void handleTopicRefInsertUrl(AuthorAccess authorAccess, java.net.URL topicUrl) throws AuthorOperationException
authorAccess
- The author access.topicUrl
- The URL of the topic to be inserted.AuthorOperationException
public static void insertTopicgroup(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author access.AuthorOperationException
@Deprecated public static ro.sync.ecss.dita.topic.head.TopicheadInfo getTopicHeadInfo(java.lang.Object parentFrame, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl, int caretOffset, ro.sync.ecss.dita.topic.head.TopicheadInfo initialHeadInfo)
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl, AuthorElement[], TopicRefInserter, Object, boolean)
parentFrame
- The parent frame.ccM
- The CC Manager.ctrl
- The document controller.caretOffset
- The caret offset.initialHeadInfo
- Initial topic head info.@Deprecated public static ro.sync.ecss.dita.topic.TopicInfo getInsertTopichead(java.lang.Object parentFrame, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl, int caretOffset)
#insertTopicReference(URL, Object, AuthorCCManager, AuthorDocumentController, int, String, TopicRefInserter, String, boolean)
parentFrame
- The parent frame.ccM
- The CC Manager.ctrl
- The document controller.caretOffset
- The caret offset.@Deprecated public static ro.sync.ecss.dita.topic.group.TopicgroupInfo getTopicGroupInfo(java.lang.Object parentFrame, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl, int caretOffset, ro.sync.ecss.dita.topic.group.TopicgroupInfo initialTopicrefInfo)
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl, AuthorElement[], TopicRefInserter, Object, boolean)
parentFrame
- The parent frame.ccM
- The CC Manager.ctrl
- The document controller.caretOffset
- The caret offset.initialTopicrefInfo
- Initial topic group info.@Deprecated public static ro.sync.ecss.dita.topic.group.TopicgroupInfo getInsertTopicgroup(java.lang.Object parentFrame, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl, int caretOffset)
#insertTopicReference(URL, Object, AuthorCCManager, AuthorDocumentController, int, String, TopicRefInserter, String, boolean)
parentFrame
- The parent frame.ccM
- The CC Manager.ctrl
- The document controller.caretOffset
- The caret offset.@Deprecated public static void getTopicRefInfo(java.net.URL location, java.lang.Object parentFrame, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl, int caretOffset, ro.sync.ecss.dita.topic.ref.TopicrefInfo initialTopicrefInfo, ro.sync.ecss.dita.topic.ref.TopicRefInserter inserter)
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl, AuthorElement[], TopicRefInserter, Object, boolean)
location
- The DITA map locationparentFrame
- The parent frame.ccM
- The CC Manager.ctrl
- The document controller.caretOffset
- The caret offset.initialTopicrefInfo
- Initial topic ref info.inserter
- Callback when the dialog is used.public static void getInsertTopicref(java.net.URL editorLocation, java.lang.Object parentFrame, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, AuthorDocumentController ctrl, int caretOffset, java.lang.String initialTopicRefLocation, ro.sync.ecss.dita.topic.ref.TopicRefInserter inserter, java.lang.String preferredElementName, boolean displayReferenceUrl)
editorLocation
- The editor location.parentFrame
- The parent frame.ccM
- The CC Manager.ctrl
- The document controller.caretOffset
- The caret offset.initialTopicRefLocation
- The initial location (relative or absolute) to set to the topic ref insert dialog.inserter
- Topic ref inserterpreferredElementName
- Preferred name or class of the element to insertdisplayReferenceUrl
- If true
the URL input will be
displayed in the insert topic reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
public static void insertKeydefWithKeyword(java.lang.Object parentFrame, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, AuthorDocumentController ctrl, int caretOffset, ro.sync.ecss.dita.topic.ref.TopicRefInserter inserter, boolean append)
parentFrame
- The parent frame.ccM
- The CC Manager.ctrl
- The document controller.caretOffset
- The caret offset.inserter
- Topic reference inserter
preferredElementName
parameter is not used on Eclipse plugin implementation.append
- true
to append child, false
to insert after.public static void insertTopichead(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author access.AuthorOperationException
public static void setDitaAccessCustomizer(ro.sync.ecss.dita.DITAAccessCustomizer ditaAccessCustomizer)
ditaAccessCustomizer
- The DITA access customizer.public static boolean hasAPIKeysManager()
true
if we have a keys manager provided through the API.public static java.lang.String getAPIKeysManagerDescription()
@Deprecated public static ro.sync.ecss.dita.map.TitleInfo getNewMapTitle(java.lang.Object parentFrame, java.lang.String oldTitle, boolean preferTitleAttribute)
editProperties(URL, AuthorCCManager, AuthorDocumentControllerImpl,
AuthorElement[], TopicRefInserter, Object, boolean)
parentFrame
- The parent frameoldTitle
- The old titlepreferTitleAttribute
- public static void editProperties(java.net.URL location, ro.sync.ecss.contentcompletion.AuthorCCManager ccM, ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl, AuthorElement[] elementsToEdit, ro.sync.ecss.dita.topic.ref.TopicRefInserter topicRefInserter, java.lang.Object parentFrame, boolean displayReferenceUrl)
location
- DITA Map editor location.ccM
- The CC Managerctrl
- The Author document controller.elementsToEdit
- The elements that must be edited.topicRefInserter
- Callback to insert/edit a topic refparentFrame
- Parent frame.displayReferenceUrl
- If true
the URL input will be
displayed in the edit reference dialog (the user will have the possibility
to change the reference URL).public static void editProperties(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- the author access.AuthorOperationException
public static void insertHref(AuthorAccess authorAccess, java.lang.String typeValue, java.lang.String formatValue, java.lang.String scopeValue, boolean isXref, boolean isHrefTypeDitaTopic, java.net.URL initialReferenceURL, boolean displayReferenceUrl) throws AuthorOperationException
authorAccess
- The author access.typeValue
- The type attribute value. If not null, the generated reference will have the 'type="typeValue"' attribute set to it.formatValue
- The format attribute value. If not null and the reference points to a non-DITA resource, the generated reference will have the 'format="formatValue"' attribute set to it.scopeValue
- The scope attribute value. If not null, the generated reference will have the 'scope="scopeValue"' attribute set to it.isXref
- true
if we need to insert an <xref> element, false
for the <link> element.isHrefTypeDitaTopic
- If true
the user wants to insert a reference to a DITA resource (Insert Cross Reference action)
If false
the user wants to a reference to an external non-dita resource (Web Link action or File Reference action).initialReferenceURL
- The default URL that will be displayed in the URL
field of the insert reference dialog.
displayReferenceUrl
- If true
the URL input will be
displayed in the insert reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
AuthorOperationException
public static void insertHref(AuthorAccess authorAccess, java.lang.String typeValue, java.lang.String formatValue, java.lang.String scopeValue, boolean isXref, boolean isHrefTypeDitaTopic) throws AuthorOperationException
authorAccess
- The author access.typeValue
- The the attribute value.formatValue
- The format attribute value.scopeValue
- The scope attribute value.isXref
- true
if we need to insert a xref element, false
for link element.isHrefTypeDitaTopic
- if true
a dita topic chooser will be shown
otherwise a input url dialog will be show for the href attribute value.AuthorOperationException
public static void insertContentReference(AuthorAccess authorAccess, java.net.URL initialReferenceURL, boolean displayReferenceUrl) throws AuthorOperationException
authorAccess
- The Author access.initialReferenceURL
- The default URL that will be displayed in the URL
field of the insert reference dialog.
displayReferenceUrl
- If true
the URL input will be
displayed in the insert reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
AuthorOperationException
public static void insertTopicref(AuthorAccess authorAccess, java.net.URL initialReferenceURL, boolean displayReferenceUrl) throws AuthorOperationException
authorAccess
- The Author access.initialReferenceURL
- The default URL that will be displayed in the URL
field of the insert reference dialog.
displayReferenceUrl
- If true
the URL input will be
displayed in the insert reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
AuthorOperationException
public static void insertTopicref(WSDITAMapEditorPage ditaPageAccess, java.net.URL initialReferenceURL, java.lang.String preferredElementName, boolean asChild, boolean displayReferenceUrl) throws AuthorOperationException
ditaPageAccess
- The DITA Page access.initialReferenceURL
- The default URL that will be displayed in the URL
field of the insert reference dialog.
preferredElementName
- The preferred name of the element to insert.asChild
- true
to insert as a child of the selected item, false
to insert as a next sibling.displayReferenceUrl
- If true
the URL input will be
displayed in the insert reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
AuthorOperationException
public static void insertReference(AuthorAccess authorAccess, int refType) throws AuthorOperationException
authorAccess
- The author access.refType
- Reference type. Can be one of the following constants:
AuthorOperationException
public static void showInsertReferenceDialog(ro.sync.ecss.contentcompletion.AuthorCCManager ccManager, ro.sync.ecss.ue.AuthorDocumentControllerImpl controller, int caretOffset, java.lang.Object parentFrame, int refType, boolean showOnlyKeysList, ro.sync.ecss.dita.topic.ref.ReferenceInserter referenceInserter) throws AuthorOperationException
ccManager
- CC manager.controller
- Author document controller.caretOffset
- Caret offset.parentFrame
- Parent frame.refType
- One of:
KEYREF_TYPE
,
CONREF_TYPE
,
CONKEYREF_TYPE
showOnlyKeysList
- true
to show only keys list
in the insert reference dialog.referenceInserter
- The reference inserter.AuthorOperationException
- When the insertion fails.public static void showInsertReferenceDialog(ro.sync.ecss.contentcompletion.AuthorCCManager ccManager, ro.sync.ecss.ue.AuthorDocumentControllerImpl controller, int caretOffset, java.lang.Object parentFrame, int refType, boolean showOnlyKeysList, ro.sync.ecss.dita.topic.ref.ReferenceInserter referenceInserter, ro.sync.ecss.dita.IKeyInfoFilter keysFilter, boolean useModalDialog) throws AuthorOperationException
ccManager
- CC manager.controller
- Author document controller.caretOffset
- Caret offset.parentFrame
- Parent frame.refType
- One of:
KEYREF_TYPE
,
CONREF_TYPE
,
CONKEYREF_TYPE
showOnlyKeysList
- true
to show only keys list
in the insert reference dialog.referenceInserter
- The reference inserter.keysFilter
- Filters the keys.useModalDialog
- true
if the dialog should be modal.AuthorOperationException
- When the insertion fails.public static void insertReference(AuthorAccess authorAccess, java.lang.String referenceValue, java.lang.String targetElementQName, java.lang.String elementClass) throws AuthorOperationException
authorAccess
- the AuthorAccessreferenceValue
- the reference value.targetElementQName
- the target element qualified name.elementClass
- the element class.AuthorOperationException
- if the operation fails.public static java.net.URL getRootMapURL()
@Deprecated public static java.net.URL resolveKeyRef(java.lang.String keyRef)
keyRef
- The keyref value@Deprecated public static java.net.URL resolveKeyRef(java.lang.String keyRef, boolean addANYIdentifierForKeys)
keyRef
- The keyref valueaddANYIdentifierForKeys
- If true
then reference keys will be prefixed by 'ANY/'.
in a element_keyref function.public static java.net.URL resolveKeyRef(java.net.URL originatorURL, java.lang.String keyRef, boolean addANYIdentifierForKeys)
originatorURL
- The originator URL.keyRef
- The keyref valueaddANYIdentifierForKeys
- If true
then reference keys will be prefixed by 'ANY/'.
in a element_keyref function.public static java.lang.String checkValidKeyRef(java.lang.String keyref)
keyref
- The keyref (may also contain the "/").null
if the key name is valid.public static java.net.URL resolveKeyRef(java.net.URL originatorURL, java.lang.String keyRef, ContextKeyManager keysManager, boolean addANYIdentifierForKeys)
originatorURL
- The url that contains the key.keyRef
- The keyref valuekeysManager
- The key manager.addANYIdentifierForKeys
- If true
then reference keys will be prefixed by 'ANY/'.
in a element_keyref function.public static java.net.URL resolveKeyRef(java.lang.String keyRef, ro.sync.ecss.dita.reference.keyref.KeyResolver kr)
keyRef
- The keyref valuekr
- The key resolver.public static void createReusableComponent(AuthorAccess authorAccess, ro.sync.ecss.extensions.api.DITAUniqueIDAssigner idsAssigner) throws AuthorOperationException
authorAccess
- The author accessidsAssigner
- The IDs assignerAuthorOperationException
- If failspublic static void insertReusableComponent(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author accessAuthorOperationException
public static void replaceConref(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- AuthorOperationException
public static void removeReference(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author access.AuthorOperationException
public static void addEditReference(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author accessAuthorOperationException
public static boolean isGeneralizationOf(java.lang.String sourceClass, java.lang.String targetClass)
sourceClass
- The source class valuetargetClass
- The target class valuepublic static int getInheritanceType(java.lang.String sourceClass, java.lang.String targetClass)
sourceClass
- The source class valuetargetClass
- The target class valuepublic static final Reference parseDITAHref(java.lang.String baseUrl, java.lang.String hrefValue) throws java.net.MalformedURLException
href
attribute and returns the absolute URL and the id.baseUrl
- The base document URL.hrefValue
- The href
attribute value.
Provides access to specific informations and actions for
editor, document, workspace, tables, change tracking, utilitynull
.java.net.MalformedURLException
- Can't create the URL.@Deprecated public static Reference parseDITAKeyRef(java.lang.String keyref) throws java.net.MalformedURLException
keyref
- The attribute 'conkeyref' valuejava.net.MalformedURLException
public static Reference parseDITAKeyRef(java.net.URL originatorURL, java.lang.String keyref) throws java.net.MalformedURLException
originatorURL
- The originator URL.keyref
- The attribute 'conkeyref' valuejava.net.MalformedURLException
public static Reference parseDITAKeyRef(java.net.URL originatorURL, ContextKeyManager keyManager, java.lang.String keyref) throws java.net.MalformedURLException
originatorURL
- The originator URL.keyManager
- The key manager used to resolve the keyref.keyref
- The attribute 'conkeyref' valuejava.net.MalformedURLException
public static Reference parseDITAKeyRef(java.lang.String keyref, ro.sync.ecss.dita.reference.keyref.KeyResolver kr) throws java.net.MalformedURLException
keyref
- The attribute 'conkeyref' valuekr
- The keys resolverjava.net.MalformedURLException
public static java.lang.String getAutoInsertTopicRefElementName(AuthorAccess authorAccess, int caretPosition)
authorAccess
- The author accesscaretPosition
- Caret positionpublic static java.lang.String getAutoInsertRefElementName(AuthorAccess authorAccess, int caretPosition)
authorAccess
- The author accesscaretPosition
- Caret positionpublic static java.lang.String getAutoInsertImageRefElementName(AuthorAccess authorAccess, int caretPosition)
authorAccess
- The author accesscaretPosition
- Caret positionpublic static CIElement[] getPossibleElements(ro.sync.ecss.ue.AuthorDocumentControllerImpl ctrl, ro.sync.ecss.contentcompletion.AuthorCCManager ccManager, int offset, java.lang.String reqAttr, java.lang.String... classFrag)
ctrl
- the author document controller.ccManager
- the content completion manager.offset
- the offset.reqAttr
- the required attribute that needs to be on the element.classFrag
- the class fragments to search for in the element.public static CIElement getEquivalentChildCIElement(AuthorAccess authorAccess, int caretOffset, java.lang.String tagName)
authorAccess
- Author accesscaretOffset
- The caret offsettagName
- The tag name@Deprecated public static java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> getKeys()
public static java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> getKeys(java.net.URL originatorURL)
originatorURL
- The URL for which the keys are requestedpublic static java.util.List<ro.sync.ecss.dita.reference.keyref.KeyInfo> getKeysForInsertion(java.net.URL originatorURL)
originatorURL
- The URL for which the keys are requestedpublic static java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> getKeys(java.net.URL originatorURL, ContextKeyManager keysManager)
originatorURL
- The URL of the document which contains the keys.keysManager
- The key manager that is aware of the context of the document.public static java.util.LinkedHashMap<java.net.URL,java.util.List<java.util.Stack<java.util.Set<java.lang.String>>>> getURLKeyScopeContexts(java.net.URL originatorURL, ContextKeyManager keysManager)
originatorURL
- The URL of the document which contains the keys.keysManager
- The key manager that is aware of the context of the document.public static java.lang.String pasteAsReference(AuthorAccess authorAccess, boolean asConref) throws AuthorOperationException
authorAccess
- The author access.asConref
- True if paste as conref, false as linkAuthorOperationException
public static java.lang.String pasteAsReference(AuthorAccess authorAccess, DITAAccess.PasteInfo pasteInfo) throws AuthorOperationException
authorAccess
- The author access.pasteInfo
- Paste type of clipboard fragments.AuthorOperationException
public static boolean pasteClipboardFragmentsAsReference(AuthorAccess authorAccess, DITAAccess.PasteInfo pasteInfo, ro.sync.ecss.component.AuthorDocumentFragmentClipboardObject[] fragments) throws AuthorOperationException
authorAccess
- The author access.pasteInfo
- Paste type of clipboard fragments.fragments
- The fragments to paste with.true
if the paste was valid.AuthorOperationException
@Deprecated public static java.util.List<CIValue> filterAttributeValues(java.util.List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context, java.lang.String documentTypeName)
attributeValues
- The attribute values.context
- The context.documentTypeName
- The document type name.public static java.util.List<CIValue> filterAttributeValues(java.util.List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context, java.lang.String documentTypeName, AuthorAccess authorAccess)
attributeValues
- The attribute values.context
- The context.documentTypeName
- The document type name.authorAccess
- The Author Access.public static java.util.List<CIValue> filterAttributeValues(java.util.List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context, ContextKeyManager keyManager, java.lang.String documentTypeName, AuthorAccess authorAccess)
attributeValues
- The attribute values.context
- The context.keyManager
- The key manager to use to propose values for attributes like keyref.documentTypeName
- The document type name.authorAccess
- The Author Access.public static java.lang.String computeElementClazz(WhatPossibleValuesHasAttributeContext context)
context
- The attributes editing context.public static java.util.List<CIAttribute> annotateAttributes(java.util.List<CIAttribute> attributes)
attributes
- The attributes list.public static void insertImage(AuthorAccess authorAccess, java.lang.String ref) throws AuthorOperationException
authorAccess
- The author accessref
- The reference.AuthorOperationException
public static void insertMedia(AuthorAccess authorAccess, ro.sync.ecss.dita.MediaInfo ref) throws AuthorOperationException
authorAccess
- The author access.ref
- Media reference.AuthorOperationException
- When fail.public static ro.sync.ecss.dita.MediaInfo chooseMediaReference(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author access.MediaInfo
object containing all the properties for the
file which will be inserted.AuthorOperationException
- On fail.public static SchemaAwareHandlerResult insertMediaSchemaAware(AuthorAccess authorAccess, ro.sync.ecss.dita.MediaInfo reference) throws AuthorOperationException
authorAccess
- The author accessreference
- The reference value.AuthorOperationException
- On fail.public static void insertImage(AuthorAccess authorAccess, ro.sync.ecss.dita.ImageInfo ref) throws AuthorOperationException
authorAccess
- The author accessref
- The information reference.AuthorOperationException
- If the image could not be inserted.public static ro.sync.ecss.dita.ImageInfo chooseImageReference(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The author access.ImageInfo
object containing all the properties for the
image, which will be inserted.AuthorOperationException
public static SchemaAwareHandlerResult insertImageSchemaAware(AuthorAccess authorAccess, java.lang.String ref) throws AuthorOperationException
authorAccess
- The author accessref
- The reference.AuthorOperationException
public static SchemaAwareHandlerResult insertImageSchemaAware(AuthorAccess authorAccess, java.lang.String refAttrName, java.lang.String refValue) throws AuthorOperationException
authorAccess
- The author accessrefAttrName
- The reference attribute name.refValue
- The reference value.AuthorOperationException
public static SchemaAwareHandlerResult insertImageSchemaAware(AuthorAccess authorAccess, ro.sync.ecss.dita.ImageInfo reference) throws AuthorOperationException
authorAccess
- The author accessreference
- The reference value.AuthorOperationException
public static java.lang.String computeImageReferenceXMLToInsert(AuthorAccess authorAccess, java.lang.String refAttrName, java.lang.String refValue)
authorAccess
- The author access.refAttrName
- The reference attribute namerefValue
- The reference value namepublic static java.lang.String getPossibleElementQName(AuthorDocumentController ctrl, java.lang.String clazzFrag, java.lang.String mostUsed)
ctrl
- The author document controller.clazzFrag
- The class of the element, whose name is searched.mostUsed
- The most used name of the element with the given class.public static void searchReferences(AuthorAccess authorAccess)
authorAccess
- The author access.public static java.lang.String computeLinkText(java.lang.String hrefValue, java.lang.String baseSystemID) throws java.net.MalformedURLException, java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
hrefValue
- The relative location of the target.baseSystemID
- base system ID.java.net.MalformedURLException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public static java.lang.String computeLinkText(AuthorNode contextNode, java.lang.String hrefValue, java.lang.String baseSystemID) throws java.net.MalformedURLException, java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.lang.Exception
contextNode
- The context node.hrefValue
- The relative location of the target.baseSystemID
- base system ID.java.net.MalformedURLException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
public static java.util.List<CIElement> filterElements(java.util.List<CIElement> elements, WhatElementsCanGoHereContext context)
elements
- The list of CIElement elements.context
- The context.public static void resolveKeyNotFoundError(AuthorAccess authorAccess, java.lang.String keyref)
authorAccess
- Interface to the author context.keyref
- The key that wasn't found in the current root map context.protected static int checkConsecutiveInsertionWarning(int previousOperationOffset, int selectionStart, int selectionEnd, ro.sync.ecss.dita.reference.ReferenceInfo previousReferenceInfo, ro.sync.ecss.dita.reference.ReferenceInfo currentReferenceInfo)
previousOperationOffset
- The previous operation offset, usually where the caret is positioned.selectionStart
- The current selection start.selectionEnd
- The current selection end.previousReferenceInfo
- The previous inserted reference.currentReferenceInfo
- The current inserted reference.public static java.util.List<CIValue> filterDITAVALAttributeValues(java.util.List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context)
attributeValues
- The current list of attribute values.context
- The what attribute values context.public static void createNewTopicReference(AuthorAccess authorAccess) throws java.lang.Exception
authorAccess
- The Author Accessjava.lang.Exception
- if it fails.public static void pushElement(AuthorAccess authorAccess) throws AuthorOperationException
authorAccess
- The Author access.AuthorOperationException
- When the operation could not be completed.public static boolean isDITA1_3OrNewer(java.lang.String archVersion)
archVersion
- The architecture version.true
if the topic or map with a certain architecture version is DITA 1.3 or newer,public static void insertLinkReference(AuthorAccess authorAccess, java.lang.String typeValue, java.lang.String formatValue, java.lang.String scopeValue, boolean isXref, java.lang.String hrefType, java.net.URL initialReferenceURL, boolean displayReferenceUrl) throws AuthorOperationException
authorAccess
- The author access.typeValue
- The type attribute value. If not null, the generated reference will have the 'type="typeValue"' attribute set to it.formatValue
- The format attribute value. If not null and the reference points to a non-DITA resource, the generated reference will have the 'format="formatValue"' attribute set to it.scopeValue
- The scope attribute value. If not null, the generated reference will have the 'scope="scopeValue"' attribute set to it.isXref
- true
if we need to insert an <xref> element, false
for the <link> element.hrefType
- The type of the link. If LINK_TYPE_DITA_TOPIC
, the user wants to insert a reference to a DITA resource (Insert Cross Reference action).
If LINK_TYPE_NON_DITA_RESOURCE
, wants to a reference to an external non-dita resource (Web Link action or File Reference action).initialReferenceURL
- The default URL that will be displayed in the URL
field of the insert reference dialog.
displayReferenceUrl
- If true
the URL input will be
displayed in the insert reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
AuthorOperationException
public static void insertLinkReference(AuthorAccess authorAccess, java.lang.String typeValue, java.lang.String formatValue, java.lang.String scopeValue, boolean isXref, java.lang.String preferredElName, java.lang.String hrefType, java.net.URL initialReferenceURL, boolean displayReferenceUrl) throws AuthorOperationException
authorAccess
- The author access.typeValue
- The type attribute value. If not null, the generated reference will have the 'type="typeValue"' attribute set to it.formatValue
- The format attribute value. If not null and the reference points to a non-DITA resource, the generated reference will have the 'format="formatValue"' attribute set to it.scopeValue
- The scope attribute value. If not null, the generated reference will have the 'scope="scopeValue"' attribute set to it.isXref
- true
if we need to insert an <xref> element, false
for the <link> element.preferredElName
- The preferred name of the reference element.hrefType
- The type of the link. If LINK_TYPE_DITA_TOPIC
, the user wants to insert a reference to a DITA resource (Insert Cross Reference action).
If LINK_TYPE_NON_DITA_RESOURCE
, wants to a reference to an external non-dita resource (Web Link action or File Reference action).initialReferenceURL
- The default URL that will be displayed in the URL
field of the insert reference dialog.
displayReferenceUrl
- If true
the URL input will be
displayed in the insert reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
AuthorOperationException
public static void insertLinkReference(AuthorAccess authorAccess, java.lang.String typeValue, java.lang.String formatValue, java.lang.String scopeValue, boolean isXref, java.lang.String hrefType, java.net.URL initialReferenceURL, boolean displayReferenceUrl, DITAAccess.InsertLinkReferenceShortcut insertLinkReferenceShortcut) throws AuthorOperationException
authorAccess
- The author access.typeValue
- The type attribute value. If not null, the generated reference will have the 'type="typeValue"' attribute set to it.formatValue
- The format attribute value. If not null and the reference points to a non-DITA resource, the generated reference will have the 'format="formatValue"' attribute set to it.scopeValue
- The scope attribute value. If not null, the generated reference will have the 'scope="scopeValue"' attribute set to it.isXref
- true
if we need to insert an <xref> element, false
for the <link> element.hrefType
- The type of the link. If LINK_TYPE_DITA_TOPIC
, the user wants to insert a reference to a DITA resource (Insert Cross Reference action).
If LINK_TYPE_NON_DITA_RESOURCE
, wants to a reference to an external non-dita resource (Web Link action or File Reference action).initialReferenceURL
- The default URL that will be displayed in the URL
field of the insert reference dialog.
displayReferenceUrl
- If true
the URL input will be
displayed in the insert reference dialog (the user will have the possibility
to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).
insertLinkReferenceShortcut
- A shortcut class that allows us to collectthe references
before inserting them into document.AuthorOperationException
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
public static void insertLinkReference(AuthorAccess authorAccess, java.lang.String typeValue, java.lang.String formatValue, java.lang.String scopeValue, boolean isXref, java.lang.String preferredElName, java.lang.String hrefType, java.net.URL initialReferenceURL, boolean displayReferenceUrl, DITAAccess.InsertLinkReferenceShortcut insertLinkReferenceShortcut) throws AuthorOperationException
authorAccess
- The author access.typeValue
- The type attribute value.
If not null
, the generated reference will have the type="typeValue"
attribute set to it.formatValue
- The format attribute value.
If not null
and the reference points to a non-DITA resource,
the generated reference will have the format="formatValue"
attribute set to it.scopeValue
- The scope attribute value.
If not null
, the generated reference will have the scope="scopeValue"
attribute set to it.isXref
- true
if we need to insert an <xref>
element,
false
for the <link>
element.preferredElName
- The preferred name of the reference element.hrefType
- The type of the link.
If LINK_TYPE_DITA_TOPIC
,
the user wants to insert a reference to a DITA resource (Insert Cross Reference action).
If LINK_TYPE_NON_DITA_RESOURCE
,
wants to a reference to an external non-dita resource (Web Link action or File Reference action).initialReferenceURL
- The default URL that will be displayed in the URL field of the insert reference dialog.displayReferenceUrl
- If true
the URL input will be displayed in the insert reference dialog
(the user will have the possibility to change the reference URL).
This parameter can be set to false
when an initialReferenceURL
is provided, and the user must not have the possibility to change it
(the reference URL must be fixed).insertLinkReferenceShortcut
- A shortcut class that allows us to collectthe references
before inserting them into document.AuthorOperationException
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
public static void insertLinkReference(java.lang.String referenceValue, java.lang.String targetElementClass, java.lang.String targetElementQName, AuthorAccess authorAccess, java.lang.String typeValue, java.lang.String formatValue, java.lang.String scopeValue, boolean isXref, java.lang.String hrefType) throws AuthorOperationException
referenceValue
- The class of the target element.targetElementClass
- The class of the target element.targetElementQName
- The qualified name of the target element.authorAccess
- The author access.typeValue
- The type attribute value. If not null, the generated reference will have the 'type="typeValue"' attribute set to it.formatValue
- The format attribute value. If not null and the reference points to a non-DITA resource, the generated reference will have the 'format="formatValue"' attribute set to it.scopeValue
- The scope attribute value. If not null, the generated reference will have the 'scope="scopeValue"' attribute set to it.isXref
- true
if we need to insert an <xref> element, false
for the <link> element.hrefType
- The type of the link. If LINK_TYPE_DITA_TOPIC
, the user wants to insert a reference to a DITA
resource (Insert Cross Reference action). If LINK_TYPE_NON_DITA_RESOURCE
, wants to a reference
to an external non-dita resource (Web Link action or File Reference action).AuthorOperationException
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
public static java.lang.String rewriteKeyref(java.util.LinkedHashMap<java.net.URL,java.util.List<java.util.Stack<java.util.Set<java.lang.String>>>> urlKeyScopesMapping, java.util.LinkedHashMap<java.lang.String,ro.sync.ecss.dita.reference.keyref.KeyInfo> keys, AuthorNode contextNode, java.lang.String keyref)
urlKeyScopesMapping
- Global URL to key scopes mapping.keys
- Map of keys.contextNode
- The context node.keyref
- The original keyref.public static java.util.LinkedHashMap<java.net.URL,java.util.List<java.util.Stack<java.util.Set<java.lang.String>>>> getURLKeyScopeContexts(java.net.URL originatorURL)
originatorURL
- The originator URL.public static void editTopicref(AuthorElement[] topicrefNodes, AuthorAccess authorAccess)
topicrefNodes
- The topicref elements.authorAccess
- Author access.public static java.util.List<DitaReferenceTargetDescriptor> getDitaReferenceTargets(AuthorAccess authorAccess, java.net.URL targetURL) throws java.io.IOException
authorAccess
- The author access of the currently opened document.targetURL
- The URL of the topic.java.io.IOException
- If an error occured while reading the URL.public static java.lang.String getFormat(java.lang.String hrefValue, java.lang.String formatValue, boolean fillFormatAttr)
hrefValue
- The HREF of the resource.formatValue
- The default format value.fillFormatAttr
- true
if the attribute should be filled when serializing.public static java.lang.String checkValidKeyName(java.lang.String keyName)
keyName
- The key name.null
if the key name is valid.public static HrefInfo getHrefInformation(AuthorNode node)
node
- The author node to get the reference information for.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
public static void exportDITAMap(java.net.URL ditamapURL, java.io.File exportDirectory, boolean exportAsZip, java.lang.String zipFileName, ExportProgressUpdater progressUpdater)
ditamapURL
- The DITA Map URL.exportDirectory
- The export directory.exportAsZip
- true
to export as ZIPzipFileName
- Zip file name.progressUpdater
- The progress updater.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.