BracketWriter (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.writer
Class BracketWriter

    java.lang.Object
      org.maltparser.core.syntaxgraph.writer.BracketWriter

All Implemented Interfaces:
  SyntaxGraphWriter

    public class BracketWriter

extends Object
implements SyntaxGraphWriter

Author:
  Johan Hall

Constructor Summary
`BracketWriter()`

Method Summary
`void` | `close()` Closes the file or the output stream.
`DataFormatInstance` | `getDataFormatInstance()` Returns the output data format instance
`String` | `getOptions()` Returns a string representation of the writer specific options.
`BufferedWriter` | `getWriter()`
`void` | `open(OutputStream os, String charsetName)` Opens an output stream
`void` | `open(String fileName, String charsetName)` Opens a file for writing
`void` | `setDataFormatInstance(DataFormatInstance dataFormatInstance)` Sets the output data format instance
`void` | `setOptions(String optionString)` Sets the writer specific options.
`void` | `setWriter(BufferedWriter writer)`
`void` | `writeEpilog()` Writes the end of the file
`void` | `writeProlog()` Cause the syntax graph writer to write the beginning of the file (such as header information)
`void` | `writeSentence(TokenStructure syntaxGraph)` Writes a sentence (token structure, dependency structure or/and phrase structure)

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

Constructor Detail

### BracketWriter

    public BracketWriter()

Method Detail

### open

    public void open(String fileName,
                     String charsetName)
              throws MaltChainedException

  Description copied from interface: `SyntaxGraphWriter`
  Opens a file for writing

  Specified by:
    `open` in interface `SyntaxGraphWriter`
  Parameters:
    `fileName` - the file name of the file
    `charsetName` - the name of the character encoding set
  Throws:
    `MaltChainedException`

### open

    public void open(OutputStream os,
                     String charsetName)
              throws MaltChainedException

  Description copied from interface: `SyntaxGraphWriter`
  Opens an output stream

  Specified by:
    `open` in interface `SyntaxGraphWriter`
  Parameters:
    `os` - an output stream
    `charsetName` - the name of the character encoding set
  Throws:
    `MaltChainedException`

### writeEpilog

    public void writeEpilog()
                     throws MaltChainedException

  Description copied from interface: `SyntaxGraphWriter`
  Writes the end of the file

  Specified by:
    `writeEpilog` in interface `SyntaxGraphWriter`
  Throws:
    `MaltChainedException`

### writeProlog

    public void writeProlog()
                     throws MaltChainedException

  Description copied from interface: `SyntaxGraphWriter`
  Cause the syntax graph writer to write the beginning of the file (such as header information)

  Specified by:
    `writeProlog` in interface `SyntaxGraphWriter`
  Throws:
    `MaltChainedException`

### writeSentence

    public void writeSentence(TokenStructure syntaxGraph)
                       throws MaltChainedException

  Description copied from interface: `SyntaxGraphWriter`
  Writes a sentence (token structure, dependency structure or/and phrase structure)

  Specified by:
    `writeSentence` in interface `SyntaxGraphWriter`
  Parameters:
    `syntaxGraph` - a syntax graph (token structure, dependency structure or/and phrase structure)
  Throws:
    `MaltChainedException`

### getWriter

    public BufferedWriter getWriter()

### setWriter

    public void setWriter(BufferedWriter writer)
                   throws MaltChainedException

  Throws:
    `MaltChainedException`

### getDataFormatInstance

    public DataFormatInstance getDataFormatInstance()

  Description copied from interface: `SyntaxGraphWriter`
  Returns the output data format instance

  Specified by:
    `getDataFormatInstance` in interface `SyntaxGraphWriter`
  Returns:
    the output data format instance

### setDataFormatInstance

    public void setDataFormatInstance(DataFormatInstance dataFormatInstance)

  Description copied from interface: `SyntaxGraphWriter`
  Sets the output data format instance

  Specified by:
    `setDataFormatInstance` in interface `SyntaxGraphWriter`
  Parameters:
    `dataFormatInstance` - an output data format instance

### getOptions

    public String getOptions()

  Description copied from interface: `SyntaxGraphWriter`
  Returns a string representation of the writer specific options.

  Specified by:
    `getOptions` in interface `SyntaxGraphWriter`
  Returns:
    a string representation of the writer specific options.

### setOptions

    public void setOptions(String optionString)
                    throws MaltChainedException

  Description copied from interface: `SyntaxGraphWriter`
  Sets the writer specific options.

  Specified by:
    `setOptions` in interface `SyntaxGraphWriter`
  Parameters:
    `optionString` - a string representation of the writer specific options
  Throws:
    `MaltChainedException`

### close

    public void close()
               throws MaltChainedException

  Description copied from interface: `SyntaxGraphWriter`
  Closes the file or the output stream.

  Specified by:
    `close` in interface `SyntaxGraphWriter`
  Throws:
    `MaltChainedException`

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.