All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class XSA.XSAEngine

java.lang.Object
   |
   +----XSA.XSAEngine

public class XSAEngine
extends Object
The main XSA object, which controls the whole checking process and presents an API to clients.


Constructor Index

 o XSAEngine()

Method Index

 o checkingDone()
Tells the engine that no more URLs will be checked.
 o checkingStarts()
Tells the engine that checking is about to begin.
 o checkURL(String, Hashtable)
Tells the engine to check a URL and some of the products mentioned there.
 o fileToURL(String)
Turns the file reference into an absolute file: URL.
 o getAPIVersion()
Returns the version number of the XSA API.
 o getEngineVersion()
Returns the version number of the XSA engine implementation.
 o getXSAVersion()
Returns the version number of the XSA specification that this XSA API implementation conforms to.
 o loadDocument(String, Hashtable)
Parses an XSA document into a Vendor object and returns the Vendor object.
 o setClient(XSAClient)
Registers the XSA client application.
 o setFactory(ObjectFactory)
Registers a new ObjectFactory for use by the XSAEngine.
 o setInternalFactory(InternalObjectsFactory)
Registers a new InternalObjectsFactory for use by the engine.
 o setParser(String)
Tells the engine which SAX parser to use.

Constructors

 o XSAEngine
 public XSAEngine()

Methods

 o setFactory
 public void setFactory(ObjectFactory newFact)
Registers a new ObjectFactory for use by the XSAEngine.

 o setInternalFactory
 public void setInternalFactory(InternalObjectsFactory newFact)
Registers a new InternalObjectsFactory for use by the engine.

 o setClient
 public void setClient(XSAClient _client)
Registers the XSA client application. This method can be called at any time.

Parameters:
_client - A client object to give results and error messages.
See Also:
XSAClient
 o setParser
 public void setParser(String className)
Tells the engine which SAX parser to use. This method can be called at any time.

Parameters:
className - The class name of the SAX driver to use.
 o checkingStarts
 public void checkingStarts()
Tells the engine that checking is about to begin.

 o checkURL
 public void checkURL(String url,
                      Hashtable pids)
Tells the engine to check a URL and some of the products mentioned there. This method does not return until the URL has been checked.

Parameters:
url - The URL of the XSA document to check.
pids - A hashtable where the IDs of the products to check are keys. (The values mapped to by the keys are never looked at.) Only products whose IDs are keys in the hashtable will be checked. If the parameter is null all products will be checked.
 o loadDocument
 public Vendor loadDocument(String url,
                            Hashtable pids) throws InternalXSAException
Parses an XSA document into a Vendor object and returns the Vendor object.

Parameters:
url - The URL to the document.
pids - A hashtable of the IDs of the products to include in the object. Objects with IDs that are not in the table will be ignored. If the parameter is null all products will be included.
Throws: InternalXSAException
Thrown if anything goes wrong.
 o checkingDone
 public void checkingDone()
Tells the engine that no more URLs will be checked.

 o getEngineVersion
 public String getEngineVersion()
Returns the version number of the XSA engine implementation. This number may differ from the API version because of bug fixes.

Returns:
The engine version number as a string of the form "1.00", "1.10" ...
 o getAPIVersion
 public String getAPIVersion()
Returns the version number of the XSA API.

Returns:
The API version number as a string of the form "1.00", "1.10" ...
 o getXSAVersion
 public String getXSAVersion()
Returns the version number of the XSA specification that this XSA API implementation conforms to.

Returns:
The XSA version number as a string of the form "1.0", "1.1" ...
 o fileToURL
 public String fileToURL(String fileref)
Turns the file reference into an absolute file: URL. The actual implementation is taken from James Clark's XMLTest.

Parameters:
fileref - An absolute or relative file reference.

All Packages  Class Hierarchy  This Package  Previous  Next  Index