|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sape.carbon.core.config.format.jdom.JDOMConfigurationFactory
This factory implementation constructs the appropriate Configuration implementation, through the Dynamic Proxy facility of the JDK, for the particular Configuration interface requested.
Copyright 2002 Sapient
Field Summary | |
private org.apache.commons.logging.Log |
log
Provides a handle to Apache-commons logger |
private static String |
SCHEMA_URI
Name of the feature URI to turn on schema validation in xerces. |
private static String |
XERCES_SAX_PARSER
Name of the xerces sax parser used to do schema validation. |
Constructor Summary | |
JDOMConfigurationFactory()
|
Method Summary | |
protected boolean |
containsDtd(org.jdom.Document document)
Checks if the given JDOM Document contains a DTD for validation against. |
protected boolean |
containsSchema(org.jdom.Document document)
Checks if the given JDOM Document contains a Schema for validation against. |
protected boolean |
containsValidatingDocument(org.jdom.Document document)
Checks if the given JDOM Document contains a document for validation against. |
protected String |
convertStreamToString(String name,
InputStream in)
Converts a given input stream into a String. |
protected static String |
getSaxParserClassName()
Returns a string representation of the parser in the system or null if an error occurs. |
org.jdom.Document |
readConfigurationStreamToData(String name,
InputStream in)
Loads a org.jdom.Document object from the given
InputStream . |
void |
writeConfigurationStreamToData(org.jdom.Document document,
OutputStream out)
Stores the raw version of the provided org.jdom.Document
object in the format that this format service implementation
understands. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private org.apache.commons.logging.Log log
private static final String SCHEMA_URI
private static final String XERCES_SAX_PARSER
Constructor Detail |
public JDOMConfigurationFactory()
Method Detail |
public org.jdom.Document readConfigurationStreamToData(String name, InputStream in) throws ConfigurationFormatException
Loads a org.jdom.Document
object from the given
InputStream
. This node object will represent
the full object-graph depiction of a live configuration.
readConfigurationStreamToData
in interface ConfigurationDataFormatService
name
- The name of the configuration nodein
- the InputStream
from which
the configuration will be read
ConfigurationFormatException
- when there is a formatting error
with the input streamprotected boolean containsValidatingDocument(org.jdom.Document document)
document
- the document to check against
protected boolean containsDtd(org.jdom.Document document)
document
- the document to check against
protected boolean containsSchema(org.jdom.Document document)
document
- the document to check against
protected String convertStreamToString(String name, InputStream in) throws ConfigurationFormatException
name
- the name of the input string to convert. Used for logging.in
- the input stream to convert
ConfigurationFormatException
- indicates an error converting
the input stream into a string. Generally used to wrap
an IOExceptionprotected static String getSaxParserClassName()
public void writeConfigurationStreamToData(org.jdom.Document document, OutputStream out) throws ConfigurationFormatException
Stores the raw version of the provided org.jdom.Document
object in the format that this format service implementation
understands. The format of this implementation is strict XML.
writeConfigurationStreamToData
in interface ConfigurationDataFormatService
out
- The output stream to which the raw configuration
data should be writtendocument
- the document to output
ConfigurationFormatException
- When unable to write a
node's raw format to the output stream
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |