org.eclipse.gmt.umlx.eqvtr.cst.environment
Class QVTrUtils
java.lang.Object
org.eclipse.gmt.umlx.eqvtr.cst.environment.QVTrUtils
public class QVTrUtils
- extends java.lang.Object
Method Summary |
static void |
assignIds(org.eclipse.emf.ecore.xmi.XMLResource resource,
java.lang.String xmiIdPrefix)
|
static org.eclipse.ocl.expressions.CollectionKind |
commonCollectionKind(org.eclipse.ocl.expressions.CollectionKind kind1,
org.eclipse.ocl.expressions.CollectionKind kind2)
|
static java.lang.String |
getKindName(org.eclipse.ocl.expressions.CollectionKind collectionKind)
|
static
<T extends org.eclipse.emf.ecore.ENamedElement>
T |
|
getNamedElement(java.util.Collection<T> elements,
java.lang.String name)
|
static
<T extends org.eclipse.emf.ecore.ENamedElement,R extends T>
R |
|
getNamedElement(java.util.Collection<T> elements,
java.lang.String name,
java.lang.Class<R> returnClass)
|
static org.eclipse.emf.ecore.EClassifier |
getOCLCollectionType(org.eclipse.emf.ecore.EClassifier type,
boolean isOrdered,
boolean isUnique)
Obtains the appropriate OCL collection type for an EClassifier ,
according to the collection's orderedness and uniqueness. |
static boolean |
isOrdered(org.eclipse.ocl.expressions.CollectionKind collectionKind)
|
static boolean |
isUnique(org.eclipse.ocl.expressions.CollectionKind collectionKind)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QVTrUtils
public QVTrUtils()
assignIds
public static void assignIds(org.eclipse.emf.ecore.xmi.XMLResource resource,
java.lang.String xmiIdPrefix)
commonCollectionKind
public static org.eclipse.ocl.expressions.CollectionKind commonCollectionKind(org.eclipse.ocl.expressions.CollectionKind kind1,
org.eclipse.ocl.expressions.CollectionKind kind2)
getKindName
public static java.lang.String getKindName(org.eclipse.ocl.expressions.CollectionKind collectionKind)
getNamedElement
public static <T extends org.eclipse.emf.ecore.ENamedElement> T getNamedElement(java.util.Collection<T> elements,
java.lang.String name)
getNamedElement
public static <T extends org.eclipse.emf.ecore.ENamedElement,R extends T> R getNamedElement(java.util.Collection<T> elements,
java.lang.String name,
java.lang.Class<R> returnClass)
getOCLCollectionType
public static org.eclipse.emf.ecore.EClassifier getOCLCollectionType(org.eclipse.emf.ecore.EClassifier type,
boolean isOrdered,
boolean isUnique)
- Obtains the appropriate OCL collection type for an
EClassifier
,
according to the collection's orderedness and uniqueness. The mapping is
as follows:
- ordered, unique: ordered set type
- ordered, non-unique: sequence type
- non-ordered, unique: set type
- non-ordered, non-unique: bag type
Note that the collection's element type
is mapped to an
OCL primitive type where possible.
- Parameters:
type
- the type to get the corresponding OCL collection type forisOrdered
- whether the OCL type should be orderedisUnique
- whether the OCL type should be unique
- Returns:
- the corresponding OCL type
- See Also:
#getOCLType(EClassifier)
isOrdered
public static boolean isOrdered(org.eclipse.ocl.expressions.CollectionKind collectionKind)
isUnique
public static boolean isUnique(org.eclipse.ocl.expressions.CollectionKind collectionKind)