Interface Model
-
- All Known Implementing Classes:
ModelImpl
public interface Model
A representation of the model object 'Model'. The model in the repository consisting of several resourcesThe following features are supported:
- See Also:
MigrationPackage.getModel()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkConformance()
Check whether the model conforms to the metamodelvoid
commit()
Commit the changes to the repository, i.e.Map<org.eclipse.emf.ecore.EClass,Set<Instance>>
createExtentMap()
Create a map to access instances by their classvoid
delete(Instance instance)
Delete an instance from the model, including all the contained instancesorg.eclipse.emf.common.util.EList<Instance>
getAllInstances(String className)
Get all instances of a class, including all sub classesorg.eclipse.emf.common.util.EList<Instance>
getAllInstances(org.eclipse.emf.ecore.EClass eClass)
Get all instances of a class, including all sub classesorg.eclipse.emf.common.util.EList<Instance>
getInstances(String className)
Get all instances of a class, excluding sub classesorg.eclipse.emf.common.util.EList<Instance>
getInstances(org.eclipse.emf.ecore.EClass eClass)
Get all instances of a class, excluding sub classesMetamodel
getMetamodel()
Returns the value of the 'Metamodel' reference.Repository
getRepository()
Returns the value of the 'Repository' container reference.org.eclipse.emf.common.util.EList<ModelResource>
getResources()
Returns the value of the 'Resources' containment reference list.Type
getType(org.eclipse.emf.ecore.EClass eClass)
Get the container for instances that conform to a certain classorg.eclipse.emf.common.util.EList<Type>
getTypes()
Returns the value of the 'Types' containment reference list.boolean
isReflection()
Returns the value of the 'Reflection' attribute.Instance
newInstance(String className)
Create a new instance of a certain classInstance
newInstance(org.eclipse.emf.ecore.EClass eClass)
Create a new instance of a certain classModelResource
newResource(org.eclipse.emf.common.util.URI uri)
Create a new instance of a certain classvoid
setMetamodel(Metamodel value)
Sets the value of the 'Metamodel
' reference.void
setReflection(boolean value)
Sets the value of the 'Reflection
' attribute.void
setRepository(Repository value)
Sets the value of the 'Repository
' container reference.void
validate()
Validate the model
-
-
-
Method Detail
-
getMetamodel
Metamodel getMetamodel()
Returns the value of the 'Metamodel' reference.If the meaning of the 'Metamodel' reference isn't clear, there really should be more of a description here...
Get the metamodel to which this model conforms- Returns:
- the value of the 'Metamodel' reference.
- See Also:
setMetamodel(Metamodel)
,MigrationPackage.getModel_Metamodel()
-
setMetamodel
void setMetamodel(Metamodel value)
Sets the value of the 'Metamodel
' reference.- Parameters:
value
- the new value of the 'Metamodel' reference.- See Also:
getMetamodel()
-
getTypes
org.eclipse.emf.common.util.EList<Type> getTypes()
Returns the value of the 'Types' containment reference list. The list contents are of typeType
. It is bidirectional and its opposite is 'Model
'.If the meaning of the 'Types' containment reference list isn't clear, there really should be more of a description here...
Containers for the classes from which instances exist- Returns:
- the value of the 'Types' containment reference list.
- See Also:
MigrationPackage.getModel_Types()
,Type.getModel()
-
isReflection
boolean isReflection()
Returns the value of the 'Reflection' attribute.If the meaning of the 'Reflection' attribute isn't clear, there really should be more of a description here...
Whether the reflection interface allows to access the real model structure- Returns:
- the value of the 'Reflection' attribute.
- See Also:
setReflection(boolean)
,MigrationPackage.getModel_Reflection()
-
setReflection
void setReflection(boolean value)
Sets the value of the 'Reflection
' attribute.- Parameters:
value
- the new value of the 'Reflection' attribute.- See Also:
isReflection()
-
getResources
org.eclipse.emf.common.util.EList<ModelResource> getResources()
Returns the value of the 'Resources' containment reference list. The list contents are of typeModelResource
. It is bidirectional and its opposite is 'Model
'.If the meaning of the 'Resources' containment reference list isn't clear, there really should be more of a description here...
Resources of which this model consists- Returns:
- the value of the 'Resources' containment reference list.
- See Also:
MigrationPackage.getModel_Resources()
,ModelResource.getModel()
-
getRepository
Repository getRepository()
Returns the value of the 'Repository' container reference. It is bidirectional and its opposite is 'Model
'.If the meaning of the 'Repository' container reference isn't clear, there really should be more of a description here...
Repository to which this model belongs- Returns:
- the value of the 'Repository' container reference.
- See Also:
setRepository(Repository)
,MigrationPackage.getModel_Repository()
,Repository.getModel()
-
setRepository
void setRepository(Repository value)
Sets the value of the 'Repository
' container reference.- Parameters:
value
- the new value of the 'Repository' container reference.- See Also:
getRepository()
-
getAllInstances
org.eclipse.emf.common.util.EList<Instance> getAllInstances(org.eclipse.emf.ecore.EClass eClass)
Get all instances of a class, including all sub classes
-
getInstances
org.eclipse.emf.common.util.EList<Instance> getInstances(org.eclipse.emf.ecore.EClass eClass)
Get all instances of a class, excluding sub classes
-
getType
Type getType(org.eclipse.emf.ecore.EClass eClass)
Get the container for instances that conform to a certain class
-
createExtentMap
Map<org.eclipse.emf.ecore.EClass,Set<Instance>> createExtentMap()
Create a map to access instances by their class
-
newInstance
Instance newInstance(org.eclipse.emf.ecore.EClass eClass)
Create a new instance of a certain class
-
delete
void delete(Instance instance)
Delete an instance from the model, including all the contained instances
-
validate
void validate() throws MigrationException
Validate the model- Throws:
MigrationException
-
checkConformance
void checkConformance() throws MigrationException
Check whether the model conforms to the metamodel- Throws:
MigrationException
-
commit
void commit() throws MigrationException
Commit the changes to the repository, i.e. check conformance and consistency- Throws:
MigrationException
-
getAllInstances
org.eclipse.emf.common.util.EList<Instance> getAllInstances(String className)
Get all instances of a class, including all sub classes
-
getInstances
org.eclipse.emf.common.util.EList<Instance> getInstances(String className)
Get all instances of a class, excluding sub classes
-
newResource
ModelResource newResource(org.eclipse.emf.common.util.URI uri)
Create a new instance of a certain class
-
-