org.eclipse.xsd.ecore
Class EcoreSchemaBuilder
java.lang.Object
org.eclipse.xsd.ecore.MapBuilder
org.eclipse.xsd.ecore.EcoreSchemaBuilder
- public class EcoreSchemaBuilder
- extends MapBuilder
This class produces an XSDSchema given an Ecore EPackage.
|
Method Summary |
protected void |
addDocumentation(XSDSchema xsdSchema,
EPackage ePackage,
XSDConcreteComponent xsdComponent,
EModelElement eModelElement)
|
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 |
createEcoreAnnotation(Map qNamePrefixToNamespaceMap,
Element element,
String key,
String value)
|
protected void |
createEcoreAnnotation(XSDComponent xsdComponent,
String key,
String value)
|
protected XSDModelGroup |
findOrCreateModelGroup(XSDComplexTypeDefinition xsdComplexTypeDefinition)
|
protected String |
getQualifiedPackageName(EPackage ePackage)
|
XSDSchema |
getSchema(EPackage ePackage)
|
protected String |
getURI(EClassifier eClassifier)
|
protected void |
handleImport(XSDSchema xsdSchema,
XSDNamedComponent xsdNamedComponent)
|
protected String |
handlePrefix(Map namespaces,
String preferredPrefix,
String namespace)
|
protected boolean |
isWrapperType(EClassifier eClassifier)
|
protected void |
map(XSDComponent xsdComponent,
EModelElement eModelElement)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultXMLSchemaNamespace
protected String defaultXMLSchemaNamespace
- The schema for schema namespace version to be used for new schemas.
defaultXMLSchemaNamespacePrefix
protected 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 Map eModelElementToXSDComponentMap
- Store the reverse map too.
EcoreSchemaBuilder
public EcoreSchemaBuilder(ExtendedMetaData extendedMetaData)
map
protected void map(XSDComponent xsdComponent,
EModelElement eModelElement)
- Overrides:
map in class MapBuilder
getSchema
public XSDSchema getSchema(EPackage ePackage)
getQualifiedPackageName
protected 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)
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)
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 String getURI(EClassifier eClassifier)
createEcoreAnnotation
protected void createEcoreAnnotation(XSDComponent xsdComponent,
String key,
String value)
createEcoreAnnotation
protected void createEcoreAnnotation(Map qNamePrefixToNamespaceMap,
Element element,
String key,
String value)
handleImport
protected void handleImport(XSDSchema xsdSchema,
XSDNamedComponent xsdNamedComponent)
handlePrefix
protected String handlePrefix(Map namespaces,
String preferredPrefix,
String namespace)
addDocumentation
protected void addDocumentation(XSDSchema xsdSchema,
EPackage ePackage,
XSDConcreteComponent xsdComponent,
EModelElement eModelElement)