|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.model.GraphModelFactory
This class and its abstract methods represent the interface to
factories that are responsible for creating Graph
model elements.
You may not create instances of a GraphModelFactory
directly. Rather you must instantiate a concrete class derived
from this one, best done by calling the static method
newInstance found in this class. Our implementation
returns a global instance that can be shared by multiple clients.
This class provides several static helper methods that create
default model elements. You must pass in a GraphModelFactory
instance to do so, however.
Instances of this class that are dereferenced will be garbage collected.
This class depends on concrete, derived classes which can be instantiated.
Graph,
Node,
Edge,
Port,
PortDenotation,
Subgraph,
NodeInfo,
EdgeInfo| Constructor Summary | |
GraphModelFactory()
Constructs a default instance of GraphModelFactory |
|
| Method Summary | |
static Node |
makeDefaultNode(GraphModelFactory factory,
java.lang.String label)
Creates a new Node using the given
GraphModelFactory instance and the given name. |
static Node |
makeDefaultNode(GraphModelFactory factory,
java.lang.String label,
NodeInfo info)
Utility method that creates a default node. |
abstract Edge |
newEdge(Node source,
Node target)
Constructs and returns an Edge object. |
abstract Edge |
newEdge(Node source,
Node target,
EdgeInfo info)
Constructs and returns an Edge object. |
abstract Graph |
newGraph()
Constructs and returns a Graph object. |
static GraphModelFactory |
newInstance()
This method returns a shared instance of the actual GraphModelFactory implementation. |
abstract Node |
newNode(java.lang.String label,
java.util.List ports)
Creates a new Node object with the specified name. |
abstract Node |
newNode(java.lang.String label,
java.util.List ports,
NodeInfo info)
Constructs and returns a node object. |
abstract Port |
newPort(PortDenotation denotation)
Constructs and returns a new Port object. |
abstract PortDenotation |
newPortDenotation(java.lang.String name)
Constructs and returns a new PortDenotation object. |
abstract PortDenotation |
newPortDenotation(java.lang.String name,
boolean inputPort,
boolean outputPort)
Constructs and returns a new PortDenotation object. |
abstract PortDenotation |
newPortDenotation(java.lang.String name,
boolean hierarchicalPort,
boolean inputPort,
boolean outputPort,
int inputCardinality,
int outputCardinality)
Constructs and returns a new PortDenotation object. |
abstract PortDenotation |
newPortDenotation(java.lang.String name,
boolean hierarchicalPort,
boolean inputPort,
boolean outputPort,
int inputCardinality,
int outputCardinality,
int inputAcceptLevel,
int outputAcceptLevel)
|
abstract PortDenotation |
newPortDenotation(java.lang.String name,
boolean inputPort,
boolean outputPort,
int inputCardinality,
int outputCardinality)
Constructs and returns a new PortDenotation object. |
abstract Subgraph |
newSubgraph(java.lang.String label,
Graph graph)
Constructs and returns a new Subgraph object. |
abstract Subgraph |
newSubgraph(java.lang.String label,
NodeInfo info,
Graph graph)
Constructs and returns a new Subgraph object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GraphModelFactory()
GraphModelFactory
| Method Detail |
public abstract PortDenotation newPortDenotation(java.lang.String name)
PortDenotation object. To get
more information about the usage of them please see the documentation
of PortDenotation.
name - the name for the PortDenotation
PortDenotation instance.
public abstract PortDenotation newPortDenotation(java.lang.String name,
boolean inputPort,
boolean outputPort)
PortDenotation object. To get
more information about the usage of them please see the documentation
of PortDenotation.
name - the name for the PortDenotationinputPort - set to true if the port allows incoming edges.outputPort - set to true if the port allows outgoing edges.
PortDenotation instance.
public abstract PortDenotation newPortDenotation(java.lang.String name,
boolean inputPort,
boolean outputPort,
int inputCardinality,
int outputCardinality)
PortDenotation object. To get
more information about the usage of them please see the documentation
of PortDenotation.
name - the name for the PortDenotationinputPort - set to true if the port allows incoming edgesoutputPort - set to true if the port allows outgoing edgesinputCardinality - maximum input cardinality, 0 means unlimitedoutputCardinality - maximum output cardinality, 0 means unlimited
PortDenotation instance.
public abstract PortDenotation newPortDenotation(java.lang.String name,
boolean hierarchicalPort,
boolean inputPort,
boolean outputPort,
int inputCardinality,
int outputCardinality)
PortDenotation object. To get
more information about the usage of them please see the documentation
of PortDenotation.
name - the name for the PortDenotationhierarchicalPort - indicates whether this port should be wrapped
by a VisualSubgraph or notinputPort - set to true if the port allows incoming edgesoutputPort - set to true if the port allows outgoing edgesinputCardinality - maximum input cardinality, 0 means unlimitedoutputCardinality - maximum output cardinality, 0 means unlimited
PortDenotation instance
public abstract PortDenotation newPortDenotation(java.lang.String name,
boolean hierarchicalPort,
boolean inputPort,
boolean outputPort,
int inputCardinality,
int outputCardinality,
int inputAcceptLevel,
int outputAcceptLevel)
public abstract Port newPort(PortDenotation denotation)
Port object. To get more
information about the meaning and usage of them please see the
documentation of Port.
denotation - the PortDenotation to assign to the port
Port
public abstract Node newNode(java.lang.String label,
java.util.List ports)
Node object with the specified name. The
Node contains the given Ports.
label - the label string for the node.ports - a list of ports to assign to the newly created Node.
public abstract Node newNode(java.lang.String label,
java.util.List ports,
NodeInfo info)
label - the label string for the created Node.ports - a list of ports to assign to the new Node.info - the associated NodeInfo-object.
public abstract Subgraph newSubgraph(java.lang.String label,
Graph graph)
Subgraph object.
label - the label of the node that wraps the subgraph.graph - the internal contents of the Subgraph given
as an instance of Graph.
public abstract Subgraph newSubgraph(java.lang.String label,
NodeInfo info,
Graph graph)
Subgraph object.
label - the label of the node that wraps the subgraph.info - the node info object for the subgraph.graph - the internal contents of the Subgraph given
as an instance of Graph.
public abstract Edge newEdge(Node source,
Node target)
Edge object.
source - the source node of the edge.target - the target node of the edge.
public abstract Edge newEdge(Node source,
Node target,
EdgeInfo info)
Edge object.
source - the source node of the edge.target - the target node of the edge.info - the associated edge info object.
public abstract Graph newGraph()
Graph object.
Graph instance.
public static final Node makeDefaultNode(GraphModelFactory factory,
java.lang.String label)
Node using the given
GraphModelFactory instance and the given name.
factory - the GraphModelFactory instance to use for
instantiating the Node.label - the label of the Node.
Node.
public static final Node makeDefaultNode(GraphModelFactory factory,
java.lang.String label,
NodeInfo info)
factory - the GraphModelFactory instance to use for
instantiating the Node.label - the label of the Node.info - the NodeInfo object to associate with the
created Node.
Node.public static GraphModelFactory newInstance()
GraphModelFactory implementation.
GraphModelFactory.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||