Class MetamodelExtent
- java.lang.Object
-
- org.eclipse.emf.edapt.internal.common.MetamodelExtent
-
public class MetamodelExtent extends Object
Helper class to administer the extent of a metamodel (root packages, class extents, ...)- Version:
- $Rev$
- Author:
- herrmama, $Author$
-
-
Constructor Summary
Constructors Constructor Description MetamodelExtent()
ConstructorMetamodelExtent(Collection<org.eclipse.emf.ecore.EPackage> rootPackages)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRootPackage(org.eclipse.emf.ecore.EPackage rootPackage)
Add a root packagevoid
addRootPackages(Collection<org.eclipse.emf.ecore.EPackage> rootPackages)
Add a collection of root packagesvoid
addToExtent(Collection<org.eclipse.emf.ecore.EObject> elements)
Add a collection of metamodel elements to the extentvoid
addToExtent(org.eclipse.emf.ecore.EObject element)
Add a metamodel element to the extentvoid
clearExtentMap()
Clear the extent mapvoid
dispose()
Dispose the extentCollection<org.eclipse.emf.ecore.EObject>
getChoiceOfValues(org.eclipse.emf.ecore.EClass type)
Get the extent of a certain typeCollection<org.eclipse.emf.ecore.EPackage>
getRootPackages()
Getter for the root packagesboolean
isConsistent()
Determine whether the metamodel is consistent, i.e.void
removeFromExtent(Collection<org.eclipse.emf.ecore.EObject> elements)
Remove a collection of element from the extentvoid
removeFromExtent(org.eclipse.emf.ecore.EObject element)
Remove a metamodel element from the extentvoid
setRootPackages(Collection<org.eclipse.emf.ecore.EPackage> rootPackages)
Set the collection of root packages
-
-
-
Constructor Detail
-
MetamodelExtent
public MetamodelExtent()
Constructor
-
MetamodelExtent
public MetamodelExtent(Collection<org.eclipse.emf.ecore.EPackage> rootPackages)
Constructor
-
-
Method Detail
-
addRootPackage
public void addRootPackage(org.eclipse.emf.ecore.EPackage rootPackage)
Add a root package- Parameters:
rootPackage
- Root package
-
setRootPackages
public void setRootPackages(Collection<org.eclipse.emf.ecore.EPackage> rootPackages)
Set the collection of root packages- Parameters:
rootPackages
- Collection of root packages
-
addRootPackages
public void addRootPackages(Collection<org.eclipse.emf.ecore.EPackage> rootPackages)
Add a collection of root packages- Parameters:
rootPackages
- Collection of root packages
-
getRootPackages
public Collection<org.eclipse.emf.ecore.EPackage> getRootPackages()
Getter for the root packages- Returns:
- Collection of root packages
-
getChoiceOfValues
public Collection<org.eclipse.emf.ecore.EObject> getChoiceOfValues(org.eclipse.emf.ecore.EClass type)
Get the extent of a certain type- Parameters:
type
- Type- Returns:
- Collection of objects
-
addToExtent
public void addToExtent(Collection<org.eclipse.emf.ecore.EObject> elements)
Add a collection of metamodel elements to the extent
-
addToExtent
public void addToExtent(org.eclipse.emf.ecore.EObject element)
Add a metamodel element to the extent
-
removeFromExtent
public void removeFromExtent(Collection<org.eclipse.emf.ecore.EObject> elements)
Remove a collection of element from the extent- Parameters:
elements
- Collection of objects
-
removeFromExtent
public void removeFromExtent(org.eclipse.emf.ecore.EObject element)
Remove a metamodel element from the extent
-
dispose
public void dispose()
Dispose the extent
-
clearExtentMap
public void clearExtentMap()
Clear the extent map
-
isConsistent
public boolean isConsistent()
Determine whether the metamodel is consistent, i.e. fulfills the constraints defined by the meta-metamodel- Returns:
- true if it is consistent, false otherwise
-
-