|
EclipseLink 2.1.2, build 'v20101206-r8635' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.bind.JAXBContext org.eclipse.persistence.jaxb.JAXBContext
public class JAXBContext
INTERNAL:
Purpose:Provide a TopLink implementation of the JAXBContext interface.
Responsibilities:
This is the TopLink JAXB 2.0 implementation of javax.xml.bind.JAXBContext. This class is created by the JAXBContextFactory and is used to create Marshallers, Unmarshallers, Validators, Binders and Introspectors. A JAXBContext can also be used to create Schema Files.
JAXBContext
,
JAXBMarshaller
,
JAXBUnmarshaller
,
JAXBBinder
,
JAXBIntrospector
Field Summary | |
---|---|
protected XMLContext |
xmlContext
|
Fields inherited from class javax.xml.bind.JAXBContext |
---|
JAXB_CONTEXT_FACTORY |
Constructor Summary | |
---|---|
protected |
JAXBContext()
|
|
JAXBContext(XMLContext context)
Create a JAXBContext for a given XMLContext. |
|
JAXBContext(XMLContext context,
Generator generator,
java.lang.reflect.Type[] boundTypes)
Create a JAXBContext. |
|
JAXBContext(XMLContext context,
Generator generator,
TypeMappingInfo[] boundTypes)
Create a JAXBContext. |
Method Summary | ||
---|---|---|
void |
applyORMMetadata(org.eclipse.persistence.internal.sessions.AbstractSession ormSession)
ADVANCED: Adjust the OXM metadata to take into accound ORM mapping metadata |
|
JAXBBinder |
createBinder()
Create a JAXBBinder. |
|
|
createBinder(java.lang.Class<T> nodeClass)
Create a JAXBBinder. |
|
JAXBIntrospector |
createJAXBIntrospector()
Creates a JAXBIntrospector object. |
|
JAXBMarshaller |
createMarshaller()
Create a JAXBMarshaller. |
|
JAXBUnmarshaller |
createUnmarshaller()
Create a JAXBUnmarshaller. |
|
JAXBValidator |
createValidator()
Create a JAXBValidator. |
|
void |
generateSchema(SchemaOutputResolver outputResolver)
Generate a Schema for this JAXBContext |
|
void |
generateSchema(SchemaOutputResolver outputResolver,
java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additonalGlobalElements)
Generate a Schema for this JAXBContext |
|
java.util.Map<java.lang.String,java.lang.Class> |
getArrayClassesToGeneratedClasses()
INTERNAL: Get the map for which array class (by name) corresponds to which generated class |
|
java.util.HashMap<java.lang.String,java.lang.Class> |
getClassToGeneratedClasses()
INTERNAL: Get the map containing which Class (by name) corresponds to which generated class. |
|
java.util.Map<java.lang.reflect.Type,java.lang.Class> |
getCollectionClassesToGeneratedClasses()
INTERNAL: Get the map for which collection class (by Type) corresponds to which generated class |
|
java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> |
getQNamesToDeclaredClasses()
INTERNAL: Get the map of which QName corresponds to which declared class. |
|
java.util.Map<TypeMappingInfo,javax.xml.namespace.QName> |
getTypeMappingInfoToSchemaType()
INTERNAL: Get the map of which TypeMappingInfo corresponds to which QName. |
|
java.util.HashMap<java.lang.reflect.Type,javax.xml.namespace.QName> |
getTypeToSchemaType()
INTERNAL: Get the map of which Type corresponds to which QName. |
|
|
getValueByXPath(java.lang.Object object,
java.lang.String xPath,
NamespaceResolver namespaceResolver,
java.lang.Class<T> returnType)
Get a value from an object based on an XPath statement. |
|
XMLContext |
getXMLContext()
Return the XMLContext associated with this JAXBContext. |
|
void |
initTypeToSchemaType()
INTERNAL: Populate the map of which Type corresponds to which QName. |
|
void |
setClassToGeneratedClasses(java.util.HashMap<java.lang.String,java.lang.Class> classToClass)
INTERNAL: Set the map containing which Class (by name) corresponds to which generated class. |
|
void |
setQNamesToDeclaredClasses(java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> nameToDeclaredClasses)
INTERNAL: Set the map of which QName corresponds to which declared class. |
|
void |
setQNameToGeneratedClasses(java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> qNameToClass)
INTERNAL: Set the map containing which QName corresponds to which generated class. |
|
void |
setValueByXPath(java.lang.Object object,
java.lang.String xPath,
NamespaceResolver namespaceResolver,
java.lang.Object value)
Set a value on an object based on an XPath statement. |
Methods inherited from class javax.xml.bind.JAXBContext |
---|
newInstance, newInstance, newInstance, newInstance, newInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected XMLContext xmlContext
Constructor Detail |
---|
protected JAXBContext()
public JAXBContext(XMLContext context)
public JAXBContext(XMLContext context, Generator generator, java.lang.reflect.Type[] boundTypes)
public JAXBContext(XMLContext context, Generator generator, TypeMappingInfo[] boundTypes)
Method Detail |
---|
public XMLContext getXMLContext()
public void generateSchema(SchemaOutputResolver outputResolver)
generateSchema
in class JAXBContext
outputResolver
- Class that decides where the schema file (of the given namespace URI) will be writtenpublic void generateSchema(SchemaOutputResolver outputResolver, java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additonalGlobalElements)
outputResolver
- Class that decides where the schema file (of the given namespace URI) will be writtenadditonalGlobalElements
- Map of additional global elements to be added to the generated XSD.
Note that if any QName in this map conflicts with another global element (for example from a TypeMappingInfo object)
then the element generated from this map will be the one that is present in the XSD.public JAXBMarshaller createMarshaller()
createMarshaller
in class JAXBContext
public JAXBUnmarshaller createUnmarshaller()
createUnmarshaller
in class JAXBContext
public JAXBValidator createValidator()
createValidator
in class JAXBContext
public JAXBBinder createBinder()
createBinder
in class JAXBContext
public <T> JAXBBinder createBinder(java.lang.Class<T> nodeClass)
createBinder
in class JAXBContext
nodeClass
- The DOM Node class to use
public JAXBIntrospector createJAXBIntrospector()
createJAXBIntrospector
in class JAXBContext
public void setQNameToGeneratedClasses(java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> qNameToClass)
public java.util.HashMap<java.lang.String,java.lang.Class> getClassToGeneratedClasses()
public void setClassToGeneratedClasses(java.util.HashMap<java.lang.String,java.lang.Class> classToClass)
public void applyORMMetadata(org.eclipse.persistence.internal.sessions.AbstractSession ormSession)
public java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> getQNamesToDeclaredClasses()
public void setQNamesToDeclaredClasses(java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> nameToDeclaredClasses)
public java.util.Map<java.lang.String,java.lang.Class> getArrayClassesToGeneratedClasses()
public java.util.Map<java.lang.reflect.Type,java.lang.Class> getCollectionClassesToGeneratedClasses()
public void initTypeToSchemaType()
public java.util.Map<TypeMappingInfo,javax.xml.namespace.QName> getTypeMappingInfoToSchemaType()
public java.util.HashMap<java.lang.reflect.Type,javax.xml.namespace.QName> getTypeToSchemaType()
public <T> T getValueByXPath(java.lang.Object object, java.lang.String xPath, NamespaceResolver namespaceResolver, java.lang.Class<T> returnType)
T
- The return type of this method corresponds to the returnType parameter.object
- The XPath will be executed relative to this object.xPath
- The XPath statement.namespaceResolver
- A NamespaceResolver containing the prefix/URI pairings from the XPath statement.returnType
- The return type.
public void setValueByXPath(java.lang.Object object, java.lang.String xPath, NamespaceResolver namespaceResolver, java.lang.Object value)
object
- The XPath will be executed relative to this object.xPath
- The XPath statement.namespaceResolver
- A NamespaceResolver containing the prefix/URI pairings from the XPath statement.value
- The value to be set.
|
EclipseLink 2.1.2, build 'v20101206-r8635' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |