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
Interface Element

All Known Subinterfaces:
  ComparableNode, DependencyNode, Edge, Node, NonTerminalNode, PhraseStructureNode, TerminalNode, TokenNode

All Known Implementing Classes:
  GraphEdge, GraphElement, GraphNode, NonTerminal, Root, Token, WeightedEdge

    public interface Element

Author:
  Johan Hall

Method Summary
`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, String symbol)` Adds a label (a string value) to the symbol table and to the graph element.
`void` | `clear()` Resets the graph element.
`SyntaxGraph` | `getBelongsToGraph()` Returns the graph (structure) in which the graph element belongs to.
`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.
`String` | `getLabelSymbol(SymbolTable table)` Returns the label symbol(a string representation) of the symbol table if it exists, otherwise an exception is thrown.
`Set<SymbolTable>` | `getLabelTypes()` Returns a set of symbol tables (labeling functions or label types) that labels the graph element.
`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(SyntaxGraph belongsToGraph)` Sets the graph (structure) in which the graph element belongs to.

Method Detail

### addLabel

    void addLabel(SymbolTable table,
                  String symbol)
                  throws MaltChainedException

  Adds a label (a string value) to the symbol table and to the graph element.

  Parameters:
    `table` - the symbol table
    `symbol` - a label symbol
  Throws:
    `MaltChainedException`

### addLabel

    void addLabel(SymbolTable table,
                  int code)
                  throws MaltChainedException

  Adds a label (an integer value) to the symbol table and to the graph element.

  Parameters:
    `table` - the symbol table
    `code` - a label code
  Throws:
    `MaltChainedException`

### addLabel

    void addLabel(LabelSet labelSet)
                  throws MaltChainedException

  Adds the labels of the label set to the label set of the graph element.

  Parameters:
    `labelSet` - a label set.
  Throws:
    `MaltChainedException`

### hasLabel

    boolean hasLabel(SymbolTable table)
                     throws MaltChainedException

  Returns true if the graph element has a label for the symbol table, otherwise false.

  Parameters:
    `table` - the symbol table
  Returns:
    true if the graph element has a label for the symbol table, otherwise false.
  Throws:
    `MaltChainedException`

### getLabelSymbol

    String getLabelSymbol(SymbolTable table)
                          throws MaltChainedException

  Returns the label symbol(a string representation) of the symbol table if it exists, otherwise an exception is thrown.

  Parameters:
    `table` - the symbol table
  Returns:
    the label (a string representation) of the symbol table if it exists.
  Throws:
    `MaltChainedException`

### getLabelCode

    int getLabelCode(SymbolTable table)
                     throws MaltChainedException

  Returns the label code (an integer representation) of the symbol table if it exists, otherwise an exception is thrown.

  Parameters:
    `table` - the symbol table
  Returns:
    the label code (an integer representation) of the symbol table if it exists
  Throws:
    `MaltChainedException`

### isLabeled

    boolean isLabeled()

  Returns true if the graph element has one or more labels, otherwise false.

  Returns:
    true if the graph element has one or more labels, otherwise false.

### nLabels

    int nLabels()

  Returns the number of labels of the graph element.

  Returns:
    the number of labels of the graph element.

### getLabelTypes

    Set<SymbolTable> getLabelTypes()

  Returns a set of symbol tables (labeling functions or label types) that labels the graph element.

  Returns:
    a set of symbol tables (labeling functions or label types)

### getLabelSet

    LabelSet getLabelSet()

  Returns the label set.

  Returns:
    the label set.

### removeLabel

    void removeLabel(SymbolTable table)
                     throws MaltChainedException

  Throws:
    `MaltChainedException`

### removeLabels

    void removeLabels()
                      throws MaltChainedException

  Throws:
    `MaltChainedException`

### getBelongsToGraph

    SyntaxGraph getBelongsToGraph()

  Returns the graph (structure) in which the graph element belongs to.

  Returns:
    the graph (structure) in which the graph element belongs to.

### setBelongsToGraph

    void setBelongsToGraph(SyntaxGraph belongsToGraph)

  Sets the graph (structure) in which the graph element belongs to.

  Parameters:
    `belongsToGraph` - a graph (structure).

### clear

    void clear()
               throws MaltChainedException

  Resets the graph element.

  Throws:
    `MaltChainedException`

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.