Class XMLProjectReader

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

public class XMLProjectReader extends 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
  • Field Details

  • Constructor Details

    • XMLProjectReader

      public XMLProjectReader()
  • Method Details

    • 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(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(Reader reader, 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(String fileOrResourceName, 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(Document document, ClassLoader classLoader)
      INTERNAL: Read the TopLink 10.1.3 deployment XML format.
    • read1111Format

      public static Project read1111Format(Document document, ClassLoader classLoader)
      INTERNAL: Read the TopLink 11.1.1 deployment XML format.
    • readObjectPersistenceRuntimeFormat

      public static Project readObjectPersistenceRuntimeFormat(Document document, 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(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.