|
EclipseLink 1.2.0, build 'v20091016-r5565' 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. |
void |
generateAnyAttributeMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLAnyCollectionMapping |
generateAnyCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
boolean isMixed)
|
void |
generateAnyObjectMapping(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)
|
void |
generateCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLCompositeCollectionMapping |
generateCompositeCollectionMapping(Property property,
XMLDescriptor descriptor,
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)
|
void |
generateDirectEnumerationMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
EnumTypeInfo enumInfo)
|
XMLDirectMapping |
generateDirectMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
void |
generateEnumCollectionMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
EnumTypeInfo info)
|
XMLCompositeCollectionMapping |
generateMapMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
void |
generateMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
XMLMapping |
generateMappingForReferenceProperty(ReferenceProperty property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
void |
generateMappings()
|
void |
generateMappings(TypeInfo info,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo)
|
Project |
generateProject(java.util.ArrayList<JavaClass> typeInfoClasses,
java.util.HashMap<java.lang.String,TypeInfo> typeInfo,
java.util.HashMap userDefinedSchemaTypes,
java.util.HashMap<java.lang.String,NamespaceInfo> packageToNamespaceMappings,
java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> globalElements)
|
java.lang.Class |
generateWrapperClass(java.lang.String className,
java.lang.String attributeType,
boolean isList,
javax.xml.namespace.QName theQName)
|
void |
generateXMLCollectionReferenceMapping(Property property,
XMLDescriptor descriptor,
NamespaceInfo namespaceInfo,
JavaClass referenceClass)
Create an XMLCollectionReferenceMapping and add it to the descriptor. |
void |
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()
|
java.lang.String |
getPrefixForNamespace(java.lang.String URI,
NamespaceResolver namespaceResolver,
java.lang.String suggestedPrefix)
|
java.lang.String |
getPrefixForNamespace(java.lang.String URI,
NamespaceResolver namespaceResolver,
java.lang.String suggestedPrefix,
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 |
isCollectionType(JavaClass type)
|
boolean |
isCollectionType(Property field)
|
boolean |
isMapType(Property property)
|
void |
processGlobalElements(Project project)
|
void |
processSchemaType(XmlSchemaType type)
|
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 userDefinedSchemaTypes, java.util.HashMap<java.lang.String,NamespaceInfo> packageToNamespaceMappings, java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> globalElements) throws java.lang.Exception
java.lang.Exception
public void generateDescriptor(JavaClass javaClass, Project project)
public void generateDescriptorForJAXBElementSubclass(JavaClass javaClass, Project project, NamespaceResolver nsr)
public void generateMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public XMLChoiceObjectMapping generateChoiceMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespace)
public XMLChoiceCollectionMapping generateChoiceCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespace)
public XMLMapping generateMappingForReferenceProperty(ReferenceProperty 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 void generateDirectEnumerationMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, EnumTypeInfo enumInfo)
public void generateCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public void generateEnumCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, EnumTypeInfo info)
public void generateAnyAttributeMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public void 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 generateMapMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public XMLCompositeCollectionMapping generateCompositeCollectionMapping(Property property, XMLDescriptor descriptor, 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, java.lang.String suggestedPrefix)
public java.lang.String getPrefixForNamespace(java.lang.String URI, NamespaceResolver namespaceResolver, java.lang.String suggestedPrefix, boolean addPrefixToNR)
public boolean isCollectionType(Property field)
public boolean isCollectionType(JavaClass type)
public void generateMappings()
public void generateMappings(TypeInfo info, XMLDescriptor descriptor, NamespaceInfo namespaceInfo)
public void generateXMLCollectionReferenceMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, JavaClass referenceClass)
property
- descriptor
- namespaceInfo
- referenceClass
- public void generateXMLObjectReferenceMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo, JavaClass referenceClass)
property
- descriptor
- namespaceInfo
- referenceClass
- public XMLField getXPathForField(Property property, NamespaceInfo namespaceInfo, boolean isTextMapping)
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 void processSchemaType(XmlSchemaType type)
public java.lang.String getSchemaTypeNameForClassName(java.lang.String className)
public boolean isMapType(Property property)
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()
|
EclipseLink 1.2.0, build 'v20091016-r5565' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |