Xindice API
version 1.1

org.apache.xindice.tools.command
Class ImportTree

java.lang.Object
  extended by org.apache.xindice.tools.command.Command
      extended by org.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:
$Revision: 511426 $, $Date: 2007-02-25 04:25:02 +0100 (Sun, 25 Feb 2007) $

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  String createCollection(String baseCollection, String newCollection)
           
 boolean execute(Hashtable table)
           
protected  void importFile(String baseCollection, String path, 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(Hashtable table)
                throws Exception
Specified by:
execute in class Command
Throws:
Exception

importFile

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

createCollection

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

Xindice API
version 1.1

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