Package org.tmatesoft.svn.core.wc.xml
Class SVNXMLDirEntryHandler
- java.lang.Object
-
- org.tmatesoft.svn.core.wc.xml.AbstractXMLHandler
-
- org.tmatesoft.svn.core.wc.xml.SVNXMLDirEntryHandler
-
- All Implemented Interfaces:
java.util.Comparator,ISVNDirEntryHandler,org.xml.sax.Locator
public class SVNXMLDirEntryHandler extends AbstractXMLHandler implements ISVNDirEntryHandler, java.util.Comparator
This is an implementation of the ISVNStatusHandler interface that writes XML formatted status 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.StringAUTHOR_TAG'author'tag.static java.lang.StringCOMMENT_TAG'comment'tag.static java.lang.StringCOMMIT_TAG'commit'tag.static java.lang.StringCREATED_TAG'created'tag.static java.lang.StringDATE_TAG'date'tag.static java.lang.StringENTRY_TAG'entry'tag.static java.lang.StringEXPIRES_TAG'expires'tag.static java.lang.StringLIST_TAG'list'tag.static java.lang.StringLISTS_TAG'lists'tag.static java.lang.StringLOCK_TAG'lock'tag.static java.lang.StringNAME_TAG'name'tag.static java.lang.StringOWNER_TAG'owner'tag.static java.lang.StringPATH_ATTR'path'attribute.static java.lang.StringREVISION_ATTR'revision'attribute.static java.lang.StringSIZE_TAG'size'tag.static java.lang.StringTOKEN_TAG'tag'tag.
-
Constructor Summary
Constructors Constructor Description SVNXMLDirEntryHandler(org.xml.sax.ContentHandler saxHandler)Creates a new handler.SVNXMLDirEntryHandler(org.xml.sax.ContentHandler saxHandler, org.tmatesoft.svn.util.ISVNDebugLog log)Creates a new handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(java.lang.Object o1, java.lang.Object o2)Compares two objects.voidendTarget()Closes the formatted XML output.protected java.lang.StringgetHeaderName()voidhandleDirEntry(SVNDirEntry entry)Handles a next direntry.voidstartTarget(java.lang.String path)Begins an XML tree with the target path for which the status is run.-
Methods inherited from class org.tmatesoft.svn.core.wc.xml.AbstractXMLHandler
addAttribute, addTag, closeTag, endDocument, getColumnNumber, getDebugLog, getLineNumber, getPublicId, getSystemId, openTag, startDocument
-
-
-
-
Field Detail
-
EXPIRES_TAG
public static final java.lang.String EXPIRES_TAG
'expires'tag.- See Also:
- Constant Field Values
-
CREATED_TAG
public static final java.lang.String CREATED_TAG
'created'tag.- See Also:
- Constant Field Values
-
COMMENT_TAG
public static final java.lang.String COMMENT_TAG
'comment'tag.- See Also:
- Constant Field Values
-
OWNER_TAG
public static final java.lang.String OWNER_TAG
'owner'tag.- See Also:
- Constant Field Values
-
TOKEN_TAG
public static final java.lang.String TOKEN_TAG
'tag'tag.- See Also:
- Constant Field Values
-
LOCK_TAG
public static final java.lang.String LOCK_TAG
'lock'tag.- See Also:
- Constant Field Values
-
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
-
LISTS_TAG
public static final java.lang.String LISTS_TAG
'lists'tag.- See Also:
- Constant Field Values
-
LIST_TAG
public static final java.lang.String LIST_TAG
'list'tag.- See Also:
- Constant Field Values
-
ENTRY_TAG
public static final java.lang.String ENTRY_TAG
'entry'tag.- See Also:
- Constant Field Values
-
NAME_TAG
public static final java.lang.String NAME_TAG
'name'tag.- See Also:
- Constant Field Values
-
SIZE_TAG
public static final java.lang.String SIZE_TAG
'size'tag.- See Also:
- Constant Field Values
-
COMMIT_TAG
public static final java.lang.String COMMIT_TAG
'commit'tag.- 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
-
-
Constructor Detail
-
SVNXMLDirEntryHandler
public SVNXMLDirEntryHandler(org.xml.sax.ContentHandler saxHandler)
Creates a new handler.- Parameters:
saxHandler- a ContentHandler to form an XML tree
-
SVNXMLDirEntryHandler
public SVNXMLDirEntryHandler(org.xml.sax.ContentHandler saxHandler, org.tmatesoft.svn.util.ISVNDebugLog log)Creates a new handler.- Parameters:
saxHandler- a ContentHandler to form an XML treelog- a debug logger
-
-
Method Detail
-
startTarget
public void startTarget(java.lang.String path)
Begins an XML tree with the target path for which the status is run.- Parameters:
path- a WC target path or URL
-
handleDirEntry
public void handleDirEntry(SVNDirEntry entry) throws SVNException
Handles a next direntry.- Specified by:
handleDirEntryin interfaceISVNDirEntryHandler- Parameters:
entry- dir entry- Throws:
SVNException- See Also:
SVNDirEntry
-
endTarget
public void endTarget()
Closes the formatted XML output.
-
getHeaderName
protected java.lang.String getHeaderName()
- Specified by:
getHeaderNamein classAbstractXMLHandler
-
compare
public int compare(java.lang.Object o1, java.lang.Object o2)Compares two objects.- Specified by:
comparein interfacejava.util.Comparator- Parameters:
o1- the first object to compareo2- the second object to compare- Returns:
- 0 if objects are equal; -1 if
o1is null or if botho1ando2are SVNDirEntry objects and the relative path of the first object is lexicographically less than that of the second one; 1 otherwise
-
-