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.core.proc
Class CreateDB

    java.lang.Object
      org.basex.core.Progress
          org.basex.core.AbstractProcess
              org.basex.core.Process
                  org.basex.core.proc.CreateDB

    public final class CreateDB

extends Process

Creates a new database.

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

Field Summary

Fields inherited from class org.basex.core.Process
`args`

Constructor Summary
`CreateDB(java.lang.String input)` Constructor.
`CreateDB(java.lang.String input, java.lang.String name)` Constructor.

Method Summary
`java.lang.String` | `toString()`
`static Data` | `xml(IO io, java.lang.String db)` Creates and returns a database for the specified XML document.
`static Data` | `xml(Parser p, java.lang.String db)` Creates and returns a database for the specified XML document.
`static Data` | `xml(javax.xml.transform.sax.SAXSource s)` Creates and returns a database from the specified SAX source.

Methods inherited from class org.basex.core.Process
`args, data, error, execute, execute, info, info, info, name, output, printing, result, updating`

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

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

Constructor Detail

### CreateDB

    public CreateDB(java.lang.String input)

  Constructor.

  Parameters:
    `input` - input path

### CreateDB

    public CreateDB(java.lang.String input,
                    java.lang.String name)

  Constructor.

  Parameters:
    `input` - input path
    `name` - name of database

Method Detail

### xml

    public static Data xml(IO io,
                           java.lang.String db)
                    throws java.io.IOException

  Creates and returns a database for the specified XML document.

  Parameters:
    `db` - name of the database to be created
    `io` - file name
  Returns:
    database instance
  Throws:
    `java.io.IOException` - exception

### xml

    public static Data xml(javax.xml.transform.sax.SAXSource s)
                    throws java.io.IOException

  Creates and returns a database from the specified SAX source.

  Parameters:
    `s` - sax source
  Returns:
    database instance
  Throws:
    `java.io.IOException` - exception

### xml

    public static Data xml(Parser p,
                           java.lang.String db)
                    throws java.io.IOException

  Creates and returns a database for the specified XML document. If building fails, an empty reference is returned.

  Parameters:
    `p` - xml parser
    `db` - name of the database to be created
  Returns:
    database instance
  Throws:
    `java.io.IOException` - exception

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `Process`

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