Class DocbookAccess


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

      • DOCBOOK_NS

        public static final java.lang.String DOCBOOK_NS
        Docbook namespace.
        See Also:
        Constant Field Values
    • Method Detail

      • 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.
      • editOLink

        public static void editOLink​(AuthorAccess authorAccess,
                                     java.lang.String namespace)
                              throws AuthorOperationException,
                                     javax.swing.text.BadLocationException
        Edit OLink.
        Parameters:
        authorAccess - Author access
        namespace - Namespace
        Throws:
        AuthorOperationException
        javax.swing.text.BadLocationException
      • filterAttributeValues

        public static java.util.List<CIValue> filterAttributeValues​(java.util.List<CIValue> attributeValues,
                                                                    WhatPossibleValuesHasAttributeContext context,
                                                                    java.lang.String documentTypeName)
        Propose additional attribute values
        Parameters:
        attributeValues - The attribute values
        context - The context
        documentTypeName -
        Returns:
        The enriched list
      • annotateAttributes

        public static java.util.List<CIAttribute> annotateAttributes​(java.util.List<CIAttribute> attributes)
        Annotate a list of attributes.
        Parameters:
        attributes - The attributes list.
        Returns:
        The list of attributes with annotations.
      • 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 java.lang.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 java.lang.String chooseURLForLink​(AuthorAccess authorAccess,
                                                        java.lang.String title)
        Choose url for link.
        Parameters:
        authorAccess - The author access.
        title - The dialog title.
        Returns:
        The chosen url.
        Since:
        18
      • resolveCustomHrefToMasterFile

        public static java.net.URL resolveCustomHrefToMasterFile​(java.net.URL currentEditorURL,
                                                                 java.lang.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.