org.hibernate.tool.hbm2x.doc
Class DocFile

java.lang.Object
  extended by org.hibernate.tool.hbm2x.doc.DocFile

public class DocFile
extends Object

Represents a documentation file.

Author:
Ricardo C. Moral

Constructor Summary
DocFile(String pName, DocFolder pFolder)
          Constructor.
 
Method Summary
 String buildRefTo(DocFile target)
          Return a path-like reference to the specified file.
 File getFile()
          Returns the File representation.
 DocFolder getFolder()
          Return the parent DocFolder.
 String getName()
          Returns the name of the file.
 List getPathFolders()
          Returns a list with the folders from root.
 String toString()
          Return a String representation of this file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocFile

public DocFile(String pName,
               DocFolder pFolder)
Constructor.

Parameters:
pName - the name of the file.
pFolder - the parent folder.
Throws:
IllegalArgumentException - if one of the parameters is null.
Method Detail

getName

public String getName()
Returns the name of the file.

Returns:
the name of the file.

getFolder

public DocFolder getFolder()
Return the parent DocFolder.

Returns:
the DocFolder.

getFile

public File getFile()
Returns the File representation.

Returns:
the File.

getPathFolders

public List getPathFolders()
Returns a list with the folders from root.

Returns:
a list with the folders from root.

buildRefTo

public String buildRefTo(DocFile target)
Return a path-like reference to the specified file.

Parameters:
target - the target file.
Returns:
a path-like reference string.

toString

public String toString()
Return a String representation of this file.

Overrides:
toString in class Object
Returns:
a String.