Xindice API
version 1.1b4

org.apache.xindice.tools.command
Class ImportTree

java.lang.Object
  extended byorg.apache.xindice.tools.command.Command
      extended byorg.apache.xindice.tools.command.ImportTree

public class ImportTree
extends Command

ImportTree.java is designed to take a directory/file path and create a Collection from it's name. The files within the directory are converted into Documents and then stored into the newly created Collection with their filename as a document key NOTE: If the collection passed in with the -c option already exists it will be overwritten!

Version:
CVS $Revision: 1.12 $, $Date: 2004/02/08 02:57:35 $

Field Summary
 
Fields inherited from class org.apache.xindice.tools.command.Command
XINDICE_NAME_INDEXER, XINDICE_VAL_INDEXER, XINDICELOCALURI, XINDICEURI, XMLDBAPIVERSION, XMLDBURI
 
Constructor Summary
ImportTree()
           
 
Method Summary
protected  java.lang.String createCollection(java.lang.String baseCollection, java.lang.String newCollection)
           
 boolean execute(java.util.Hashtable table)
           
protected  void importFile(java.lang.String baseCollection, java.lang.String path, java.lang.String name)
           
 
Methods inherited from class org.apache.xindice.tools.command.Command
normalizeCollectionURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportTree

public ImportTree()
Method Detail

execute

public boolean execute(java.util.Hashtable table)
                throws java.lang.Exception
Specified by:
execute in class Command
Throws:
java.lang.Exception

importFile

protected void importFile(java.lang.String baseCollection,
                          java.lang.String path,
                          java.lang.String name)
                   throws java.lang.Exception
Throws:
java.lang.Exception

createCollection

protected java.lang.String createCollection(java.lang.String baseCollection,
                                            java.lang.String newCollection)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

Xindice API
version 1.1b4

Copyright (c) 1999-2004 The Apache Software Foundation. All Rights Reserved.