GraphEdge (MaltParser 1.4.1)
Date: 2010-07-15

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

## org.maltparser.core.syntaxgraph.edge
Class GraphEdge

    java.lang.Object
      java.util.Observable
          org.maltparser.core.syntaxgraph.GraphElement
              org.maltparser.core.syntaxgraph.edge.GraphEdge

All Implemented Interfaces:
  Comparable<GraphEdge>, Edge, Element

Direct Known Subclasses:
  WeightedEdge

    public class GraphEdge

extends GraphElement
implements Edge, Comparable<GraphEdge>

Author:
  Johan Hall

Field Summary

Fields inherited from interface org.maltparser.core.syntaxgraph.edge.Edge
`DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE, SECONDARY_EDGE`

Constructor Summary
`GraphEdge()`
`GraphEdge(Node source, Node target, int type)`

Method Summary
`void` | `clear()` Resets the graph element.
`int` | `compareTo(GraphEdge that)`
`boolean` | `equals(Object obj)`
`Node` | `getSource()` Returns the source node of the edge.
`Node` | `getTarget()` Returns the target node of the edge.
`int` | `getType()` Returns the edge type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE).
`int` | `hashCode()`
`void` | `setEdge(Node source, Node target, int type)` Sets the edge with a source node, a target node and a type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE).
`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.Element
`addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph`

Constructor Detail

### GraphEdge

    public GraphEdge()

### GraphEdge

    public GraphEdge(Node source,
                     Node target,
                     int type)
              throws MaltChainedException

Throws:
  `MaltChainedException`

Method Detail

### setEdge

    public void setEdge(Node source,
                        Node target,
                        int type)
                 throws MaltChainedException

  Sets the edge with a source node, a target node and a type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE).

  Specified by:
    `setEdge` in interface `Edge`
  Parameters:
    `source` - a source node
    `target` - a target node
    `type` - a type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE)
  Throws:
    `MaltChainedException`

### 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`

### getSource

    public Node getSource()

  Returns the source node of the edge.

  Specified by:
    `getSource` in interface `Edge`
  Returns:
    the source node of the edge.

### getTarget

    public Node getTarget()

  Returns the target node of the edge.

  Specified by:
    `getTarget` in interface `Edge`
  Returns:
    the target node of the edge.

### getType

    public int getType()

  Returns the edge type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE).

  Specified by:
    `getType` in interface `Edge`
  Returns:
    the edge type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE).

### compareTo

    public int compareTo(GraphEdge that)

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

### 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.4.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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