Package org.tmatesoft.svn.core.wc.xml

## Class SVNXMLAnnotateHandler

- java.lang.Object
- - org.tmatesoft.svn.core.wc.xml.AbstractXMLHandler
  - - org.tmatesoft.svn.core.wc.xml.SVNXMLAnnotateHandler

- All Implemented Interfaces:
    `ISVNAnnotateHandler`, `org.xml.sax.Locator`

      public class SVNXMLAnnotateHandler
      extends AbstractXMLHandler
      implements ISVNAnnotateHandler

  This is an implementation of the ISVNAnnotateHandler interface that writes XML formatted annotation information to a specified ContentHandler.
  Since:
    1.2
  Version:
    1.3
  Author:
    TMate Software Ltd.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `AUTHOR_TAG` | `'author'` tag.
    `static java.lang.String` | `BLAME_TAG` | `'blame'` tag.
    `static java.lang.String` | `COMMIT_TAG` | `'commit'` tag.
    `static java.lang.String` | `DATE_TAG` | `'date'` tag.
    `static java.lang.String` | `ENTRY_TAG` | `'entry'` tag.
    `static java.lang.String` | `LINE_NUMBER_TAG` | `'line-number'` tag.
    `static java.lang.String` | `MERGED_TAG` | `'merged'` tag.
    `static java.lang.String` | `PATH_ATTR` | `'path'` attribute.
    `static java.lang.String` | `REVISION_ATTR` | `'revision'` attribute.
    `static java.lang.String` | `TARGET_TAG` | `'target'` tag.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SVNXMLAnnotateHandler​(org.xml.sax.ContentHandler contentHandler)` | Creates a new annotation handler.
    `SVNXMLAnnotateHandler​(org.xml.sax.ContentHandler contentHandler, org.tmatesoft.svn.util.ISVNDebugLog log)` | Creates a new annotation handler.
    `SVNXMLAnnotateHandler​(org.xml.sax.ContentHandler contentHandler, org.tmatesoft.svn.util.ISVNDebugLog log, boolean isUseMergeHistory)` | Creates a new annotation handler.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `endTarget()` | Closes the formatted XML output.
    `protected java.lang.String` | `getHeaderName()` |
    `void` | `handleEOF()` | Does nothing.
    `void` | `handleLine​(java.util.Date date, long revision, java.lang.String author, java.lang.String line)` | Handles line annotation producing corresponding xml tags.
    `void` | `handleLine​(java.util.Date date, long revision, java.lang.String author, java.lang.String line, java.util.Date mergedDate, long mergedRevision, java.lang.String mergedAuthor, java.lang.String mergedPath, int lineNumber)` | Handles line annotation producing corresponding xml tags.
    `boolean` | `handleRevision​(java.util.Date date, long revision, java.lang.String author, java.io.File contents)` | Just returns false.
    `void` | `startTarget​(java.lang.String pathOrURL)` | Begins an XML tree with the target path/URL for which annotating is run.

    - ### Methods inherited from class org.tmatesoft.svn.core.wc.xml.AbstractXMLHandler

      `addAttribute, addTag, closeTag, endDocument, getColumnNumber, getDebugLog, getLineNumber, getPublicId, getSystemId, openTag, startDocument`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PATH_ATTR

          public static final java.lang.String PATH_ATTR

      `'path'` attribute.
      See Also:
        Constant Field Values

    - #### REVISION_ATTR

          public static final java.lang.String REVISION_ATTR

      `'revision'` attribute.
      See Also:
        Constant Field Values

    - #### DATE_TAG

          public static final java.lang.String DATE_TAG

      `'date'` tag.
      See Also:
        Constant Field Values

    - #### AUTHOR_TAG

          public static final java.lang.String AUTHOR_TAG

      `'author'` tag.
      See Also:
        Constant Field Values

    - #### COMMIT_TAG

          public static final java.lang.String COMMIT_TAG

      `'commit'` tag.
      See Also:
        Constant Field Values

    - #### ENTRY_TAG

          public static final java.lang.String ENTRY_TAG

      `'entry'` tag.
      See Also:
        Constant Field Values

    - #### LINE_NUMBER_TAG

          public static final java.lang.String LINE_NUMBER_TAG

      `'line-number'` tag.
      See Also:
        Constant Field Values

    - #### TARGET_TAG

          public static final java.lang.String TARGET_TAG

      `'target'` tag.
      See Also:
        Constant Field Values

    - #### BLAME_TAG

          public static final java.lang.String BLAME_TAG

      `'blame'` tag.
      See Also:
        Constant Field Values

    - #### MERGED_TAG

          public static final java.lang.String MERGED_TAG

      `'merged'` tag.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SVNXMLAnnotateHandler

          public SVNXMLAnnotateHandler​(org.xml.sax.ContentHandler contentHandler)

      Creates a new annotation handler.
      Parameters:
        `contentHandler` - a ContentHandler to form an XML tree

    - #### SVNXMLAnnotateHandler

          public SVNXMLAnnotateHandler​(org.xml.sax.ContentHandler contentHandler,
                                       org.tmatesoft.svn.util.ISVNDebugLog log)

      Creates a new annotation handler.
      Parameters:
        `contentHandler` - a ContentHandler to form an XML tree
        `log` - a debug logger

    - #### SVNXMLAnnotateHandler

          public SVNXMLAnnotateHandler​(org.xml.sax.ContentHandler contentHandler,
                                       org.tmatesoft.svn.util.ISVNDebugLog log,
                                       boolean isUseMergeHistory)

      Creates a new annotation handler.
      Parameters:
        `contentHandler` - a ContentHandler to form an XML tree
        `log` - a debug logger
        `isUseMergeHistory` - whether merge history should be taken into account or not

  - ### Method Detail

    - #### getHeaderName

          protected java.lang.String getHeaderName()

      Specified by:
        `getHeaderName` in class `AbstractXMLHandler`

    - #### startTarget

          public void startTarget​(java.lang.String pathOrURL)

      Begins an XML tree with the target path/URL for which annotating is run.
      Parameters:
        `pathOrURL` - a target file WC path or URL

    - #### endTarget

          public void endTarget()

      Closes the formatted XML output.

    - #### handleLine

          public void handleLine​(java.util.Date date,
                                 long revision,
                                 java.lang.String author,
                                 java.lang.String line)
                          throws SVNException

      Handles line annotation producing corresponding xml tags.
      Specified by:
        `handleLine` in interface `ISVNAnnotateHandler`
      Parameters:
        `date` -
        `revision` -
        `author` -
        `line` -
      Throws:
        `SVNException`

    - #### handleLine

          public void handleLine​(java.util.Date date,
                                 long revision,
                                 java.lang.String author,
                                 java.lang.String line,
                                 java.util.Date mergedDate,
                                 long mergedRevision,
                                 java.lang.String mergedAuthor,
                                 java.lang.String mergedPath,
                                 int lineNumber)
                          throws SVNException

      Handles line annotation producing corresponding xml tags.
      Specified by:
        `handleLine` in interface `ISVNAnnotateHandler`
      Parameters:
        `date` -
        `revision` -
        `author` -
        `line` -
        `mergedDate` -
        `mergedRevision` -
        `mergedAuthor` -
        `mergedPath` -
        `lineNumber` -
      Throws:
        `SVNException`

    - #### handleRevision

          public boolean handleRevision​(java.util.Date date,
                                        long revision,
                                        java.lang.String author,
                                        java.io.File contents)
                                 throws SVNException

      Just returns false.
      Specified by:
        `handleRevision` in interface `ISVNAnnotateHandler`
      Parameters:
        `date` -
        `revision` -
        `author` -
        `contents` -
      Returns:
        false
      Throws:
        `SVNException`

    - #### handleEOF

          public void handleEOF()

      Does nothing.
      Specified by:
        `handleEOF` in interface `ISVNAnnotateHandler`