|
IBM Rational UML Modeling | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.xtools.traceability.internal.TrcObject
com.ibm.xtools.traceability.internal.TrcDependency
com.ibm.xtools.traceability.TraceRelationship
public class TraceRelationship
The TraceRelationship represents a relationship of the results of the Model Query Command.
It could represent one of the following:
ModelQueryCommand.getResults()| Field Summary | |
|---|---|
static int |
TYPE_IMPLIED_ACCESS_VIOLATION
TYPE_IMPLIED_ACCESS_VIOLATION: implied relationship and there is an access violation. |
static int |
TYPE_IMPLIED_REFINE
TYPE_IMPLIED_REFINE: Implied Refine relationship. |
static int |
TYPE_IMPLIED_USAGE
TYPE_IMPLIED_USAGE: Implied Usage relationship. |
static int |
TYPE_NONE
TYPE_NONE: None type. |
static int |
TYPE_REQPRO_LINK
TYPE_REQPRO_LINK: This relationship represents a link between UML element and ReqPro element. |
static int |
TYPE_UML
TYPE_UML: This relationship represents a UML Relationship. |
static int |
TYPE_URL_LINK
Represents a URL based Link. |
| Fields inherited from class com.ibm.xtools.traceability.internal.TrcDependency |
|---|
CLIENT, SUPPLIER |
| Constructor Summary | |
|---|---|
TraceRelationship(EObject source,
EObject target,
int type)
Deprecated. |
|
TraceRelationship(EObject semanticElement,
String semanticHint,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
|
|
TraceRelationship(EObject semanticElement,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
|
|
TraceRelationship(Relationship umlRelationship)
Deprecated. |
|
TraceRelationship(String semanticHint,
String label,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
|
|
TraceRelationship(String semanticHint,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
|
|
| Method Summary | |
|---|---|
Object |
getAdapter(Class adapter)
Returns the wrapped UML relationship. |
EObject |
getSource()
Returns the source element of this relationship. |
EObject |
getTarget()
Returns the target element of this relationship. |
int |
getType()
Return the type of this relationship. |
void |
setType(int type)
Set the type of this relationship. |
| Methods inherited from class com.ibm.xtools.traceability.internal.TrcDependency |
|---|
equals, getClient, getNode, getSupplier, hashCode, isTraceRelationship, setClient, setSupplier, setTraceRelationship, toString, toStringImpl |
| Methods inherited from class com.ibm.xtools.traceability.internal.TrcObject |
|---|
getLabel, getSemanticElement, getSemanticHint, setLabel, setSemanticElement, setSemanticHint |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_NONE
public static final int TYPE_IMPLIED_REFINE
public static final int TYPE_IMPLIED_USAGE
public static final int TYPE_IMPLIED_ACCESS_VIOLATION
If the TraceRelationship type is set to this value, this relationship is an implied relationship and there is access violation.
You could solve this problem by doing one of the following:
public static final int TYPE_REQPRO_LINK
public static final int TYPE_UML
public static final int TYPE_URL_LINK
| Constructor Detail |
|---|
public TraceRelationship(EObject semanticElement,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
public TraceRelationship(EObject semanticElement,
String semanticHint,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
public TraceRelationship(String semanticHint,
String label,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
public TraceRelationship(String semanticHint,
com.ibm.xtools.traceability.internal.TrcNode client,
com.ibm.xtools.traceability.internal.TrcNode supplier)
public TraceRelationship(Relationship umlRelationship)
umlRelationship - UML relationship.
public TraceRelationship(EObject source,
EObject target,
int type)
source - the source elementtarget - the target elementtype - the type of the relationship. It could be set to any value of
the TYPE_xxx contants.| Method Detail |
|---|
public EObject getSource()
If the type of this relationship is TYPE_UML, it will return the first source element of the UML Relationship sources. To get the whole list of sources of the UML relationship, you can get it directly from the wrapped UML relationship.
To get the UML Relationship element call:
public EObject getTarget()
If the type of this relationship is TYPE_UML, it will return the first target element of the UML Relationship targets. To get the whole list of sources of the UML relationship, you can get it directly from the wrapped UML relationship.
To get the UML Relationship element call:
public int getType()
public void setType(int type)
type - any value of the TYPE_xxx constantspublic Object getAdapter(Class adapter)
getAdapter in interface IAdaptableadapter - if it is set to Relationship.class, it will return the wrapped
UML Relationship.
IAdaptable.getAdapter(java.lang.Class)
|
IBM Rational UML Modeling | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||