org.castor.xml
Class XMLProperties

java.lang.Object
  extended by org.castor.core.util.AbstractProperties
      extended by org.castor.xml.XMLProperties
Direct Known Subclasses:
XMLConfiguration

public class XMLProperties
extends AbstractProperties

Properties of XML modul.

Since:
1.1.3
Version:
$Id: Configuration.java,v 1.8 2006/03/08 17:25:52 jens Exp $
Author:
Ralf Joachim

Field Summary
static java.lang.String COLLECTION_HANDLERS_FOR_JAVA_11_OR_12
          Property specifying which collections handlers should be used for Java 1.1 and Java 1.2 run-times.
static java.lang.String DEBUG
          Property specifying whether to run in debug mode.
static java.lang.String JAVA_NAMING
          Property specifying the 'type' of the Java naming conventions to use.
static java.lang.String LENIENT_ID_VALIDATION
          Property specifying whether id/href validation should be lenient; defaults to false.
static java.lang.String LENIENT_INTEGER_VALIDATION
          Property that allows to specify whether the validation for <xs:integer> should accept the old 'int/Integer' members as well; default to false.
static java.lang.String LENIENT_INTROSPECTED_ELEMENT_STRICTNESS
          Property specifying whether element strictness for introspected classes/elements should be lenient (aka allowed); defaults to true.
static java.lang.String LENIENT_SEQUENCE_ORDER
          Property specifying whether sequence order validation should be lenient.
static java.lang.String LOAD_PACKAGE_MAPPING
          Property specifying whether the ClassDescriptorResolver should (automatically) search for and consult with package mapping files (.castor.xml) to retrieve class descriptor information; on by default.
static java.lang.String MARSHALLING_VALIDATION
          Property specifying whether to use validation in the Marshalling framework.
static java.lang.String NAMESPACE_PACKAGE_MAPPINGS
          Property specifying XML namespace to Java package mappings.
static java.lang.String NAMESPACES
          Property specifying whether to support XML namespaces by default.
static java.lang.String PARSER
          Property specifying the class name of the SAX 1 XML parser to use.
static java.lang.String PARSER_FEATURES
          Property specifying additional features for the XML parser.
static java.lang.String PARSER_FEATURES_DISABLED
          Property specifying features to be disbaled on the underlying SAX parser.
static java.lang.String PARSER_VALIDATION
          Property specifying whether to perform document validation by default.
static java.lang.String PRIMITIVE_NODE_TYPE
          Property specifying the type of XML node to use for primitive values, either 'element' or 'attribute'.
static java.lang.String PROXY_INTERFACES
          Property specifying whether or not to search for an proxy interface at marshalling.
static java.lang.String REG_EXP_CLASS_NAME
          Property specifying the regular expression validator to use.
static java.lang.String SAVE_MAP_KEYS
          Property specifying whether or not to save the "keys" of a Hashtable or Map during marshalling.
static java.lang.String SERIALIZER_FACTORY
          Property specifying what factory to use for dealing with XML serializers.
static java.lang.String STRICT_ELEMENTS
          Property specifying whether to apply strictness to elements when unmarshalling.
static java.lang.String USE_INDENTATION
          Property specifying whether XML documents (as generated at marshalling) should use indentation or not.
static java.lang.String USE_INTROSPECTION
          Property specifying if introspection should be used at class resolving.
static java.lang.String WRAP_COLLECTIONS_PROPERTY
          The property name for enabling collection wrapping.
static java.lang.String XML_NAMING
          Property specifying the 'type' of the XML naming conventions to use.
 
Constructor Summary
XMLProperties(AbstractProperties parent)
          Construct properties with given parent.
 
Method Summary
static AbstractProperties newInstance()
          Factory method for a default XML properties instance.
static AbstractProperties newInstance(java.lang.ClassLoader app, java.lang.ClassLoader domain)
          Factory method for a XML properties instance that uses the specified class loaders.
 
Methods inherited from class org.castor.core.util.AbstractProperties
get, getApplicationClassLoader, getBoolean, getBoolean, getClass, getClassArray, getDomainClassLoader, getInteger, getInteger, getObject, getObjectArray, getString, getString, getStringArray, loadDefaultProperties, loadUserProperties, put, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIMITIVE_NODE_TYPE

public static final java.lang.String PRIMITIVE_NODE_TYPE
Property specifying the type of XML node to use for primitive values, either 'element' or 'attribute'. Possible values: - 'element' - 'attribute' (default)
 org.exolab.castor.xml.introspector.primitive.nodetype
 

See Also:
Constant Field Values

PARSER

public static final java.lang.String PARSER
Property specifying the class name of the SAX 1 XML parser to use.
 org.exolab.castor.parser
 

See Also:
Constant Field Values

PARSER_VALIDATION

public static final java.lang.String PARSER_VALIDATION
Property specifying whether to perform document validation by default. Possible values: - false (default) - true
 org.exolab.castor.SAXParser.validation
 

See Also:
Constant Field Values

NAMESPACES

public static final java.lang.String NAMESPACES
Property specifying whether to support XML namespaces by default. Possible values: - false (default) - true
 org.exolab.castor.SAXParser.namespaces
 

See Also:
Constant Field Values

NAMESPACE_PACKAGE_MAPPINGS

public static final java.lang.String NAMESPACE_PACKAGE_MAPPINGS
Property specifying XML namespace to Java package mappings.
 org.exolab.castor.xml.nspackages
 

See Also:
Constant Field Values

XML_NAMING

public static final java.lang.String XML_NAMING
Property specifying the 'type' of the XML naming conventions to use. Values of this property must be either "mixed", "lower", or the name of a class which extends AbstractXMLNaming. Possible values: - 'mixed' - 'lower' - A class name (which extends AbstractXMLNaming).
 org.exolab.castor.xml.naming
 

See Also:
Constant Field Values

JAVA_NAMING

public static final java.lang.String JAVA_NAMING
Property specifying the 'type' of the Java naming conventions to use. Values of this property must be either null or the name of a class which extends JavaNaming. Possible values: - null - A class name (which extends JavaNaming).
 org.castor.xml.java_naming
 

See Also:
Constant Field Values

MARSHALLING_VALIDATION

public static final java.lang.String MARSHALLING_VALIDATION
Property specifying whether to use validation in the Marshalling framework. Possible values: - false - true (default)
 org.exolab.castor.marshalling.validation
 

See Also:
Constant Field Values

USE_INDENTATION

public static final java.lang.String USE_INDENTATION
Property specifying whether XML documents (as generated at marshalling) should use indentation or not. Possible values: - false (default) - true
 org.exolab.castor.indent
 

See Also:
Constant Field Values

PARSER_FEATURES

public static final java.lang.String PARSER_FEATURES
Property specifying additional features for the XML parser. This value contains a comma separated list of features that might or might not be supported by the specified SAX parser.
 org.exolab.castor.sax.features
 

See Also:
Constant Field Values

PARSER_FEATURES_DISABLED

public static final java.lang.String PARSER_FEATURES_DISABLED
Property specifying features to be disbaled on the underlying SAX parser. This value contains a comma separated list of features to be disabled.
 org.exolab.castor.sax.features-to-disable
 

See Also:
Constant Field Values

REG_EXP_CLASS_NAME

public static final java.lang.String REG_EXP_CLASS_NAME
Property specifying the regular expression validator to use. The specified class must implement org.exolab.castor.xml.validators.RegExpValidator Possible values: - A class name.
 org.exolab.castor.regexp
 

See Also:
Constant Field Values

DEBUG

public static final java.lang.String DEBUG
Property specifying whether to run in debug mode. Possible values: - false (default) - true
 org.exolab.castor.debug
 

See Also:
Constant Field Values

STRICT_ELEMENTS

public static final java.lang.String STRICT_ELEMENTS
Property specifying whether to apply strictness to elements when unmarshalling. Default is true which means that elements appearing in the XML document, which cannot be mapped to a class, cause a SAXException to be thrown. If set to false, these 'unknown' elements are ignored. Possible values: - false - true (default)
 org.exolab.castor.strictelements
 

See Also:
Constant Field Values

SAVE_MAP_KEYS

public static final java.lang.String SAVE_MAP_KEYS
Property specifying whether or not to save the "keys" of a Hashtable or Map during marshalling. By default this is true. Backwards compatibility switch (for 0.9.5.2 users and earlier) Possible values: - false - true (default)
 org.exolab.castor.xml.saveMapKeys
 

Since:
0.9.5.3
See Also:
Constant Field Values

LOAD_PACKAGE_MAPPING

public static final java.lang.String LOAD_PACKAGE_MAPPING
Property specifying whether the ClassDescriptorResolver should (automatically) search for and consult with package mapping files (.castor.xml) to retrieve class descriptor information; on by default. Possible values: - false - true (default)
 org.exolab.castor.xml.loadPackageMappings
 

Since:
1.0
See Also:
Constant Field Values

SERIALIZER_FACTORY

public static final java.lang.String SERIALIZER_FACTORY
Property specifying what factory to use for dealing with XML serializers. Possible value: - A class name
 org.exolab.castor.xml.serializer.factory
 

Since:
1.0
See Also:
Constant Field Values

LENIENT_SEQUENCE_ORDER

public static final java.lang.String LENIENT_SEQUENCE_ORDER
Property specifying whether sequence order validation should be lenient. Possible values - false (default) - true
 org.exolab.castor.xml.lenient.sequence.order=false
 
since 1.1

See Also:
Constant Field Values

LENIENT_ID_VALIDATION

public static final java.lang.String LENIENT_ID_VALIDATION
Property specifying whether id/href validation should be lenient; defaults to false. Possible values: - false (default) - true
 org.exolab.castor.xml.lenient.id.validation=false
 
since 1.1

See Also:
Constant Field Values

PROXY_INTERFACES

public static final java.lang.String PROXY_INTERFACES
Property specifying whether or not to search for an proxy interface at marshalling. If property is not empty the objects to be marshalled will be searched if they implement one of the given interface names. If the interface is implemented the superclass will be marshalled instead of the class itself.
 org.exolab.castor.xml.proxyInterfaces
 

Since:
1.1.3
See Also:
Constant Field Values

LENIENT_INTROSPECTED_ELEMENT_STRICTNESS

public static final java.lang.String LENIENT_INTROSPECTED_ELEMENT_STRICTNESS
Property specifying whether element strictness for introspected classes/elements should be lenient (aka allowed); defaults to true. Possible values: - false - true (default)
 org.exolab.castor.xml.lenient.introspected.element.strictness=true
 

Since:
1.1.3
See Also:
Constant Field Values

COLLECTION_HANDLERS_FOR_JAVA_11_OR_12

public static final java.lang.String COLLECTION_HANDLERS_FOR_JAVA_11_OR_12
Property specifying which collections handlers should be used for Java 1.1 and Java 1.2 run-times.
 org.exolab.castor.mapping.collections
 

See Also:
Constant Field Values

USE_INTROSPECTION

public static final java.lang.String USE_INTROSPECTION
Property specifying if introspection should be used at class resolving.
 org.castor.xml.class-resolver.use-introspection
 

See Also:
Constant Field Values

WRAP_COLLECTIONS_PROPERTY

public static final java.lang.String WRAP_COLLECTIONS_PROPERTY
The property name for enabling collection wrapping. The property controls whether or not collections (arrays, vectors, etc) should be wrapped in a container element. For example:
    <foos>
       <foo>foo1</foo>
       <foo>foo2</foo>
    </foos>

   instead of the default:

    <foos>foo1<foos>
    <foos>foo2</foos>

 
Use this property with a value of true or false in the castor.properties file org.exolab.castor.xml.introspector.wrapCollections=true -or- org.exolab.castor.xml.introspector.wrapCollections=false This property is false by default.

See Also:
Constant Field Values

LENIENT_INTEGER_VALIDATION

public static final java.lang.String LENIENT_INTEGER_VALIDATION
Property that allows to specify whether the validation for <xs:integer> should accept the old 'int/Integer' members as well; default to false. Possible values: - false (default) - true
 org.exolab.castor.xml.lenient.integer.validation=false
 

See Also:
Constant Field Values
Constructor Detail

XMLProperties

public XMLProperties(AbstractProperties parent)
Construct properties with given parent. Application and domain class loaders will be initialized to the ones of the parent.
Note: This constructor is not intended for public use. Use one of the newInstance() methods instead.

Parameters:
parent - Parent properties.
Method Detail

newInstance

public static AbstractProperties newInstance()
Factory method for a default XML properties instance. Application and domain class loaders will be initialized to the one used to load this class. The properties instance returned will be a CastorProperties with a XMLProperties and a CoreProperties instance as parents. The CastorProperties holding user specific properties is the only one that can be modified by put() and remove() methods. XMLProperties and CoreProperties are responsible to deliver Castor's default values if they have not been overwritten by the user.

Returns:
Properties instance for Castor XML module.

newInstance

public static AbstractProperties newInstance(java.lang.ClassLoader app,
                                             java.lang.ClassLoader domain)
Factory method for a XML properties instance that uses the specified class loaders. The properties instance returned will be a CastorProperties with a XMLProperties and a CoreProperties instance as parents. The CastorProperties holding user specific properties is the only one that can be modified by put() and remove() methods. XMLProperties and CoreProperties are responsble to deliver Castor's default values if they have not been overwritten by the user.

Parameters:
app - Classloader to be used for all classes of Castor and its required libraries.
domain - Classloader to be used for all domain objects.
Returns:
Properties instance for Castor XML modul.


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com