EclipseLink 2.0.0, build 'v20091127-r5931' 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 getOrGeneratePrefixForNamespace(java.lang.String URI, org.eclipse.persistence.internal.oxm.schema.model.Schema schema)
          Attempt to resolve the given URI to a prefix.
 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(TypeInfo info)
           
 boolean isCollectionType(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(TypeInfo info)

isCollectionType

public boolean isCollectionType(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)

getOrGeneratePrefixForNamespace

public java.lang.String getOrGeneratePrefixForNamespace(java.lang.String URI,
                                                        org.eclipse.persistence.internal.oxm.schema.model.Schema schema)
Attempt to resolve the given URI to a prefix. If this is unsuccessful, one will be generated and added to the resolver.

Parameters:
URI -
schema -
Returns:

addGlobalElements

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

getSchemaTypeInfo

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

EclipseLink 2.0.0, build 'v20091127-r5931' API Reference