EclipseLink 1.1.2_ 1.1.2.v20090612-r4475 API Reference

org.eclipse.persistence.sessions.factories
Class XMLProjectReader

java.lang.Object
  extended by org.eclipse.persistence.sessions.factories.XMLProjectReader

public class XMLProjectReader
extends java.lang.Object

Purpose: Allow for a EclipseLink Mapping Workbench generated deployment XML project file to be read. This reader returns an instance of Project to be used to initialize a EclipseLink session. This class supports reading the 11g 11.1.1 and 10g 10.1.3.

Author:
James Sutherland
Since:
TopLink 3.0

Field Summary
static java.lang.String ECLIPSELINK_1_0_SCHEMA
           
static java.lang.String ECLIPSELINK_SCHEMA
           
static java.lang.String OPM_SCHEMA
           
protected static Project project
          Cache the creation and initialization of the EclipseLink XML mapping project.
static java.lang.String SCHEMA_DIR
           
protected static boolean shouldUseSchemaValidation
          Allow for usage of schema validation to be configurable.
static java.lang.String TOPLINK_10_SCHEMA
           
static java.lang.String TOPLINK_11_SCHEMA
           
 
Constructor Summary
XMLProjectReader()
           
 
Method Summary
static Project read(java.io.Reader reader)
          PUBLIC: Read the EclipseLink project deployment XML from the reader on the file.
static Project read(java.io.Reader reader, java.lang.ClassLoader classLoader)
          PUBLIC: Read the EclipseLink project deployment XML from the reader on the file.
static Project read(java.lang.String fileOrResourceName)
          PUBLIC: Read the EclipseLink project deployment XML from the file or resource name.
static Project read(java.lang.String fileOrResourceName, java.lang.ClassLoader classLoader)
          PUBLIC: Read the EclipseLink project deployment XML from the file or resource name.
static Project read1013Format(org.w3c.dom.Document document, java.lang.ClassLoader classLoader)
          INTERNAL: Read the TopLink 10.1.3 deployment XML format.
static Project read1111Format(org.w3c.dom.Document document, java.lang.ClassLoader classLoader)
          INTERNAL: Read the TopLink 11.1.1 deployment XML format.
static Project readObjectPersistenceRuntimeFormat(org.w3c.dom.Document document, java.lang.ClassLoader classLoader, Project opmProject)
          Read a project in the format of an ObjectPersistenceRuntimeXMLProject.
static void setShouldUseSchemaValidation(boolean value)
          PUBLIC: Set if schema validation will be used when parsing the deployment XML.
static boolean shouldUseSchemaValidation()
          PUBLIC: Return if schema validation will be used when parsing the deployment XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shouldUseSchemaValidation

protected static boolean shouldUseSchemaValidation
Allow for usage of schema validation to be configurable.


project

protected static Project project
Cache the creation and initialization of the EclipseLink XML mapping project.


SCHEMA_DIR

public static final java.lang.String SCHEMA_DIR
See Also:
Constant Field Values

OPM_SCHEMA

public static final java.lang.String OPM_SCHEMA
See Also:
Constant Field Values

ECLIPSELINK_SCHEMA

public static final java.lang.String ECLIPSELINK_SCHEMA
See Also:
Constant Field Values

ECLIPSELINK_1_0_SCHEMA

public static final java.lang.String ECLIPSELINK_1_0_SCHEMA
See Also:
Constant Field Values

TOPLINK_11_SCHEMA

public static final java.lang.String TOPLINK_11_SCHEMA
See Also:
Constant Field Values

TOPLINK_10_SCHEMA

public static final java.lang.String TOPLINK_10_SCHEMA
See Also:
Constant Field Values
Constructor Detail

XMLProjectReader

public XMLProjectReader()
Method Detail

shouldUseSchemaValidation

public static boolean shouldUseSchemaValidation()
PUBLIC: Return if schema validation will be used when parsing the deployment XML.


setShouldUseSchemaValidation

public static void setShouldUseSchemaValidation(boolean value)
PUBLIC: Set if schema validation will be used when parsing the deployment XML. By default schema validation is on, but can be turned off if validation problems occur, or to improve parsing performance.


read

public static Project read(java.lang.String fileOrResourceName)
PUBLIC: Read the EclipseLink project deployment XML from the file or resource name. If a resource name is used the default class loader will be used to resolve the resource. Note the default class loader must be able to resolve the domain classes. Note the file must be the deployment XML, not the Mapping Workbench project file.


read

public static Project read(java.io.Reader reader,
                           java.lang.ClassLoader classLoader)
PUBLIC: Read the EclipseLink project deployment XML from the reader on the file. Note the class loader must be able to resolve the domain classes. Note the file must be the deployment XML, not the Mapping Workbench project file. This API supports 10g (10.0.3), 11g (11.1.1) formats.


read

public static Project read(java.lang.String fileOrResourceName,
                           java.lang.ClassLoader classLoader)
PUBLIC: Read the EclipseLink project deployment XML from the file or resource name. If a resource name is used the class loader will be used to resolve the resource. Note the class loader must be able to resolve the domain classes. Note the file must be the deployment XML, not the Mapping Workbench project file.


read1013Format

public static Project read1013Format(org.w3c.dom.Document document,
                                     java.lang.ClassLoader classLoader)
INTERNAL: Read the TopLink 10.1.3 deployment XML format.


read1111Format

public static Project read1111Format(org.w3c.dom.Document document,
                                     java.lang.ClassLoader classLoader)
INTERNAL: Read the TopLink 11.1.1 deployment XML format.


readObjectPersistenceRuntimeFormat

public static Project readObjectPersistenceRuntimeFormat(org.w3c.dom.Document document,
                                                         java.lang.ClassLoader classLoader,
                                                         Project opmProject)
Read a project in the format of an ObjectPersistenceRuntimeXMLProject. This could include a TopLink 11.1.1 project or a TopLink 10.1.3 project

Parameters:
document -
classLoader -
opmProject -
Returns:

read

public static Project read(java.io.Reader reader)
PUBLIC: Read the EclipseLink project deployment XML from the reader on the file. Note the default class loader must be able to resolve the domain classes. Note the file must be the deployment XML, not the Mapping Workbench project file.


EclipseLink 1.1.2_ 1.1.2.v20090612-r4475 API Reference