Class DocumentPositionedInfo

  • Direct Known Subclasses:
    AuthorDocumentPositionedInfo

    @API(type=EXTENDABLE,
         src=PUBLIC)
    public class DocumentPositionedInfo
    extends java.lang.Object
    This class holds information related to the document, refering to some errors, or find results. These informations hold the position in the document, the message and the systemId of the document in which they appear. If the systemId is null, then the semantics is that the info belongs to the currently edited file.
    • Constructor Summary

      Constructors 
      Constructor Description
      DocumentPositionedInfo​(int offset)
      Constructor for a DPI used only to hold the current position in the editor.
      DocumentPositionedInfo​(int severity, java.lang.String message)
      Constructor.
      DocumentPositionedInfo​(int severity, java.lang.String message, java.lang.String systemID)
      Constructor.
      DocumentPositionedInfo​(int severity, java.lang.String message, java.lang.String systemID, int line, int column)
      Constructor.
      DocumentPositionedInfo​(int severity, java.lang.String message, java.lang.String systemID, int line, int column, int length)
      Constructor.
      DocumentPositionedInfo​(int severity, java.lang.String message, java.lang.String systemID, int line, int column, int length, int offset, java.net.URL additionalInfo, boolean highlightToColumn)
      Constructor.
      DocumentPositionedInfo​(int severity, ro.sync.document.MessageProvider messageProvider, java.lang.String systemID, int line, int column, int endLine, int endColumn, int length, int offset, java.net.URL additionalInfo, boolean highlightToColumn)
      Constructor.
      DocumentPositionedInfo​(java.net.URL url)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String asHTML()
      Build the HTML representation of this DPI.
      java.lang.String asHTML​(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Build the HTML representation of this DPI.
      java.lang.String asHTML​(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Builds the HTML representation of this DPI.
      java.lang.String asHTML​(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription, boolean asCompleteHTMLDocument)
      Build the HTML representation of this DPI.
      java.lang.String asJSON()
      Build the JSON representation of this DPI.
      java.lang.String asJSON​(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Build the JSON representation of this DPI.
      java.lang.String asJSON​(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Build the JSON representation of this DPI.
      java.lang.String asText()
      Build the text representation of this DPI.
      java.lang.String asText​(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Build the text representation of this DPI.
      java.lang.String asText​(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Build the text representation of this DPI.
      java.lang.String asXML()
      Build the XML representation of this DPI.
      java.lang.String asXML​(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Build the XML representation of this DPI.
      java.lang.String asXML​(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
      Build the XML representation of this DPI.
      boolean equals​(java.lang.Object obj)
      Indicates whether some other document positioned information is "equal to" this one.
      static int flipSeverity​(int severityToFlip)
      Used to obtain the severity level to be used when sorting the DPIs by severity.
      protected java.lang.String getAdditionalHtmlContent()
      Return the additional HTML content, if any.
      java.net.URL getAdditionalInfo()
      The URL for additional information if available.
      ro.sync.exml.editor.Anchor getAnchor()
      Get the error anchor if any.
      int getColumn()
      Gets the column of the event.
      ro.sync.document.DPIData getData()
      Getter for the user managed data.
      ro.sync.document.DetailedExceptionInfo getDetailedExceptionInfo()
      Get detailed information about the problem.
      ro.sync.document.DITAAdditionalInfo getDITAAdditionalInfo()
      Additional info about DITA completeness check.
      ro.sync.document.ECAdditionalInfo getECAdditionalInfo()
      Additional info for Eclipse inner usage.
      int getEndColumn()
      Get the highlight end column, or NOT_KNOWN if not available.
      int getEndLine()
      Get the highlight end line, or NOT_KNOWN if not available.
      java.lang.String getEngineName()
      Get the name of the engine who provided the error.
      java.lang.String getErrorKey()
      Get the error key.
      java.lang.String getHTMLMessage()
      Gets the HTML fragment to be presented when the message is displayed as HTML.
      java.lang.String getImposedInitialPage()
      Get the imposed initial page if a new editor will be opened.
      int getLength()
      Gets the length of the text that will be selected in the editor.
      int getLine()
      Gets the line attribute of the event
      int[] getMatchRange()
      Get the match range if any.
      java.lang.String getMessage()
      Gets the message
      int getMessageHighlightOffset()
      Return the offset used to highlight the match inside the message in the results panel.
      ro.sync.document.MessageProvider getMessageProvider()
      The provider of messages from the current document position info.
      java.lang.String getMessageWithEngine()
      Gets the message prepended with the engine name, if available.
      java.lang.String getMessageWithEngine​(boolean includeSeverity, boolean includeErrorKey)
      Gets the message prepended with the engine name, if available.
      java.lang.String getMessageWithSeverity()
      Get the message with severity info as a char in the front of the message (W, E, F).
      java.lang.String getMessageWithSeverity​(boolean includeEngineInformation)
      Get the message with severity info as a char in the front of the message (W, E, F).
      java.lang.String getMessageWithSeverity​(boolean includeEngineInformation, boolean includeErrorKey)
      Gets the message with severity info as a char in the front of the message (W, E, F).
      int getOffset()
      Get the event's offset.
      ro.sync.document.OperationDescription getOperationDescription()
      The description of an operation (that is an operation which is applied over multiple resources) that generated this DPI.
      java.lang.String getPreferredEngineName()
      Get the preferred engine name who provided the error.
      int getSeverity()
      Gets the severity level.
      java.lang.String getSeverityAsString()
      Gets the severity level as string
      javax.swing.text.Position[] getStartEndPositions​(java.lang.String pageId)
      Get the temporary start and end positions for the current page.
      java.lang.String getSystemID()
      Gets the systemID attribute of the DocumentPositionedInfo object
      int hashCode()
      Compute unique hash code for this object.
      boolean isElementTarget()
      Return true if this DPI targets an XML element.
      boolean isHighlightToColumn()
      Check if the highlight must be made from column 0 to the specified column.
      void setAdditionalInfo​(java.net.URL url)
      Set the additional information URL if available.
      void setAnchor​(ro.sync.exml.editor.Anchor anchor)
      Set the error anchor.
      void setColumn​(int column)
      Sets the column of the event, or NOT_KNOWN if the column is not available.
      void setData​(ro.sync.document.DPIData data)
      Setter for the user managed data.
      void setDetailedExceptionInfo​(ro.sync.document.DetailedExceptionInfo detailedExceptionInfo)
      Set detailed information about the problem.
      void setDITAAdditionalInfo​(ro.sync.document.DITAAdditionalInfo additionalInfo)
      Additional info about DITA completeness check.
      void setECAdditionalInfo​(ro.sync.document.ECAdditionalInfo additionalInfo)
      Additional info for Eclipse inner usage.
      void setElementTarget​(boolean isElementTarget)
      Set true if this DPI targets an XML element.
      void setEndColumn​(int endColumn)
      Sets the end column of the highlight.
      void setEndLine​(int endLine)
      Sets the end line of the highlight.
      void setEngineName​(java.lang.String engineName)
      Set the name of the engine who provided the error.
      void setErrorKey​(java.lang.String errorKey)
      The error validation key.
      void setHighlightToColumn​(boolean how)
      Set highlight strategy for the document positioned information visual presentation.
      void setHtmlMessageFragment​(java.lang.String htmlMessageFragment)
      Set a special HTML fragment which needs to be presented instead of the message when the DPI is serialized to HTML.
      void setImposedInitialPage​(java.lang.String imposedInitialPage)
      Set the imposed initial page in which to open the DPI for a new editor.
      void setLength​(int length)
      Sets the length of the selected text.
      void setLine​(int line)
      Sets the line of the event, or NOT_KNOWN if the line is not available.
      void setMaskPasswordsInURLs​(boolean maskPasswordsInURLs)
      Set mask passwords in URLs, true by default.
      void setMatchRange​(int[] matchRange)
      Set the match range.
      void setMessage​(java.lang.String message)
      Sets the message.
      void setMessageHighlightOffset​(int messageHighlightOffset)
      Set the offset used to highlight the match inside the message in the results panel.
      void setOffset​(int offset)
      Sets the event's offset.
      void setOperationDescription​(ro.sync.document.OperationDescription operationDescription)
      Sets the description of an operation (that is an operation which is applied over multiple resources) that generated this DPI.
      void setSeverity​(int severity)
      Sets the error severity.
      void setStartEndPositionsMap​(java.util.Map<java.lang.String,​javax.swing.text.Position[]> startEndPositionsMap)
      Set a new temporary positions map.
      void setSystemID​(java.lang.String systemID)
      Sets the systemID of the event.
      void setTemporaryPositions​(javax.swing.text.Position startPosition, javax.swing.text.Position endPosition, java.lang.String pageId)
      Set the temporary start and end positions used for keeping the DPI synchronized with the highlight range from the page.
      java.lang.String toString()
      Gets the string representation.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • SEVERITY_INFO

        public static final int SEVERITY_INFO
        Information message.
        See Also:
        Constant Field Values
      • SEVERITY_FATAL

        public static final int SEVERITY_FATAL
        Fatal error message.
        See Also:
        Constant Field Values
      • NOT_KNOWN

        public static final int NOT_KNOWN
        If one of the components is not known, use this constant for it.
        See Also:
        Constant Field Values
      • MESSAGE_CSS_STYLE

        public static final java.lang.String MESSAGE_CSS_STYLE
        The message CSS style.
    • Constructor Detail

      • DocumentPositionedInfo

        public DocumentPositionedInfo​(int offset)
        Constructor for a DPI used only to hold the current position in the editor.
        Parameters:
        offset - Start of selection.
      • DocumentPositionedInfo

        public DocumentPositionedInfo​(int severity,
                                      java.lang.String message,
                                      java.lang.String systemID,
                                      int line,
                                      int column,
                                      int length)
        Constructor.
        Parameters:
        severity - the severity level of the message.
        message - the error message.
        systemID - the system ID.
        line - the line on which the error occurred in the document.
        column - the column on which the error occurred.
        length - the length of the text to be selected.
      • DocumentPositionedInfo

        public DocumentPositionedInfo​(int severity,
                                      java.lang.String message,
                                      java.lang.String systemID,
                                      int line,
                                      int column,
                                      int length,
                                      int offset,
                                      java.net.URL additionalInfo,
                                      boolean highlightToColumn)
        Constructor.
        Parameters:
        severity - the severity level of the message.
        message - the error message.
        systemID - the system ID.
        line - the line on which the error occurred in the document.
        column - the column on which the error occurred.
        length - the length of the text to be selected.
        offset - the offset in the document
        additionalInfo - the URL from which the user can retrieve additional info about the error.
        highlightToColumn - true if the opener must highlight the entire text from the 1 column to the column number. This is useful in case of error checks, like validations or well-formed.
      • DocumentPositionedInfo

        public DocumentPositionedInfo​(int severity,
                                      ro.sync.document.MessageProvider messageProvider,
                                      java.lang.String systemID,
                                      int line,
                                      int column,
                                      int endLine,
                                      int endColumn,
                                      int length,
                                      int offset,
                                      java.net.URL additionalInfo,
                                      boolean highlightToColumn)
        Constructor. Uses a message provider for the cases in which composing the message takes a lot of time (e.g. XPATH).
        Parameters:
        severity - the severity level of the message.
        messageProvider - the error message provider.
        systemID - the system ID.
        line - the line on which the error occurred in the document.
        column - the column on which the error occurred.
        endLine - the highlighted text must end in this line.
        endColumn - the highlighted text must end in this column.
        length - the length of the text to be selected.
        offset - the offset in the document
        additionalInfo - the URL from which the user can retrieve additional info about the error.
        highlightToColumn - true if the opener must highlight the entire text from the 1 column to the column number. This is useful in case of error checks, like validations or well-formed.
      • DocumentPositionedInfo

        public DocumentPositionedInfo​(int severity,
                                      java.lang.String message,
                                      java.lang.String systemID,
                                      int line,
                                      int column)
        Constructor.
        Parameters:
        severity - the severity level of the message.
        message - the error message.
        systemID - the system ID.
        line - the line on which the error occurred in the document.
        column - the column on which the error occurred.
      • DocumentPositionedInfo

        public DocumentPositionedInfo​(int severity,
                                      java.lang.String message,
                                      java.lang.String systemID)
        Constructor.
        Parameters:
        severity - the severity level of the message.
        message - the error message.
        systemID - the system ID.
      • DocumentPositionedInfo

        public DocumentPositionedInfo​(int severity,
                                      java.lang.String message)
        Constructor.
        Parameters:
        severity - the severity level of the message.
        message - the error message.
      • DocumentPositionedInfo

        public DocumentPositionedInfo​(java.net.URL url)
        Constructor. Use this for IDEAccess#openAndShowLocation. Tries to identify the line and column parameters in the URL fragment.
        Parameters:
        url - The URL to open in the editor.
    • Method Detail

      • flipSeverity

        public static int flipSeverity​(int severityToFlip)
        Used to obtain the severity level to be used when sorting the DPIs by severity. This is done to allow natural sorting by severity, having the SEVERITY_FATAL to be the small value and the SEVERITY_INFO the big value.
        Parameters:
        severityToFlip - The severity of a DPI to be translated into natural ordering.
        Returns:
        The natural ordering value to be used for a DPI' severity level.
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other document positioned information is "equal to" this one.
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Compute unique hash code for this object. Hashcode is compatible with equals method.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • setSeverity

        public void setSeverity​(int severity)
        Sets the error severity.
        Parameters:
        severity - The new severity value. One of: SEVERITY_INFO, SEVERITY_WARN, SEVERITY_ERROR or SEVERITY_FATAL
      • setColumn

        public void setColumn​(int column)
        Sets the column of the event, or NOT_KNOWN if the column is not available.
        Parameters:
        column - The column
      • setLine

        public void setLine​(int line)
        Sets the line of the event, or NOT_KNOWN if the line is not available.
        Parameters:
        line - The new line value, 1 based.
      • setMessage

        public void setMessage​(java.lang.String message)
        Sets the message. It will clear any user info if there is present into the message.
        Parameters:
        message - The new message
      • setMaskPasswordsInURLs

        public void setMaskPasswordsInURLs​(boolean maskPasswordsInURLs)
        Set mask passwords in URLs, true by default.
        Parameters:
        maskPasswordsInURLs - true to mask passwords in URLs which are part of the message.
      • setLength

        public void setLength​(int length)
        Sets the length of the selected text.
        Parameters:
        length - The length of the selected text.
      • setSystemID

        public void setSystemID​(java.lang.String systemID)
        Sets the systemID of the event.
        Parameters:
        systemID - The new systemID value
      • getLength

        public int getLength()
        Gets the length of the text that will be selected in the editor.
        Returns:
        The length of the text to be selected.
      • getColumn

        public int getColumn()
        Gets the column of the event.
        Returns:
        The column value, 1 based. Can be NOT_KNOWN.
      • getSeverity

        public int getSeverity()
        Gets the severity level. One of: SEVERITY_INFO, SEVERITY_WARN, SEVERITY_ERROR or SEVERITY_FATAL
        Returns:
        The severity value
      • getSeverityAsString

        public java.lang.String getSeverityAsString()
        Gets the severity level as string
        Returns:
        The severity value string
      • getLine

        public int getLine()
        Gets the line attribute of the event
        Returns:
        The line value, 1 based. Can be NOT_KNOWN.
      • getMessage

        public java.lang.String getMessage()
        Gets the message
        Returns:
        The message value
      • getHTMLMessage

        public java.lang.String getHTMLMessage()
        Gets the HTML fragment to be presented when the message is displayed as HTML.
        Returns:
        A special HTML fragment which needs to be presented when the message is presented as HTML. null if there is no HTML flavor.
      • getMessageProvider

        public ro.sync.document.MessageProvider getMessageProvider()
        The provider of messages from the current document position info.
        Returns:
        Returns the message provider.
      • getMessageWithEngine

        public java.lang.String getMessageWithEngine()
        Gets the message prepended with the engine name, if available.
        Returns:
        The message.
      • getMessageWithEngine

        public java.lang.String getMessageWithEngine​(boolean includeSeverity,
                                                     boolean includeErrorKey)
        Gets the message prepended with the engine name, if available. Could also include the severity and the error key.
        Parameters:
        includeSeverity - true to include the severity level (other than INFO).
        includeErrorKey - true to include the error code (if available).
        Returns:
        the error message built as requested.
      • getMessageWithSeverity

        public java.lang.String getMessageWithSeverity()
        Get the message with severity info as a char in the front of the message (W, E, F).
        Returns:
        The message prefixed with the severity char. For INFO we do not present such a char.
      • getMessageWithSeverity

        public java.lang.String getMessageWithSeverity​(boolean includeEngineInformation)
        Get the message with severity info as a char in the front of the message (W, E, F). Could include the engine information.
        Parameters:
        includeEngineInformation - true to include engine name.
        Returns:
        The message prefixed with the severity char. For INFO we do not present such a char.
      • getMessageWithSeverity

        public java.lang.String getMessageWithSeverity​(boolean includeEngineInformation,
                                                       boolean includeErrorKey)
        Gets the message with severity info as a char in the front of the message (W, E, F). Could also include engine info and error code.
        Parameters:
        includeEngineInformation - true to include engine name.
        includeErrorKey - true to include error code.
        Returns:
        The message prefixed with the severity char. For INFO we do not present such a char.
      • getSystemID

        public java.lang.String getSystemID()
        Gets the systemID attribute of the DocumentPositionedInfo object
        Returns:
        The systemID value
      • setOffset

        public void setOffset​(int offset)
        Sets the event's offset. can be NOT_KNOWN
        Parameters:
        offset - the new offset.
      • getOffset

        public int getOffset()
        Get the event's offset. Can be NOT_KNOWN
        Returns:
        the offset
      • toString

        public java.lang.String toString()
        Gets the string representation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation.
      • getAdditionalInfo

        public java.net.URL getAdditionalInfo()
        The URL for additional information if available.
        Returns:
        The additional information URL, or null.
      • setAdditionalInfo

        public void setAdditionalInfo​(java.net.URL url)
        Set the additional information URL if available.
        Parameters:
        url - The URL at which the user can find additional information.
      • isHighlightToColumn

        public boolean isHighlightToColumn()
        Check if the highlight must be made from column 0 to the specified column.
        Returns:
        True if the highlight must be made from column 0 to the specified column.
      • setHighlightToColumn

        public void setHighlightToColumn​(boolean how)
        Set highlight strategy for the document positioned information visual presentation.
        Parameters:
        how - true if the visual part should highlight from column 0 to specified column false otherwise.
      • getEndColumn

        public int getEndColumn()
        Get the highlight end column, or NOT_KNOWN if not available.
        Returns:
        the highlight end column, or NOT_KNOWN.
      • getEndLine

        public int getEndLine()
        Get the highlight end line, or NOT_KNOWN if not available.
        Returns:
        the highlight end line or NOT_KNOWN.
      • setEndLine

        public void setEndLine​(int endLine)
        Sets the end line of the highlight.
        Parameters:
        endLine - The end line of the highlight.
      • setEndColumn

        public void setEndColumn​(int endColumn)
        Sets the end column of the highlight.
        Parameters:
        endColumn - The end column of the highlight.
      • setData

        public void setData​(ro.sync.document.DPIData data)
        Setter for the user managed data.
        Parameters:
        data - The user managed data.
      • getData

        public ro.sync.document.DPIData getData()
        Getter for the user managed data.
        Returns:
        The user managed data.
      • setDetailedExceptionInfo

        public void setDetailedExceptionInfo​(ro.sync.document.DetailedExceptionInfo detailedExceptionInfo)
        Set detailed information about the problem.
        Parameters:
        detailedExceptionInfo - The additional detailed info.
      • getDetailedExceptionInfo

        public ro.sync.document.DetailedExceptionInfo getDetailedExceptionInfo()
        Get detailed information about the problem.
        Returns:
        Returns the additional detailed info.
      • setEngineName

        public void setEngineName​(java.lang.String engineName)
        Set the name of the engine who provided the error.
        Parameters:
        engineName - The source engine name who provided the error.
      • getEngineName

        public java.lang.String getEngineName()
        Get the name of the engine who provided the error.
        Returns:
        Returns the source engine name who provided the error. null if no was engine set.
      • getPreferredEngineName

        public java.lang.String getPreferredEngineName()
        Get the preferred engine name who provided the error. For DITA the engine is given by problem type.
        Returns:
        Returns the source engine name who provided the error.
      • asXML

        public java.lang.String asXML()
        Build the XML representation of this DPI.
        Returns:
        The XML representation of the DPI.
      • asXML

        public java.lang.String asXML​(boolean includeSeverity,
                                      boolean includeAdditionalInfo,
                                      boolean includeDescription,
                                      boolean includeSystemID,
                                      boolean includeLocation,
                                      boolean includeOperationDescription)
        Build the XML representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The XML representation of the DPI.
      • asXML

        public java.lang.String asXML​(boolean includeSeverity,
                                      boolean includeErrorCode,
                                      boolean includeAdditionalInfo,
                                      boolean includeDescription,
                                      boolean includeSystemID,
                                      boolean includeLocation,
                                      boolean includeOperationDescription)
        Build the XML representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeErrorCode - true if error code should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The XML representation of the DPI.
      • asJSON

        public java.lang.String asJSON()
        Build the JSON representation of this DPI.
        Returns:
        The JSON representation of the DPI.
      • asJSON

        public java.lang.String asJSON​(boolean includeSeverity,
                                       boolean includeAdditionalInfo,
                                       boolean includeDescription,
                                       boolean includeSystemID,
                                       boolean includeLocation,
                                       boolean includeOperationDescription)
        Build the JSON representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The JSON representation of the DPI.
      • asJSON

        public java.lang.String asJSON​(boolean includeSeverity,
                                       boolean includeErrorCode,
                                       boolean includeAdditionalInfo,
                                       boolean includeDescription,
                                       boolean includeSystemID,
                                       boolean includeLocation,
                                       boolean includeOperationDescription)
        Build the JSON representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeErrorCode - true if error code should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The JSON representation of the DPI.
      • asText

        public java.lang.String asText()
        Build the text representation of this DPI.
        Returns:
        The text representation of this DPI.
      • asText

        public java.lang.String asText​(boolean includeSeverity,
                                       boolean includeAdditionalInfo,
                                       boolean includeDescription,
                                       boolean includeSystemID,
                                       boolean includeLocation,
                                       boolean includeOperationDescription)
        Build the text representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The text representation of this DPI.
      • asText

        public java.lang.String asText​(boolean includeSeverity,
                                       boolean includeErrorCode,
                                       boolean includeAdditionalInfo,
                                       boolean includeDescription,
                                       boolean includeSystemID,
                                       boolean includeLocation,
                                       boolean includeOperationDescription)
        Build the text representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeErrorCode - true if error code should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The text representation of this DPI.
      • getImposedInitialPage

        public java.lang.String getImposedInitialPage()
        Get the imposed initial page if a new editor will be opened.
        Returns:
        the imposed initial page
      • setImposedInitialPage

        public void setImposedInitialPage​(java.lang.String imposedInitialPage)
        Set the imposed initial page in which to open the DPI for a new editor.
        Parameters:
        imposedInitialPage - The imposed initial page.
      • getAnchor

        public ro.sync.exml.editor.Anchor getAnchor()
        Get the error anchor if any.
        Returns:
        the error anchor if any.
      • setAnchor

        public void setAnchor​(ro.sync.exml.editor.Anchor anchor)
        Set the error anchor.
        Parameters:
        anchor - The anchor to set.
      • getMatchRange

        public int[] getMatchRange()
        Get the match range if any.
        Returns:
        The match range if possible.
      • setMatchRange

        public void setMatchRange​(int[] matchRange)
        Set the match range.
        Parameters:
        matchRange - The match range.
      • getMessageHighlightOffset

        public int getMessageHighlightOffset()
        Return the offset used to highlight the match inside the message in the results panel.
        Returns:
        the message highlight offset.
      • setMessageHighlightOffset

        public void setMessageHighlightOffset​(int messageHighlightOffset)
        Set the offset used to highlight the match inside the message in the results panel.
        Parameters:
        messageHighlightOffset - The offset to be set.
      • setOperationDescription

        public void setOperationDescription​(ro.sync.document.OperationDescription operationDescription)
        Sets the description of an operation (that is an operation which is applied over multiple resources) that generated this DPI. Can be null.
        Parameters:
        operationDescription - the description of an operation (that is an operation which is applied over multiple resources) that generated this DPI. Can be null.
      • getOperationDescription

        public ro.sync.document.OperationDescription getOperationDescription()
        The description of an operation (that is an operation which is applied over multiple resources) that generated this DPI. Can be null.
        Returns:
        the description of an operation (that is an operation which is applied over multiple resources) that generated this DPI. Can be null.
      • getDITAAdditionalInfo

        public ro.sync.document.DITAAdditionalInfo getDITAAdditionalInfo()
        Additional info about DITA completeness check.
        Returns:
        Returns additional info.
      • setDITAAdditionalInfo

        public void setDITAAdditionalInfo​(ro.sync.document.DITAAdditionalInfo additionalInfo)
        Additional info about DITA completeness check.
        Parameters:
        additionalInfo - Additional info about DITA completeness check.
      • getECAdditionalInfo

        public ro.sync.document.ECAdditionalInfo getECAdditionalInfo()
        Additional info for Eclipse inner usage.
        Returns:
        Returns additional info.
      • setECAdditionalInfo

        public void setECAdditionalInfo​(ro.sync.document.ECAdditionalInfo additionalInfo)
        Additional info for Eclipse inner usage.
        Parameters:
        additionalInfo - Additional info for Elipse inner usage.
      • setTemporaryPositions

        public void setTemporaryPositions​(javax.swing.text.Position startPosition,
                                          javax.swing.text.Position endPosition,
                                          java.lang.String pageId)
        Set the temporary start and end positions used for keeping the DPI synchronized with the highlight range from the page.
        Parameters:
        startPosition - The start position.
        endPosition - The end position. Always exclusive.
        pageId - The id of the page for which the positions were created, one of EditorPageConstants constants.
      • getStartEndPositions

        public javax.swing.text.Position[] getStartEndPositions​(java.lang.String pageId)
        Get the temporary start and end positions for the current page.
        Parameters:
        pageId - The id of the page for which we want the positions, one of EditorPageConstants constants.
        Returns:
        An arrays with two positions, representing the start and end positions of the DPI. The end position is exclusive. Can be null if the page is closed, or the DPI is not synchronized with the modifications from editor.
      • setStartEndPositionsMap

        public void setStartEndPositionsMap​(java.util.Map<java.lang.String,​javax.swing.text.Position[]> startEndPositionsMap)
        Set a new temporary positions map.
        Parameters:
        startEndPositionsMap - The temporary positions map.
      • asHTML

        public java.lang.String asHTML()
        Build the HTML representation of this DPI.
        Returns:
        The HTML representation of this DPI.
      • asHTML

        public java.lang.String asHTML​(boolean includeSeverity,
                                       boolean includeAdditionalInfo,
                                       boolean includeDescription,
                                       boolean includeSystemID,
                                       boolean includeLocation,
                                       boolean includeOperationDescription)
        Build the HTML representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The HTML representation of this DPI.
      • asHTML

        public java.lang.String asHTML​(boolean includeSeverity,
                                       boolean includeErrorCode,
                                       boolean includeAdditionalInfo,
                                       boolean includeDescription,
                                       boolean includeSystemID,
                                       boolean includeLocation,
                                       boolean includeOperationDescription)
        Builds the HTML representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeErrorCode - true if error code should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        Returns:
        The HTML representation of this DPI.
      • asHTML

        public java.lang.String asHTML​(boolean includeSeverity,
                                       boolean includeErrorCode,
                                       boolean includeAdditionalInfo,
                                       boolean includeDescription,
                                       boolean includeSystemID,
                                       boolean includeLocation,
                                       boolean includeOperationDescription,
                                       boolean asCompleteHTMLDocument)
        Build the HTML representation of this DPI.
        Parameters:
        includeSeverity - true if severity details should be included.
        includeErrorCode - true if error code should be included.
        includeAdditionalInfo - true if additional info details should be included.
        includeDescription - true if description details should be included.
        includeSystemID - true if system ID details should be included.
        includeLocation - true if location details should be included.
        includeOperationDescription - true if operation description details should be included.
        asCompleteHTMLDocument - true for a complete valid HTML document representation, including style section. The title of the HTML document is "Message". If false, then the HTML representation only consists of a 'table' inside a 'div' section, and no styling at all.
        Returns:
        The HTML representation of this DPI.
      • getAdditionalHtmlContent

        protected java.lang.String getAdditionalHtmlContent()
        Return the additional HTML content, if any.
        Returns:
        the additional HTML content, if any.
      • setHtmlMessageFragment

        public void setHtmlMessageFragment​(java.lang.String htmlMessageFragment)
        Set a special HTML fragment which needs to be presented instead of the message when the DPI is serialized to HTML.
        Parameters:
        htmlMessageFragment - The fragment to set.
      • setErrorKey

        public void setErrorKey​(java.lang.String errorKey)
        The error validation key.
        Parameters:
        errorKey - The error key.
      • getErrorKey

        public java.lang.String getErrorKey()
        Get the error key.
        Returns:
        Returns the error key.
      • isElementTarget

        public boolean isElementTarget()
        Return true if this DPI targets an XML element.
        Returns:
        true if this DPI targets an XML element.
      • setElementTarget

        public void setElementTarget​(boolean isElementTarget)
        Set true if this DPI targets an XML element.
        Parameters:
        isElementTarget - true if this DPI targets an XML element.