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`, `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 final String`
`AUTHOR_TAG`
`'author'` tag.
`static final String`
`BLAME_TAG`
`'blame'` tag.
`static final String`
`COMMIT_TAG`
`'commit'` tag.
`static final String`
`DATE_TAG`
`'date'` tag.
`static final String`
`ENTRY_TAG`
`'entry'` tag.
`static final String`
`LINE_NUMBER_TAG`
`'line-number'` tag.
`static final String`
`MERGED_TAG`
`'merged'` tag.
`static final String`
`PATH_ATTR`
`'path'` attribute.
`static final String`
`REVISION_ATTR`
`'revision'` attribute.
`static final String`
`TARGET_TAG`
`'target'` tag.

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`void`
`endTarget()`
Closes the formatted XML output.
`protected String`
`getHeaderName()`
`void`
`handleEOF()`
Does nothing.
`void`
`handleLine(Date date, long revision, String author, String line)`
Handles line annotation producing corresponding xml tags.
`void`
`handleLine(Date date, long revision, String author, String line, Date mergedDate, long mergedRevision, String mergedAuthor, String mergedPath, int lineNumber)`
Handles line annotation producing corresponding xml tags.
`boolean`
`handleRevision(Date date, long revision, String author, File contents)`
Just returns false.
`void`
`startTarget(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 Details

### PATH_ATTR

public static final String PATH_ATTR
`'path'` attribute.

See Also:
  - Constant Field Values

### REVISION_ATTR

public static final String REVISION_ATTR
`'revision'` attribute.

See Also:
  - Constant Field Values

### DATE_TAG

public static final String DATE_TAG
`'date'` tag.

See Also:
  - Constant Field Values

### AUTHOR_TAG

public static final String AUTHOR_TAG
`'author'` tag.

See Also:
  - Constant Field Values

### COMMIT_TAG

public static final String COMMIT_TAG
`'commit'` tag.

See Also:
  - Constant Field Values

### ENTRY_TAG

public static final String ENTRY_TAG
`'entry'` tag.

See Also:
  - Constant Field Values

### LINE_NUMBER_TAG

public static final String LINE_NUMBER_TAG
`'line-number'` tag.

See Also:
  - Constant Field Values

### TARGET_TAG

public static final String TARGET_TAG
`'target'` tag.

See Also:
  - Constant Field Values

### BLAME_TAG

public static final String BLAME_TAG
`'blame'` tag.

See Also:
  - Constant Field Values

### MERGED_TAG

public static final String MERGED_TAG
`'merged'` tag.

See Also:
  - Constant Field Values

## Constructor Details

### SVNXMLAnnotateHandler

public SVNXMLAnnotateHandler(ContentHandler contentHandler)
Creates a new annotation handler.

Parameters:
  `contentHandler` - a ContentHandler to form an XML tree

### SVNXMLAnnotateHandler

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

### getHeaderName

protected String getHeaderName()

Specified by:
  `getHeaderName` in class `AbstractXMLHandler`

### startTarget

public void startTarget(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(Date date, long revision, String author, 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(Date date, long revision, String author, String line, Date mergedDate, long mergedRevision, String mergedAuthor, 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(Date date, long revision, String author, 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`