Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.app.model.util
Class RelationshipsHelper

java.lang.Object
  extended by com.ibm.etools.systems.app.model.util.RelationshipsHelper

public class RelationshipsHelper
extends Object

Helper class for working with Relationships in the model


Field Summary
static String copyright
           
 
Constructor Summary
RelationshipsHelper()
           
 
Method Summary
static List<Relationship> getPrimaryRelationships(Artifact source, Artifact target)
          Return a list of Relationships whose artifacts at both ends are children ( direct or indirect ) of given source and target artifacts.
static List<Relationship> getRelationshipsBySource(Artifact artifact, Class[] classtypes)
          Return a list of relationships based on the specified source and type
static List<Relationship> getRelationshipsByTarget(Artifact artifact, Class[] classtypes)
          Return a list of relationships based on the specified target and type
static List<Artifact> getSources(Artifact target, Class classtype)
          Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.
static List<Artifact> getSources(Artifact target, Class[] classtypes)
          Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.
static List<Artifact> getTargets(Artifact source, Class classtype)
          Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.
static List<Artifact> getTargets(Artifact source, Class[] classtypes)
          Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.
static boolean hasRelation(Artifact artifact)
          Check if the given element is soure or target of any relationship.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

RelationshipsHelper

public RelationshipsHelper()
Method Detail

getTargets

public static List<Artifact> getTargets(Artifact source,
                                        Class[] classtypes)
Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.


getTargets

public static List<Artifact> getTargets(Artifact source,
                                        Class classtype)
Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.


getSources

public static List<Artifact> getSources(Artifact target,
                                        Class[] classtypes)
Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.


getSources

public static List<Artifact> getSources(Artifact target,
                                        Class classtype)
Return a list of Artifacts which are targets from Relationships of the specified class type and whose source is the specified artifact.


getPrimaryRelationships

public static List<Relationship> getPrimaryRelationships(Artifact source,
                                                         Artifact target)
Return a list of Relationships whose artifacts at both ends are children ( direct or indirect ) of given source and target artifacts.


hasRelation

public static boolean hasRelation(Artifact artifact)
Check if the given element is soure or target of any relationship.


getRelationshipsBySource

public static List<Relationship> getRelationshipsBySource(Artifact artifact,
                                                          Class[] classtypes)
Return a list of relationships based on the specified source and type


getRelationshipsByTarget

public static List<Relationship> getRelationshipsByTarget(Artifact artifact,
                                                          Class[] classtypes)
Return a list of relationships based on the specified target and type


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.