EclipseLink 1.2.0, build 'v20091016-r5565' API Reference

org.eclipse.persistence.jaxb.compiler
Class SchemaGenerator

java.lang.Object
  extended by org.eclipse.persistence.jaxb.compiler.SchemaGenerator

public class SchemaGenerator
extends java.lang.Object

INTERNAL:

Purpose:To generate Schema objects based on a map of TypeInfo objects, and some additional information gathered by the AnnotationsProcessing phase.

Responsibilities:

This class is used by the Generator to handle the generation of Schemas. The Generator passes in a map of TypeInfo objects, generated by the Annotations processor. The generated Schemas are stored in a map of keyed on Target Namespace.

See Also:
TypeInfo, AnnotationsProcessor, Generator
Author:
mmacivor
Since:
Oracle TopLink 11.1.1.0.0

Constructor Summary
SchemaGenerator(Helper helper)
           
 
Method Summary
 void addGlobalElements(java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> additionalElements)
           
 void addSchemaComponents(JavaClass myClass)
           
 void addToSchemaType(TypeInfo ownerTypeInfo, java.util.List<Property> properties, org.eclipse.persistence.internal.oxm.schema.model.TypeDefParticle compositor, org.eclipse.persistence.internal.oxm.schema.model.ComplexType type, org.eclipse.persistence.internal.oxm.schema.model.Schema schema)
           
 org.eclipse.persistence.internal.oxm.schema.model.Schema generateSchema(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,NamespaceInfo> packageToNamespaceMappings, java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> additionalGlobalElements)
           
 java.util.Collection<org.eclipse.persistence.internal.oxm.schema.model.Schema> getAllSchemas()
           
 java.util.ArrayList<java.lang.String> getEnumerationFacetsFor(EnumTypeInfo info)
           
 NamespaceInfo getNamespaceInfoForNamespace(java.lang.String namespace)
           
 java.lang.String getPrefixForNamespace(java.lang.String URI, NamespaceResolver namespaceResolver)
           
 javax.xml.namespace.QName getSchemaTypeFor(JavaClass javaClass)
           
 java.util.HashMap<java.lang.String,SchemaTypeInfo> getSchemaTypeInfo()
           
 java.lang.String getSchemaTypeNameForClassName(java.lang.String className)
           
 Property getXmlValueFieldForSimpleContent(java.util.ArrayList<Property> properties)
           
 boolean isCollectionType(Property field)
           
 boolean isMapType(Property field)
           
 void populateSchemaTypes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaGenerator

public SchemaGenerator(Helper helper)
Method Detail

generateSchema

public org.eclipse.persistence.internal.oxm.schema.model.Schema generateSchema(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,NamespaceInfo> packageToNamespaceMappings,
                                                                               java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> additionalGlobalElements)

addSchemaComponents

public void addSchemaComponents(JavaClass myClass)

addToSchemaType

public void addToSchemaType(TypeInfo ownerTypeInfo,
                            java.util.List<Property> properties,
                            org.eclipse.persistence.internal.oxm.schema.model.TypeDefParticle compositor,
                            org.eclipse.persistence.internal.oxm.schema.model.ComplexType type,
                            org.eclipse.persistence.internal.oxm.schema.model.Schema schema)

getSchemaTypeFor

public javax.xml.namespace.QName getSchemaTypeFor(JavaClass javaClass)

populateSchemaTypes

public void populateSchemaTypes()

getSchemaTypeNameForClassName

public java.lang.String getSchemaTypeNameForClassName(java.lang.String className)

getEnumerationFacetsFor

public java.util.ArrayList<java.lang.String> getEnumerationFacetsFor(EnumTypeInfo info)

getXmlValueFieldForSimpleContent

public Property getXmlValueFieldForSimpleContent(java.util.ArrayList<Property> properties)

isCollectionType

public boolean isCollectionType(Property field)

isMapType

public boolean isMapType(Property field)

getAllSchemas

public java.util.Collection<org.eclipse.persistence.internal.oxm.schema.model.Schema> getAllSchemas()

getNamespaceInfoForNamespace

public NamespaceInfo getNamespaceInfoForNamespace(java.lang.String namespace)

getPrefixForNamespace

public java.lang.String getPrefixForNamespace(java.lang.String URI,
                                              NamespaceResolver namespaceResolver)

addGlobalElements

public void addGlobalElements(java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> additionalElements)

getSchemaTypeInfo

public java.util.HashMap<java.lang.String,SchemaTypeInfo> getSchemaTypeInfo()

EclipseLink 1.2.0, build 'v20091016-r5565' API Reference