org.eclipse.xtend.typesystem.xsd
Class XSDMetaModel

java.lang.Object
  extended by org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel
      extended by org.eclipse.xtend.typesystem.xsd.XSDMetaModel
All Implemented Interfaces:
MetaModel

public class XSDMetaModel
extends EmfRegistryMetaModel

Author:
Moritz Eysholdt - Initial contribution and API

Field Summary
static java.lang.String EFEATURE
           
static java.lang.String EFEATURE_MAP_ENTRY
           
protected  java.lang.String id
           
protected  org.apache.commons.logging.Log log
           
protected  java.util.Set<org.eclipse.emf.ecore.EPackage> savedPackages
           
protected  java.lang.String savePackagesPath
           
 
Constructor Summary
XSDMetaModel()
           
XSDMetaModel(XSDManager manager)
           
 
Method Summary
 void addSchemaFile(java.lang.String uri)
           
 org.eclipse.emf.ecore.EPackage[] allPackages()
          returns the managed packages.
 EFeatureMapEntryTypeImpl getEFeatureMapEntryType()
           
 XMLFeatureMapTypeImpl getEFeatureMapType(org.eclipse.emf.ecore.EClass aClass)
           
 EFeatureType getEFeatureType()
           
 EMapEntryType getEMapEntryType(org.eclipse.emf.ecore.EClassifier innerType)
           
 EMapType getEMapType(org.eclipse.emf.ecore.EClassifier innerType)
           
 java.lang.String getID()
           
 java.util.Set<Type> getKnownTypes()
          returns all types this metamodel is responsible for
 QNameType getQNameType()
           
 Type getType(java.lang.Object obj)
          if this metamodel is responsible for a types which are responsible for the given object, it returns the corresponding type.
 Type getTypeForEClassifier(org.eclipse.emf.ecore.EClassifier element)
           
 Type getTypeForETypedElement(org.eclipse.emf.ecore.ETypedElement typedElement)
           
 Type getTypeForName(java.lang.String typeName)
          if this metamodel is responsible for a type with the given name, it returns the corresponding type.
 XSDManager getXsdManager()
           
 boolean isRegisterPackagesGlobally()
           
 boolean isSaveEPackages()
           
protected  void registerNewPackages()
           
protected  void saveNewPackages()
           
 void setId(java.lang.String id)
           
 void setRegisterPackagesGlobally(boolean registerPackagesGlobally)
           
 void setSavePackagesPath(java.lang.String path)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel
addResourceSet, getElementName, getEobjectType, getFqnRec, getFullyQualifiedName, getNamespaces, getTypeForEClassifier, getTypeSystem, setTypeSystem, setUseSingleGlobalResourceSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EFEATURE

public static final java.lang.String EFEATURE
See Also:
Constant Field Values

EFEATURE_MAP_ENTRY

public static final java.lang.String EFEATURE_MAP_ENTRY
See Also:
Constant Field Values

log

protected org.apache.commons.logging.Log log

id

protected java.lang.String id

savedPackages

protected java.util.Set<org.eclipse.emf.ecore.EPackage> savedPackages

savePackagesPath

protected java.lang.String savePackagesPath
Constructor Detail

XSDMetaModel

public XSDMetaModel()

XSDMetaModel

public XSDMetaModel(XSDManager manager)
Method Detail

addSchemaFile

public void addSchemaFile(java.lang.String uri)

allPackages

public org.eclipse.emf.ecore.EPackage[] allPackages()
Description copied from class: EmfRegistryMetaModel
returns the managed packages. Uses the global EPackage Registry.

Overrides:
allPackages in class EmfRegistryMetaModel
Returns:

getEFeatureMapEntryType

public EFeatureMapEntryTypeImpl getEFeatureMapEntryType()

getEFeatureMapType

public XMLFeatureMapTypeImpl getEFeatureMapType(org.eclipse.emf.ecore.EClass aClass)

getEFeatureType

public EFeatureType getEFeatureType()

getEMapEntryType

public EMapEntryType getEMapEntryType(org.eclipse.emf.ecore.EClassifier innerType)

getEMapType

public EMapType getEMapType(org.eclipse.emf.ecore.EClassifier innerType)

getKnownTypes

public java.util.Set<Type> getKnownTypes()
Description copied from interface: MetaModel
returns all types this metamodel is responsible for

Specified by:
getKnownTypes in interface MetaModel
Overrides:
getKnownTypes in class EmfRegistryMetaModel
Returns:
set of known types

getQNameType

public QNameType getQNameType()

getType

public Type getType(java.lang.Object obj)
Description copied from interface: MetaModel
if this metamodel is responsible for a types which are responsible for the given object, it returns the corresponding type. Otherwise returns null

Specified by:
getType in interface MetaModel
Overrides:
getType in class EmfRegistryMetaModel
Parameters:
obj - object for which a corresponding object is requested
Returns:
the corresponding type

getTypeForEClassifier

public Type getTypeForEClassifier(org.eclipse.emf.ecore.EClassifier element)
Overrides:
getTypeForEClassifier in class EmfRegistryMetaModel

getTypeForETypedElement

public Type getTypeForETypedElement(org.eclipse.emf.ecore.ETypedElement typedElement)
Overrides:
getTypeForETypedElement in class EmfRegistryMetaModel

getTypeForName

public Type getTypeForName(java.lang.String typeName)
Description copied from interface: MetaModel
if this metamodel is responsible for a type with the given name, it returns the corresponding type. Otherwise returns null

Specified by:
getTypeForName in interface MetaModel
Overrides:
getTypeForName in class EmfRegistryMetaModel
Parameters:
typeName - name of type
Returns:
the corresponding type

getXsdManager

public XSDManager getXsdManager()

isRegisterPackagesGlobally

public boolean isRegisterPackagesGlobally()

isSaveEPackages

public boolean isSaveEPackages()

registerNewPackages

protected void registerNewPackages()

saveNewPackages

protected void saveNewPackages()

setId

public void setId(java.lang.String id)

getID

public java.lang.String getID()

setRegisterPackagesGlobally

public void setRegisterPackagesGlobally(boolean registerPackagesGlobally)

setSavePackagesPath

public void setSavePackagesPath(java.lang.String path)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object