The XMLContext is thread-safe.  If multiple threads accessing the same XMLContext object
  request an XMLMarshaller, each will receive their own instance of XMLMarshaller, so any
  state that the XMLMarshaller maintains will be unique to that process.  The same is true
  of instances of XMLUnmarshaller and XMLValidator.
- See Also:
- XMLMarshaller,- XMLUnmarshaller,- XMLValidator
| Constructor Summary | 
| XMLContext(java.util.Collection projects)
 | 
| XMLContext(java.util.Collection projects,
           java.lang.ClassLoader classLoader)
 | 
| XMLContext(Project project)Create a new XMLContext based on the specified project
 | 
| XMLContext(Project project,
           java.lang.ClassLoader classLoader)
 | 
| XMLContext(java.lang.String sessionNames)Create a new XMLContext based on the specified session name or list of
 session names
 | 
| XMLContext(java.lang.String sessionNames,
           java.lang.ClassLoader classLoader)Create a new XMLContext based on the specified session name or list of
 session names
 | 
| XMLContext(java.lang.String sessionNames,
           java.lang.ClassLoader classLoader,
           java.lang.String xmlResource)Create a new XMLContext based on passed in session names, classloader and
 session meta XML.
 | 
| XMLContext(java.lang.String sessionNames,
           java.lang.String xmlResource)Create a new XMLContext based on passed in session names and session meta
 XML.
 | 
 
| Method Summary | 
|  void | addDescriptorByQName(javax.xml.namespace.QName qName,
                     XMLDescriptor descriptor)
 | 
|  void | addSession(DatabaseSession sessionToAdd)INTERNAL: Add and initialize a new session to the list of sessions
 associated with this XMLContext.
 | 
|  void | applyORMMetadata(org.eclipse.persistence.internal.sessions.AbstractSession ormSession)ADVANCED:
 Adjust the OXM metadata to take into accound ORM mapping metadata,
 | 
|  XMLBinder | createBinder()Create a new XMLBinder
 | 
|  XMLMarshaller | createMarshaller()Create a new XMLMarshaller
 | 
|  XMLUnmarshaller | createUnmarshaller()Create a new XMLUnmarshaller
 | 
|  XMLValidator | createValidator()Create a new XMLValidator
 | 
|  XMLDescriptor | getDescriptor(javax.xml.namespace.QName qName)INTERNAL: Return the XMLDescriptor with the default root mapping matchin
 the QName paramater.
 | 
|  XMLDescriptor | getDescriptorByGlobalType(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)INTERNAL: Return the XMLDescriptor mapped to the global type matching the
 XPathFragment parameter.
 | 
|  DocumentPreservationPolicy | getDocumentPreservationPolicy(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL:
 Return the DocumentPreservationPolicy associated with this session
 | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getReadSession(java.lang.Class clazz)INTERNAL:
 Return the session corresponding to this class.
 | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getReadSession(java.lang.Object object)INTERNAL: Return the session corresponding to this object.
 | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getReadSession(XMLDescriptor xmlDescriptor)INTERNAL:
 Return the session corresponding to this XMLDescriptor.
 | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getSession(java.lang.Class clazz)INTERNAL: Return the session corresponding to this class.
 | 
|  DatabaseSession | getSession(int index)INTERNAL:
 
 XMLContext xmlContext = new XMLContext("path0:path1");DatabaseSession session = xmlContext.getSession(0);  // returns session for path0
 
 | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getSession(java.lang.Object object)INTERNAL: Return the session corresponding to this object.
 | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getSession(XMLDescriptor xmlDescriptor)INTERNAL: Return the session corresponding to this XMLDescriptor.
 | 
|  java.util.List | getSessions()INTERNAL: Return the EclipseLink session used to marshall.
 | 
|  boolean | hasDocumentPreservation()INTERNAL:
 Return true if any session held onto by this context has a document preservation
 policy that requires unmarshalling from a Node.
 | 
|  void | setupDocumentPreservationPolicy(DatabaseSession session)
 | 
|  void | storeXMLDescriptorByQName(XMLDescriptor xmlDescriptor)INTERNAL:
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
XMLContext
public XMLContext(java.lang.String sessionNames)
- Create a new XMLContext based on the specified session name or list of
 session names
 
- Parameters:
- sessionNames- A single session name or multiple session names separated by a :
 
XMLContext
public XMLContext(java.lang.String sessionNames,
                  java.lang.ClassLoader classLoader)
- Create a new XMLContext based on the specified session name or list of
 session names
 
- Parameters:
- sessionNames- A single session name or multiple session names separated by a :
- classLoader- classloader for loading sessions.xml
 
XMLContext
public XMLContext(java.lang.String sessionNames,
                  java.lang.String xmlResource)
- Create a new XMLContext based on passed in session names and session meta
 XML.
 
- Parameters:
- sessionNames- A single session name or multiple session names separated by
            a:
- xmlResource- path to XML file containing session meta data to initialize
            and load sessions.
 
XMLContext
public XMLContext(java.lang.String sessionNames,
                  java.lang.ClassLoader classLoader,
                  java.lang.String xmlResource)
- Create a new XMLContext based on passed in session names, classloader and
 session meta XML.
 
- Parameters:
- sessionNames- A single session name or multiple session names separated by a :
- classLoader- classloader for loading sessions.xml
- xmlResource- path to XML file containing session meta data to initialize
            and load sessions.
 
XMLContext
public XMLContext(Project project)
- Create a new XMLContext based on the specified project
 
- Parameters:
- project- An EclipseLink project
 
XMLContext
public XMLContext(Project project,
                  java.lang.ClassLoader classLoader)
XMLContext
public XMLContext(java.util.Collection projects)
XMLContext
public XMLContext(java.util.Collection projects,
                  java.lang.ClassLoader classLoader)
addSession
public void addSession(DatabaseSession sessionToAdd)
- INTERNAL: Add and initialize a new session to the list of sessions
 associated with this XMLContext.
 
- 
 
createUnmarshaller
public XMLUnmarshaller createUnmarshaller()
- Create a new XMLUnmarshaller
 
- 
- Returns:
- An XMLUnmarshaller based on this XMLContext
 
createBinder
public XMLBinder createBinder()
- Create a new XMLBinder
 
- 
- Returns:
- an XMLBinder based on this XMLContext
 
createMarshaller
public XMLMarshaller createMarshaller()
- Create a new XMLMarshaller
 
- 
- Returns:
- An XMLMarshaller based on this XMLContext
 
createValidator
public XMLValidator createValidator()
- Create a new XMLValidator
 
- 
- Returns:
- An XMLValidator based on this XMLContext
 
getReadSession
public org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(java.lang.Object object)
- INTERNAL: Return the session corresponding to this object. Since the
 object may be mapped by more that one of the projects used to create the
 XML Context, this method will return the first match.
 The session will be a unit of work if document preservation is not
 enabled.  This method will typically  be used for unmarshalling
 when a non-shared cache is desired.
 
- 
 
getReadSession
public org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(java.lang.Class clazz)
- INTERNAL:
 Return the session corresponding to this class. Since the class
 may be mapped by more that one of the projects used to create the XML
 Context, this method will return the first match.
 The session will be a unit of work if document preservation is not
 enabled.  This method will typically  be used for unmarshalling
 when a non-shared cache is desired.
 
- 
 
getReadSession
public org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(XMLDescriptor xmlDescriptor)
- INTERNAL:
 Return the session corresponding to this XMLDescriptor. Since
 the class may be mapped by more that one of the projects used to create
 the XML Context, this method will return the first match.
 The session will be a unit of work if document preservation is not
 enabled.  This method will typically  be used for unmarshalling
 when a non-shared cache is desired.
 
- 
 
getSessions
public java.util.List getSessions()
- INTERNAL: Return the EclipseLink session used to marshall.
 
- 
 
getSession
public DatabaseSession getSession(int index)
- INTERNAL: 
 XMLContext xmlContext = new XMLContext("path0:path1");
 DatabaseSession session = xmlContext.getSession(0);  // returns session for path0
 
 
- 
 
getSession
public org.eclipse.persistence.internal.sessions.AbstractSession getSession(java.lang.Object object)
- INTERNAL: Return the session corresponding to this object. Since the
 object may be mapped by more that one of the projects used to create the
 XML Context, this method will return the first match.
 
- 
 
getSession
public org.eclipse.persistence.internal.sessions.AbstractSession getSession(java.lang.Class clazz)
- INTERNAL: Return the session corresponding to this class. Since the class
 may be mapped by more that one of the projects used to create the XML
 Context, this method will return the first match.
 
- 
 
getSession
public org.eclipse.persistence.internal.sessions.AbstractSession getSession(XMLDescriptor xmlDescriptor)
- INTERNAL: Return the session corresponding to this XMLDescriptor. Since
 the class may be mapped by more that one of the projects used to create
 the XML Context, this method will return the first match.
 
- 
 
storeXMLDescriptorByQName
public void storeXMLDescriptorByQName(XMLDescriptor xmlDescriptor)
- INTERNAL:
 
- 
 
getDescriptor
public XMLDescriptor getDescriptor(javax.xml.namespace.QName qName)
- INTERNAL: Return the XMLDescriptor with the default root mapping matchin
 the QName paramater.
 
- 
 
addDescriptorByQName
public void addDescriptorByQName(javax.xml.namespace.QName qName,
                                 XMLDescriptor descriptor)
- 
 
getDescriptorByGlobalType
public XMLDescriptor getDescriptorByGlobalType(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)
- INTERNAL: Return the XMLDescriptor mapped to the global type matching the
 XPathFragment parameter.
 
- 
 
getDocumentPreservationPolicy
public DocumentPreservationPolicy getDocumentPreservationPolicy(org.eclipse.persistence.internal.sessions.AbstractSession session)
- INTERNAL:
 Return the DocumentPreservationPolicy associated with this session
 
- 
- Parameters:
- session-
- Returns:
 
setupDocumentPreservationPolicy
public void setupDocumentPreservationPolicy(DatabaseSession session)
- 
 
hasDocumentPreservation
public boolean hasDocumentPreservation()
- INTERNAL:
 Return true if any session held onto by this context has a document preservation
 policy that requires unmarshalling from a Node.
 
- 
 
applyORMMetadata
public void applyORMMetadata(org.eclipse.persistence.internal.sessions.AbstractSession ormSession)
- ADVANCED:
 Adjust the OXM metadata to take into accound ORM mapping metadata,
 
-