org.maltparser.core.syntaxgraph.edge
Class GraphEdge
java.lang.Object
   java.util.Observable
java.util.Observable
       org.maltparser.core.syntaxgraph.GraphElement
org.maltparser.core.syntaxgraph.GraphElement
           org.maltparser.core.syntaxgraph.edge.GraphEdge
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
 
 
 
 
| 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 interface org.maltparser.core.syntaxgraph.Element | 
| addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph | 
 
GraphEdge
public GraphEdge()
GraphEdge
public GraphEdge(Node source,
                 Node target,
                 int type)
          throws MaltChainedException
- Throws:
- MaltChainedException
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:
- setEdgein 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:
- clearin interface- Element
- Overrides:
- clearin class- GraphElement
 
- 
- Throws:
- MaltChainedException
 
getSource
public Node getSource()
- Returns the source node of the edge.
 
- 
- Specified by:
- getSourcein interface- Edge
 
- 
- Returns:
- the source node of the edge.
 
getTarget
public Node getTarget()
- Returns the target node of the edge.
 
- 
- Specified by:
- getTargetin 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:
- getTypein interface- Edge
 
- 
- Returns:
- the edge type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE).
 
compareTo
public int compareTo(GraphEdge that)
- 
- Specified by:
- compareToin interface- Comparable<GraphEdge>
 
- 
 
equals
public boolean equals(Object obj)
- 
- Overrides:
- equalsin class- GraphElement
 
- 
 
hashCode
public int hashCode()
- 
- Overrides:
- hashCodein class- GraphElement
 
- 
 
toString
public String toString()
- 
- Overrides:
- toStringin class- GraphElement
 
- 
 
Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.