Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.build
Class Parser

    java.lang.Object
      org.basex.core.Progress
          org.basex.build.Parser

Direct Known Subclasses:
  DirParser, DOCWrapper, MAB2Parser, SAXWrapper, XMLParser

    public abstract class Parser

extends Progress

This class defines a parser for creating databases from various sources.

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

Field Summary
`boolean` | `doc` Document flag; if true, a document node is added.
`IO` | `io` Input file.
`Prop` | `prop` Database properties.

Method Summary
`static Parser` | `emptyParser(IO io, Prop pr)` Returns a parser instance for creating empty databases.
`abstract void` | `parse(Builder build)` Parses all nodes and sends events to the specified builder.
`static Parser` | `xmlParser(IO io, Prop prop)` Returns an XML parser instance.

Methods inherited from class org.basex.core.Progress
`abort, checkStop, det, detail, prog, progress, progress, stop, tit, title`

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

Field Detail

### doc

    public boolean doc

  Document flag; if true, a document node is added.

### prop

    public Prop prop

  Database properties.

### io

    public IO io

  Input file.

Method Detail

### xmlParser

    public static Parser xmlParser(IO io,
                                   Prop prop)
                            throws IOException

  Returns an XML parser instance.

  Parameters:
    `io` - io reference
    `prop` - database properties
  Returns:
    xml parser
  Throws:
    `IOException` - I/O exception

### emptyParser

    public static Parser emptyParser(IO io,
                                     Prop pr)

  Returns a parser instance for creating empty databases.

  Parameters:
    `io` - io reference
    `pr` - database properties
  Returns:
    parser

### parse

    public abstract void parse(Builder build)
                        throws IOException

  Parses all nodes and sends events to the specified builder.

  Parameters:
    `build` - database builder
  Throws:
    `IOException` - I/O exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD