Class DocbookAccess

java.lang.Object
ro.sync.ecss.docbook.DocbookAccess

@API(type=NOT_EXTENDABLE, src=PRIVATE) public final class DocbookAccess extends Object
Docbook access.
  • Field Details

  • Method Details

    • setDocbookAccessCustomizer

      public static void setDocbookAccessCustomizer(ro.sync.ecss.docbook.DocbookAccessCustomizer accessCustomizer)
      Parameters:
      accessCustomizer - The accessCustomizer to set.
    • chooseOLink

      public static OLinkInfo chooseOLink(AuthorAccess authorAccess)
      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 access
      namespace - Namespace
      Throws:
      AuthorOperationException
    • editOLink

      public static void editOLink(AuthorAccess authorAccess, String namespace) throws AuthorOperationException, BadLocationException
      Edit OLink.
      Parameters:
      authorAccess - Author access
      namespace - 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 values
      context - The context
      documentTypeName -
      Returns:
      The enriched list
    • annotateAttributes

      public static List<CIAttribute> annotateAttributes(List<CIAttribute> attributes)
      Annotate a list of attributes.
      Parameters:
      attributes - The attributes list.
      Returns:
      The list of attributes with annotations.
    • insertXInclude

      public static void insertXInclude(AuthorAccess authorAccess) throws AuthorOperationException
      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

      public static String chooseLocalLink(AuthorAccess authorAccess, boolean isXref, boolean isDocbook5)
      Show a dialog to choose an id.
      Parameters:
      authorAccess - The author access.
      isXref - If true it will be inserted an xref element.
      isDocbook5 - If true the current file is Docbook 5.
      Returns:
      The chosen id or null if the user canceled the dialog.
      Since:
      18
    • chooseURLForLink

      public static String chooseURLForLink(AuthorAccess authorAccess, String title)
      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 URL
      linkHref - The link href
      authorAccess - The author access
      Returns:
      The resolved URL if any.
    • pasteContentAsLink

      public static void pasteContentAsLink(AuthorAccess authorAccess)
      Paste clipboard content as <link> with @linkend attribute.
      Parameters:
      authorAccess - The author access.
    • pasteContentAsXref

      public static void pasteContentAsXref(AuthorAccess authorAccess)
      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.