| java.lang.Object org.ozoneDB.xml.DOMFactory
All known Subclasses: org.ozoneDB.xml.OOXMLDOMFactory,
Method Summary | |
public static DTDDocument | createDTDDocument() Creates and returns a new DTD document. | public static Document | createDocument(Class docClass) Creates and returns a new XML/HTML/DTD document. | public static HTMLDocument | createHTMLDocument() Creates and returns a new HTML document. | public static Parser | createParser(Reader reader, String sourceURI, Class docClass) Creates and returns a new XML/HTML/DTD parser. | public static Parser | createParser(Reader reader, String sourceName) Creates and returns a new XML parser. | public static Parser | createParser(InputStream stream, String sourceName, Class docClass) Creates and returns a new XML/HTML/DTD parser. | public static Parser | createParser(InputStream stream, String sourceName) Creates and returns a new XML parser. | public static Printer | createPrinter(Writer writer, int mode, Class docClass) Creates and returns a new XML/HTML/DTD printer. | public static Printer | createPrinter(Writer writer, int mode) Creates and returns a new XML printer. | public static Printer | createPrinter(OutputStream stream, int mode, Class docClass) Creates and returns a new XML/HTML/DTD printer. | public static Printer | createPrinter(OutputStream stream, int mode) Creates and returns a new XML printer. | public static Document | createXMLDocument() Creates and returns a new XML document. | public static Class | getDocClass(Class docClass) Returns the specified document class, or the properties file specified
class, or the default. | public static HolderFinder | getHolderFinder() Returns a singleton holder finder. | public static Properties | getProperties() Returns the properties list from the OpenXML properties file. | public static String | getProperty(String name) Returns the property from the OpenXML properties file. | public static Source | newSource() |
DOCUMENT_DTD | final public static Class DOCUMENT_DTD(Code) | | DTD document class. Can be used to request a new DTD document, DTD
parser or DTD printer. Will produce a document of type
DTDDocument .
|
DOCUMENT_HTML | final public static Class DOCUMENT_HTML(Code) | | HTML document class. Can be used to request a new HTML document, HTML
parser or HTML printer. Will produce a document of type
HTMLDocument .
|
DOCUMENT_XML | final public static Class DOCUMENT_XML(Code) | | XML document class. Can be used to request a new XML document, XML
parser or XML printer. Will produce a document of type
Document .
|
createDocument | public static Document createDocument(Class docClass)(Code) | | Creates and returns a new XML/HTML/DTD document. The document type is
based on docClass, which dictates whether the document is XML,
HTML or DTD. If docClass is null, the class type is read from
the property openxml.document.class, and if that property is
missing, the default
Document is used.
Note that the returned document type may or may not be
Document ,
but it must extend
Document , and that is also true for non-XML
documents.
A new XML/HTML/DTD document See Also: Document |
createParser | public static Parser createParser(Reader reader, String sourceURI, Class docClass)(Code) | | Creates and returns a new XML/HTML/DTD parser. The parser type is
determined by the document class provided in docClass, which
dictates whether the parser is XML, HTML or DTD. If docClass is
null, the same rules that govern
DOMFactory.createDocument apply here.
The parser is only guaranteed to extend
Parser and will use
DOMFactory.createDocument to create an instance of the parsed document.
To create a document of a user class, either use
Source , or
the following code:
Parser parser;
parser = DOMFactory.createParser( reader, sourceURI, docClass );
if ( parser instanceof XMLParser )
doc = ( (XMLParser) parser ).parseDocument( null, docClass );
else
doc = parser.parseDocument();
Parameters: reader - A reader to the document source Parameters: sourceURI - The source URI Parameters: docClass - The requested document type A new parser |
createParser | public static Parser createParser(Reader reader, String sourceName) throws IOException(Code) | | Creates and returns a new XML parser.
Parameters: reader - A reader to the document source Parameters: sourceURI - The source URI A new parser |
createParser | public static Parser createParser(InputStream stream, String sourceName, Class docClass) throws IOException(Code) | | Creates and returns a new XML/HTML/DTD parser. The parser type is
determined by the document class provided in docClass, which
dictates whether the parser is XML, HTML or DTD. If docClass is
null, the same rules that govern
DOMFactory.createDocument apply here.
The parser is only guaranteed to extend
Parser and will use
DOMFactory.createDocument to create an instance of the parsed document.
To create a document of a user class, either use
Source , or
the following code:
Parser parser;
parser = DOMFactory.createParser( reader, sourceURI, docClass );
if ( parser instanceof XMLParser )
doc = ( (XMLParser) parser ).parseDocument( null, docClass );
else
doc = parser.parseDocument();
Parameters: input - An input stream to the document source Parameters: sourceURI - The source URI Parameters: docClass - The requested document type A new parser |
createParser | public static Parser createParser(InputStream stream, String sourceName) throws IOException(Code) | | Creates and returns a new XML parser.
Parameters: input - An input stream to the document source Parameters: sourceURI - The source URI A new parser |
createPrinter | public static Printer createPrinter(Writer writer, int mode, Class docClass) throws IOException(Code) | | Creates and returns a new XML/HTML/DTD printer. The printer type is
determined by the document class provided in docClass, which
dictates whether the printer is XML, HTML or DTD. If docClass is
null, the same rules that govern
DOMFactory.createDocument apply here.
Parameters: writer - A writer for the document output Parameters: mode - The printing mode Parameters: docClass - The document type A new printer |
createPrinter | public static Printer createPrinter(Writer writer, int mode) throws IOException(Code) | | Creates and returns a new XML printer.
Parameters: writer - A writer for the document output Parameters: mode - The printing mode A new printer |
createPrinter | public static Printer createPrinter(OutputStream stream, int mode, Class docClass) throws IOException(Code) | | Creates and returns a new XML/HTML/DTD printer. The printer type is
determined by the document class provided in docClass, which
dictates whether the printer is XML, HTML or DTD. If docClass is
null, the same rules that govern
DOMFactory.createDocument apply here.
Parameters: output - A stream for the document output Parameters: mode - The printing mode Parameters: docClass - The document type A new printer |
createPrinter | public static Printer createPrinter(OutputStream stream, int mode) throws IOException(Code) | | Creates and returns a new XML printer.
Parameters: output - A stream for the document output Parameters: mode - The printing mode A new printer |
createXMLDocument | public static Document createXMLDocument()(Code) | | Creates and returns a new XML document. The document type is
Document .
A new XML document See Also: Document |
getDocClass | public static Class getDocClass(Class docClass)(Code) | | Returns the specified document class, or the properties file specified
class, or the default. If the specified document class is not valid, a
runtime exception is thrown. If the specified class is null, the name
is read from the properties file and used as the based class. If that
property is missing or not a valid class, the default document class
(
Document ) is used.
Parameters: docClass - The specified document class, or null A valid document class, extending Document |
getHolderFinder | public static HolderFinder getHolderFinder()(Code) | | Returns a singleton holder finder. This finder has default holder factories
registered for handling network, file, JAR and CLASSPATH document sources,
and mapping for built-in DTDs. Additional holder factories and Xcatalogs
may be specified in the properties file and are loaded and registered the
first time this method is called.
An holder finder |
getProperties | public static Properties getProperties()(Code) | | Returns the properties list from the OpenXML properties file. If this
property list is changed, changes will affect the behavior of the factory
and other OpenXML elements.
The properties list |
getProperty | public static String getProperty(String name)(Code) | | Returns the property from the OpenXML properties file.
Parameters: name - The property name Property value or null |
newSource | public static Source newSource()(Code) | | |
|
|