All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xset.XSetService

java.lang.Object
   |
   +----java.rmi.server.RemoteObject
           |
           +----java.rmi.server.RemoteServer
                   |
                   +----java.rmi.server.UnicastRemoteObject
                           |
                           +----xset.XSetService

public class XSetService
extends UnicastRemoteObject
implements XSetServiceIF
Class that makes the SETserver an RMI service It offers methods to add and delete files from the XSet search engine, and to query the dataset in different ways.

The service is originally empty, and files can be added directory by directory by calling AddFiles(path)


Constructor Index

 o XSetService()
Constructor, just creates an SETserver object

Method Index

 o AddDocument(String)
Method used to add a single document to the XSet search engine index
 o AddFile(String)
Method to add a single file to the XSet dataset
 o AddFiles(String)
Method used to add files to the XSet search engine index
 o ClearAll()
Method to clear the XSet index, in reality it just creates a new instance of the SETserver object
 o EnumerateTag(String[])
EnumerateTag (String []) *** Method that takes in a path to a subpath down to a tag in the form of an array, and returns an enumeration of the existing values in the treap for that tag.
 o main(String[])
 o Query(String)
Method that queries the XSet server and returns vector of XML documents
 o Query(String, Vector)
Query (String, Vector) *** Method to query the XSet server, and return only those fields requested

This returned data structure is rather complicated.

 o QuerySE(String)
Method to query the XSet server
 o RemoveDocument(Document)
RemoveDocument(Document) ** The method that removes a document from the index structure
 o RemoveDocument(String)
RemoveDocument(String) ** The method that takes in a XML string, and tries to remove it from the index if it exists
 o usage()

Constructors

 o XSetService
 public XSetService() throws RemoteException
Constructor, just creates an SETserver object

Methods

 o usage
 public static void usage()
 o main
 public static void main(String argv[])
 o AddDocument
 public void AddDocument(String xmlstring) throws RemoteException
Method used to add a single document to the XSet search engine index

Parameters:
xmlstring - the document to be added
Throws: RemoteException
as a remote service should
 o AddFiles
 public void AddFiles(String path) throws RemoteException
Method used to add files to the XSet search engine index

Parameters:
path - String that encodes the full path of the directory that contains the files to be indexed
Throws: RemoteException
as demanded by RMI
 o AddFile
 public void AddFile(String filename) throws RemoteException
Method to add a single file to the XSet dataset

Parameters:
filename - String encoding of the filename including full path
Throws: RemoteException
if file not found or error in IO.
 o ClearAll
 public void ClearAll() throws RemoteException
Method to clear the XSet index, in reality it just creates a new instance of the SETserver object

 o QuerySE
 public Vector QuerySE(String xmlQuery) throws RemoteException
Method to query the XSet server

Parameters:
xmlQuery - is the query in the form of a text string encoded xml document. The query must be well-formed, but not contain a reference to any DTDs
Returns:
Vector of ServiceEntry objects, each wrapped around a XML Document
 o Query
 public Vector Query(String xmlQuery) throws RemoteException
Method that queries the XSet server and returns vector of XML documents

Parameters:
xmlQuery - is the query in string encoded xml format, which must be well-formed, and should not contain a reference to any DTDs
Returns:
Vector of XML documents in string form
 o Query
 public Vector Query(String xmlQuery,
                     Vector tagVector) throws RemoteException
Query (String, Vector) *** Method to query the XSet server, and return only those fields requested

This returned data structure is rather complicated. It's a vector of hashtables, one hashtable for each matching XML document found. For each of these matches, the hashtable hashes each of the requested tag names to a vector. The vector contains all the string values which occur in that tagname in the currently matched XML document. So it's a Vector of Hashtables of Vectors.

Parameters:
xmlQuery, - the xml query in the form of a string encoded XML
tagVector, - a vector containing String names of requested tags
Returns:
Vector of hashtables that map each requested tag name to its value
 o EnumerateTag
 public Vector EnumerateTag(String pathArray[]) throws RemoteException
EnumerateTag (String []) *** Method that takes in a path to a subpath down to a tag in the form of an array, and returns an enumeration of the existing values in the treap for that tag. Just a simple wrapper around SETserver.enumerateTag()

Parameters:
pathArray - - the string array of tag names in the path to the tag
Returns:
Vector of unique existing values that exist in the dataset
 o RemoveDocument
 public void RemoveDocument(Document d) throws RemoteException
RemoveDocument(Document) ** The method that removes a document from the index structure

Parameters:
d - The org.w3c.dom document that is to be removed
 o RemoveDocument
 public void RemoveDocument(String xml) throws RemoteException
RemoveDocument(String) ** The method that takes in a XML string, and tries to remove it from the index if it exists

Parameters:
xml - The XML string representing the XML document to be removed

All Packages  Class Hierarchy  This Package  Previous  Next  Index