|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ocl.uml.util.UMLTypeUtil
Utility methods for working with the annotations that extend the Ecore model to implement certain UML semantics required by OCL.
Field Summary | |
---|---|
static java.lang.String |
ANNOTATION_URI_ASSOCIATION_CLASS
Annotation that stores the reference to the EClass representing
an association class that includes an EReference as a member end. |
static java.lang.String |
ANNOTATION_URI_CLASSIFIER
Annotation that indicates what kind of a UML classifier is an EClass . |
static java.lang.String |
ANNOTATION_URI_MEMBER_ENDS
Annotation that stores references to which of the EReference s
of an EClass representing an association class are its
member ends. |
static java.lang.String |
ANNOTATION_URI_OPERATION
Annotation that stores details of the nature of a UML operation (modeled as an EOperation ). |
static java.lang.String |
ANNOTATION_URI_QUALIFIERS
Annotation that stores qualifiers (if any) of a UML association end (modeled as an EReference ). |
static java.lang.String |
ANNOTATION_URI_SIGNALS
Annotation that stores references to EClass es representing
signals that an EClass can receive. |
Method Summary | |
---|---|
static void |
addMemberEnd(org.eclipse.emf.ecore.EClass associationClass,
org.eclipse.emf.ecore.EReference memberEnd)
Adds a member end to an EMF classifier representing a UML association class. |
static void |
addQualifier(org.eclipse.emf.ecore.EStructuralFeature property,
org.eclipse.emf.ecore.EStructuralFeature qualifier)
Adds a UML qualifier to the specified property. |
static void |
addSignal(org.eclipse.emf.ecore.EClass eclass,
org.eclipse.emf.ecore.EClass signal)
Adds a UML signal that the specified classifier can receive. |
static org.eclipse.emf.ecore.EClass |
getAssociationClass(org.eclipse.emf.ecore.EReference reference)
Obtains the EClass representing the "class" aspect of the
UML association class that the specified EReference represents. |
static org.eclipse.emf.common.util.EList |
getMemberEnds(org.eclipse.emf.ecore.EClass associationClass)
Obtains the member ends of an EMF classifier representing a UML association class. |
static org.eclipse.emf.ecore.EStructuralFeature |
getProperty(org.eclipse.emf.ecore.EStructuralFeature qualifier)
Queries the property that has the specified qualifier, if any. |
static org.eclipse.emf.common.util.EList |
getQualifiers(org.eclipse.emf.ecore.EStructuralFeature property)
Obtains the UML qualifiers, if any, associated with the specified property. |
static org.eclipse.emf.common.util.EList |
getSignals(org.eclipse.emf.ecore.EClass eclass)
Obtains the UML signals that the specified classifier can receive, if any. |
static boolean |
isAssociationClass(org.eclipse.emf.ecore.EClassifier classifier)
Queries whether the specified classifier represents a UML association class. |
static boolean |
isClass(org.eclipse.emf.ecore.EClassifier classifier)
Queries whether the specified classifier represents a UML class. |
static boolean |
isDataType(org.eclipse.emf.ecore.EClassifier classifier)
Queries whether the specified classifier represents a UML data type. |
static boolean |
isEnumeration(org.eclipse.emf.ecore.EClassifier classifier)
Queries whether the specified classifier represents a UML enumeration. |
static boolean |
isQuery(org.eclipse.emf.ecore.EOperation operation)
Queries whether the specified operation is a query (side-effect free). |
static boolean |
isSignal(org.eclipse.emf.ecore.EClassifier classifier)
Queries whether the specified classifier represents a UML signal. |
static void |
setAssociationClass(org.eclipse.emf.ecore.EClassifier classifier,
boolean isAssociationClass)
Sets whether the specified classifier represents a UML association class. |
static void |
setAssociationClass(org.eclipse.emf.ecore.EReference reference,
org.eclipse.emf.ecore.EClass associationClass)
Sets the association class that an EReference represents (in its role of a UML association). |
static void |
setClass(org.eclipse.emf.ecore.EClassifier classifier,
boolean isClass)
Sets whether the specified classifier represents a UML class. |
static void |
setDataType(org.eclipse.emf.ecore.EClassifier classifier,
boolean isDataType)
Sets whether the specified classifier represents a UML data type. |
static void |
setEnumeration(org.eclipse.emf.ecore.EClassifier classifier,
boolean isEnumeration)
Sets whether the specified classifier represents a UML enumeration. |
static void |
setQuery(org.eclipse.emf.ecore.EOperation operation,
boolean isQuery)
Sets whether the specified operation is a query (side-effect free). |
static void |
setSignal(org.eclipse.emf.ecore.EClassifier classifier,
boolean isSignal)
Sets whether the specified classifier represents a UML signal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ANNOTATION_URI_CLASSIFIER
EClass
. The details map has a "kind"
key mapping
to one of the following values:
"AssociationClass"
- indicates association class"Signal"
- indicates signal"Class"
- indicates class (implicit for EClass
es)"DataType"
- indicates data type (implicit for EDataType
s"Enumeration"
- indicates enumeration (implicit for EEnum
s
public static final java.lang.String ANNOTATION_URI_MEMBER_ENDS
EReference
s
of an EClass
representing an association class are its
member ends.
public static final java.lang.String ANNOTATION_URI_ASSOCIATION_CLASS
EClass
representing
an association class that includes an EReference
as a member end.
public static final java.lang.String ANNOTATION_URI_OPERATION
EOperation
). The details map supports the
following keys:
"isQuery"
- value "true" or "false" according to whether
the operation is a query (side-effect-free) operation
public static final java.lang.String ANNOTATION_URI_QUALIFIERS
EReference
). The qualifiers are
EStructuralFeature
s in the annotation's contents list.
public static final java.lang.String ANNOTATION_URI_SIGNALS
EClass
es representing
signals that an EClass
can receive.
Method Detail |
public static boolean isSignal(org.eclipse.emf.ecore.EClassifier classifier)
classifier
- an OCL type
public static boolean isAssociationClass(org.eclipse.emf.ecore.EClassifier classifier)
classifier
- an OCL type
public static boolean isClass(org.eclipse.emf.ecore.EClassifier classifier)
classifier
- an OCL type
public static boolean isDataType(org.eclipse.emf.ecore.EClassifier classifier)
classifier
- an OCL type
public static boolean isEnumeration(org.eclipse.emf.ecore.EClassifier classifier)
classifier
- an OCL type
public static boolean isQuery(org.eclipse.emf.ecore.EOperation operation)
public static org.eclipse.emf.common.util.EList getMemberEnds(org.eclipse.emf.ecore.EClass associationClass)
associationClass
- representation of a UML association class
EReference
sUMLTypeUtil.isAssociationClass(EClassifier)
,
UMLTypeUtil.getAssociationClass(EReference)
public static org.eclipse.emf.ecore.EClass getAssociationClass(org.eclipse.emf.ecore.EReference reference)
EClass
representing the "class" aspect of the
UML association class that the specified EReference
represents.
reference
- an association class reference
UMLTypeUtil.getMemberEnds(EClass)
,
UMLTypeUtil.isAssociationClass(EClassifier)
public static org.eclipse.emf.common.util.EList getQualifiers(org.eclipse.emf.ecore.EStructuralFeature property)
property
- the representation of a UML property
EStructuralFeature
s, if anypublic static org.eclipse.emf.ecore.EStructuralFeature getProperty(org.eclipse.emf.ecore.EStructuralFeature qualifier)
qualifier
- a UML qualifier
null
if nonepublic static org.eclipse.emf.common.util.EList getSignals(org.eclipse.emf.ecore.EClass eclass)
eclass
- an OCL type
EClass
es, if anypublic static void setSignal(org.eclipse.emf.ecore.EClassifier classifier, boolean isSignal)
classifier
- an OCL typeisSignal
- whether it represents a UML signalpublic static void setAssociationClass(org.eclipse.emf.ecore.EClassifier classifier, boolean isAssociationClass)
classifier
- an OCL typeisAssociationClass
- whether it represents a UML association classpublic static void setClass(org.eclipse.emf.ecore.EClassifier classifier, boolean isClass)
classifier
- an OCL typeisClass
- whether it represents a UML classpublic static void setDataType(org.eclipse.emf.ecore.EClassifier classifier, boolean isDataType)
classifier
- an OCL typeisDataType
- whether it represents a UML data typepublic static void setEnumeration(org.eclipse.emf.ecore.EClassifier classifier, boolean isEnumeration)
classifier
- an OCL typeisEnumeration
- whether it represents a UML enumerationpublic static void setQuery(org.eclipse.emf.ecore.EOperation operation, boolean isQuery)
isQuery
- whether it represents a query operationpublic static void addMemberEnd(org.eclipse.emf.ecore.EClass associationClass, org.eclipse.emf.ecore.EReference memberEnd)
associationClass
- representation of a UML association classmemberEnd
- the member end to addUMLTypeUtil.isAssociationClass(EClassifier)
,
UMLTypeUtil.getAssociationClass(EReference)
public static void setAssociationClass(org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass associationClass)
reference
actually represents the association class.
reference
- a reference representing a UML association classassociationClass
- the Ecore representation of the association class's class-nesspublic static void addQualifier(org.eclipse.emf.ecore.EStructuralFeature property, org.eclipse.emf.ecore.EStructuralFeature qualifier)
property
- the representation of a UML propertyqualifier
- a qualifier to addpublic static void addSignal(org.eclipse.emf.ecore.EClass eclass, org.eclipse.emf.ecore.EClass signal)
eclass
- an OCL typesignal
- a signal that it can receive
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |