dbXML API

## com.dbxml.xml.dtsm
Class TableBuilder

    java.lang.Object
      com.dbxml.xml.dtsm.TableBuilder

public final class TableBuilder
extends java.lang.Object

TableBuilder

Constructor Summary
`TableBuilder()`
`TableBuilder(SymbolTable symbols)`

Method Summary
`void` `addEntry(byte typeID)` addEntry adds an entry to the table with no associated Symbol ID or Value ID.
`void` `addEntry(byte typeID, byte[] data)` addEntry adds an entry to the DocumentTable and return the Value ID that the data produces.
`void` `addEntry(byte typeID, int symbolID)` addEntry adds an entry to the DocumentTable.
`int` `addEntry(byte typeID, QName qname)` addEntry adds an entry to the DocumentTable and returns the Symbol ID that the qname maps to.
`DocumentTable` `buildDocumentTable()` buildDocumentTable instructs the TableBuilder to take all of the information it has accumulated, and to produce a DocumentTable.
`int` `getDataSize()` getDataSize returns the total number of bytes that are being stored as unique Values.
`SymbolTable` `getSymbolTable()` getSymbolTable returns the SymbolTable that is associated with this TableBuilder.
`void` `setSymbolTable(SymbolTable symbols)` setSymbolTable sets the SymbolTable that will be associated with this TableBuilder.

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

Constructor Detail

### TableBuilder

    public TableBuilder()

### TableBuilder

    public TableBuilder(SymbolTable symbols)

Method Detail

### getSymbolTable

    public SymbolTable getSymbolTable()

  getSymbolTable returns the SymbolTable that is associated with this TableBuilder.

  Returns:
    the SymbolTable

### setSymbolTable

    public void setSymbolTable(SymbolTable symbols)

  setSymbolTable sets the SymbolTable that will be associated with this TableBuilder.

  Parameters:
    `symbols` - the SymbolTable

### addEntry

    public void addEntry(byte typeID)

  addEntry adds an entry to the table with no associated Symbol ID or Value ID.

  Parameters:
    `typeID` - The Type ID
  See Also:
    `Constants`

### addEntry

    public int addEntry(byte typeID,
                        QName qname)

  addEntry adds an entry to the DocumentTable and returns the Symbol ID that the qname maps to. The Symbol ID can be used to generate end entries more rapidly.

  Parameters:
    `typeID` - The Type ID
    `qname` - The QName
  Returns:
    The Symbol ID
  See Also:
    `Constants`

### addEntry

    public void addEntry(byte typeID,
                         int symbolID)

  addEntry adds an entry to the DocumentTable.

  Parameters:
    `typeID` - The Type ID
  Returns:
    symbolID The Symbol ID
  See Also:
    `Constants`

### addEntry

    public void addEntry(byte typeID,
                         byte[] data)

  addEntry adds an entry to the DocumentTable and return the Value ID that the data produces.

  Parameters:
    `typeID` - The Type ID
    `data` - The data to store
  See Also:
    `Constants`

### getDataSize

    public int getDataSize()

  getDataSize returns the total number of bytes that are being stored as unique Values.

  Returns:
    the total data size

### buildDocumentTable

    public DocumentTable buildDocumentTable()

  buildDocumentTable instructs the TableBuilder to take all of the information it has accumulated, and to produce a DocumentTable.

  Returns:
    the DocumentTable

dbXML API

Copyright (c) 2004 The dbXML Group