Interface AuthorAccessDeprecated

  • All Known Subinterfaces:
    AuthorAccess

    @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface AuthorAccessDeprecated
    Contains methods that are deprecated in the AuthorAccess and should no longer be used.
    • Method Detail

      • getSelectionStart

        @Deprecated
        int getSelectionStart()
        Get the offset of the selection start. It is inclusive.
        Returns:
        The offset of the selection start, 0 based.
      • getSelectionEnd

        @Deprecated
        int getSelectionEnd()
        Get the offset of the selection end. It is exclusive.
        Returns:
        The offset of the selection end, zero based.
      • getSelectedText

        @Deprecated
        java.lang.String getSelectedText()
        Get the selected text. The text does not contains XML tags.
        Returns:
        The selected text or the empty string if no selection is present.
      • getCaretOffset

        @Deprecated
        int getCaretOffset()
        Deprecated.
        Use WSTextBasedEditorPage.getCaretOffset() instead. For example if you have an AuthorAccess object then use authorAccess.getEditorAccess().getCaretOffset().
        The current caret offset.
        Returns:
        The caret offset, 0 based.
      • insertText

        @Deprecated
        void insertText​(java.lang.String text,
                        int offset)
        Inserts a text at the offset. After the operation is performed the caret will be positioned at the end of the inserted text.
        Parameters:
        text - The text to insert.
        offset - The offset of the insertion point, 0 based.
      • insertXMLFragment

        @Deprecated
        void insertXMLFragment​(java.lang.String xmlFragment,
                               int offset)
                        throws AuthorOperationException
        Insert an XML fragment at the given offset. After the operation is performed the caret will be positioned at the end of the inserted XML fragment.
        Parameters:
        xmlFragment - The XML fragment.
        offset - The offset of the insertion point, 0 based.
        Throws:
        AuthorOperationException - If it could not be inserted.
      • insertXMLFragment

        @Deprecated
        void insertXMLFragment​(java.lang.String xmlFragment,
                               java.lang.String xpathLocation,
                               java.lang.String relativePosition)
                        throws AuthorOperationException
        Insert an XML fragment at the node specified by the xpathLocation and relativePosition. Note: if the xpathLocation is not specified then the XML fragment will be inserted at the caret position(relativePosition is ignored).

        After the operation is performed the caret will be positioned at the end of the inserted XML fragment.
        Parameters:
        xmlFragment - The XML fragment.
        xpathLocation - The xpath location.
        relativePosition - The position relative to the node identified by the xpath location. Can be one of the constants: AuthorConstants.POSITION_BEFORE, AuthorConstants.POSITION_AFTER, AuthorConstants.POSITION_INSIDE.
        Throws:
        AuthorOperationException - If it could not be inserted.
      • surroundInFragment

        @Deprecated
        void surroundInFragment​(java.lang.String xmlFragment,
                                int startOffset,
                                int endOffset)
                         throws AuthorOperationException
        Surround the given offsets in xmlFragment. If endOffset < startOffset the xmlFragment will be inserted at startOffset.
        Parameters:
        xmlFragment - The XML fragment which will surround the given offsets. The first XML fragment leaf(deepest on the first branch) will be the surround point.
        startOffset - The start offset of the fragment to be surrounded, 0 based and inclusive.
        endOffset - The end offset of the fragment to be surrounded, 0 based and inclusive.
        Throws:
        AuthorOperationException - If the fragment between the offsets could not be surrounded.
      • surroundInText

        @Deprecated
        void surroundInText​(java.lang.String header,
                            java.lang.String footer,
                            int startOffset,
                            int endOffset)
        Surround the given offsets in plain text(without XML parsing) by inserting the header at the start offset and the footer at the endOffset.
        Parameters:
        header - The header to be inserted before the surrounded text.
        footer - The footer to be inserted after the surrounded text.
        startOffset - The start offset of the text to be surrounded, 0 based.
        endOffset - The end offset of the text to be surrounded, zero based.
      • setCaretPosition

        @Deprecated
        void setCaretPosition​(int offset)
        Move the caret to the specified offset.
        Parameters:
        offset - The offset where the caret should be positioned, 0 based.
      • select

        @Deprecated
        void select​(int startOffset,
                    int endOffset)
        Deprecated.
        Select the interval between start and end offset.
        Parameters:
        startOffset - Inclusive start offset
        endOffset - Exclusive end offset
      • getWordAtCaret

        @Deprecated
        int[] getWordAtCaret()
        Deprecated.
        Compute the offsets of the word that contains the caret position.
        Returns:
        An array with the start and end offsets of the word at caret. null if the offsets couldn't be obtained.
      • getParentFrame

        @Deprecated
        java.lang.Object getParentFrame()
        Deprecated.
        Returns the parent frame.
        Returns:
        The parent frame (or @link java.awt.Frame (when running as a JApplet)) of the Oxygen application or the parent shell(Shell) if this is the Eclipse implementation.
      • makeRelative

        @Deprecated
        java.lang.String makeRelative​(java.net.URL baseURL,
                                      java.net.URL childURL)
        Deprecated.
        Make the child path relative to the parent.

        The child path is relatively expressed to the base file. If is not possible, the child URL is returned.

        Ex: Base: "file://c:/projects/exml/base.prx", Child "file://c:/projects/exml/test/someTest.xml"

        Result: "test/someTest.xml"

        Parameters:
        baseURL - The base URL.
        childURL - The child URL.
        Returns:
        The relative path or the childURL if a relative path cannot be computed.
      • escapeAttributeValue

        @Deprecated
        java.lang.String escapeAttributeValue​(java.lang.String attributeValue)
        Escape an attribute value so that the XML remains wellformed.
        Parameters:
        attributeValue - The attribute value.
        Returns:
        The escaped value.
      • getEditorLocation

        @Deprecated
        java.net.URL getEditorLocation()
        Deprecated.
        Get the editor location.
        Returns:
        The editor location.
      • locateFile

        @Deprecated
        java.io.File locateFile​(java.net.URL url)
        Deprecated.
        Locate the file on disk corresponding to the URL.
        Parameters:
        url - The URL to be checked.
        Returns:
        The corresponding file or null if URL is remote.
      • chooseFile

        @Deprecated
        java.io.File chooseFile​(java.lang.String title,
                                java.lang.String[] allowedExtensions,
                                java.lang.String filterDescr,
                                boolean openForSave)
        Choose a file.
        Parameters:
        title - The file chooser title.
        allowedExtensions - Allowed file extensions.
        filterDescr - Description for this file filter.
        openForSave - True to show the file chooser for saving, false to use it for opening
        Returns:
        The chosen file or null if user canceled the dialog...
      • chooseFile

        @Deprecated
        java.io.File chooseFile​(java.lang.String title,
                                java.lang.String[] allowedExtensions,
                                java.lang.String filterDescr)
        Choose a file.
        Parameters:
        title - The file chooser title.
        allowedExtensions - Allowed file extensions.
        filterDescr - Description for this file filter.
        Returns:
        The chosen file or null if user canceled the dialog...
      • chooseURL

        @Deprecated
        java.net.URL chooseURL​(java.lang.String title,
                               java.lang.String[] allowedExtensions,
                               java.lang.String filterDescr)
        Choose an url.
        Parameters:
        title - The file chooser title.
        allowedExtensions - Allowed extensions.
        filterDescr - Description for this file filter.
        Returns:
        The chosen url or null if user canceled the dialog...
      • getTableCellIndex

        @Deprecated
        int[] getTableCellIndex​(AuthorElement authorElement)
        Obtain the table row and column index for the given element.
        Parameters:
        authorElement - The element.
        Returns:
        an array with row index on the first position and column index on the second one. 0 based. Can be null.
      • getTableCellAt

        @Deprecated
        AuthorElement getTableCellAt​(int row,
                                     int column,
                                     AuthorElement tableElement)
        Obtain the element at the given row and column in the table.
        Parameters:
        row - The row, 0 based.
        column - The column, 0 based.
        tableElement - The table element.
        Returns:
        The element at the specified location. Can be null if it could not be found.
      • getTableColSpanIndices

        @Deprecated
        int[] getTableColSpanIndices​(AuthorElement cellElement)
        For the given cell find the start column and the end column defining the column span. The indices are 0 based.
        Parameters:
        cellElement - The table cell element.
        Returns:
        The column span indices. Can be null.
      • isStandalone

        @Deprecated
        boolean isStandalone()
        Deprecated.
        Returns information about the Oxygen underlying implementation.
        Returns:
        true if this is the standalone Oxygen version, false if this is the Oxygen Eclipse plugin version.
      • inInlineContext

        @Deprecated
        boolean inInlineContext​(int offset)
                         throws javax.swing.text.BadLocationException
        Test if the context at the given offset is inline or not. For example a text paragraph determines an inline context, and for an offset inside this paragraph the method will return true. For an offset between two paragraphs(block boxes) the method will returns false.
        Parameters:
        offset - The offset in the document, zero based.
        Returns:
        Returns true if the given offset is inside an inline context. false otherwise.
        Throws:
        javax.swing.text.BadLocationException - When the offset does not exists in document model.
      • insertMultipleElements

        @Deprecated
        void insertMultipleElements​(AuthorElement parentElement,
                                    java.lang.String[] elementNames,
                                    int[] offsets,
                                    java.lang.String namespace)
        Insert multiple empty elements at the given offsets. The offsets and elements must be in the document order.
        Parameters:
        parentElement - The element that will be the parent of the inserted elements.
        elementNames - The element names to be inserted.
        offsets - The absolute offsets where the elements will be inserted.
        namespace - The namespace of the new inserted elements. null for default namespace.
      • multipleDelete

        @Deprecated
        void multipleDelete​(AuthorElement parentElement,
                            int[] startOffsets,
                            int[] endOffsets)
        Deletes the given intervals. The offsets must be in document order and the intervals must not intersect with one another.
        Parameters:
        parentElement - The element that contains all the deleted intervals.
        startOffsets - The start offset for each interval. Must be in document order.
        endOffsets - The end offset for each interval. Must be in document order.
      • removeClonedElementAttribute

        @Deprecated
        void removeClonedElementAttribute​(AuthorElement element,
                                          java.lang.String attrName)
        Deprecated.
        Remove the attribute from a cloned element. Warning: Use this only when the element is not from the existing content. All operations on nodes from the document model must be done through the AuthorDocumentController.
        Parameters:
        element - Element node.
        attrName - The attribute name to remove.
      • setClonedElementAttribute

        @Deprecated
        void setClonedElementAttribute​(AuthorElement element,
                                       java.lang.String name,
                                       AttrValue attributeValue)
        Set the attribute value for a cloned element. Warning: Use this only when the element is not from the existing content. All operations on nodes from the document model must be done through the AuthorDocumentController.
        Parameters:
        element - Element node.
        name - Name of the attribute to be set.
        attributeValue - The attribute value to set. Must not be null.
      • showConfirmDialog

        @Deprecated
        int showConfirmDialog​(java.lang.String title,
                              java.lang.String message,
                              java.lang.String[] buttonNames,
                              int[] buttonIds)
        Shows a question message.
        Parameters:
        title - The dialog title.
        message - The message to be presented to the user.
        buttonNames - The names of the buttons representing the choices.
        buttonIds - The id for each button. Used to identify which button was pressed. All ids must be greater or equal to 0.
        Returns:
        the id of the pressed button or -1 if the dialog was closed by other means.
      • newNonValidatingXMLReader

        @Deprecated
        org.xml.sax.XMLReader newNonValidatingXMLReader()
        Creates an XML Reader without validation.
        Returns:
        A new XML Reader.
      • correctURL

        @Deprecated
        java.lang.String correctURL​(java.lang.String url)
        Deprecated.
        Corrects the given URL.
        Parameters:
        url - The URL to be corrected.
        Returns:
        The corrected URL.
      • showErrorMessage

        @Deprecated
        void showErrorMessage​(java.lang.String message)
        Presents the error message.
        Parameters:
        message - The error message to be presented.
      • resolvePath

        @Deprecated
        java.net.URL resolvePath​(java.net.URL baseURL,
                                 java.lang.String relativeLocation,
                                 boolean entityResolve,
                                 boolean uriResolve)
        Try to resolve a relative href to an absolute path by passing through catalog.
        Parameters:
        baseURL - The URL of the current opened XML file.
        relativeLocation - The relative href.
        entityResolve - True to pass through catalog entity resolver
        uriResolve - True to pass through catalog URI resolver.
        Returns:
        The absolute URL.
      • findNodesByXPath

        @Deprecated
        AuthorNode[] findNodesByXPath​(java.lang.String xpathExpression,
                                      boolean ignoreTexts,
                                      boolean ignoreCData,
                                      boolean ignoreComments)
                               throws AuthorOperationException
        Finds the author nodes selected by the given XPath expression. The result of this function is an array of AuthorNode's selected by the given XPath expression. Author text nodes, Author CDATA section nodes and Author comment nodes can be ignored for performance reasons.
        For example executing the expression:
        //node()
        will return an array with all the AuthorNode's in the document.
        But the result of calling the function with the expression:
        count(//node())
        will return an empty array.
        Parameters:
        xpathExpression - The XPath expression.
        ignoreTexts - If true Author text nodes will not be returned.
        ignoreCData - If true Author CDATA sections will not be returned.
        ignoreComments - If true Author comments will not be returned.
        Returns:
        The Author nodes selected by the XPath expression.
        Throws:
        AuthorOperationException - If the XPath expression failed to be evaluated.
      • evaluateXPath

        @Deprecated
        java.lang.Object[] evaluateXPath​(java.lang.String xpathExpression,
                                         boolean ignoreTexts,
                                         boolean ignoreCData,
                                         boolean ignoreComments)
                                  throws AuthorOperationException
        Evaluates an XPath expression. This functions returns the result of the given XPath expression as an array of Object's. Author DOM text nodes, DOM CDATA sections and DOM comments wrappers can be ignored for performance reasons.
        For example, executing the expression:
        //node()
        will return an array with all the Author DOM Node wrappers in the document.
        while evaluating the expression:
        count(//node())
        will return an array having a single component representing the number of nodes in the document.
        Evaluating the expression:
        //node(), count(//node())
        will return an array containing all the Author DOM Node wrappers in the document and having as last component the total number of nodes.
        Parameters:
        xpathExpression - The XPath expression.
        ignoreTexts - If true DOM text nodes will not be returned.
        ignoreCData - If true DOM CDATA sections will not be returned.
        ignoreComments - If true DOM comments will not be returned.
        Returns:
        An array of objects representing the XPath result.
        Throws:
        AuthorOperationException - If the XPath expression failed to be evaluated.
      • viewToModel

        @Deprecated
        AuthorViewToModelInfo viewToModel​(int x,
                                          int y)
        Get the position in the document corresponding to the point in the viewport.
        Parameters:
        x - The "x" coordinate relative to the viewport origin.
        y - The "y" coordinate relative to the viewport origin.
        Returns:
        The information about the view-at-position.
      • isTrackingChanges

        @Deprecated
        boolean isTrackingChanges()
        Return true if the current editor is in change tracking mode
        Returns:
        true if the current editor is in change tracking mode