Java Doc for LocalConfiguration.java in  » Database-ORM » castor » org » exolab » castor » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » castor » org.exolab.castor.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.exolab.castor.util.Configuration
      org.exolab.castor.util.LocalConfiguration

LocalConfiguration
final public class LocalConfiguration extends Configuration (Code)
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.
author:
   Keith Visco
author:
   Assaf Arkin
version:
   $Revision: 6980 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $




Constructor Summary
public  LocalConfiguration()
    

Method Summary
public  booleandebug()
     Returns true if the current configuration has enabled debugging.
public static synchronized  LocalConfigurationgetInstance()
     Returns an instance of the LocalConfiguration, if a previous configuration has already been loaded for local resource, it will be returned.
public  booleangetLenientIdValidation()
     Indicates whether id/href validation should be lenient.
public  booleangetLenientSequenceOrder()
     Indicates whether validation for sequence order should be lenient.
public  OutputFormatgetOutputFormat()
     Returns the default OutputFormat for use with a Serializer.
public  ParsergetParser()
     Return an XML document parser implementing the feature list specified in the configuration file.
public  ParsergetParser(String features)
     Returns an XML document parser implementing the requested set of features.
public  NodeTypegetPrimitiveNodeType()
     Returns the NodeType to use for Java primitives.
public synchronized  PropertiesgetProperties()
     Returns the current properties from the configuration file(s).
public  RegExpEvaluatorgetRegExpEvaluator()
    
public  SerializergetSerializer()
     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.
public  DocumentHandlergetSerializer(OutputStream output)
     Returns a default serializer for producing an XML document to the designated output stream using the default serialization format.
public  DocumentHandlergetSerializer(Writer output)
     Returns a default serializer for producing an XML document to the designated output stream using the default serialization format.
public  XMLNaminggetXMLNaming()
    
public  XMLNaminggetXMLNaming(ClassLoader classLoader)
    
public  XMLReadergetXMLReader()
     Returns an XML document parser implementing the requested set of features.
public  XMLReadergetXMLReader(String features)
     Returns an XML document parser implementing the requested set of features.
protected  voidload()
     Calls LocalConfiguration.getDefault() to load the configuration the first time and then looks for a local configuration to merge in with the defaults.
public  voidloadProperties(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.
public  booleanmarshallingValidation()
     Returns true if the default configuration specified validation in the marshalling framework.
public  booleanstrictElements()
     Access to the property specifying whether to apply strictness to elements when unmarshalling.


Constructor Detail
LocalConfiguration
public LocalConfiguration()(Code)
Creates a new instance of LocalConfiguration




Method Detail
debug
public boolean debug()(Code)
Returns true if the current configuration has enabled debugging. true if the current configuration has enabled debugging,otherwise false.



getInstance
public static synchronized LocalConfiguration getInstance()(Code)
Returns an instance of the LocalConfiguration, if a previous configuration has already been loaded for local resource, it will be returned. the LocalConfiguration



getLenientIdValidation
public boolean getLenientIdValidation()(Code)
Indicates whether id/href validation should be lenient. True if id/href validation should be lenient.



getLenientSequenceOrder
public boolean getLenientSequenceOrder()(Code)
Indicates whether validation for sequence order should be lenient. True if sequence order validation should be lenient.



getOutputFormat
public OutputFormat getOutputFormat()(Code)
Returns the default OutputFormat for use with a Serializer. the default OutputFormat



getParser
public Parser getParser()(Code)
Return an XML document parser implementing the feature list specified in the configuration file. A suitable XML parser



getParser
public Parser getParser(String features)(Code)
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.
Parameters:
  features - The requested feature list, null for thedefaults A suitable XML parser



getPrimitiveNodeType
public NodeType getPrimitiveNodeType()(Code)
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. the NodeType assigned to Java primitives, or nullif no NodeType was specified.



getProperties
public synchronized Properties getProperties()(Code)
Returns the current properties from the configuration file(s). The Properties returned may be empty, but never null. The current set of configuration properties.



getRegExpEvaluator
public RegExpEvaluator getRegExpEvaluator()(Code)
Returns a new instance of the specified Regular Expression Evaluator, or null if no validator was specified the regular expression evaluator,



getSerializer
public Serializer getSerializer()(Code)
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. A suitable serializer



getSerializer
public DocumentHandler getSerializer(OutputStream output) throws IOException(Code)
Returns a default serializer for producing an XML document to the designated output stream using the default serialization format.
Parameters:
  output - The output stream A suitable serializer



getSerializer
public DocumentHandler getSerializer(Writer output) throws IOException(Code)
Returns a default serializer for producing an XML document to the designated output stream using the default serialization format.
Parameters:
  output - The output stream A suitable serializer



getXMLNaming
public XMLNaming getXMLNaming()(Code)
Returns the naming conventions to use for the XML framework the naming conventions to use for the XML framework



getXMLNaming
public XMLNaming getXMLNaming(ClassLoader classLoader)(Code)
Returns the naming conventions to use for the XML framework the naming conventions to use for the XML framework



getXMLReader
public XMLReader getXMLReader()(Code)
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. A suitable XML parser



getXMLReader
public XMLReader getXMLReader(String features)(Code)
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. A suitable XML parser



load
protected void load()(Code)
Calls LocalConfiguration.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.



loadProperties
public void loadProperties(String fileOrResourceName) throws FileNotFoundException(Code)
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.



marshallingValidation
public boolean marshallingValidation()(Code)
Returns true if the default configuration specified validation in the marshalling framework.



strictElements
public boolean strictElements()(Code)
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 true if element processing should be "strict".



Fields inherited from org.exolab.castor.util.Configuration
final static String ON_VALUE(Code)(Java Doc)
final static String TRUE_VALUE(Code)(Java Doc)

Methods inherited from org.exolab.castor.util.Configuration
public boolean debug()(Code)(Java Doc)
public static synchronized Properties getDefault()(Code)(Java Doc)
public static boolean getDefaultDebug()(Code)(Java Doc)
public static boolean getDefaultLenientIdValidation()(Code)(Java Doc)
public static boolean getDefaultLenientSequenceOrder()(Code)(Java Doc)
public static boolean getDefaultMarshallingValidation()(Code)(Java Doc)
public static OutputFormat getDefaultOutputFormat()(Code)(Java Doc)
public static Parser getDefaultParser()(Code)(Java Doc)
public static Parser getDefaultParser(String features)(Code)(Java Doc)
public static NodeType getDefaultPrimitiveNodeType()(Code)(Java Doc)
public static String getDefaultProperty(String name, String defValue)(Code)(Java Doc)
public static RegExpEvaluator getDefaultRegExpEvaluator()(Code)(Java Doc)
public static Serializer getDefaultSerializer()(Code)(Java Doc)
public static DocumentHandler getDefaultSerializer(OutputStream output) throws IOException(Code)(Java Doc)
public static DocumentHandler getDefaultSerializer(Writer output) throws IOException(Code)(Java Doc)
public static boolean getDefaultStrictElements()(Code)(Java Doc)
public static XMLNaming getDefaultXMLNaming()(Code)(Java Doc)
public static XMLReader getDefaultXMLReader()(Code)(Java Doc)
public static XMLReader getDefaultXMLReader(String features)(Code)(Java Doc)
public boolean getLenientIdValidation()(Code)(Java Doc)
public boolean getLenientSequenceOrder()(Code)(Java Doc)
abstract public OutputFormat getOutputFormat()(Code)(Java Doc)
public Parser getParser()(Code)(Java Doc)
public NodeType getPrimitiveNodeType()(Code)(Java Doc)
public Properties getProperties()(Code)(Java Doc)
public String getProperty(String name, String defValue)(Code)(Java Doc)
public RegExpEvaluator getRegExpEvaluator()(Code)(Java Doc)
abstract public Serializer getSerializer()(Code)(Java Doc)
abstract public DocumentHandler getSerializer(OutputStream output) throws IOException(Code)(Java Doc)
abstract public DocumentHandler getSerializer(Writer output) throws IOException(Code)(Java Doc)
protected static XMLSerializerFactory getSerializerFactory(Properties props)(Code)(Java Doc)
public XMLNaming getXMLNaming()(Code)(Java Doc)
public XMLReader getXMLReader()(Code)(Java Doc)
protected static void loadDefaults()(Code)(Java Doc)
public static Properties loadProperties(String resourceName, String fileName)(Code)(Java Doc)
public boolean marshallingValidation()(Code)(Java Doc)
protected static void setFeaturesOnXmlReader(Properties properties, String features, boolean validation, boolean namespaces, XMLReader xmlReader)(Code)(Java Doc)
public boolean strictElements()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.