com.photoviewer.server.util
Class Path

java.lang.Object
  extended bycom.photoviewer.server.util.Path
All Implemented Interfaces:
java.lang.Comparable

public class Path
extends java.lang.Object
implements java.lang.Comparable

The Path class represents a subdirectory in both the source and destination trees. It holds onto the local information necessary to create an individual directory's thumbnail page.

Author:
Chris Normand

Field Summary
protected  java.util.Vector m_children
           
protected  java.lang.String m_comment
           
protected  java.util.Properties m_descriptions
           
protected  java.io.File m_destDirectory
           
protected  Path m_parent
           
protected  java.util.Hashtable m_pictureNames
           
protected  java.io.File[] m_pictures
           
protected  java.util.Properties m_properties
           
protected  java.util.Vector m_segments
           
protected  java.io.File m_srcDirectory
           
static char WEB_SEP
           
static java.lang.String WEB_SEP_STR
           
 
Constructor Summary
  Path()
           
  Path(Path prnt)
           
protected Path(Path prnt, java.util.Vector segs)
           
  Path(java.lang.String path)
           
 
Method Summary
protected  void buildPictureNameSet()
           
 Path childPath(java.lang.String segment)
           
 int compareTo(java.lang.Object o)
           
 boolean containsPicture(java.lang.String name)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String fileFrom(java.lang.String root)
           
 Path findPath(Path target)
           
 java.util.Vector getChildren()
           
 java.lang.String getComment()
           
 java.util.Properties getDescriptions()
           
 java.io.File getDestDirectory()
           
 java.lang.String getName()
           
 int getNumOfPictures()
           
 Path getParent()
           
 java.io.File getPicture(int i)
           
 java.util.Hashtable getPictureNames()
           
 java.util.Properties getProperties()
           
 Path getRoot()
           
 java.io.File getSrcDirectory()
           
 int indexOf(java.lang.String name)
           
 boolean isRoot()
           
 void parsePath(java.lang.String path)
           
protected  java.lang.String path(char ch, boolean useLeading)
           
 java.lang.String printIndexOf(java.lang.String name)
           
 void setComment(java.lang.String s)
           
 void setDescriptions(java.util.Properties newDescriptions)
           
 void setDestDirectory(java.io.File newDestDirectory)
           
 void setPictures(java.io.File[] newPictures)
           
 void setProperties(java.util.Properties newProperties)
           
 void setSrcDirectory(java.io.File newSrcDirectory)
           
 java.lang.String toString()
           
 java.lang.String webFrom(java.lang.String root)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_segments

protected java.util.Vector m_segments

m_parent

protected Path m_parent

m_children

protected java.util.Vector m_children

m_comment

protected java.lang.String m_comment

m_pictures

protected java.io.File[] m_pictures

m_pictureNames

protected java.util.Hashtable m_pictureNames

m_srcDirectory

protected java.io.File m_srcDirectory

m_destDirectory

protected java.io.File m_destDirectory

m_properties

protected java.util.Properties m_properties

m_descriptions

protected java.util.Properties m_descriptions

WEB_SEP

public static final char WEB_SEP
See Also:
Constant Field Values

WEB_SEP_STR

public static final java.lang.String WEB_SEP_STR
See Also:
Constant Field Values
Constructor Detail

Path

public Path()

Path

public Path(java.lang.String path)

Path

public Path(Path prnt)

Path

protected Path(Path prnt,
               java.util.Vector segs)
Method Detail

buildPictureNameSet

protected void buildPictureNameSet()

childPath

public Path childPath(java.lang.String segment)

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

containsPicture

public boolean containsPicture(java.lang.String name)

equals

public boolean equals(java.lang.Object obj)

fileFrom

public java.lang.String fileFrom(java.lang.String root)

findPath

public Path findPath(Path target)

getChildren

public java.util.Vector getChildren()

getComment

public java.lang.String getComment()

getDescriptions

public java.util.Properties getDescriptions()

getDestDirectory

public java.io.File getDestDirectory()

getName

public java.lang.String getName()

getNumOfPictures

public int getNumOfPictures()

getParent

public Path getParent()

getPicture

public java.io.File getPicture(int i)

getPictureNames

public java.util.Hashtable getPictureNames()

getProperties

public java.util.Properties getProperties()

getRoot

public Path getRoot()

getSrcDirectory

public java.io.File getSrcDirectory()

indexOf

public int indexOf(java.lang.String name)

isRoot

public boolean isRoot()

parsePath

public void parsePath(java.lang.String path)

path

protected java.lang.String path(char ch,
                                boolean useLeading)

printIndexOf

public java.lang.String printIndexOf(java.lang.String name)

setComment

public void setComment(java.lang.String s)

setDescriptions

public void setDescriptions(java.util.Properties newDescriptions)

setDestDirectory

public void setDestDirectory(java.io.File newDestDirectory)

setPictures

public void setPictures(java.io.File[] newPictures)

setProperties

public void setProperties(java.util.Properties newProperties)

setSrcDirectory

public void setSrcDirectory(java.io.File newSrcDirectory)

toString

public java.lang.String toString()

webFrom

public java.lang.String webFrom(java.lang.String root)