|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jaxb.compiler.MappingsGenerator
public class MappingsGenerator
INTERNAL:
Purpose:To generate a TopLink OXM Project based on Java Class and TypeInfo information
Responsibilities:
This class is invoked by a Generator in order to create a TopLink Project. This is generally used by JAXBContextFactory to create the runtime project. A Descriptor will be generated for each TypeInfo and Mappings generated for each Property. In the case that a non-transient property's type is a user defined class, a Descriptor and Mappings will be generated for that class as well.
Generator
,
TypeInfo
,
Property
Field Summary | |
---|---|
static javax.xml.namespace.QName |
RESERVED_QNAME
|
Constructor Summary | |
---|---|
MappingsGenerator(Helper helper)
|
Method Summary | |
---|---|
protected boolean |
areEquals(JavaClass src,
java.lang.Class tgt)
|
protected boolean |
areEquals(JavaClass src,
java.lang.String tgtCanonicalName)
Compares a JavaModel JavaClass to a Class. |
XMLAnyAttributeMapping |
generateAnyAttributeMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLAnyCollectionMapping |
generateAnyCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
boolean isMixed)
|
XMLAnyObjectMapping |
generateAnyObjectMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLBinaryDataCollectionMapping |
generateBinaryDataCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLBinaryDataMapping |
generateBinaryMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLChoiceCollectionMapping |
generateChoiceCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespace)
|
XMLChoiceObjectMapping |
generateChoiceMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespace)
|
DatabaseMapping |
generateCollectionMapping(Property property,
XMLDescriptor descriptor,
JavaClass descriptorJavaClass,
NamespaceInfo namespaceInfo)
|
XMLCompositeCollectionMapping |
generateCompositeCollectionMapping(Property property,
XMLDescriptor descriptor,
JavaClass javaClass,
NamespaceInfo namespaceInfo,
java.lang.String referenceClassName)
|
XMLCompositeObjectMapping |
generateCompositeObjectMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
java.lang.String referenceClassName)
|
void |
generateDescriptor(JavaClass javaClass,
Project project)
|
void |
generateDescriptorForJAXBElementSubclass(JavaClass javaClass,
Project project,
NamespaceResolver nsr)
|
XMLCompositeDirectCollectionMapping |
generateDirectCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLDirectMapping |
generateDirectEnumerationMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
EnumTypeInfo enumInfo)
|
XMLDirectMapping |
generateDirectMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLCompositeDirectCollectionMapping |
generateEnumCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
EnumTypeInfo info)
|
DatabaseMapping |
generateMapping(Property property,
XMLDescriptor descriptor,
JavaClass descriptorJavaClass,
NamespaceInfo namespaceInfo)
Generate a mapping for a given Property. |
DatabaseMapping |
generateMappingForReferenceProperty(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
void |
generateMappings()
|
void |
generateMappings(TypeInfo info,
XMLDescriptor descriptor,
JavaClass descriptorJavaClass,
NamespaceInfo namespaceInfo)
Generate mappings for a given TypeInfo. |
Project |
generateProject(java.util.ArrayList<JavaClass> typeInfoClasses,
java.util.HashMap<java.lang.String,TypeInfo> typeInfo,
java.util.HashMap<java.lang.String,javax.xml.namespace.QName> userDefinedSchemaTypes,
java.util.HashMap<java.lang.String,PackageInfo> packageToPackageInfoMappings,
java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> globalElements,
java.util.List<ElementDeclaration> localElements,
java.util.Map<TypeMappingInfo,java.lang.Class> typeMappingInfoToGeneratedClass,
java.util.Map<TypeMappingInfo,java.lang.Class> typeMappingInfoToAdapterClasses,
boolean isDefaultNamespaceAllowed)
|
XMLTransformationMapping |
generateTransformationMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespace)
Generate an XMLTransformationMapping based on a given Property. |
java.lang.Class |
generateWrapperClass(java.lang.String className,
java.lang.String attributeType,
boolean isList,
javax.xml.namespace.QName theQName)
|
XMLCollectionReferenceMapping |
generateXMLCollectionReferenceMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
JavaClass referenceClass)
Create an XMLCollectionReferenceMapping and add it to the descriptor. |
XMLObjectReferenceMapping |
generateXMLObjectReferenceMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
JavaClass referenceClass)
Create an XMLObjectReferenceMapping and add it to the descriptor. |
java.util.HashMap<java.lang.String,java.lang.Class> |
getClassToGeneratedClasses()
|
org.eclipse.persistence.internal.jaxb.JaxbClassLoader |
getJaxbClassLoader()
|
java.lang.String |
getPrefixForNamespace(java.lang.String URI,
NamespaceResolver namespaceResolver)
|
java.lang.String |
getPrefixForNamespace(java.lang.String URI,
NamespaceResolver namespaceResolver,
boolean addPrefixToNR)
|
java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> |
getQNamesToDeclaredClasses()
|
java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> |
getQNamesToGeneratedClasses()
|
java.lang.String |
getSchemaTypeNameForClassName(java.lang.String className)
|
Property |
getXmlValueFieldForSimpleContent(java.util.ArrayList<Property> properties)
|
XMLField |
getXPathForElement(java.lang.String path,
javax.xml.namespace.QName elementName,
NamespaceInfo namespaceInfo,
boolean isText)
|
XMLField |
getXPathForField(Property property,
NamespaceInfo namespaceInfo,
boolean isTextMapping,
boolean isAny)
|
void |
processGlobalElements(Project project)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final javax.xml.namespace.QName RESERVED_QNAME
Constructor Detail |
---|
public MappingsGenerator(Helper helper)
Method Detail |
---|
public Project generateProject(java.util.ArrayList<JavaClass> typeInfoClasses, java.util.HashMap<java.lang.String,TypeInfo> typeInfo, java.util.HashMap<java.lang.String,javax.xml.namespace.QName> userDefinedSchemaTypes, java.util.HashMap<java.lang.String,PackageInfo> packageToPackageInfoMappings, java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> globalElements, java.util.List<ElementDeclaration> localElements, java.util.Map<TypeMappingInfo,java.lang.Class> typeMappingInfoToGeneratedClass, java.util.Map<TypeMappingInfo,java.lang.Class> typeMappingInfoToAdapterClasses, boolean isDefaultNamespaceAllowed) throws java.lang.Exception
java.lang.Exception
public void generateDescriptor(JavaClass javaClass, Project project)
public void generateDescriptorForJAXBElementSubclass(JavaClass javaClass, Project project, NamespaceResolver nsr)
public DatabaseMapping generateMapping(Property property, XMLDescriptor descriptor, JavaClass descriptorJavaClass, NamespaceInfo namespaceInfo)
property
- descriptor
- namespaceInfo
-
public XMLTransformationMapping generateTransformationMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespace)
property
- descriptor
- namespace
-
public XMLChoiceObjectMapping generateChoiceMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespace)
public XMLChoiceCollectionMapping generateChoiceCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespace)
public DatabaseMapping generateMappingForReferenceProperty(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public XMLAnyCollectionMapping generateAnyCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, boolean isMixed)
public XMLCompositeObjectMapping generateCompositeObjectMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, java.lang.String referenceClassName)
public XMLDirectMapping generateDirectMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public XMLBinaryDataMapping generateBinaryMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public XMLBinaryDataCollectionMapping generateBinaryDataCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public XMLDirectMapping generateDirectEnumerationMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, EnumTypeInfo enumInfo)
public DatabaseMapping generateCollectionMapping(Property property, XMLDescriptor descriptor, JavaClass descriptorJavaClass, NamespaceInfo namespaceInfo)
public XMLCompositeDirectCollectionMapping generateEnumCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, EnumTypeInfo info)
public XMLAnyAttributeMapping generateAnyAttributeMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public XMLAnyObjectMapping generateAnyObjectMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
protected boolean areEquals(JavaClass src, java.lang.Class tgt)
protected boolean areEquals(JavaClass src, java.lang.String tgtCanonicalName)
src
- tgt
-
public XMLCompositeCollectionMapping generateCompositeCollectionMapping(Property property, XMLDescriptor descriptor, JavaClass javaClass, NamespaceInfo namespaceInfo, java.lang.String referenceClassName)
public XMLCompositeDirectCollectionMapping generateDirectCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public java.lang.String getPrefixForNamespace(java.lang.String URI, NamespaceResolver namespaceResolver)
public java.lang.String getPrefixForNamespace(java.lang.String URI, NamespaceResolver namespaceResolver, boolean addPrefixToNR)
public void generateMappings()
public void generateMappings(TypeInfo info, XMLDescriptor descriptor, JavaClass descriptorJavaClass, NamespaceInfo namespaceInfo)
info
- descriptor
- namespaceInfo
- public XMLCollectionReferenceMapping generateXMLCollectionReferenceMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, JavaClass referenceClass)
property
- descriptor
- namespaceInfo
- referenceClass
- public XMLObjectReferenceMapping generateXMLObjectReferenceMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, JavaClass referenceClass)
property
- descriptor
- namespaceInfo
- referenceClass
- public XMLField getXPathForField(Property property, NamespaceInfo namespaceInfo, boolean isTextMapping, boolean isAny)
public XMLField getXPathForElement(java.lang.String path, javax.xml.namespace.QName elementName, NamespaceInfo namespaceInfo, boolean isText)
public Property getXmlValueFieldForSimpleContent(java.util.ArrayList<Property> properties)
public java.lang.String getSchemaTypeNameForClassName(java.lang.String className)
public void processGlobalElements(Project project)
public java.lang.Class generateWrapperClass(java.lang.String className, java.lang.String attributeType, boolean isList, javax.xml.namespace.QName theQName)
public java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> getQNamesToGeneratedClasses()
public java.util.HashMap<java.lang.String,java.lang.Class> getClassToGeneratedClasses()
public java.util.HashMap<javax.xml.namespace.QName,java.lang.Class> getQNamesToDeclaredClasses()
public org.eclipse.persistence.internal.jaxb.JaxbClassLoader getJaxbClassLoader()
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |