|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.opendse.model.Models
public class Models
The Graphs provides several useful static methods and classes.
| Nested Class Summary | |
|---|---|
static class |
Models.DirectedLink
The DirectedLink is a Link wrapper that contains the
source Resource and destination Resource. |
protected static class |
Models.IsCommunicationPredicate
The IsCommunicationPredicate is a Predicate that returns
true if the task implements the ICommunication interface. |
protected static class |
Models.IsProcessPredicate
The IsCommunicationPredicate is a Predicate that returns
true if the task does not implement the ICommunication interface. |
protected static class |
Models.OnlyCommunicationIterator
The OnlyCommunicationIterator is an iterator for tasks that only
considers communication tasks. |
protected static class |
Models.OnlyProcessIterator
The OnlyCommunicationIterator is an iterator for tasks that only
considers process tasks. |
| Field Summary | |
|---|---|
protected static Models.IsCommunicationPredicate |
isCommunicationPredicate
The instance of the IsCommunicationPredicate class. |
protected static Models.IsProcessPredicate |
isProcessPredicate
The instance of the IsProcessPredicate class. |
| Constructor Summary | |
|---|---|
Models()
|
|
| Method Summary | ||
|---|---|---|
static Specification |
clone(Specification specification)
|
|
static
|
copy(Element element)
|
|
static
|
copy(Mapping<?,?> mapping)
|
|
static Specification |
copy(Specification specification)
|
|
static void |
filter(Specification specification,
java.util.Collection<Function<Task,Dependency>> functions)
|
|
static void |
filterByFunctionName(Specification specification,
java.util.Collection<java.lang.String> functions)
|
|
static void |
filterByFunctionName(Specification specification,
java.lang.String... functions)
|
|
static void |
filterByResources(Specification specification,
java.util.Collection<Resource> resources)
|
|
static java.lang.Iterable<Task> |
filterCommunications(java.lang.Iterable<Task> iterable)
Filters an Iterable such that only communication tasks are
considered. |
|
static java.lang.Iterable<Task> |
filterProcesses(java.lang.Iterable<Task> iterable)
Filters an Iterable such that only process tasks are considered. |
|
static
|
filterType(java.lang.Iterable<E> iterable,
java.lang.String... types)
Returns an Iterable which returns only those Elements
from the given iterable which are of one of the given
types. |
|
static java.util.Set<Element> |
getElements(Specification specification)
Returns all Element objects of a Specification. |
|
static java.util.Map<java.lang.String,Element> |
getElementsMap(Specification specification)
Returns a map of all pairs of ids and the corresponding
Element objects. |
|
static java.util.List<Models.DirectedLink> |
getInLinks(Architecture<Resource,Link> architecture,
Resource r0)
Returns the list of DirectedLink elements that have a given
destination {code Resource}. |
|
static java.util.List<Models.DirectedLink> |
getLinks(Architecture<Resource,Link> architecture)
Returns all DirectedLink elements of an Architecture. |
|
static java.util.List<Models.DirectedLink> |
getLinks(Architecture<Resource,Link> architecture,
Link link)
Returns all DirectedLink elements of an Architecture for
given Link. |
|
static java.util.List<Models.DirectedLink> |
getOutLinks(Architecture<Resource,Link> architecture,
Resource r0)
Returns the list of DirectedLink elements that have a given
source {code Resource}. |
|
static boolean |
isCommunication(Task task)
Returns true if the task is a communication. |
|
static boolean |
isProcess(Task task)
Returns true if the task is a process. |
|
static void |
setAttributes(IAttributes e,
Attributes attributes)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Models.IsCommunicationPredicate isCommunicationPredicate
IsCommunicationPredicate class.
protected static Models.IsProcessPredicate isProcessPredicate
IsProcessPredicate class.
| Constructor Detail |
|---|
public Models()
| Method Detail |
|---|
public static java.lang.Iterable<Task> filterCommunications(java.lang.Iterable<Task> iterable)
Iterable such that only communication tasks are
considered.
iterable - the iterable
public static java.lang.Iterable<Task> filterProcesses(java.lang.Iterable<Task> iterable)
Iterable such that only process tasks are considered.
iterable - the iterable
public static boolean isProcess(Task task)
true if the task is a process.
task - the task
true if the task is a processpublic static boolean isCommunication(Task task)
true if the task is a communication.
task - the task
true if the task is a communication
public static java.util.List<Models.DirectedLink> getOutLinks(Architecture<Resource,Link> architecture,
Resource r0)
DirectedLink elements that have a given
source {code Resource}.
architecture - the architecturer0 - the source
public static java.util.List<Models.DirectedLink> getInLinks(Architecture<Resource,Link> architecture,
Resource r0)
DirectedLink elements that have a given
destination {code Resource}.
architecture - the architecturer0 - the source
public static java.util.List<Models.DirectedLink> getLinks(Architecture<Resource,Link> architecture)
DirectedLink elements of an Architecture.
architecture - the architecture
public static java.util.List<Models.DirectedLink> getLinks(Architecture<Resource,Link> architecture,
Link link)
DirectedLink elements of an Architecture for
given Link.
architecture - the architecturelink - the link
public static java.util.Map<java.lang.String,Element> getElementsMap(Specification specification)
ids and the corresponding
Element objects.
specification - the specification
public static java.util.Set<Element> getElements(Specification specification)
Element objects of a Specification.
specification - the specification
public static <E extends Element> java.lang.Iterable<E> filterType(java.lang.Iterable<E> iterable,
java.lang.String... types)
Iterable which returns only those Elements
from the given iterable which are of one of the given
types.
E - the type of the elementiterable - the iterable over the source elementstypes - the types to filter for
Element.getType()public static Specification copy(Specification specification)
public static <E extends Element> E copy(Element element)
public static <M extends Mapping<?,?>> M copy(Mapping<?,?> mapping)
public static void setAttributes(IAttributes e,
Attributes attributes)
public static Specification clone(Specification specification)
public static void filterByResources(Specification specification,
java.util.Collection<Resource> resources)
public static void filter(Specification specification,
java.util.Collection<Function<Task,Dependency>> functions)
public static void filterByFunctionName(Specification specification,
java.util.Collection<java.lang.String> functions)
public static void filterByFunctionName(Specification specification,
java.lang.String... functions)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||