org.kabeja.parser
Interface Parser

All Superinterfaces:
Handler
All Known Implementing Classes:
DXFParser

public interface Parser
extends Handler

This interface describes a Parser, which will parse a specific format and create a DXFDocument from this data.

Lifecycle

  1. supportedExtension()
  2. parse(...)
  3. getDXFDocument()
Simon Mieth


Method Summary
 DXFDocument getDocument()
          Gets the parsed DXFDocument after parsing.
 java.lang.String getName()
          Gets the name of the parser.
 void parse(java.io.InputStream input, java.lang.String encoding)
          Parse the given inputstream
 void parse(java.lang.String file)
          Parse the given file.
 void parse(java.lang.String file, java.lang.String encoding)
          Parse the given file with the specific encoding.
 boolean supportedExtension(java.lang.String extension)
           
 
Methods inherited from interface org.kabeja.parser.Handler
releaseDXFDocument, setDXFDocument
 

Method Detail

parse

void parse(java.lang.String file)
           throws ParseException
Parse the given file.

Parameters:
file - the file to parse
Throws:
ParseException

parse

void parse(java.lang.String file,
           java.lang.String encoding)
           throws ParseException
Parse the given file with the specific encoding.

Parameters:
file -
encoding -
Throws:
ParseException

parse

void parse(java.io.InputStream input,
           java.lang.String encoding)
           throws ParseException
Parse the given inputstream

Parameters:
input -
encoding -
Throws:
ParseException

getDocument

DXFDocument getDocument()
Gets the parsed DXFDocument after parsing.

Returns:
the parsed @see org.kabeja.dxf.DXFDocument after parsing.

supportedExtension

boolean supportedExtension(java.lang.String extension)
Parameters:
extension -
Returns:

getName

java.lang.String getName()
Gets the name of the parser.

Returns: