Berkeley DB XML
version 2.5.16

com.sleepycat.dbxml
Class XmlContainerConfig

java.lang.Object
  extended by com.sleepycat.db.DatabaseConfig
      extended by com.sleepycat.dbxml.XmlContainerConfig
All Implemented Interfaces:
Cloneable

public class XmlContainerConfig
extends DatabaseConfig

Configuration settings for an XmlContainer instance. Used in XmlManager.createContainer(String, XmlContainerConfig), XmlManager.createContainer(XmlTransaction, String, XmlContainerConfig), XmlManager.openContainer(String, XmlContainerConfig), or XmlManager.openContainer(XmlTransaction, String, XmlContainerConfig).

This class extends DatabaseConfig but does not support all of the configuration state in that object. Specifically, the only state used is that obtained from these methods: DatabaseConfig.getChecksum(), DatabaseConfig.getEncrypted(), DatabaseConfig.getTransactional(), DatabaseConfig.getAllowCreate(), DatabaseConfig.getExclusiveCreate(), DatabaseConfig.getNoMMap(), DatabaseConfig.getReadOnly(), DatabaseConfig.getDirtyRead(), DatabaseConfig.getTransactionNotDurable(), DatabaseConfig.getPageSize(), DatabaseConfig.getMultiversion(), DatabaseConfig.getMode(). Setting any other configuration will be silently ignored.


Field Summary
static XmlContainerConfig DEFAULT
          The default configuration settings for XmlContainers.
static String DEFAULT_COMPRESSSION
          The default compression algorithm.
static String NO_COMPRESSSION
          Do not use compression.
static int Off
          Pass to setStatisticsEnabled(int) and setIndexNodes(int) to turn off these properties.
static int On
          Pass to setStatisticsEnabled(int) and setIndexNodes(int) to turn on these properties.
static int UseDefaults
          Pass to setStatisticsEnabled(int) and setIndexNodes(int) to use the default value.
 
Constructor Summary
XmlContainerConfig()
           
 
Method Summary
 boolean getAllowValidation()
          Gets whether documents are validated when loaded into the container, if they refer to a DTD or XML Schema.
 String getCompression()
          Returns the name of the compression algorithm.
 int getContainerType()
          Gets the container type of either XmlContainer.NodeContainer, or XmlContainer.WholedocContainer.
 boolean getIndexNodes()
          Deprecated. as of release 2.5, replaced by getIndexNodesFlag().

Returns whether the indexer should create index targets that references nodes rather than documents.

 int getIndexNodesFlag()
          Returns whether indexing nodes instead of documents is set to On, Off, or UseDefaults.
 boolean getNodeContainer()
          Deprecated. as of release 2.5, replaced by getContainerType().

Returns whether the container stores XML as individual nodes instead of as documents.

 int getSequenceIncrement()
          Returns the integer increment to be used when pre-allocating document ids for new documents created by XmlContainer.putDocument(com.sleepycat.dbxml.XmlDocument).
 boolean getStatisticsEnabled()
          Deprecated. as of release 2.5, replaced by getStatisticsEnabledFlag().

Returns whether the statistics database should be created and kept.

 int getStatisticsEnabledFlag()
          Returns the flag that controls whether gathering of statistics is turned on or off for the container.
 XmlContainerConfig setAllowValidation(boolean value)
          Sets whether documents are validated when loaded into the container, if they refer to a DTD or XML Schema.
 XmlContainerConfig setCompression(String compressionName)
          Set the name of the compression algorithm to be used by the container.
 XmlContainerConfig setContainerType(int value)
          Set whether documents are broken down into their component nodes, and these nodes are stored individually in the container, or stored intact with all white space and formatting is preserved.
 XmlContainerConfig setIndexNodes(boolean value)
          Deprecated. as of release 2.5, replaced by setIndexNodes(int).

Causes the indexer to create index targets that reference nodes rather than documents.

 XmlContainerConfig setIndexNodes(int value)
          Causes the indexer to create index targets that reference nodes rather than documents.
 XmlContainerConfig setNodeContainer(boolean value)
          Deprecated. as of release 2.5, replaced by setContainerType(int)

Set whether documents are broken down into their component nodes, and these nodes are stored individually in the container, or stored intact with all white space and formatting is preserved. Storing nodes is preferred.

 void setSequenceIncrement(int incr)
           Sets the integer increment to be used when pre-allocating document ids for new documents created by XmlContainer.putDocument(com.sleepycat.dbxml.XmlDocument).
 XmlContainerConfig setStatisticsEnabled(boolean value)
          Deprecated. as of release 2.5, replaced by setStatisticsEnabled(int).

Setting to true will cause the container to be created or reindexed with additional structural statistics information, which is very useful for cost based query optimisation. When setting to false, reindexing will remove any structural statistics database present. The default during container creation is to create a structural statistics database. The default during reindexing is to keep the existing configuration. Containers created with these statistics will take longer to load and update, since the statistics must also be updated.

 XmlContainerConfig setStatisticsEnabled(int value)
          Setting to On or UseDefaults will cause the container to be created or reindexed with additional structural statistics information, which is very useful for cost based query optimisation.
 
Methods inherited from class com.sleepycat.db.DatabaseConfig
cloneConfig, getAllowCreate, getBtreeComparator, getBtreeCompressor, getBtreeMinKey, getBtreePrefixCalculator, getBtreeRecordNumbers, getByteOrder, getByteSwapped, getCacheCount, getCacheSize, getChecksum, getCreateDir, getDirtyRead, getDuplicateComparator, getEncrypted, getErrorHandler, getErrorPrefix, getErrorStream, getExclusiveCreate, getFeedbackHandler, getHashComparator, getHasher, getHashFillFactor, getHashNumElements, getMessageHandler, getMessageStream, getMode, getMultiversion, getNoMMap, getPageSize, getPanicHandler, getPartitionDirs, getPartitionHandler, getPartitionKeys, getPartitionParts, getPriority, getQueueExtentSize, getQueueInOrder, getReadOnly, getReadUncommitted, getRecordDelimiter, getRecordLength, getRecordNumberAppender, getRecordPad, getRecordSource, getRenumbering, getReverseSplitOff, getSnapshot, getSortedDuplicates, getTransactional, getTransactionNotDurable, getTruncate, getType, getUnsortedDuplicates, setAllowCreate, setBtreeComparator, setBtreeCompressor, setBtreeMinKey, setBtreePrefixCalculator, setBtreeRecordNumbers, setByteOrder, setCacheCount, setCacheSize, setChecksum, setCreateDir, setDirtyRead, setDuplicateComparator, setEncrypted, setErrorHandler, setErrorPrefix, setErrorStream, setExclusiveCreate, setFeedbackHandler, setHashComparator, setHasher, setHashFillFactor, setHashNumElements, setMessageHandler, setMessageStream, setMode, setMultiversion, setNoMMap, setPageSize, setPanicHandler, setPartitionByCallback, setPartitionByRange, setPartitionDirs, setPriority, setQueueExtentSize, setQueueInOrder, setReadOnly, setReadUncommitted, setRecordDelimiter, setRecordLength, setRecordNumberAppender, setRecordPad, setRecordSource, setRenumbering, setReverseSplitOff, setSnapshot, setSortedDuplicates, setTransactional, setTransactionNotDurable, setTruncate, setType, setUnsortedDuplicates
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final XmlContainerConfig DEFAULT
The default configuration settings for XmlContainers.


DEFAULT_COMPRESSSION

public static final String DEFAULT_COMPRESSSION
The default compression algorithm.

See Also:
Constant Field Values

NO_COMPRESSSION

public static final String NO_COMPRESSSION
Do not use compression.

See Also:
Constant Field Values

UseDefaults

public static final int UseDefaults
Pass to setStatisticsEnabled(int) and setIndexNodes(int) to use the default value.

See Also:
Constant Field Values

On

public static final int On
Pass to setStatisticsEnabled(int) and setIndexNodes(int) to turn on these properties.

See Also:
Constant Field Values

Off

public static final int Off
Pass to setStatisticsEnabled(int) and setIndexNodes(int) to turn off these properties.

See Also:
Constant Field Values
Constructor Detail

XmlContainerConfig

public XmlContainerConfig()
Method Detail

getCompression

public String getCompression()
Returns the name of the compression algorithm.


setCompression

public XmlContainerConfig setCompression(String compressionName)
Set the name of the compression algorithm to be used by the container. If the name is not the default then the name must match the name the algorithm was registered with the XmlManager using XmlManager.registerCompression(java.lang.String, com.sleepycat.dbxml.XmlCompression). This only effects container creation, after the container is created this value is silently ignored.


setSequenceIncrement

public void setSequenceIncrement(int incr)

Sets the integer increment to be used when pre-allocating document ids for new documents created by XmlContainer.putDocument(com.sleepycat.dbxml.XmlDocument).

Parameters:
incr - The integer increment to use.

getSequenceIncrement

public int getSequenceIncrement()
Returns the integer increment to be used when pre-allocating document ids for new documents created by XmlContainer.putDocument(com.sleepycat.dbxml.XmlDocument).


getIndexNodesFlag

public int getIndexNodesFlag()
Returns whether indexing nodes instead of documents is set to On, Off, or UseDefaults.


getIndexNodes

public boolean getIndexNodes()
Deprecated. as of release 2.5, replaced by getIndexNodesFlag().

Returns whether the indexer should create index targets that references nodes rather than documents.


setIndexNodes

public XmlContainerConfig setIndexNodes(boolean value)
Deprecated. as of release 2.5, replaced by setIndexNodes(int).

Causes the indexer to create index targets that reference nodes rather than documents.

Parameters:
value - Whether the indexer should create index targets that references nodes rather than documents.

setIndexNodes

public XmlContainerConfig setIndexNodes(int value)
Causes the indexer to create index targets that reference nodes rather than documents.

Parameters:
value - If set to On the indexer creates index targets that references nodes. If set to Off then the index targets reference documents. If set to the default UseDefaults then the index targets will be nodes for containers of type XmlContainer.NodeContainer, and documents for containers of type XmlContainer.WholedocContainer.

getStatisticsEnabledFlag

public int getStatisticsEnabledFlag()
Returns the flag that controls whether gathering of statistics is turned on or off for the container.


getStatisticsEnabled

public boolean getStatisticsEnabled()
Deprecated. as of release 2.5, replaced by getStatisticsEnabledFlag().

Returns whether the statistics database should be created and kept.


setStatisticsEnabled

public XmlContainerConfig setStatisticsEnabled(boolean value)
Deprecated. as of release 2.5, replaced by setStatisticsEnabled(int).

Setting to true will cause the container to be created or reindexed with additional structural statistics information, which is very useful for cost based query optimisation. When setting to false, reindexing will remove any structural statistics database present. The default during container creation is to create a structural statistics database. The default during reindexing is to keep the existing configuration. Containers created with these statistics will take longer to load and update, since the statistics must also be updated.

Parameters:
value - Whether the structural statistics database is created

setStatisticsEnabled

public XmlContainerConfig setStatisticsEnabled(int value)
Setting to On or UseDefaults will cause the container to be created or reindexed with additional structural statistics information, which is very useful for cost based query optimisation. When setting to Off, reindexing will remove any structural statistics database present. The default during container creation is to create a structural statistics database. The default during reindexing is to keep the existing configuration. Containers created with these statistics will take longer to load and update, since the statistics must also be updated.

Parameters:
value - Whether the structural statistics database is created

getContainerType

public int getContainerType()
Gets the container type of either XmlContainer.NodeContainer, or XmlContainer.WholedocContainer.


getNodeContainer

public boolean getNodeContainer()
Deprecated. as of release 2.5, replaced by getContainerType().

Returns whether the container stores XML as individual nodes instead of as documents.


setNodeContainer

public XmlContainerConfig setNodeContainer(boolean value)
Deprecated. as of release 2.5, replaced by setContainerType(int)

Set whether documents are broken down into their component nodes, and these nodes are stored individually in the container, or stored intact with all white space and formatting is preserved. Storing nodes is preferred.

Parameters:
value - Whether documents are stored as nodes.

setContainerType

public XmlContainerConfig setContainerType(int value)
Set whether documents are broken down into their component nodes, and these nodes are stored individually in the container, or stored intact with all white space and formatting is preserved. Storing nodes is preferred.

Parameters:
value - Set to XmlContainer.NodeContainer to store documents broken into nodes, set to XmlContainer.WholedocContainer to store documents intact. The default is XmlContainer.NodeContainer.

getAllowValidation

public boolean getAllowValidation()
Gets whether documents are validated when loaded into the container, if they refer to a DTD or XML Schema.


setAllowValidation

public XmlContainerConfig setAllowValidation(boolean value)
Sets whether documents are validated when loaded into the container, if they refer to a DTD or XML Schema. The default is false.


Berkeley DB XML
version 2.5.16

Copyright (c) 1996,2009 Oracle. All rights reserved.