org.eclipse.ohf.stem.core.model
Interface Model
- All Superinterfaces:
- org.eclipse.emf.ecore.EObject, Identifiable, org.eclipse.emf.common.notify.Notifier, SanityChecker
- All Known Implementing Classes:
- ModelImpl
public interface Model
- extends Identifiable
A Model
contains all of the components necessary to create a
canonical Graph
suitable for simulation. In particular it contains a
collection of Graph
's and a collection of other (sub)
Model
's. This structure forms a "tree" with
Model
instances as the tree's root and interior nodes, and
Graph
instances as the tree's leaves.
Each Model
can also contain collection's of Decorator
's
which can modify the canonical Graph
when it is first created from
the model (see getCanonicalGraph(URI)
.
Each Scenario
contains a single reference to a Model
.
That model is the root of the tree the defines the canonical Graph
that will be used for simulation. A Scenario
obtains the canonical
Graph
from the model by calling the method
getCanonicalGraph(URI)
. This method recursively creates the
canonical Graph
by invoking itself on the Model
instances it contains. At each level of the recursion, it combines the
results of those calls with the Graph
's it contains (if any). The
Decorator
s in the model are also then allowed to modify (decorate)
the Graph
. Then, the recursion attempts to resolve any outstanding
unresolved links between Edge
s and Label
s and the
Node
s in the canonical Graph
under construction. This is
accomplished by matching up the "target" URI
s of the unresolved
Edge
s or Label
s with a URI
of a Node
. Any
which cannot be resolved are recorded with a UnresolvedIdentifiable
instance (see Graph.getUnresolvedIdentifiables()
) for later
reporting.
This interface definition is also an "Annotated Java Interface" that defines
one class in a UML "model". The UML class
diagram for the model is in the documentation
folder of the
project. This file and the other interfaces in this Java package are
processed by the Eclipse Modeling Framework (aka EMF http://org.eclipse/emf). to automatically
generate an implementation of the model.
EMF is documented in the book Eclipse
Modeling Framework by Budinsky, et al.
- See Also:
Graph
,
Scenario
Field Summary |
static java.lang.String |
URI_TYPE_MODEL_SEGMENT
This is the segment of the type URI that prefixes all other segments in a
model URI. |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
URI_TYPE_MODEL_SEGMENT
static final java.lang.String URI_TYPE_MODEL_SEGMENT
- This is the segment of the type URI that prefixes all other segments in a
model URI.
- See Also:
- Constant Field Values
getModels
org.eclipse.emf.common.util.EList<Model> getModels()
- Returns:
- this
Model
's collection of (sub)
Model
s
getGraphs
org.eclipse.emf.common.util.EList<Graph> getGraphs()
- Returns:
- this
Model
's collection of Graph
}s
getGraphDecorators
org.eclipse.emf.common.util.EList<GraphDecorator> getGraphDecorators()
- Returns:
- the collection of
Decorator
s that decorate the canonical
Graph
itself. These decorations are Label
s that
act like "global variables" for the canonical Graph
.
getNodeDecorators
org.eclipse.emf.common.util.EList<NodeDecorator> getNodeDecorators()
- Returns:
- the collection of
Decorator
s that decorate the
Node
s in the canonical Graph
.
getEdgeDecorators
org.eclipse.emf.common.util.EList<EdgeDecorator> getEdgeDecorators()
- Returns:
- the collection of
Decorator
s that decorate the
Edge
s in the canonical Graph
.
getCanonicalGraph
Graph getCanonicalGraph(org.eclipse.emf.common.util.URI uri)
- Recursively process any models this model contains to obtain their
canonical
Graph
s. Combine these with any graphs this model
contains to make one aggregate Graph
. Then this
model
's Decorator
s decorate the graph.
- Parameters:
uri
- the URI
of the newly created canonical graph
- Returns:
- the canonical graph of the model