DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE, SECONDARY_EDGE| Modifier | Constructor and Description |
|---|---|
protected |
LWEdge(LWEdge edge) |
protected |
LWEdge(Node _source,
Node _target) |
protected |
LWEdge(Node _source,
Node _target,
java.util.SortedMap<org.maltparser.concurrent.graph.dataformat.ColumnDescription,java.lang.String> _labels) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLabel(LabelSet labelSet)
Adds the labels of the label set to the label set of the graph element.
|
void |
addLabel(SymbolTable table,
int code)
Adds a label (an integer value) to the symbol table and to the graph element.
|
void |
addLabel(SymbolTable table,
java.lang.String symbol)
Adds a label (a string value) to the symbol table and to the graph element.
|
void |
clear()
Resets the graph element.
|
int |
compareTo(LWEdge that) |
boolean |
equals(java.lang.Object obj) |
LabeledStructure |
getBelongsToGraph()
Returns the graph (structure) in which the graph element belongs to.
|
java.lang.String |
getLabel(org.maltparser.concurrent.graph.dataformat.ColumnDescription column) |
int |
getLabelCode(SymbolTable table)
Returns the label code (an integer representation) of the symbol table if it exists, otherwise
an exception is thrown.
|
LabelSet |
getLabelSet()
Returns the label set.
|
java.lang.String |
getLabelSymbol(SymbolTable table)
Returns the label symbol(a string representation) of the symbol table if it exists, otherwise
an exception is thrown.
|
java.util.Set<SymbolTable> |
getLabelTypes()
Returns a set of symbol tables (labeling functions or label types) that labels the graph element.
|
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() |
boolean |
hasLabel(SymbolTable table)
Returns true if the graph element has a label for the symbol table, otherwise false.
|
boolean |
isLabeled()
Returns true if the graph element has one or more labels, otherwise false.
|
int |
nLabels()
Returns the number of labels of the graph element.
|
void |
removeLabel(SymbolTable table) |
void |
removeLabels() |
void |
setBelongsToGraph(LabeledStructure belongsToGraph)
Sets the graph (structure) in which the graph element belongs to.
|
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).
|
java.lang.String |
toString() |
protected LWEdge(LWEdge edge) throws LWGraphException
LWGraphExceptionprotected LWEdge(Node _source, Node _target, java.util.SortedMap<org.maltparser.concurrent.graph.dataformat.ColumnDescription,java.lang.String> _labels) throws MaltChainedException
MaltChainedExceptionprotected LWEdge(Node _source, Node _target) throws MaltChainedException
MaltChainedExceptionpublic Node getSource()
Edgepublic Node getTarget()
Edgepublic java.lang.String getLabel(org.maltparser.concurrent.graph.dataformat.ColumnDescription column)
public int nLabels()
Elementpublic boolean isLabeled()
Elementpublic void setEdge(Node source, Node target, int type) throws MaltChainedException
EdgesetEdge in interface Edgesource - a source nodetarget - a target nodetype - a type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE)MaltChainedExceptionpublic int getType()
Edgepublic void addLabel(SymbolTable table, java.lang.String symbol) throws MaltChainedException
addLabel in interface Elementtable - the symbol tablesymbol - a label symbolMaltChainedExceptionpublic void addLabel(SymbolTable table, int code) throws MaltChainedException
addLabel in interface Elementtable - the symbol tablecode - a label codeMaltChainedExceptionpublic void addLabel(LabelSet labelSet) throws MaltChainedException
addLabel in interface ElementlabelSet - a label set.MaltChainedExceptionpublic boolean hasLabel(SymbolTable table) throws MaltChainedException
hasLabel in interface Elementtable - the symbol tableMaltChainedExceptionpublic java.lang.String getLabelSymbol(SymbolTable table) throws MaltChainedException
getLabelSymbol in interface Elementtable - the symbol tableMaltChainedExceptionpublic int getLabelCode(SymbolTable table) throws MaltChainedException
getLabelCode in interface Elementtable - the symbol tableMaltChainedExceptionpublic java.util.Set<SymbolTable> getLabelTypes()
getLabelTypes in interface Elementpublic LabelSet getLabelSet()
getLabelSet in interface Elementpublic void removeLabel(SymbolTable table) throws MaltChainedException
removeLabel in interface ElementMaltChainedExceptionpublic void removeLabels() throws MaltChainedException
removeLabels in interface ElementMaltChainedExceptionpublic LabeledStructure getBelongsToGraph()
getBelongsToGraph in interface Elementpublic void setBelongsToGraph(LabeledStructure belongsToGraph)
ElementsetBelongsToGraph in interface ElementbelongsToGraph - a graph (structure).public void clear() throws MaltChainedException
clear in interface ElementMaltChainedExceptionpublic int compareTo(LWEdge that)
compareTo in interface java.lang.Comparable<LWEdge>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.