public class EcoreSchemaBuilder extends MapBuilder
MapBuilder.Mapper
Modifier and Type | Field and Description |
---|---|
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 |
mapper, xsdComponentToEModelElementMap
DOMAINS, LOWER_CASE, UNCHANGED_CASE, UPPER_CASE
Constructor and Description |
---|
EcoreSchemaBuilder(ExtendedMetaData extendedMetaData) |
Modifier and Type | Method and Description |
---|---|
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) |
protected java.lang.String |
transformDefaultValue(XSDSimpleTypeDefinition xsdSimpleTypeDefinition,
java.lang.String defaultValue)
Handle difference lexical representations for default values,
in particular, positive and negative infinity for float and double.
|
addInput, addOutput, setMapper
parseName, qualifiedPackageName, uncapName, validName, validName, validName
protected java.lang.String defaultXMLSchemaNamespace
protected java.lang.String defaultXMLSchemaNamespacePrefix
protected ExtendedMetaData extendedMetaData
protected java.util.Map<EModelElement,XSDComponent> eModelElementToXSDComponentMap
protected static final java.lang.String GEN_MODEL_PACKAGE_NS_URI
public EcoreSchemaBuilder(ExtendedMetaData extendedMetaData)
protected void map(XSDComponent xsdComponent, EModelElement eModelElement)
map
in class MapBuilder
protected java.lang.String getQualifiedPackageName(EPackage ePackage)
protected XSDElementDeclaration buildGlobalElement(XSDSchema xsdSchema, EClass eClass)
protected XSDFeature buildGlobalFeature(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature)
protected java.lang.String transformDefaultValue(XSDSimpleTypeDefinition xsdSimpleTypeDefinition, java.lang.String defaultValue)
protected XSDElementDeclaration buildGlobalElement(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature)
protected XSDAttributeDeclaration buildGlobalAttribute(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature)
protected XSDTypeDefinition buildTypeDefinition(XSDSchema xsdSchema, EClassifier eClassifier)
protected XSDSimpleTypeDefinition buildSimpleTypeDefinition(XSDSchema xsdSchema, EDataType eDataType)
protected XSDComplexTypeDefinition buildComplexTypeDefinition(XSDSchema xsdSchema, EClass eClass)
protected void buildTypeParameters(XSDComponent xsdComponent, java.util.List<ETypeParameter> eTypeParameters)
protected XSDComponent buildContentFeature(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
protected XSDParticle buildModelGroupParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
protected XSDWildcard buildElementWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
protected XSDWildcard buildAttributeWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
protected XSDSimpleTypeDefinition buildSimpleContent(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
protected XSDAttributeUse buildAttributeUse(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
protected void buildAttributeInformation(XSDComplexTypeDefinition xsdComplexTypeDefinition, java.lang.String name, boolean isRef, EClassifier referenceType, XSDComponent xsdComponent, EStructuralFeature eStructuralFeature)
protected void handleMultiplicity(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature, XSDAttributeDeclaration xsdAttributeDeclaration, XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
protected void handleMultiplicity(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature, XSDComponent xsdComponent, XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
protected XSDParticle buildElementParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
protected XSDModelGroup findOrCreateModelGroup(XSDComplexTypeDefinition xsdComplexTypeDefinition)
protected XSDModelGroup buildModelGroup(XSDComplexTypeDefinition xsdComplexTypeDefinition)
protected boolean isWrapperType(EClassifier eClassifier)
protected java.lang.String getURI(EClassifier eClassifier)
protected java.lang.String getURI(EStructuralFeature eStructuralFeature)
protected java.lang.String getGenericType(XSDSchema xsdSchema, EGenericType eGenericType)
protected void createEcoreAnnotation(XSDComponent xsdComponent, 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 createAnnotation(XSDComponent xsdComponent, java.lang.String namespace, java.lang.String key, java.lang.String value)
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 handleImport(XSDSchema xsdSchema, XSDNamedComponent xsdNamedComponent)
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 void buildAnnotations(XSDComponent xsdComponent, EModelElement eModelElement)
protected XSDAnnotation buildAnnotation(XSDConcreteComponent xsdComponent, EModelElement eModelElement)
protected void createUserInfo(XSDAnnotation xsdAnnotation, java.lang.String documentation)
protected void buildAnnotation(EModelElement eModelElement, org.w3c.dom.Element parent)