Class DocumentPositionedInfo

java.lang.Object
ro.sync.document.DocumentPositionedInfo
Direct Known Subclasses:
AuthorDocumentPositionedInfo

@API(type=EXTENDABLE, src=PUBLIC) public class DocumentPositionedInfo extends 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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    If one of the components is not known, use this constant for it.
    static final int
    Error message.
    static final int
    Fatal error message.
    static final int
    Information message.
    static final int
    Warning message.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Build the HTML representation of this DPI.
    asHTML(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Build the HTML representation of this DPI.
    asHTML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Builds the HTML representation of this DPI.
    asHTML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription, boolean asCompleteHTMLDocument)
    Build the HTML representation of this DPI.
    Build the JSON representation of this DPI.
    asJSON(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Build the JSON representation of this DPI.
    asJSON(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Build the JSON representation of this DPI.
    Build the text representation of this DPI.
    asText(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Build the text representation of this DPI.
    asText(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Build the text representation of this DPI.
    Build the XML representation of this DPI.
    asXML(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Build the XML representation of this DPI.
    asXML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription)
    Build the XML representation of this DPI.
    boolean
    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 String
    Return the additional HTML content, if any.
    The URL for additional information if available.
    ro.sync.exml.editor.Anchor
    Get the error anchor if any.
    int
    Gets the column of the event.
    ro.sync.document.DPIData
    Getter for the user managed data.
    ro.sync.document.DetailedExceptionInfo
    Get detailed information about the problem.
    ro.sync.document.DITAAdditionalInfo
    Additional info about DITA completeness check.
    ro.sync.document.ECAdditionalInfo
    Additional info for Eclipse inner usage.
    int
    Get the highlight end column, or NOT_KNOWN if not available.
    int
    Get the highlight end line, or NOT_KNOWN if not available.
    Get the name of the engine who provided the error.
    Get the error key.
    Gets the HTML fragment to be presented when the message is displayed as HTML.
    Get the imposed initial page if a new editor will be opened.
    int
    Gets the length of the text that will be selected in the editor.
    int
    Gets the line attribute of the event
    int[]
    Get the match range if any.
    Gets the message
    int
    Return the offset used to highlight the match inside the message in the results panel.
    ro.sync.document.MessageProvider
    The provider of messages from the current document position info.
    Gets the message prepended with the engine name, if available.
    getMessageWithEngine(boolean includeSeverity, boolean includeErrorKey)
    Gets the message prepended with the engine name, if available.
    Get the message with severity info as a char in the front of the message (W, E, F).
    getMessageWithSeverity(boolean includeEngineInformation)
    Get the message with severity info as a char in the front of the message (W, E, F).
    getMessageWithSeverity(boolean includeEngineInformation, boolean includeErrorKey)
    Gets the message with severity info as a char in the front of the message (W, E, F).
    int
    Get the event's offset.
    ro.sync.document.OperationDescription
    The description of an operation (that is an operation which is applied over multiple resources) that generated this DPI.
    Get the preferred engine name who provided the error.
    int
    Gets the severity level.
    Gets the severity level as string
    Get the temporary start and end positions for the current page.
    Gets the systemID attribute of the DocumentPositionedInfo object
    int
    Compute unique hash code for this object.
    boolean
    Return true if this DPI targets an XML element.
    boolean
    Check if the highlight must be made from column 0 to the specified column.
    void
    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(String engineName)
    Set the name of the engine who provided the error.
    void
    setErrorKey(String errorKey)
    The error validation key.
    void
    setHighlightToColumn(boolean how)
    Set highlight strategy for the document positioned information visual presentation.
    void
    setHtmlMessageFragment(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(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(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(Map<String,Position[]> startEndPositionsMap)
    Set a new temporary positions map.
    void
    setSystemID(String systemID)
    Sets the systemID of the event.
    void
    setTemporaryPositions(Position startPosition, Position endPosition, String pageId)
    Set the temporary start and end positions used for keeping the DPI synchronized with the highlight range from the page.
    Gets the string representation.

    Methods inherited from class java.lang.Object

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

    • SEVERITY_INFO

      public static final int SEVERITY_INFO
      Information message.
      See Also:
    • SEVERITY_WARN

      public static final int SEVERITY_WARN
      Warning message.
      See Also:
    • SEVERITY_ERROR

      public static final int SEVERITY_ERROR
      Error message.
      See Also:
    • SEVERITY_FATAL

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

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

    • 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, String message, 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, String message, String systemID, int line, int column, int length, int offset, 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, String systemID, int line, int column, int endLine, int endColumn, int length, int offset, 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, String message, 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, String message, String systemID)
      Constructor.
      Parameters:
      severity - the severity level of the message.
      message - the error message.
      systemID - the system ID.
    • DocumentPositionedInfo

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

      public DocumentPositionedInfo(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 Details

    • 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(Object obj)
      Indicates whether some other document positioned information is "equal to" this one.
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Compute unique hash code for this object. Hashcode is compatible with equals method.
      Overrides:
      hashCode in class Object
      See Also:
    • 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(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(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 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 String getMessage()
      Gets the message
      Returns:
      The message value
    • getHTMLMessage

      public 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 String getMessageWithEngine()
      Gets the message prepended with the engine name, if available.
      Returns:
      The message.
    • getMessageWithEngine

      public 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 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 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 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 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 String toString()
      Gets the string representation.
      Overrides:
      toString in class Object
      Returns:
      the string representation.
    • getAdditionalInfo

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

      public void setAdditionalInfo(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(String engineName)
      Set the name of the engine who provided the error.
      Parameters:
      engineName - The source engine name who provided the error.
    • getEngineName

      public 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 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 String asXML()
      Build the XML representation of this DPI.
      Returns:
      The XML representation of the DPI.
    • asXML

      public 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 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 String asJSON()
      Build the JSON representation of this DPI.
      Returns:
      The JSON representation of the DPI.
    • asJSON

      public 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 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 String asText()
      Build the text representation of this DPI.
      Returns:
      The text representation of this DPI.
    • asText

      public 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 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 String getImposedInitialPage()
      Get the imposed initial page if a new editor will be opened.
      Returns:
      the imposed initial page
    • setImposedInitialPage

      public void setImposedInitialPage(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(Position startPosition, Position endPosition, 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 Position[] getStartEndPositions(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(Map<String,Position[]> startEndPositionsMap)
      Set a new temporary positions map.
      Parameters:
      startEndPositionsMap - The temporary positions map.
    • asHTML

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

      public 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 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 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 String getAdditionalHtmlContent()
      Return the additional HTML content, if any.
      Returns:
      the additional HTML content, if any.
    • setHtmlMessageFragment

      public void setHtmlMessageFragment(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(String errorKey)
      The error validation key.
      Parameters:
      errorKey - The error key.
    • getErrorKey

      public 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.