Public Member Functions | |
LocalConfiguration () | |
boolean | debug () |
boolean | strictElements () |
boolean | marshallingValidation () |
synchronized Properties | getProperties () |
XMLNaming | getXMLNaming () |
Parser | getParser () |
Parser | getParser (String features) |
XMLReader | getXMLReader () |
XMLReader | getXMLReader (String features) |
NodeType | getPrimitiveNodeType () |
RegExpEvaluator | getRegExpEvaluator () |
Serializer | getSerializer () |
OutputFormat | getOutputFormat () |
DocumentHandler | getSerializer (OutputStream output) throws IOException |
DocumentHandler | getSerializer (Writer output) throws IOException |
void | loadProperties (String fileOrResourceName) throws FileNotFoundException |
Static Public Member Functions | |
static synchronized LocalConfiguration | getInstance () |
Protected Member Functions | |
void | load () |
Provides default configuration for Castor components from the castor.properties
configuration file. All Castor features rely on the central configuration file.
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.
org.exolab.castor.util.LocalConfiguration.LocalConfiguration | ( | ) |
Creates a new instance of LocalConfiguration
References org.exolab.castor.util.LocalConfiguration.load().
Referenced by org.exolab.castor.util.LocalConfiguration.getInstance().
boolean org.exolab.castor.util.LocalConfiguration.debug | ( | ) |
Returns true if the current configuration has enabled debugging.
Reimplemented from org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.getProperties().
static synchronized LocalConfiguration org.exolab.castor.util.LocalConfiguration.getInstance | ( | ) | [static] |
Returns an instance of the LocalConfiguration, if a previous configuration has already been loaded for local resource, it will be returned.
References org.exolab.castor.util.LocalConfiguration.LocalConfiguration().
OutputFormat org.exolab.castor.util.LocalConfiguration.getOutputFormat | ( | ) | [virtual] |
Returns the default OutputFormat for use with a Serializer.
Implements org.exolab.castor.util.Configuration.
References org.exolab.castor.util.Configuration.ON_VALUE, and org.exolab.castor.util.Configuration.TRUE_VALUE.
Referenced by org.exolab.castor.util.LocalConfiguration.getSerializer().
Parser org.exolab.castor.util.LocalConfiguration.getParser | ( | String | features | ) |
Returns an XML document parser implementing the requested set of features. The feature list is a comma separated list of features that parser may or may not support. No errors are generated for unsupported features. If the feature list is not null, it overrides the default feature list specified in the configuration file, including validation and Namespaces.
features | The requested feature list, null for the defaults |
References org.exolab.castor.util.LocalConfiguration.getProperties().
Parser org.exolab.castor.util.LocalConfiguration.getParser | ( | ) |
Return an XML document parser implementing the feature list specified in the configuration file.
Reimplemented from org.exolab.castor.util.Configuration.
NodeType org.exolab.castor.util.LocalConfiguration.getPrimitiveNodeType | ( | ) |
Returns the NodeType to use for Java primitives. A null value will be returned if no NodeType was specified, indicating the default NodeType should be used.
Reimplemented from org.exolab.castor.util.Configuration.
References org.exolab.castor.util.Configuration.getProperty().
Referenced by org.exolab.castor.xml.XMLMappingLoader.XMLMappingLoader().
synchronized Properties org.exolab.castor.util.LocalConfiguration.getProperties | ( | ) |
Returns the current properties from the configuration file(s). The Properties returned may be empty, but never null.
Reimplemented from org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.load().
Referenced by org.exolab.castor.util.LocalConfiguration.debug(), org.exolab.castor.util.LocalConfiguration.getParser(), org.exolab.castor.util.LocalConfiguration.getRegExpEvaluator(), org.exolab.castor.util.LocalConfiguration.getXMLReader(), org.exolab.castor.util.ChangeLog2XML.main(), org.exolab.castor.util.LocalConfiguration.marshallingValidation(), and org.exolab.castor.util.LocalConfiguration.strictElements().
RegExpEvaluator org.exolab.castor.util.LocalConfiguration.getRegExpEvaluator | ( | ) |
Returns a new instance of the specified Regular Expression Evaluator, or null if no validator was specified
Reimplemented from org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.getProperties().
DocumentHandler org.exolab.castor.util.LocalConfiguration.getSerializer | ( | Writer | output | ) | throws IOException [virtual] |
Returns a default serializer for producing an XML document to the designated output stream using the default serialization format.
output | The output stream |
Implements org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.getSerializer().
Serializer org.exolab.castor.util.LocalConfiguration.getSerializer | ( | ) | [virtual] |
Returns a default serializer for producing an XML document. The caller can specify an alternative output format, may reuse this serializer across several streams, and may serialize both DOM and SAX events. If such control is not required, it is recommended to call one of the other two methods.
Implements org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.getOutputFormat().
Referenced by org.exolab.castor.util.LocalConfiguration.getSerializer().
DocumentHandler org.exolab.castor.util.LocalConfiguration.getSerializer | ( | OutputStream | output | ) | throws IOException [virtual] |
Returns a default serializer for producing an XML document to the designated output stream using the default serialization format.
output | The output stream |
Implements org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.getSerializer().
XMLNaming org.exolab.castor.util.LocalConfiguration.getXMLNaming | ( | ) |
Returns the naming conventions to use for the XML framework
Reimplemented from org.exolab.castor.util.Configuration.
References org.exolab.castor.util.Configuration.getProperty(), and org.exolab.castor.xml.util.DefaultNaming.setStyle().
Referenced by org.exolab.castor.xml.XMLMappingLoader.XMLMappingLoader().
XMLReader org.exolab.castor.util.LocalConfiguration.getXMLReader | ( | ) |
Returns an XML document parser implementing the requested set of features. The feature list is a comma separated list of features that parser may or may not support. No errors are generated for unsupported features. If the feature list is not null, it overrides the default feature list specified in the configuration file, including validation and Namespaces.
Reimplemented from org.exolab.castor.util.Configuration.
XMLReader org.exolab.castor.util.LocalConfiguration.getXMLReader | ( | String | features | ) |
Returns an XML document parser implementing the requested set of features. The feature list is a comma separated list of features that parser may or may not support. No errors are generated for unsupported features. If the feature list is not null, it overrides the default feature list specified in the configuration file, including validation and Namespaces.
References org.exolab.castor.util.LocalConfiguration.getProperties().
void org.exolab.castor.util.LocalConfiguration.load | ( | ) | [protected] |
Calls getDefault to load the configuration the first time and then looks for a local configuration to merge in with the defaults. Will not complain about inability to load local configuration file from one of the default directories, but if it cannot find the JAR's configuration file, will throw a run time exception.
References org.exolab.castor.util.Configuration.getDefault(), and org.exolab.castor.util.LocalConfiguration.loadProperties().
Referenced by org.exolab.castor.util.LocalConfiguration.getProperties(), and org.exolab.castor.util.LocalConfiguration.LocalConfiguration().
void org.exolab.castor.util.LocalConfiguration.loadProperties | ( | String | fileOrResourceName | ) | throws FileNotFoundException |
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.
Referenced by org.exolab.castor.util.LocalConfiguration.load().
boolean org.exolab.castor.util.LocalConfiguration.marshallingValidation | ( | ) |
Returns true if the default configuration specified validation in the marshalling framework.
Reimplemented from org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.getProperties().
boolean org.exolab.castor.util.LocalConfiguration.strictElements | ( | ) |
Access to the property specifying whether to apply strictness to elements when unmarshalling. Default is true which means that elements appearing in the XML Documnt which cannot be mapped to a class cause a SAXException to be thrown. If set to false, these 'unknown' elements are ignored
Reimplemented from org.exolab.castor.util.Configuration.
References org.exolab.castor.util.LocalConfiguration.getProperties().