Overview | Package | Class | Tree | Deprecated | Index | Help
| SVNKit Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.tmatesoft.svn.core
Class SVNDirEntry

    java.lang.Object
      org.tmatesoft.svn.core.SVNDirEntry

All Implemented Interfaces:
  Comparable

public class SVNDirEntry
extends Object
implements Comparable

The SVNDirEntry class is a representation of a versioned directory entry.

SVNDirEntry keeps an entry name, entry kind (is it a file or directory), file size (in case an entry is a file), the last changed revision, the date when the entry was last changed, the name of the author who last changed the entry, the commit log message for the last changed revision. SVNDirEntry also knows if the entry has any properties.

Version:
  1.1.1
Author:
  TMate Software Ltd.
See Also:
  `ISVNDirEntryHandler`

Constructor Summary
`SVNDirEntry(SVNURL url, String name, SVNNodeKind kind, long size, boolean hasProperties, long revision, Date createdDate, String lastAuthor)` Constructs an instance of SVNDirEntry.
`SVNDirEntry(SVNURL url, String name, SVNNodeKind kind, long size, boolean hasProperties, long revision, Date createdDate, String lastAuthor, String commitMessage)` Constructs an instance of SVNDirEntry.

Method Summary
`int` | `compareTo(Object o)` Compares this object with another one.
`String` | `getAuthor()` Retrieves the name of the author who last changed this entry.
`String` | `getCommitMessage()` Returns the commit log message for the revision of this entry.
`Date` | `getDate()` Returns the date the entry was last changed.
`SVNNodeKind` | `getKind()` Returns the entry node kind.
`SVNLock` | `getLock()` Gets the lock object for this entry (if it's locked).
`String` | `getName()` Gets the the directory entry name
`String` | `getPath()` Deprecated. use `getRelativePath()` instead.
`String` | `getRelativePath()` Returns the entry's path.
`long` | `getRevision()` Gets the last changed revision of this entry.
`long` | `getSize()` Returns the file size in bytes (if this entry is a file).
`SVNURL` | `getURL()` Returns the entry's URL.
`boolean` | `hasProperties()` Tells if the entry has any properties.
`void` | `setCommitMessage(String message)` This method is used by SVNKit internals and not intended for users (from an API point of view).
`void` | `setLock(SVNLock lock)` Sets the lock object for this entry (if it's locked).
`void` | `setRelativePath(String path)` This method is used by SVNKit internals and not intended for users (from an API point of view).
`long` | `size()` Deprecated. use `getSize()` instead
`String` | `toString()` Retirns a string representation of this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SVNDirEntry

    public SVNDirEntry(SVNURL url,
                       String name,
                       SVNNodeKind kind,
                       long size,
                       boolean hasProperties,
                       long revision,
                       Date createdDate,
                       String lastAuthor)

  Constructs an instance of SVNDirEntry.

Parameters:
  `url` - a url of this entry
  `name` - an entry name
  `kind` - the node kind for the entry
  `size` - the entry size in bytes
  `hasProperties` - true if the entry has properties, otherwise false
  `revision` - the last changed revision of the entry
  `createdDate` - the date the entry was last changed
  `lastAuthor` - the person who last changed the entry

### SVNDirEntry

    public SVNDirEntry(SVNURL url,
                       String name,
                       SVNNodeKind kind,
                       long size,
                       boolean hasProperties,
                       long revision,
                       Date createdDate,
                       String lastAuthor,
                       String commitMessage)

  Constructs an instance of SVNDirEntry.

Parameters:
  `url` - a url of this entry
  `name` - an entry name
  `kind` - the node kind for the entry
  `size` - the entry size in bytes
  `hasProperties` - true if the entry has properties, otherwise false
  `revision` - the last changed revision of the entry
  `createdDate` - the date the entry was last changed
  `lastAuthor` - the person who last changed the entry
  `commitMessage` - the log message of the last change commit

Method Detail

### getURL

    public SVNURL getURL()

  Returns the entry's URL.

  Returns:
    this entry's URL.

### getName

    public String getName()

  Gets the the directory entry name

  Returns:
    the name of this entry

### getSize

    public long getSize()

  Returns the file size in bytes (if this entry is a file).

  Returns:
    the size of this entry in bytes

### size

    public long size()

  Deprecated. use `getSize()` instead

  Returns the file size in bytes (if this entry is a file).

  Returns:
    the size of this entry in bytes

### hasProperties

    public boolean hasProperties()

  Tells if the entry has any properties.

  Returns:
    true if has, false otherwise

### getKind

    public SVNNodeKind getKind()

  Returns the entry node kind.

  Returns:
    the node kind of this entry
  See Also:
    `SVNNodeKind`

### getDate

    public Date getDate()

  Returns the date the entry was last changed.

  Returns:
    the datestamp when the entry was last changed

### getRevision

    public long getRevision()

  Gets the last changed revision of this entry.

  Returns:
    the revision of this entry when it was last changed

### getAuthor

    public String getAuthor()

  Retrieves the name of the author who last changed this entry.

  Returns:
    the last author's name.

### getRelativePath

    public String getRelativePath()

  Returns the entry's path.

  This method always returns the name of an entry (i.e. a path relative to the parent folder) when an SVNDirEntry object is provided by an `SVNRepository` driver.

  This property (relative path) is longer than just an entry name only when an SVNDirEntry object is obtained via a recursive call to a `doList()` method of the `SVNLogClient` class. In that case an SVNDirEntry object located deep in the hierarchy will return a path relative to the URL `doList()` was called for.

  Returns:
    a path relative to a repository location or null if no path is specified

### getPath

    public String getPath()

  Deprecated. use `getRelativePath()` instead.

### getCommitMessage

    public String getCommitMessage()

  Returns the commit log message for the revision of this entry.

  Returns:
    a commit log message

### getLock

    public SVNLock getLock()

  Gets the lock object for this entry (if it's locked).

  Returns:
    a lock object or null

### setRelativePath

    public void setRelativePath(String path)

  This method is used by SVNKit internals and not intended for users (from an API point of view).

  Parameters:
    `path` - this entry's path

### setCommitMessage

    public void setCommitMessage(String message)

  This method is used by SVNKit internals and not intended for users (from an API point of view).

  Parameters:
    `message` - a commit message

### setLock

    public void setLock(SVNLock lock)

  Sets the lock object for this entry (if it's locked).

  Parameters:
    `lock` - a lock object

### toString

    public String toString()

  Retirns a string representation of this object.

  Returns:
    a string representation of this directory entry

### compareTo

    public int compareTo(Object o)

  Compares this object with another one.

  Specified by:
    `compareTo` in interface `Comparable`
  Parameters:
    `o` - an object to compare with
  Returns:
    - -1 - if `o` is either null, or is not an instance of SVNDirEntry, or this entry's URL is lexicographically less than the name of `o`;
    - 1 - if this entry's URL is lexicographically greater than the name of `o`;
    - 0 - if and only if `o` has got the same URL as this one has

Overview | Package | Class | Tree | Deprecated | Index | Help
| SVNKit Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 TMate Software Ltd. All Rights Reserved.