Package ro.sync.ecss.docbook
Class DocbookAccess
java.lang.Object
ro.sync.ecss.docbook.DocbookAccess
Docbook access.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic List<CIAttribute>
annotateAttributes
(List<CIAttribute> attributes) Annotate a list of attributes.static ro.sync.ecss.docbook.DocBookImageInfo
chooseImageReference
(AuthorAccess authorAccess) Allows the user to choose an image reference, which will be inserted inside the document.static String
chooseLocalLink
(AuthorAccess authorAccess, boolean isXref, boolean isDocbook5) Show a dialog to choose an id.static OLinkInfo
chooseOLink
(AuthorAccess authorAccess) Choose OLink.static String
chooseURLForLink
(AuthorAccess authorAccess, String title) Choose url for link.static void
editOLink
(AuthorAccess authorAccess, String namespace) Edit OLink.filterAttributeValues
(List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context, String documentTypeName) Propose additional attribute valuesstatic void
insertLocalLink
(AuthorAccess authorAccess, boolean schemaAware) Create and insert a local link element.static void
insertOLink
(AuthorAccess authorAccess, String namespace) Insert OLink.static void
insertXInclude
(AuthorAccess authorAccess) Insert an XInclude fragment.static void
insertXRef
(AuthorAccess authorAccess, boolean schemaAware) Insert a xref element.static void
pasteContentAsLink
(AuthorAccess authorAccess) Paste clipboard content as <link> with @linkend attribute.static void
pasteContentAsXref
(AuthorAccess authorAccess) Paste clipboard content as <xref> with @linkend attribute.static URL
resolveCustomHrefToMasterFile
(URL currentEditorURL, String linkHref, AuthorAccess authorAccess) Resolve an IDREF to a main file if possible.static void
setDocbookAccessCustomizer
(ro.sync.ecss.docbook.DocbookAccessCustomizer accessCustomizer)
-
Field Details
-
DOCBOOK_NS
Docbook namespace.- See Also:
-
-
Method Details
-
setDocbookAccessCustomizer
public static void setDocbookAccessCustomizer(ro.sync.ecss.docbook.DocbookAccessCustomizer accessCustomizer) - Parameters:
accessCustomizer
- The accessCustomizer to set.
-
chooseOLink
Choose OLink. Public, maybe users want to customize what tag name to insert.- Parameters:
authorAccess
- The Author access.- Returns:
- The OLink information, or
null
if the user canceled the operation.
-
insertOLink
public static void insertOLink(AuthorAccess authorAccess, String namespace) throws AuthorOperationException Insert OLink.- Parameters:
authorAccess
- Author accessnamespace
- Namespace- Throws:
AuthorOperationException
-
editOLink
public static void editOLink(AuthorAccess authorAccess, String namespace) throws AuthorOperationException, BadLocationException Edit OLink.- Parameters:
authorAccess
- Author accessnamespace
- Namespace- Throws:
AuthorOperationException
BadLocationException
-
filterAttributeValues
public static List<CIValue> filterAttributeValues(List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context, String documentTypeName) Propose additional attribute values- Parameters:
attributeValues
- The attribute valuescontext
- The contextdocumentTypeName
-- Returns:
- The enriched list
-
annotateAttributes
Annotate a list of attributes.- Parameters:
attributes
- The attributes list.- Returns:
- The list of attributes with annotations.
-
insertXInclude
Insert an XInclude fragment.- Parameters:
authorAccess
- The author access.- Throws:
AuthorOperationException
-
insertLocalLink
public static void insertLocalLink(AuthorAccess authorAccess, boolean schemaAware) throws AuthorOperationException Create and insert a local link element.- Parameters:
authorAccess
- The Author access.schemaAware
-true
to insert with schema aware,false
otherwise.- Throws:
AuthorOperationException
-
chooseLocalLink
Show a dialog to choose an id.- Parameters:
authorAccess
- The author access.isXref
- Iftrue
it will be inserted an xref element.isDocbook5
- Iftrue
the current file is Docbook 5.- Returns:
- The chosen id or
null
if the user canceled the dialog. - Since:
- 18
-
chooseURLForLink
Choose url for link.- Parameters:
authorAccess
- The author access.title
- The dialog title.- Returns:
- The chosen url.
- Since:
- 18
-
insertXRef
public static void insertXRef(AuthorAccess authorAccess, boolean schemaAware) throws AuthorOperationException Insert a xref element.- Parameters:
authorAccess
- The Author access.schemaAware
-true
to insert with schema aware,false
otherwise.- Throws:
AuthorOperationException
-
resolveCustomHrefToMasterFile
public static URL resolveCustomHrefToMasterFile(URL currentEditorURL, String linkHref, AuthorAccess authorAccess) Resolve an IDREF to a main file if possible.- Parameters:
currentEditorURL
- The current editor URLlinkHref
- The link hrefauthorAccess
- The author access- Returns:
- The resolved URL if any.
-
pasteContentAsLink
Paste clipboard content as <link> with @linkend attribute.- Parameters:
authorAccess
- The author access.
-
pasteContentAsXref
Paste clipboard content as <xref> with @linkend attribute.- Parameters:
authorAccess
- The author access.
-
chooseImageReference
public static ro.sync.ecss.docbook.DocBookImageInfo chooseImageReference(AuthorAccess authorAccess) throws AuthorOperationException Allows the user to choose an image reference, which will be inserted inside the document.- Parameters:
authorAccess
- Access to the Author-specific functions.- Returns:
- An object containing all the properties for the image that will be inserted.
- Throws:
AuthorOperationException
- When the operation cannot be performed.
-