## org.eclipse.xsd.ecore
Class EcoreSchemaBuilder

    java.lang.Object
      org.eclipse.xsd.ecore.NameMangler
          org.eclipse.xsd.ecore.MapBuilder
              org.eclipse.xsd.ecore.EcoreSchemaBuilder

    public class EcoreSchemaBuilder

extends MapBuilder

This class produces an XSDSchema given an Ecore EPackage.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.xsd.ecore.MapBuilder
`MapBuilder.Mapper`

Field Summary
`protected java.lang.String` `defaultXMLSchemaNamespace` The schema for schema namespace version to be used for new schemas.
`protected java.lang.String` `defaultXMLSchemaNamespacePrefix` The prefix to be used for the schema for schema namespace version in new schemas.
`protected java.util.Map<EModelElement,XSDComponent>` `eModelElementToXSDComponentMap` Store the reverse map too.
`protected ExtendedMetaData` `extendedMetaData` The extended meta data used to determine the schema structure.
`protected static java.lang.String` `GEN_MODEL_PACKAGE_NS_URI`

Fields inherited from class org.eclipse.xsd.ecore.MapBuilder
`mapper, xsdComponentToEModelElementMap`

Fields inherited from class org.eclipse.xsd.ecore.NameMangler
`DOMAINS, LOWER_CASE, UNCHANGED_CASE, UPPER_CASE`

Constructor Summary
`EcoreSchemaBuilder(ExtendedMetaData extendedMetaData)`

Method Summary
`protected void` `buildAnnotation(EModelElement eModelElement, org.w3c.dom.Element parent)`
`protected XSDAnnotation` `buildAnnotation(XSDConcreteComponent xsdComponent, EModelElement eModelElement)`
`protected void` `buildAnnotations(XSDComponent xsdComponent, EModelElement eModelElement)`
`protected void` `buildAttributeInformation(XSDComplexTypeDefinition xsdComplexTypeDefinition, java.lang.String name, boolean isRef, EClassifier referenceType, XSDComponent xsdComponent, EStructuralFeature eStructuralFeature)`
`protected XSDAttributeUse` `buildAttributeUse(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)`
`protected XSDWildcard` `buildAttributeWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)`
`protected XSDComplexTypeDefinition` `buildComplexTypeDefinition(XSDSchema xsdSchema, EClass eClass)`
`protected XSDComponent` `buildContentFeature(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)`
`protected XSDParticle` `buildElementParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)`
`protected XSDWildcard` `buildElementWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)`
`protected XSDAttributeDeclaration` `buildGlobalAttribute(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature)`
`protected XSDElementDeclaration` `buildGlobalElement(XSDSchema xsdSchema, EClass eClass)`
`protected XSDElementDeclaration` `buildGlobalElement(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature)`
`protected XSDFeature` `buildGlobalFeature(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature)`
`protected XSDModelGroup` `buildModelGroup(XSDComplexTypeDefinition xsdComplexTypeDefinition)`
`protected XSDParticle` `buildModelGroupParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)`
`protected XSDSchema` `buildSchema(EPackage ePackage)`
`protected XSDSimpleTypeDefinition` `buildSimpleContent(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)`
`protected XSDSimpleTypeDefinition` `buildSimpleTypeDefinition(XSDSchema xsdSchema, EDataType eDataType)`
`protected XSDTypeDefinition` `buildTypeDefinition(XSDSchema xsdSchema, EClassifier eClassifier)`
`protected void` `buildTypeParameters(XSDComponent xsdComponent, java.util.List<ETypeParameter> eTypeParameters)`
`protected void` `createAnnotation(java.util.Map<java.lang.String,java.lang.String> qNamePrefixToNamespaceMap, org.w3c.dom.Element element, java.lang.String namespace, java.lang.String key, java.lang.String value)`
`protected void` `createAnnotation(XSDComponent xsdComponent, java.lang.String namespace, java.lang.String key, java.lang.String value)`
`protected void` `createEcoreAnnotation(java.util.Map<java.lang.String,java.lang.String> qNamePrefixToNamespaceMap, org.w3c.dom.Element element, java.lang.String key, java.lang.String value)`
`protected void` `createEcoreAnnotation(XSDComponent xsdComponent, java.lang.String key, java.lang.String value)`
`protected void` `createUserInfo(XSDAnnotation xsdAnnotation, java.lang.String documentation)`
`protected XSDModelGroup` `findOrCreateModelGroup(XSDComplexTypeDefinition xsdComplexTypeDefinition)`
`protected java.lang.String` `getGenericType(XSDSchema xsdSchema, EGenericType eGenericType)`
`protected java.lang.String` `getQualifiedPackageName(EPackage ePackage)`
`XSDSchema` `getSchema(EPackage ePackage)`
`protected java.lang.String` `getURI(EClassifier eClassifier)`
`protected java.lang.String` `getURI(EStructuralFeature eStructuralFeature)`
`protected void` `handleImport(XSDSchema xsdSchema, XSDNamedComponent xsdNamedComponent)`
`protected void` `handleMultiplicity(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature, XSDAttributeDeclaration xsdAttributeDeclaration, XSDSimpleTypeDefinition xsdSimpleTypeDefinition)`
`protected void` `handleMultiplicity(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature, XSDComponent xsdComponent, XSDSimpleTypeDefinition xsdSimpleTypeDefinition)`
`protected java.lang.String` `handlePrefix(java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String preferredPrefix, java.lang.String namespace)`
`protected boolean` `isIgnoredAnnotationSource(java.lang.String sourceURI)`
`protected boolean` `isWrapperType(EClassifier eClassifier)`
`protected void` `map(XSDComponent xsdComponent, EModelElement eModelElement)`

Methods inherited from class org.eclipse.xsd.ecore.MapBuilder
`addInput, addOutput, setMapper`

Methods inherited from class org.eclipse.xsd.ecore.NameMangler
`parseName, qualifiedPackageName, uncapName, validName, validName, validName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### defaultXMLSchemaNamespace

    protected java.lang.String defaultXMLSchemaNamespace

  The schema for schema namespace version to be used for new schemas.

### defaultXMLSchemaNamespacePrefix

    protected java.lang.String defaultXMLSchemaNamespacePrefix

  The prefix to be used for the schema for schema namespace version in new schemas.

### extendedMetaData

    protected ExtendedMetaData extendedMetaData

  The extended meta data used to determine the schema structure.

### eModelElementToXSDComponentMap

    protected java.util.Map<EModelElement,XSDComponent> eModelElementToXSDComponentMap

  Store the reverse map too.

### GEN_MODEL_PACKAGE_NS_URI

    protected static final java.lang.String GEN_MODEL_PACKAGE_NS_URI

See Also:
  Constant Field Values

Constructor Detail

### EcoreSchemaBuilder

    public EcoreSchemaBuilder(ExtendedMetaData extendedMetaData)

Method Detail

### map

    protected void map(XSDComponent xsdComponent,
                       EModelElement eModelElement)

  Overrides:
    `map` in class `MapBuilder`

### getSchema

    public XSDSchema getSchema(EPackage ePackage)

### getQualifiedPackageName

    protected java.lang.String getQualifiedPackageName(EPackage ePackage)

### buildSchema

    protected XSDSchema buildSchema(EPackage ePackage)

### buildGlobalElement

    protected XSDElementDeclaration buildGlobalElement(XSDSchema xsdSchema,
                                                       EClass eClass)

### buildGlobalFeature

    protected XSDFeature buildGlobalFeature(XSDSchema xsdSchema,
                                            EStructuralFeature eStructuralFeature)

### buildGlobalElement

    protected XSDElementDeclaration buildGlobalElement(XSDSchema xsdSchema,
                                                       EStructuralFeature eStructuralFeature)

### buildGlobalAttribute

    protected XSDAttributeDeclaration buildGlobalAttribute(XSDSchema xsdSchema,
                                                           EStructuralFeature eStructuralFeature)

### buildTypeDefinition

    protected XSDTypeDefinition buildTypeDefinition(XSDSchema xsdSchema,
                                                    EClassifier eClassifier)

### buildSimpleTypeDefinition

    protected XSDSimpleTypeDefinition buildSimpleTypeDefinition(XSDSchema xsdSchema,
                                                                EDataType eDataType)

### buildComplexTypeDefinition

    protected XSDComplexTypeDefinition buildComplexTypeDefinition(XSDSchema xsdSchema,
                                                                  EClass eClass)

### buildTypeParameters

    protected void buildTypeParameters(XSDComponent xsdComponent,
                                       java.util.List<ETypeParameter> eTypeParameters)

### buildContentFeature

    protected XSDComponent buildContentFeature(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                               EStructuralFeature eStructuralFeature)

### buildModelGroupParticle

    protected XSDParticle buildModelGroupParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                                  EStructuralFeature eStructuralFeature)

### buildElementWildcard

    protected XSDWildcard buildElementWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                               EStructuralFeature eStructuralFeature)

### buildAttributeWildcard

    protected XSDWildcard buildAttributeWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                                 EStructuralFeature eStructuralFeature)

### buildSimpleContent

    protected XSDSimpleTypeDefinition buildSimpleContent(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                                         EStructuralFeature eStructuralFeature)

### buildAttributeUse

    protected XSDAttributeUse buildAttributeUse(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                                EStructuralFeature eStructuralFeature)

### buildAttributeInformation

    protected void buildAttributeInformation(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                             java.lang.String name,
                                             boolean isRef,
                                             EClassifier referenceType,
                                             XSDComponent xsdComponent,
                                             EStructuralFeature eStructuralFeature)

### handleMultiplicity

    protected void handleMultiplicity(XSDSchema xsdSchema,
                                      EStructuralFeature eStructuralFeature,
                                      XSDAttributeDeclaration xsdAttributeDeclaration,
                                      XSDSimpleTypeDefinition xsdSimpleTypeDefinition)

### handleMultiplicity

    protected void handleMultiplicity(XSDSchema xsdSchema,
                                      EStructuralFeature eStructuralFeature,
                                      XSDComponent xsdComponent,
                                      XSDSimpleTypeDefinition xsdSimpleTypeDefinition)

### buildElementParticle

    protected XSDParticle buildElementParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition,
                                               EStructuralFeature eStructuralFeature)

### findOrCreateModelGroup

    protected XSDModelGroup findOrCreateModelGroup(XSDComplexTypeDefinition xsdComplexTypeDefinition)

### buildModelGroup

    protected XSDModelGroup buildModelGroup(XSDComplexTypeDefinition xsdComplexTypeDefinition)

### isWrapperType

    protected boolean isWrapperType(EClassifier eClassifier)

### getURI

    protected java.lang.String getURI(EClassifier eClassifier)

### getURI

    protected java.lang.String getURI(EStructuralFeature eStructuralFeature)

### getGenericType

    protected java.lang.String getGenericType(XSDSchema xsdSchema,
                                              EGenericType eGenericType)

### createEcoreAnnotation

    protected void createEcoreAnnotation(XSDComponent xsdComponent,
                                         java.lang.String key,
                                         java.lang.String value)

### createEcoreAnnotation

    protected void createEcoreAnnotation(java.util.Map<java.lang.String,java.lang.String> qNamePrefixToNamespaceMap,
                                         org.w3c.dom.Element element,
                                         java.lang.String key,
                                         java.lang.String value)

### createAnnotation

    protected void createAnnotation(XSDComponent xsdComponent,
                                    java.lang.String namespace,
                                    java.lang.String key,
                                    java.lang.String value)

### createAnnotation

    protected void createAnnotation(java.util.Map<java.lang.String,java.lang.String> qNamePrefixToNamespaceMap,
                                    org.w3c.dom.Element element,
                                    java.lang.String namespace,
                                    java.lang.String key,
                                    java.lang.String value)

### handleImport

    protected void handleImport(XSDSchema xsdSchema,
                                XSDNamedComponent xsdNamedComponent)

### handlePrefix

    protected java.lang.String handlePrefix(java.util.Map<java.lang.String,java.lang.String> namespaces,
                                            java.lang.String preferredPrefix,
                                            java.lang.String namespace)

### isIgnoredAnnotationSource

    protected boolean isIgnoredAnnotationSource(java.lang.String sourceURI)

### buildAnnotations

    protected void buildAnnotations(XSDComponent xsdComponent,
                                    EModelElement eModelElement)

### buildAnnotation

    protected XSDAnnotation buildAnnotation(XSDConcreteComponent xsdComponent,
                                            EModelElement eModelElement)

### createUserInfo

    protected void createUserInfo(XSDAnnotation xsdAnnotation,
                                  java.lang.String documentation)

### buildAnnotation

    protected void buildAnnotation(EModelElement eModelElement,
                                   org.w3c.dom.Element parent)

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.