Network
Keywords: uk.ac.ic.doc.automed.reps.Network class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.reps
Class Network

    java.lang.Object
      uk.ac.ic.doc.automed.reps.Network

All Implemented Interfaces:
  Positionable

    public class Network

extends java.lang.Object
implements Positionable

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 `Positionable`s.
`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 `Schema`s 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 `Positionable`s.
`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

### DEFAULT_INDENT

    public static final int DEFAULT_INDENT

See Also:
  Constant Field Values

### NONVIRTUAL_SCHEMA_SEPARATOR

    public static final java.lang.String NONVIRTUAL_SCHEMA_SEPARATOR

  The string to put between any non-virtual schemas in the network name

  See Also:
    Constant Field Values

Constructor Detail

### Network

    public Network(Schema[][] paths,
                   int indent)
            throws IntegrityException

  Constructs a directed network from the schema paths supplied. Each path's first schema is a root of the network. Not sure what this will do if the paths don't all overlap. Note that the paths don't have to bear any relationship to the contents of the repository - most likely use is to represent a sub-network of a complete network.

  Throws:
    `IntegrityException`

### Network

    public Network(java.lang.String name,
                   Schema[][] paths,
                   int indent)
            throws IntegrityException

  Constructs a directed network from the schema paths supplied. Not sure what this will do if the paths don't all overlap. Note that the paths don't have to bear any relationship to the contents of the repository - most likely use is to represent a sub-network of a complete network.

  Parameters:
    `name` - The name to give the network
  Throws:
    `IntegrityException`

### Network

    public Network(java.lang.String name,
                   Schema[][] paths,
                   boolean directed,
                   boolean maximal,
                   int indent)
            throws IntegrityException

  Constructs a network from the schema paths supplied. Not sure what this will do if the paths don't all overlap. Note that the paths don't have to bear any relationship to the contents of the repository - most likely use is to represent a sub-network of a complete network.

  Parameters:
    `name` - The name to give the network
    `directed` - Shoud the network be directed
    `maximal` - If not directed, should each nodes parents and children be the empty set or the same as the adjacent set for the node
  Throws:
    `IntegrityException`

Method Detail

### getName

    public java.lang.String getName()

### isDirected

    public boolean isDirected()

### isCyclic

    public boolean isCyclic()

### isTree

    public boolean isTree()

### areRelativesMaximal

    public boolean areRelativesMaximal()

### contains

    public boolean contains(java.lang.String name)

  Returns whether or not the network contains the named schema

  Parameters:
    `name` - The name of the schema
  Returns:
    true if the network contatins the schema, false otherwise

### contains

    public boolean contains(Schema schema)

  Returns whether or not the network contains the supplied schema

  Parameters:
    `name` - The schema to be tested
  Returns:
    true if the network contatins the schema, false otherwise

### contains

    public boolean contains(Node node)

  Returns whether or not the network contains the supplied node. Note that the network may contain the schema represented by the node but not contain the node - the node may represent the schema in a different network instance.

  Parameters:
    `node` - A node representing the schema to be tested
  Returns:
    true if the network contatins the node, false otherwise

### getNode

    public Node getNode(java.lang.String name)

  Returns the network node representing the named schema

  Parameters:
    `name` - Name of the schema whose Node is to be returned
  Returns:
    The Node which represents the named schema

### getNode

    public Node getNode(Schema schema)

  Returns the network node representing the supplied schema

  Parameters:
    `schema` - The schema whose Node is to be returned
  Returns:
    The Node which represents the supplied schema

### getNode

    public Node getNode(Node node)

  Deprecated.

  Probably not the most useful method in the world, should return the parameter passed to it. Don't know why it's here

### getAllNodes

    public Node[] getAllNodes()

### getSchemas

    public Schema[] getSchemas()

  Return all the `Schema`s in this network.

### getRoots

    public Node[] getRoots()

### getLeafs

    public Node[] getLeafs()

### getNetworks

    public static java.util.List getNetworks(int indent)

  Return a List that contains all Networks held in the repository. If the networks have previously been computed from the stored transformations then they will not be regenerated.

  Returns:
    List of Networks held in the repository.

### getNetworks

    public static java.util.List getNetworks(boolean recompute,
                                             int indent)

  Return a list that contains all Networks held in the repository.

  Parameters:
    `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 repository

### deleted

    public boolean deleted()

  Return true when the Network class is finished with, after all Schemas have been deleted from it

### getNetwork

    public static Network getNetwork(Schema s,
                                     java.lang.String name)

  Returns the complete undirected network that contains schema s.

  Parameters:
    `s` - The schema to trawl the network from
    `name` - The name to give the new network or null for a default name
  Returns:
    The complete, undirected network containing schema s

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getXPos

    public int getXPos()

  Specified by:
    `getXPos` in interface `Positionable`

### getYPos

    public int getYPos()

  Specified by:
    `getYPos` in interface `Positionable`

### getPosition

    public java.awt.Point getPosition()

  Description copied from interface: `Positionable`
  Return the `Point` 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

  Specified by:
    `getPosition` in interface `Positionable`

### getPositionedRelativeTo

    public Positionable getPositionedRelativeTo()

  Description copied from interface: `Positionable`
  Return the `Positionable` this is relative to. If not relative to some other `Positionable` then return null.

  Specified by:
    `getPositionedRelativeTo` in interface `Positionable`

### getAbsolutePosition

    public java.awt.Point getAbsolutePosition()

  Same behaviour as `getPosition()` since `Network` instances are not placed relative to other `Positionable`s.

  Specified by:
    `getAbsolutePosition` in interface `Positionable`

### setXPos

    public void setXPos(int x)

  Specified by:
    `setXPos` in interface `Positionable`

### setYPos

    public void setYPos(int y)

  Specified by:
    `setYPos` in interface `Positionable`

### setPosition

    public void setPosition(int x,
                            int y)

  Specified by:
    `setPosition` in interface `Positionable`

### setAbsolutePosition

    public void setAbsolutePosition(int x,
                                    int y)

  Same behaviour as `#setPosition()` since `Network` instances are not placed relative to other `Positionable`s.

  Specified by:
    `setAbsolutePosition` in interface `Positionable`

### getLabelXPos

    public int getLabelXPos()

  Specified by:
    `getLabelXPos` in interface `Positionable`

### getLabelYPos

    public int getLabelYPos()

  Specified by:
    `getLabelYPos` in interface `Positionable`

### setLabelXPos

    public void setLabelXPos(int x)

  Specified by:
    `setLabelXPos` in interface `Positionable`

### setLabelYPos

    public void setLabelYPos(int y)

  Specified by:
    `setLabelYPos` in interface `Positionable`

### getLabelPosition

    public java.awt.Point getLabelPosition()

  Specified by:
    `getLabelPosition` in interface `Positionable`

### setLabelPosition

    public void setLabelPosition(int x,
                                 int y)

  Specified by:
    `setLabelPosition` in interface `Positionable`

### getLabel

    public java.lang.String getLabel()

  Get the text used to label this Network. Note that this will differ from `getName()` at least in that any characters that need escaping for printing are escaped.

  Specified by:
    `getLabel` in interface `Positionable`
  Returns:
    Name of this schema used for writing on to the screen or file

### setLabel

    public void setLabel(java.lang.String label)

  Specified by:
    `setLabel` in interface `Positionable`

### getRepObject

    public java.lang.Object getRepObject()

  Specified by:
    `getRepObject` in interface `Positionable`

### getForegroundColor

    public java.awt.Color getForegroundColor()

  Specified by:
    `getForegroundColor` in interface `Positionable`

### setForegroundColor

    public void setForegroundColor(java.awt.Color c)

  Specified by:
    `setForegroundColor` in interface `Positionable`

### getBackgroundColor

    public java.awt.Color getBackgroundColor()

  Specified by:
    `getBackgroundColor` in interface `Positionable`

### setBackgroundColor

    public void setBackgroundColor(java.awt.Color c)

  Specified by:
    `setBackgroundColor` in interface `Positionable`

### getTextColor

    public java.awt.Color getTextColor()

  Specified by:
    `getTextColor` in interface `Positionable`

### setTextColor

    public void setTextColor(java.awt.Color c)

  Specified by:
    `setTextColor` in interface `Positionable`

### addNetworkChangeListener

    public boolean addNetworkChangeListener(NetworkChangeListener scl)

### removeNetworkChangeListener

    public boolean removeNetworkChangeListener(NetworkChangeListener scl)

### addNetworksListener

    public static boolean addNetworksListener(NetworksListener nl)

### removeNetworksListener

    public static boolean removeNetworksListener(NetworksListener nl)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD