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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final java.lang.String
    'author' tag.
    static final java.lang.String
    'comment' tag.
    static final java.lang.String
    'commit' tag.
    static final java.lang.String
    'created' tag.
    static final java.lang.String
    'date' tag.
    static final java.lang.String
    'entry' tag.
    static final java.lang.String
    'expires' tag.
    static final java.lang.String
    'list' tag.
    static final java.lang.String
    'lists' tag.
    static final java.lang.String
    'lock' tag.
    private java.util.Collection
     
    static final java.lang.String
    'name' tag.
    static final java.lang.String
    'owner' tag.
    static final java.lang.String
    'path' attribute.
    static final java.lang.String
    'revision' attribute.
    static final java.lang.String
    'size' tag.
    static final java.lang.String
    'tag' tag.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SVNXMLDirEntryHandler(org.xml.sax.ContentHandler saxHandler)
    Creates a new handler.
    SVNXMLDirEntryHandler(org.xml.sax.ContentHandler saxHandler, ISVNDebugLog log)
    Creates a new handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compare(java.lang.Object o1, java.lang.Object o2)
    Compares two objects.
    void
    Closes the formatted XML output.
    protected java.lang.String
     
    void
    Handles a next dir entry.
    private void
     
    void
    startTarget(java.lang.String path)
    Begins an XML tree with the target path for which the status is run.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.util.Comparator

    equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
  • Field Details

    • EXPIRES_TAG

      public static final java.lang.String EXPIRES_TAG
      'expires' tag.
      See Also:
    • CREATED_TAG

      public static final java.lang.String CREATED_TAG
      'created' tag.
      See Also:
    • COMMENT_TAG

      public static final java.lang.String COMMENT_TAG
      'comment' tag.
      See Also:
    • OWNER_TAG

      public static final java.lang.String OWNER_TAG
      'owner' tag.
      See Also:
    • TOKEN_TAG

      public static final java.lang.String TOKEN_TAG
      'tag' tag.
      See Also:
    • LOCK_TAG

      public static final java.lang.String LOCK_TAG
      'lock' tag.
      See Also:
    • PATH_ATTR

      public static final java.lang.String PATH_ATTR
      'path' attribute.
      See Also:
    • REVISION_ATTR

      public static final java.lang.String REVISION_ATTR
      'revision' attribute.
      See Also:
    • LISTS_TAG

      public static final java.lang.String LISTS_TAG
      'lists' tag.
      See Also:
    • LIST_TAG

      public static final java.lang.String LIST_TAG
      'list' tag.
      See Also:
    • ENTRY_TAG

      public static final java.lang.String ENTRY_TAG
      'entry' tag.
      See Also:
    • NAME_TAG

      public static final java.lang.String NAME_TAG
      'name' tag.
      See Also:
    • SIZE_TAG

      public static final java.lang.String SIZE_TAG
      'size' tag.
      See Also:
    • COMMIT_TAG

      public static final java.lang.String COMMIT_TAG
      'commit' tag.
      See Also:
    • DATE_TAG

      public static final java.lang.String DATE_TAG
      'date' tag.
      See Also:
    • AUTHOR_TAG

      public static final java.lang.String AUTHOR_TAG
      'author' tag.
      See Also:
    • myDirEntries

      private java.util.Collection myDirEntries
  • Constructor Details

    • 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, ISVNDebugLog log)
      Creates a new handler.
      Parameters:
      saxHandler - a ContentHandler to form an XML tree
      log - a debug logger
  • Method Details

    • 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 dir entry.
      Specified by:
      handleDirEntry in interface ISVNDirEntryHandler
      Parameters:
      entry - dir entry
      Throws:
      SVNException
      See Also:
    • endTarget

      public void endTarget()
      Closes the formatted XML output.
    • sendToHandler

      private void sendToHandler(SVNDirEntry entry) throws org.xml.sax.SAXException
      Throws:
      org.xml.sax.SAXException
    • getHeaderName

      protected java.lang.String getHeaderName()
      Specified by:
      getHeaderName in class AbstractXMLHandler
    • compare

      public int compare(java.lang.Object o1, java.lang.Object o2)
      Compares two objects.
      Specified by:
      compare in interface java.util.Comparator
      Parameters:
      o1 - the first object to compare
      o2 - the second object to compare
      Returns:
      0 if objects are equal; -1 if o1 is null or if both o1 and o2 are SVNDirEntry objects and the relative path of the first object is lexicographically less than that of the second one; 1 otherwise