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 Decorators in the model are also then allowed to modify (decorate) the Graph. Then, the recursion attempts to resolve any outstanding unresolved links between Edges and Labels and the Nodes in the canonical Graph under construction. This is accomplished by matching up the "target" URIs of the unresolved Edges or Labels 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.
 
Method Summary
 Graph getCanonicalGraph(org.eclipse.emf.common.util.URI uri)
          Recursively process any models this model contains to obtain their canonical Graphs.
 org.eclipse.emf.common.util.EList<EdgeDecorator> getEdgeDecorators()
           
 org.eclipse.emf.common.util.EList<GraphDecorator> getGraphDecorators()
           
 org.eclipse.emf.common.util.EList<Graph> getGraphs()
           
 org.eclipse.emf.common.util.EList<Model> getModels()
           
 org.eclipse.emf.common.util.EList<NodeDecorator> getNodeDecorators()
           
 
Methods inherited from interface org.eclipse.ohf.stem.core.common.Identifiable
getDublinCore, getTypeURI, getURI, sane, setDublinCore, setTypeURI, setURI
 
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
 

Field Detail

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
Method Detail

getModels

org.eclipse.emf.common.util.EList<Model> getModels()
Returns:
this Model's collection of (sub) Models

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 Decorators that decorate the canonical Graph itself. These decorations are Labels that act like "global variables" for the canonical Graph.

getNodeDecorators

org.eclipse.emf.common.util.EList<NodeDecorator> getNodeDecorators()
Returns:
the collection of Decorators that decorate the Nodes in the canonical Graph.

getEdgeDecorators

org.eclipse.emf.common.util.EList<EdgeDecorator> getEdgeDecorators()
Returns:
the collection of Decorators that decorate the Edges 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 Graphs. Combine these with any graphs this model contains to make one aggregate Graph. Then this model's Decorators decorate the graph.

Parameters:
uri - the URI of the newly created canonical graph
Returns:
the canonical graph of the model