|
Berkeley DB XML version 2.5.16 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sleepycat.db.DatabaseConfig com.sleepycat.dbxml.XmlContainerConfig
public class XmlContainerConfig
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 java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final XmlContainerConfig DEFAULT
public static final String DEFAULT_COMPRESSSION
public static final String NO_COMPRESSSION
public static final int UseDefaults
setStatisticsEnabled(int)
and
setIndexNodes(int)
to use the
default value.
public static final int On
setStatisticsEnabled(int)
and
setIndexNodes(int)
to turn on these properties.
public static final int Off
setStatisticsEnabled(int)
and
setIndexNodes(int)
to turn off these properties.
Constructor Detail |
---|
public XmlContainerConfig()
Method Detail |
---|
public String getCompression()
public XmlContainerConfig setCompression(String compressionName)
XmlManager.registerCompression(java.lang.String, com.sleepycat.dbxml.XmlCompression)
. This only effects container creation, after the container is created this value is silently ignored.
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)
.
incr
- The integer increment to use.public int getSequenceIncrement()
XmlContainer.putDocument(com.sleepycat.dbxml.XmlDocument)
.
public int getIndexNodesFlag()
On
, Off
, or UseDefaults
.
public boolean getIndexNodes()
getIndexNodesFlag()
.Returns whether the indexer should create index targets that references nodes rather than documents.
public XmlContainerConfig setIndexNodes(boolean value)
setIndexNodes(int)
.Causes the indexer to create index targets that reference nodes rather than documents.
value
- Whether the indexer should create index targets that references nodes rather than documents.public XmlContainerConfig setIndexNodes(int value)
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
.public int getStatisticsEnabledFlag()
public boolean getStatisticsEnabled()
getStatisticsEnabledFlag()
. Returns whether the statistics database should be created and kept.
public XmlContainerConfig setStatisticsEnabled(boolean value)
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.
value
- Whether the structural statistics database is createdpublic XmlContainerConfig setStatisticsEnabled(int value)
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.
value
- Whether the structural statistics database is createdpublic int getContainerType()
XmlContainer.NodeContainer
, or XmlContainer.WholedocContainer
.
public boolean getNodeContainer()
getContainerType()
. Returns whether the container stores XML as individual nodes instead of as documents.
public XmlContainerConfig setNodeContainer(boolean value)
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.
value
- Whether documents are stored as nodes.public XmlContainerConfig setContainerType(int value)
value
- Set to XmlContainer.NodeContainer
to store documents broken into nodes, set to XmlContainer.WholedocContainer
to store documents intact. The default is XmlContainer.NodeContainer
.public boolean getAllowValidation()
public XmlContainerConfig setAllowValidation(boolean value)
|
Berkeley DB XML version 2.5.16 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |