org.exolab.castor.util
public final class LocalConfiguration extends Configuration
The configuration file is loaded from the Java lib directory, the classpath and the Castor JAR. Properties set in the classpath file takes precedence over properties set in the Java library configuration file and properties set in the Castor JAR, allowing for each customization. All three files are named castor.properties.
For example, to change the parser in use, specify that all documents should be printed with identantion or turn debugging on, create a new configuration file in the current directory, instead of modifying the global one.
Version: $Revision: 6302 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Constructor Summary | |
---|---|
LocalConfiguration()
Creates a new instance of LocalConfiguration |
Method Summary | |
---|---|
boolean | debug()
Returns true if the current configuration has enabled debugging.
|
static LocalConfiguration | getInstance()
Returns an instance of the LocalConfiguration, if a previous
configuration has already been loaded for local resource,
it will be returned.
|
OutputFormat | getOutputFormat()
Returns the default OutputFormat for use with a Serializer.
|
Parser | getParser()
Return an XML document parser implementing the feature list
specified in the configuration file.
|
Parser | getParser(String features)
Returns an XML document parser implementing the requested
set of features. |
NodeType | getPrimitiveNodeType()
Returns the NodeType to use for Java primitives.
|
Properties | getProperties()
Returns the current properties from the configuration file(s).
|
RegExpEvaluator | getRegExpEvaluator()
Returns a new instance of the specified Regular Expression
Evaluator, or null if no validator was specified
|
Serializer | getSerializer()
Returns a default serializer for producing an XML document.
|
DocumentHandler | getSerializer(OutputStream output)
Returns a default serializer for producing an XML document to
the designated output stream using the default serialization
format.
|
DocumentHandler | getSerializer(Writer output)
Returns a default serializer for producing an XML document to
the designated output stream using the default serialization
format.
|
XMLNaming | getXMLNaming()
Returns the naming conventions to use for the XML framework
|
XMLNaming | getXMLNaming(ClassLoader classLoader)
Returns the naming conventions to use for the XML framework
|
XMLReader | getXMLReader()
Returns an XML document parser implementing the requested
set of features. |
XMLReader | getXMLReader(String features)
Returns an XML document parser implementing the requested
set of features. |
protected void | load()
Calls LocalConfiguration to load the configuration the
first time and then looks for a local configuration to
merge in with the defaults. |
void | loadProperties(String fileOrResourceName)
Load the configuration will not complain about inability to load
configuration file from one of the default directories, but if
it cannot find the JAR's configuration file, will throw a
run time exception. |
boolean | marshallingValidation()
Returns true if the default configuration specified validation in
the marshalling framework. |
boolean | strictElements()
Access to the property specifying whether to apply strictness to elements when
unmarshalling. |
Returns: true if the current configuration has enabled debugging, otherwise false.
Returns: the LocalConfiguration
Returns: the default OutputFormat
Returns: A suitable XML parser
Parameters: features The requested feature list, null for the defaults
Returns: A suitable XML parser
Returns: the NodeType assigned to Java primitives, or null if no NodeType was specified.
Returns: The current set of configuration properties.
Returns: the regular expression evaluator,
Returns: A suitable serializer
Parameters: output The output stream
Returns: A suitable serializer
Parameters: output The output stream
Returns: A suitable serializer
Returns: the naming conventions to use for the XML framework
Returns: the naming conventions to use for the XML framework
Returns: A suitable XML parser
Returns: A suitable XML parser
Returns: true if element processing should be "strict".