|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jps.util.RSMModel
public class RSMModel
Contains utilities for manipulating UML model elements.
Constructor Summary | |
---|---|
RSMModel()
|
Method Summary | |
---|---|
static org.eclipse.uml2.uml.Profile |
applyProfile(org.eclipse.uml2.uml.Package inToPkg,
java.lang.String inExtension,
java.lang.String inProfileName)
applyProfile will apply the specified profile to the specified package (typically a model) if it is not already applied. |
static boolean |
areNamespacesDependent(org.eclipse.uml2.uml.Namespace inFrom,
org.eclipse.uml2.uml.Namespace inTo)
arePackagesDependent determines whether or not the client Namespace ('from') depends on the supplier Namespace ('to'). |
static boolean |
areOperationsEqual(org.eclipse.uml2.uml.Operation op1,
org.eclipse.uml2.uml.Operation op2)
Checks if two operations are equal. |
static boolean |
classContainsOperation(org.eclipse.uml2.uml.Class cls,
org.eclipse.uml2.uml.Operation op)
Checks if a class contains the specified operation |
static boolean |
classifierDependsOn(org.eclipse.uml2.uml.Classifier inElt,
org.eclipse.uml2.uml.Namespace inNS)
dependsOn determines if the input element (inElt) depends on the target namespace (inNS), i.e. if inElt has a relationship with any element belonging to the target namespace. |
static boolean |
containedIn(java.lang.String source,
java.lang.String target)
containedIn determines if the 'source' package is contained in the 'target' package. |
static void |
copyOperation(org.eclipse.uml2.uml.Operation inOp,
org.eclipse.uml2.uml.Interface inInt)
Copies the specified operation to the target interface |
static org.eclipse.uml2.uml.Package |
createPackageHierarchy(org.eclipse.uml2.uml.Package inRootPkg,
java.lang.String inFromQualifiedName)
createPackageHierarchy takes as an input a qualified name like 'model::package1::package2::namedelement' and will generate under the specified root package (inRootPkg) the following package hierarchy: (root package) .....package1 ..........package2 The 'model' prefix in the qualified name is ignored, as well as the 'namedelement' suffix. |
static org.eclipse.uml2.uml.Abstraction |
createTrace(org.eclipse.uml2.uml.NamedElement inFrom,
org.eclipse.uml2.uml.NamedElement inTo)
Creates a < |
static boolean |
dependencyExists(org.eclipse.uml2.uml.Namespace inFrom,
org.eclipse.uml2.uml.Namespace inTo)
dependencyExists returns true if there is a dependency relationship whether explicit or implicit. |
static java.util.List<org.eclipse.uml2.uml.Actor> |
findAssociatedActors(org.eclipse.emf.ecore.EObject inObj,
org.eclipse.uml2.uml.UseCase inUC)
Returns of list of actors associated with the specified use case. |
static java.util.List<RSMRelation> |
findClients(org.eclipse.emf.ecore.EObject inObj,
org.eclipse.uml2.uml.Classifier inCl)
Returns the clients of the specified classifier. |
static org.eclipse.uml2.uml.Element |
findElement(org.eclipse.uml2.uml.Package inPkg,
org.eclipse.emf.ecore.EClass inElementKind,
java.lang.String inElementName)
Finds a named element of a given type in the specified package. |
static java.util.List<org.eclipse.emf.ecore.EObject> |
findElements(org.eclipse.emf.ecore.EObject inObj,
org.eclipse.emf.ecore.EClass inElementKind)
Finds recursively all elements of the specified kind within the specified object. |
static java.util.List<org.eclipse.uml2.uml.Element> |
findElements(org.eclipse.uml2.uml.Package inPkg,
org.eclipse.emf.ecore.EClass inElementKind,
java.lang.String inElementName)
Finds elements of a given type with a given name in the specified package. |
static java.util.List<org.eclipse.uml2.uml.Element> |
findLinkedElement(org.eclipse.uml2.uml.Package inPkg,
org.eclipse.emf.ecore.EClass inElementKind,
org.eclipse.emf.ecore.EClass inRelationKind,
java.lang.String inElementName,
boolean recursiveSearch)
Finds objects of a given type linked through relationships of the specified kind to the specified named element. |
static org.eclipse.uml2.uml.Profile |
findProfile(java.lang.String inExtension,
java.lang.String inProfileName)
|
static java.util.List<RSMRelation> |
findSuppliers(org.eclipse.emf.ecore.EObject inObj,
org.eclipse.uml2.uml.Classifier inCl)
|
static org.eclipse.uml2.uml.Abstraction |
findTrace(org.eclipse.uml2.uml.NamedElement inFrom,
org.eclipse.uml2.uml.NamedElement inTo)
|
static java.lang.String |
getBasicInfo(org.eclipse.emf.ecore.EObject elt)
|
static java.util.List<RSMRelation> |
getDependencies(org.eclipse.uml2.uml.NamedElement inNE)
|
static java.lang.String |
getDocumentation(org.eclipse.uml2.uml.Element from)
|
static org.eclipse.uml2.uml.NamedElement |
getElementByQualifiedName(org.eclipse.uml2.uml.Package inPkg,
java.lang.String elementQualifiedName)
|
static org.eclipse.uml2.uml.Model |
getModel(org.eclipse.uml2.uml.Element elt)
|
static org.eclipse.core.resources.IResource |
getModelResource(org.eclipse.uml2.uml.NamedElement elt)
|
static java.lang.String |
getNameWithoutModel(java.lang.String name)
|
static java.util.List<RSMRelation> |
getRelations(org.eclipse.uml2.uml.Classifier inCl)
|
static java.lang.String |
getStereotypes(org.eclipse.uml2.uml.Element elt)
|
static boolean |
haveSameSignature(org.eclipse.uml2.uml.Operation op1,
org.eclipse.uml2.uml.Operation op2)
Checks if two operations have the same signature. |
static boolean |
haveSameSignature(org.eclipse.uml2.uml.Parameter p1,
org.eclipse.uml2.uml.Parameter p2)
Checks if two parameters have the same signature. |
static boolean |
interfaceContainsOperation(org.eclipse.uml2.uml.Interface inInt,
org.eclipse.uml2.uml.Operation inOp)
Checks if a interface contains the specified operation |
static void |
setDocumentation(org.eclipse.uml2.uml.NamedElement to,
java.lang.String text)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RSMModel()
Method Detail |
---|
public static org.eclipse.uml2.uml.Profile applyProfile(org.eclipse.uml2.uml.Package inToPkg, java.lang.String inExtension, java.lang.String inProfileName)
inToPkg
- The package to apply the profile toinExtension
- The name of the extension containing the profile (e.g. the RUP Analysis profile is
found in 'com.ibm.xtools.modeler.ui.templates')inProfileName
- The profile name (e.g. the RUP Analysis profile is called 'Analysis Profile')
public static boolean areNamespacesDependent(org.eclipse.uml2.uml.Namespace inFrom, org.eclipse.uml2.uml.Namespace inTo)
inFrom
- The client NamespaceinTo
- The supplier Namespace
public static boolean areOperationsEqual(org.eclipse.uml2.uml.Operation op1, org.eclipse.uml2.uml.Operation op2)
op1
- The first operationop2
- The second operation
public static boolean classContainsOperation(org.eclipse.uml2.uml.Class cls, org.eclipse.uml2.uml.Operation op)
cls
- The class to be searched for the presence of the specified operation.op
- The operation
public static boolean classifierDependsOn(org.eclipse.uml2.uml.Classifier inElt, org.eclipse.uml2.uml.Namespace inNS)
inElt
- The input elementinNS
- The target namespace
public static boolean containedIn(java.lang.String source, java.lang.String target)
String
- sourceString
- target
public static void copyOperation(org.eclipse.uml2.uml.Operation inOp, org.eclipse.uml2.uml.Interface inInt)
inOp
- The operation to duplicateinInt
- The target interfacepublic static org.eclipse.uml2.uml.Package createPackageHierarchy(org.eclipse.uml2.uml.Package inRootPkg, java.lang.String inFromQualifiedName)
The 'model' prefix in the qualified name is ignored, as well as the 'namedelement' suffix. createPackageHierarchy will return the last package in the hierarchy (package2 in the example, or the root package if the input qualified name is something like 'model::namedelement'.
createPackageHierarchy is typically used to duplicate a package hierarchy from an input model to a target model.
inRootPkg
- The root package under which the package hierarchy should be createdinFromQualifiedName
- Q full qualified name such as 'model::package1::package2::namedelement'
public static org.eclipse.uml2.uml.Abstraction createTrace(org.eclipse.uml2.uml.NamedElement inFrom, org.eclipse.uml2.uml.NamedElement inTo)
inFrom
- The client elementinTo
- The supplier element
public static boolean dependencyExists(org.eclipse.uml2.uml.Namespace inFrom, org.eclipse.uml2.uml.Namespace inTo)
inFrom
- The client namespaceinTo
- The supplier namespace
public static java.util.List<org.eclipse.uml2.uml.Actor> findAssociatedActors(org.eclipse.emf.ecore.EObject inObj, org.eclipse.uml2.uml.UseCase inUC)
inObj
- The Ecore object containing the possible associations (typically the whole model)inUC
- The referenced use case
public static java.util.List<RSMRelation> findClients(org.eclipse.emf.ecore.EObject inObj, org.eclipse.uml2.uml.Classifier inCl)
inObj
- The Ecore object to searchinCl
- The input classifier
public static org.eclipse.uml2.uml.Element findElement(org.eclipse.uml2.uml.Package inPkg, org.eclipse.emf.ecore.EClass inElementKind, java.lang.String inElementName)
inPkg
- The package to search intoinElementKind
- The kind of elementinElementName
- The name of the element
public static java.util.List<org.eclipse.emf.ecore.EObject> findElements(org.eclipse.emf.ecore.EObject inObj, org.eclipse.emf.ecore.EClass inElementKind)
inObj
- The object to search intoinElementKind
- The kind of element
public static java.util.List<org.eclipse.uml2.uml.Element> findElements(org.eclipse.uml2.uml.Package inPkg, org.eclipse.emf.ecore.EClass inElementKind, java.lang.String inElementName)
inPkg
- The package to search intoinElementKind
- The kind of elementinElementName
- The name of the element
public static java.util.List<org.eclipse.uml2.uml.Element> findLinkedElement(org.eclipse.uml2.uml.Package inPkg, org.eclipse.emf.ecore.EClass inElementKind, org.eclipse.emf.ecore.EClass inRelationKind, java.lang.String inElementName, boolean recursiveSearch)
inPkg
- inElementKind
- inRelationKind
- inElementName
- recursiveSearch
-
public static org.eclipse.uml2.uml.Profile findProfile(java.lang.String inExtension, java.lang.String inProfileName)
inExtension
- inProfileName
-
public static java.util.List<RSMRelation> findSuppliers(org.eclipse.emf.ecore.EObject inObj, org.eclipse.uml2.uml.Classifier inCl)
inObj
- inCl
-
public static org.eclipse.uml2.uml.Abstraction findTrace(org.eclipse.uml2.uml.NamedElement inFrom, org.eclipse.uml2.uml.NamedElement inTo)
inFrom
- inTo
-
public static java.lang.String getBasicInfo(org.eclipse.emf.ecore.EObject elt)
elt
-
public static java.util.List<RSMRelation> getDependencies(org.eclipse.uml2.uml.NamedElement inNE)
inNE
-
public static java.lang.String getDocumentation(org.eclipse.uml2.uml.Element from)
from
-
public static org.eclipse.uml2.uml.NamedElement getElementByQualifiedName(org.eclipse.uml2.uml.Package inPkg, java.lang.String elementQualifiedName)
inPkg
- elementQualifiedName
-
public static org.eclipse.uml2.uml.Model getModel(org.eclipse.uml2.uml.Element elt)
elt
-
public static org.eclipse.core.resources.IResource getModelResource(org.eclipse.uml2.uml.NamedElement elt)
elt
-
public static java.lang.String getNameWithoutModel(java.lang.String name)
name
-
public static java.util.List<RSMRelation> getRelations(org.eclipse.uml2.uml.Classifier inCl)
inCl
-
public static java.lang.String getStereotypes(org.eclipse.uml2.uml.Element elt)
elt
-
public static boolean haveSameSignature(org.eclipse.uml2.uml.Operation op1, org.eclipse.uml2.uml.Operation op2)
op1
- First operationop2
- Second operation
public static boolean haveSameSignature(org.eclipse.uml2.uml.Parameter p1, org.eclipse.uml2.uml.Parameter p2)
null
, the parameters are defined to have the same signature only if their
directions are the same.
p1
- First parameterp2
- Second parameter
public static boolean interfaceContainsOperation(org.eclipse.uml2.uml.Interface inInt, org.eclipse.uml2.uml.Operation inOp)
cls
- The interface to be searched for the presence of the specified operation.inOp
- The operation
public static void setDocumentation(org.eclipse.uml2.uml.NamedElement to, java.lang.String text)
to
- text
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |