|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ddtek.xmlconverter.ConverterResolver
public class ConverterResolver
An implementation of URIResolver which can resolve Converter URIs and many others.
This class resolves URIs which start with converter: or file: or can be recognized as
file URIs (e.g. C:\abc.txt or \\server\path). Any other URI will be handed to
the URL class for further processing.
Instances of this class are created from the ConverterFactory class.
| Method Summary | |
|---|---|
InputStream |
createInputStream(String uri,
String URIBase)
A convenience method to resolve a Stylus Studio URI and return an InputStream. |
OutputStream |
createOutputStream(String uri,
String URIBase)
A convenience method to resolve a Stylus Studio URI and return an OutputStream. |
Configuration |
getConfiguration()
Get the Configuration associated with this ConverterResolver. |
ConverterFactory |
getFactory()
Get the ConverterFactory which created this ConverterResolver. |
SAXSource |
getSAXSource(String uri,
String URIBase)
Resolve a url and return a SAXSource which can be used to read the data. |
javax.xml.stream.XMLStreamReader |
getXMLStreamReader(String uri,
String URIBase)
Resolve a url and return a XMLStreamReader to read the data. |
Result |
outputStreamResolver(String uri,
String URIBase)
Resolve a URI and return a Result which can be used to write data to the URI. |
Source |
resolve(String uri,
String URIBase)
Resolve a URI and return a Source which can
be used to read data from the URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Configuration getConfiguration()
Configuration associated with this ConverterResolver.
public ConverterFactory getFactory()
ConverterFactory which created this ConverterResolver.
public Source resolve(String uri,
String URIBase)
throws TransformerException
Source which can
be used to read data from the URI. The Source returned by this method
is a StreamSource. To get the data, cast it as a StreamSource and call
getInputStream().
resolve in interface URIResolveruri - The URI to be resolved.URIBase - The base URI in effect when the URI was encountered.
TransformerException - If the URI is malformed or some other error occurs.
public Result outputStreamResolver(String uri,
String URIBase)
throws TransformerException,
IOException
uri - The URI to be resolved.URIBase - The base URI in effect when the URI was encountered.
TransformerException - If the URI is malformed or some other error occurs.
IOException
public InputStream createInputStream(String uri,
String URIBase)
throws IOException
uri - The URI to be resolved.URIBase - The base URI in effect when the URI was encountered.
IOException - If an error occurs.
public OutputStream createOutputStream(String uri,
String URIBase)
throws IOException
uri - The URI to be resolved.URIBase - The base URI in effect when the URI was encountered.
IOException - If an error occurs.
public javax.xml.stream.XMLStreamReader getXMLStreamReader(String uri,
String URIBase)
throws javax.xml.stream.XMLStreamException
XMLStreamReader to read the data.
The url must represent an xml data source. This method will return a
XMLStreamReader to read the contents of the data source.
getXMLStreamReader in interface com.ddtek.xmlconverter.interfaces.StAXResolveruri - The URI to be resolved.URIBase - The base URI in effect when the URI was encountered.
javax.xml.stream.XMLStreamException - if an error occurs
public SAXSource getSAXSource(String uri,
String URIBase)
throws ConverterException
SAXSource to read the contents of the data source. The caller should
register a ContentHandler by calling
SAXSource.getXMLReader().setContentHandler() an then start the data flow by calling
SAXSource.getXMLReader().parse(null);
getSAXSource in interface com.ddtek.xmlconverter.interfaces.StAXResolveruri - The URI to be resolved.URIBase - The base URI in effect when the URI was encountered.
SAXSource containing an XMLReader or null if the
uri scheme was not recognized.
ConverterException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||