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.DocBookImageInfochooseImageReference(AuthorAccess authorAccess) Allows the user to choose an image reference, which will be inserted inside the document.static StringchooseLocalLink(AuthorAccess authorAccess, boolean isXref, boolean isDocbook5) Show a dialog to choose an id.static OLinkInfochooseOLink(AuthorAccess authorAccess) Choose OLink.static StringchooseURLForLink(AuthorAccess authorAccess, String title) Choose url for link.static voideditOLink(AuthorAccess authorAccess, String namespace) Edit OLink.filterAttributeValues(List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context, String documentTypeName) Propose additional attribute valuesstatic voidinsertLocalLink(AuthorAccess authorAccess, boolean schemaAware) Create and insert a local link element.static voidinsertOLink(AuthorAccess authorAccess, String namespace) Insert OLink.static voidinsertXInclude(AuthorAccess authorAccess) Insert an XInclude fragment.static voidinsertXRef(AuthorAccess authorAccess, boolean schemaAware) Insert a xref element.static voidpasteContentAsLink(AuthorAccess authorAccess) Paste clipboard content as <link> with @linkend attribute.static voidpasteContentAsXref(AuthorAccess authorAccess) Paste clipboard content as <xref> with @linkend attribute.static URLresolveCustomHrefToMasterFile(URL currentEditorURL, String linkHref, AuthorAccess authorAccess) Resolve an IDREF to a main file if possible.static voidsetDocbookAccessCustomizer(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
nullif 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:
AuthorOperationExceptionBadLocationException
-
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-trueto insert with schema aware,falseotherwise.- Throws:
AuthorOperationException
-
chooseLocalLink
Show a dialog to choose an id.- Parameters:
authorAccess- The author access.isXref- Iftrueit will be inserted an xref element.isDocbook5- Iftruethe current file is Docbook 5.- Returns:
- The chosen id or
nullif 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-trueto insert with schema aware,falseotherwise.- 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.
-