|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.reps.Network
public class Network
| Field Summary | |
|---|---|
static int |
DEFAULT_INDENT
|
static java.lang.String |
NONVIRTUAL_SCHEMA_SEPARATOR
The string to put between any non-virtual schemas in the network name |
| Constructor Summary | |
|---|---|
Network(Schema[][] paths,
int indent)
Constructs a directed network from the schema paths supplied. |
|
Network(java.lang.String name,
Schema[][] paths,
boolean directed,
boolean maximal,
int indent)
Constructs a network from the schema paths supplied. |
|
Network(java.lang.String name,
Schema[][] paths,
int indent)
Constructs a directed network from the schema paths supplied. |
|
| Method Summary | |
|---|---|
boolean |
addNetworkChangeListener(NetworkChangeListener scl)
|
static boolean |
addNetworksListener(NetworksListener nl)
|
boolean |
areRelativesMaximal()
|
boolean |
contains(Node node)
Returns whether or not the network contains the supplied node. |
boolean |
contains(Schema schema)
Returns whether or not the network contains the supplied schema |
boolean |
contains(java.lang.String name)
Returns whether or not the network contains the named schema |
boolean |
deleted()
Return true when the Network class is finished with, after all Schemas have been deleted from it |
java.awt.Point |
getAbsolutePosition()
Same behaviour as getPosition() since Network instances
are not placed relative to other Positionables. |
Node[] |
getAllNodes()
|
java.awt.Color |
getBackgroundColor()
|
java.awt.Color |
getForegroundColor()
|
java.lang.String |
getLabel()
Get the text used to label this Network. |
java.awt.Point |
getLabelPosition()
|
int |
getLabelXPos()
|
int |
getLabelYPos()
|
Node[] |
getLeafs()
|
java.lang.String |
getName()
|
static Network |
getNetwork(Schema s,
java.lang.String name)
Returns the complete undirected network that contains schema s. |
static java.util.List |
getNetworks(boolean recompute,
int indent)
Return a list that contains all Networks held in the repository. |
static java.util.List |
getNetworks(int indent)
Return a List that contains all Networks held in the repository. |
Node |
getNode(Node node)
Deprecated. |
Node |
getNode(Schema schema)
Returns the network node representing the supplied schema |
Node |
getNode(java.lang.String name)
Returns the network node representing the named schema |
java.awt.Point |
getPosition()
Return the Point that represents the position of this
Positionable in a Panel. |
Positionable |
getPositionedRelativeTo()
Return the Positionable this is relative to. |
java.lang.Object |
getRepObject()
|
Node[] |
getRoots()
|
Schema[] |
getSchemas()
Return all the Schemas in this network. |
java.awt.Color |
getTextColor()
|
int |
getXPos()
|
int |
getYPos()
|
boolean |
isCyclic()
|
boolean |
isDirected()
|
boolean |
isTree()
|
boolean |
removeNetworkChangeListener(NetworkChangeListener scl)
|
static boolean |
removeNetworksListener(NetworksListener nl)
|
void |
setAbsolutePosition(int x,
int y)
Same behaviour as #setPosition() since Network instances
are not placed relative to other Positionables. |
void |
setBackgroundColor(java.awt.Color c)
|
void |
setForegroundColor(java.awt.Color c)
|
void |
setLabel(java.lang.String label)
|
void |
setLabelPosition(int x,
int y)
|
void |
setLabelXPos(int x)
|
void |
setLabelYPos(int y)
|
void |
setPosition(int x,
int y)
|
void |
setTextColor(java.awt.Color c)
|
void |
setXPos(int x)
|
void |
setYPos(int y)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_INDENT
public static final java.lang.String NONVIRTUAL_SCHEMA_SEPARATOR
| Constructor Detail |
|---|
public Network(Schema[][] paths,
int indent)
throws IntegrityException
IntegrityException
public Network(java.lang.String name,
Schema[][] paths,
int indent)
throws IntegrityException
name - The name to give the network
IntegrityException
public Network(java.lang.String name,
Schema[][] paths,
boolean directed,
boolean maximal,
int indent)
throws IntegrityException
name - The name to give the networkdirected - Shoud the network be directedmaximal - If not directed, should each nodes parents and children
be the empty set or the same as the adjacent set for the node
IntegrityException| Method Detail |
|---|
public java.lang.String getName()
public boolean isDirected()
public boolean isCyclic()
public boolean isTree()
public boolean areRelativesMaximal()
public boolean contains(java.lang.String name)
name - The name of the schema
public boolean contains(Schema schema)
name - The schema to be tested
public boolean contains(Node node)
node - A node representing the schema to be tested
public Node getNode(java.lang.String name)
name - Name of the schema whose Node is to be returned
public Node getNode(Schema schema)
schema - The schema whose Node is to be returned
public Node getNode(Node node)
public Node[] getAllNodes()
public Schema[] getSchemas()
Schemas in this network.
public Node[] getRoots()
public Node[] getLeafs()
public static java.util.List getNetworks(int indent)
public static java.util.List getNetworks(boolean recompute,
int indent)
recompute - If set true, then the set of Networks will be recomputed
from the description of pathways held in the recompository, even if
this has previously been done. This means that there may be duplicates
of the same network being represented by different Network instances.
Thus normally this parameter should be false unless some problem is
suspected where the existing set of Network instances are suspected
not to reflect the contents of the repositorypublic boolean deleted()
public static Network getNetwork(Schema s,
java.lang.String name)
s - The schema to trawl the network fromname - The name to give the new network or null for a default name
public java.lang.String toString()
toString in class java.lang.Objectpublic int getXPos()
getXPos in interface Positionablepublic int getYPos()
getYPos in interface Positionablepublic java.awt.Point getPosition()
PositionablePoint that represents the position of this
Positionable in a Panel. Note that depending on
the implementation of the interface, this might a coordinate
relative to some other positionable
getPosition in interface Positionablepublic Positionable getPositionedRelativeTo()
PositionablePositionable this is relative to. If not relative
to some other Positionable then return null.
getPositionedRelativeTo in interface Positionablepublic java.awt.Point getAbsolutePosition()
getPosition() since Network instances
are not placed relative to other Positionables.
getAbsolutePosition in interface Positionablepublic void setXPos(int x)
setXPos in interface Positionablepublic void setYPos(int y)
setYPos in interface Positionable
public void setPosition(int x,
int y)
setPosition in interface Positionable
public void setAbsolutePosition(int x,
int y)
#setPosition() since Network instances
are not placed relative to other Positionables.
setAbsolutePosition in interface Positionablepublic int getLabelXPos()
getLabelXPos in interface Positionablepublic int getLabelYPos()
getLabelYPos in interface Positionablepublic void setLabelXPos(int x)
setLabelXPos in interface Positionablepublic void setLabelYPos(int y)
setLabelYPos in interface Positionablepublic java.awt.Point getLabelPosition()
getLabelPosition in interface Positionable
public void setLabelPosition(int x,
int y)
setLabelPosition in interface Positionablepublic java.lang.String getLabel()
getName() at least in that any characters that need escaping
for printing are escaped.
getLabel in interface Positionablepublic void setLabel(java.lang.String label)
setLabel in interface Positionablepublic java.lang.Object getRepObject()
getRepObject in interface Positionablepublic java.awt.Color getForegroundColor()
getForegroundColor in interface Positionablepublic void setForegroundColor(java.awt.Color c)
setForegroundColor in interface Positionablepublic java.awt.Color getBackgroundColor()
getBackgroundColor in interface Positionablepublic void setBackgroundColor(java.awt.Color c)
setBackgroundColor in interface Positionablepublic java.awt.Color getTextColor()
getTextColor in interface Positionablepublic void setTextColor(java.awt.Color c)
setTextColor in interface Positionablepublic boolean addNetworkChangeListener(NetworkChangeListener scl)
public boolean removeNetworkChangeListener(NetworkChangeListener scl)
public static boolean addNetworksListener(NetworksListener nl)
public static boolean removeNetworksListener(NetworksListener nl)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||