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

## org.maltparser.core.syntaxgraph.node
Class GraphNode

    java.lang.Object
      java.util.Observable
          org.maltparser.core.syntaxgraph.GraphElement
              org.maltparser.core.syntaxgraph.node.GraphNode

All Implemented Interfaces:
  Comparable<ComparableNode>, Element, ComparableNode, Node

Direct Known Subclasses:
  NonTerminal, Root, Token

    public abstract class GraphNode

extends GraphElement
implements Node

Author:
  Johan Hall

Field Summary
`protected SortedSet<Edge>` | `incomingEdges`
`protected SortedSet<Edge>` | `outgoingEdges`

Constructor Summary
`GraphNode()`

Method Summary
`void` | `addIncomingEdge(Edge in)`
`void` | `addOutgoingEdge(Edge out)`
`void` | `clear()` Resets the graph element.
`int` | `compareTo(ComparableNode o)`
`boolean` | `equals(Object obj)`
`Iterator<Edge>` | `getIncomingEdgeIterator()`
`SortedSet<Edge>` | `getIncomingSecondaryEdges()` Returns a sorted set of incoming secondary edges.
`int` | `getInDegree()` Returns the in degree of the node (number of incoming edges of all types of edges).
`abstract int` | `getIndex()` Returns the index of the node.
`int` | `getLeftmostDescendantIndex()` Returns the index of the left-most terminal descendant node.
`int` | `getLeftmostProperDescendantIndex()` Returns the index of the left-most proper terminal descendant node (excluding itself).
`int` | `getOutDegree()` Returns the out degree of the node (number of outgoing edges of all types of edges).
`Iterator<Edge>` | `getOutgoingEdgeIterator()`
`SortedSet<Edge>` | `getOutgoingSecondaryEdges()` Returns a sorted set of outgoing secondary edges.
`int` | `getRightmostDescendantIndex()` Returns the index of the right-most terminal descendant node.
`int` | `getRightmostProperDescendantIndex()` Returns the index of the right-most proper terminal descendant node (excluding itself).
`int` | `hashCode()`
`abstract boolean` | `isRoot()` Returns true if the node is a root node, otherwise false.
`void` | `removeIncomingEdge(Edge in)`
`void` | `removeOutgoingEdge(Edge out)`
`abstract void` | `setIndex(int index)`
`String` | `toString()`

Methods inherited from class org.maltparser.core.syntaxgraph.GraphElement
`addLabel, addLabel, addLabel, compareTo, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph`

Methods inherited from class java.util.Observable
`addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.maltparser.core.syntaxgraph.node.ComparableNode
`getCompareToIndex, getLeftmostDescendant, getLeftmostProperDescendant, getRightmostDescendant, getRightmostProperDescendant`

Methods inherited from interface org.maltparser.core.syntaxgraph.Element
`addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph`

Field Detail

### incomingEdges

    protected SortedSet<Edge> incomingEdges

### outgoingEdges

    protected SortedSet<Edge> outgoingEdges

Constructor Detail

### GraphNode

    public GraphNode()
              throws MaltChainedException

Throws:
  `MaltChainedException`

Method Detail

### addIncomingEdge

    public void addIncomingEdge(Edge in)
                         throws MaltChainedException

  Specified by:
    `addIncomingEdge` in interface `Node`
  Throws:
    `MaltChainedException`

### addOutgoingEdge

    public void addOutgoingEdge(Edge out)
                         throws MaltChainedException

  Specified by:
    `addOutgoingEdge` in interface `Node`
  Throws:
    `MaltChainedException`

### removeIncomingEdge

    public void removeIncomingEdge(Edge in)
                            throws MaltChainedException

  Specified by:
    `removeIncomingEdge` in interface `Node`
  Throws:
    `MaltChainedException`

### removeOutgoingEdge

    public void removeOutgoingEdge(Edge out)
                            throws MaltChainedException

  Specified by:
    `removeOutgoingEdge` in interface `Node`
  Throws:
    `MaltChainedException`

### getLeftmostProperDescendantIndex

    public int getLeftmostProperDescendantIndex()
                                         throws MaltChainedException

  Description copied from interface: `ComparableNode`
  Returns the index of the left-most proper terminal descendant node (excluding itself).

  Specified by:
    `getLeftmostProperDescendantIndex` in interface `ComparableNode`
  Returns:
    the index of the left-most proper terminal descendant node.
  Throws:
    `MaltChainedException`

### getRightmostProperDescendantIndex

    public int getRightmostProperDescendantIndex()
                                          throws MaltChainedException

  Description copied from interface: `ComparableNode`
  Returns the index of the right-most proper terminal descendant node (excluding itself).

  Specified by:
    `getRightmostProperDescendantIndex` in interface `ComparableNode`
  Returns:
    the index of the right-most proper terminal descendant node.
  Throws:
    `MaltChainedException`

### getLeftmostDescendantIndex

    public int getLeftmostDescendantIndex()
                                   throws MaltChainedException

  Description copied from interface: `ComparableNode`
  Returns the index of the left-most terminal descendant node.

  Specified by:
    `getLeftmostDescendantIndex` in interface `ComparableNode`
  Returns:
    the index of the left-most terminal descendant node.
  Throws:
    `MaltChainedException`

### getRightmostDescendantIndex

    public int getRightmostDescendantIndex()
                                    throws MaltChainedException

  Description copied from interface: `ComparableNode`
  Returns the index of the right-most terminal descendant node.

  Specified by:
    `getRightmostDescendantIndex` in interface `ComparableNode`
  Returns:
    the index of the right-most terminal descendant node.
  Throws:
    `MaltChainedException`

### getIncomingEdgeIterator

    public Iterator<Edge> getIncomingEdgeIterator()

  Specified by:
    `getIncomingEdgeIterator` in interface `Node`

### getOutgoingEdgeIterator

    public Iterator<Edge> getOutgoingEdgeIterator()

  Specified by:
    `getOutgoingEdgeIterator` in interface `Node`

### clear

    public void clear()
               throws MaltChainedException

  Description copied from class: `GraphElement`
  Resets the graph element.

  Specified by:
    `clear` in interface `Element`
  Overrides:
    `clear` in class `GraphElement`
  Throws:
    `MaltChainedException`

### getInDegree

    public int getInDegree()

  Description copied from interface: `ComparableNode`
  Returns the in degree of the node (number of incoming edges of all types of edges).

  Specified by:
    `getInDegree` in interface `ComparableNode`
  Returns:
    the in degree of the node (number of incoming edges of all types of edges).

### getOutDegree

    public int getOutDegree()

  Description copied from interface: `ComparableNode`
  Returns the out degree of the node (number of outgoing edges of all types of edges).

  Specified by:
    `getOutDegree` in interface `ComparableNode`
  Returns:
    the out degree of the node (number of outgoing edges of all types of edges).

### getIncomingSecondaryEdges

    public SortedSet<Edge> getIncomingSecondaryEdges()

  Description copied from interface: `ComparableNode`
  Returns a sorted set of incoming secondary edges.

  Specified by:
    `getIncomingSecondaryEdges` in interface `ComparableNode`
  Returns:
    a sorted set of incoming secondary edges.

### getOutgoingSecondaryEdges

    public SortedSet<Edge> getOutgoingSecondaryEdges()

  Description copied from interface: `ComparableNode`
  Returns a sorted set of outgoing secondary edges.

  Specified by:
    `getOutgoingSecondaryEdges` in interface `ComparableNode`
  Returns:
    a sorted set of outgoing secondary edges.

### compareTo

    public int compareTo(ComparableNode o)

  Specified by:
    `compareTo` in interface `Comparable<ComparableNode>`

### getIndex

    public abstract int getIndex()

  Description copied from interface: `ComparableNode`
  Returns the index of the node.

  Specified by:
    `getIndex` in interface `ComparableNode`
  Returns:
    the index of the node.

### setIndex

    public abstract void setIndex(int index)
                           throws MaltChainedException

  Specified by:
    `setIndex` in interface `Node`
  Throws:
    `MaltChainedException`

### isRoot

    public abstract boolean isRoot()

  Description copied from interface: `ComparableNode`
  Returns true if the node is a root node, otherwise false.

  Specified by:
    `isRoot` in interface `ComparableNode`
  Returns:
    true if the node is a root node, otherwise false.

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `GraphElement`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `GraphElement`

### toString

    public String toString()

  Overrides:
    `toString` in class `GraphElement`

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

Copyright 2007-2011 Johan Hall, Jens Nilsson and Joakim Nivre.