org.basex.build
Class Parser

java.lang.Object
  extended by org.basex.build.Parser
Direct Known Subclasses:
FSParser, MAB2Parser, SAXWrapper, XMLParser

public abstract class Parser
extends java.lang.Object

This is class defines methods for parser implementations. A parser is applied to create database instances.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
 java.lang.String file
          Input file.
 
Constructor Summary
Parser(java.lang.String fn)
          Constructor.
 
Method Summary
abstract  void parse(Builder build)
          Parses all nodes and sends events to the specified builder.
abstract  double percent()
          Returns a value from 0 to 1, representing the current progress.
abstract  java.lang.String title()
          Returns a compact description of the current progress.
abstract  java.lang.String toString()
          Returns detailed progress information.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

file

public java.lang.String file
Input file.

Constructor Detail

Parser

public Parser(java.lang.String fn)
Constructor.

Parameters:
fn - input filename.
Method Detail

parse

public abstract void parse(Builder build)
                    throws java.io.IOException
Parses all nodes and sends events to the specified builder.

Parameters:
build - event listener.
Throws:
java.io.IOException - I/O exception

percent

public abstract double percent()
Returns a value from 0 to 1, representing the current progress.

Returns:
progress information

title

public abstract java.lang.String title()
Returns a compact description of the current progress.

Returns:
progress information

toString

public abstract java.lang.String toString()
Returns detailed progress information.

Overrides:
toString in class java.lang.Object
Returns:
position info