net.groboclown.xml.xdstates.v1
Class StateIteratorLoader
java.lang.Object
|
+--net.groboclown.xml.xdstates.v1.StateIteratorLoader
- public class StateIteratorLoader
- extends Object
A utility class which invokes the XML parser to extract the
IXMLResource instances from the XML file.
Depending on which XML library you have, you will want to specify
which XMLReader creator to use. Specify the class which implements
the IGetXMLReader interface with the -D option of:
net.groboclown.util.xmlresource.v1.XMLReaderClass=<class name>
where class name is the name of the class which will read in the
XMLReader. The default class is the Xerces reader. Default supported
implementations are:
- xml4j:
net.groboclown.util.xmlresource.v1.xml4j.GetXMLReader
(requires xml4j.jar and sax2.jar in the classpath)
- xerces:
net.groboclown.util.xmlresource.v1.xerces.GetXMLReader
(requires a 1.2.1 compatible build of xerces.jar)
- Version:
- Alpha 0.9.0 - xml4j + sax2
- Author:
- Matt Albrecht
- See Also:
XMLResourceHandler
Constructor Summary |
protected |
StateIteratorLoader()
Default constructor - protected since this is a
utility class. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
s_instance
protected static StateIteratorLoader s_instance
StateIteratorLoader
protected StateIteratorLoader()
- Default constructor - protected since this is a
utility class.
getInstance
public static StateIteratorLoader getInstance()
getFromResource
public IStateIterator getFromResource(String resourceName)
throws IOException,
SAXException
- Get the resource from a classpath resource.
getFromFile
public IStateIterator getFromFile(String resourceFile)
throws IOException,
SAXException
getFromURL
public IStateIterator getFromURL(String resourceURL)
throws IOException,
SAXException
getFromStream
public IStateIterator getFromStream(IInputStreamGenerator isg,
String systemID)
throws IOException,
SAXException
readHandler
public void readHandler(StateIteratorHandler handler,
IInputStreamGenerator isg,
String systemID)
throws IOException,
SAXException
getHandlerFromStream
public StateIteratorHandler getHandlerFromStream(IInputStreamGenerator isg,
String systemID)
throws IOException,
SAXException
getXMLReader
protected XMLReader getXMLReader()
throws SAXException
Written under the LGPL