net.sf.jfilesync.sync2
Class SyncTree

java.lang.Object
  extended by net.sf.jfilesync.sync2.SyncTree

public class SyncTree
extends java.lang.Object


Field Summary
private  TPathControlInterface pathControl
           
private  SyncFile root
           
private  java.lang.String rootPath
           
 
Constructor Summary
SyncTree(SyncFile root, java.lang.String rootPath, TPathControlInterface pathControl)
           
 
Method Summary
protected  void collectIgnoredNodes(SyncFile node, SyncFileIgnoreList il)
           
 SyncFile findSyncFile(java.lang.String absoluteFileName)
           
 SyncFileIgnoreList getIgnoreList()
           
private  int getNumberOfDirChildren(SyncFile f)
           
 int getNumberOfDirectories()
           
 int getNumberOfFiles()
           
private  int getNumberOfFiles(SyncFile f)
           
 TPathControlInterface getPathControl()
           
 java.lang.String getPathRelativeToRoot(SyncFile file)
           
 SyncFile getRoot()
           
 java.lang.String getRootPath()
           
protected  void hideIfNotInList(SyncFile node, java.lang.String[] fnlist)
           
protected  boolean isNodeInList(SyncFile node, java.lang.String[] fnlist)
           
protected  boolean isPrefixOfListElem(SyncFile node, java.lang.String[] fnlist)
           
 boolean isRoot(SyncFile node)
           
 void setIgnoredFile(java.lang.String fname)
           
 void showOnly(java.lang.String[] fnlist)
           
 void unhide()
           
protected  void unhideNode(SyncFile node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

private final SyncFile root

pathControl

private final TPathControlInterface pathControl

rootPath

private final java.lang.String rootPath
Constructor Detail

SyncTree

public SyncTree(SyncFile root,
                java.lang.String rootPath,
                TPathControlInterface pathControl)
Method Detail

getPathControl

public TPathControlInterface getPathControl()

getRoot

public SyncFile getRoot()

getRootPath

public java.lang.String getRootPath()

isRoot

public boolean isRoot(SyncFile node)

getPathRelativeToRoot

public java.lang.String getPathRelativeToRoot(SyncFile file)

getNumberOfDirectories

public int getNumberOfDirectories()

getNumberOfDirChildren

private int getNumberOfDirChildren(SyncFile f)

getNumberOfFiles

public int getNumberOfFiles()

getNumberOfFiles

private int getNumberOfFiles(SyncFile f)

findSyncFile

public SyncFile findSyncFile(java.lang.String absoluteFileName)
Parameters:
absoluteFileName -
Returns:
returns a reference to this sync file or null if it does not exist

setIgnoredFile

public void setIgnoredFile(java.lang.String fname)

unhide

public void unhide()

showOnly

public void showOnly(java.lang.String[] fnlist)

hideIfNotInList

protected void hideIfNotInList(SyncFile node,
                               java.lang.String[] fnlist)

isPrefixOfListElem

protected boolean isPrefixOfListElem(SyncFile node,
                                     java.lang.String[] fnlist)

isNodeInList

protected boolean isNodeInList(SyncFile node,
                               java.lang.String[] fnlist)

unhideNode

protected void unhideNode(SyncFile node)

getIgnoreList

public SyncFileIgnoreList getIgnoreList()

collectIgnoredNodes

protected void collectIgnoredNodes(SyncFile node,
                                   SyncFileIgnoreList il)