org.xmldb.api.reference
Class DatabaseImpl
- Configurable, Database
public class DatabaseImpl
Reference Database implmentation. The reference Database simply resides on
the file system. It isn't speedy but it serves the purpose of illustrating
how a driver should work..
The path where the data files are located is specified through the property
xmldb.data.dir. If this property is not specified it defaults to a directory
named data in the current working directory. If the directory does not exist
an attempt will be made to create it.
protected static String | DATA_PREFIX - The default directory to look for to find the data files.
|
protected static String | DIR_PROP - The property to look for to set the directory
|
protected static String | SEP - The characters expected to separate the INSTANCE_NAME from the file system
path
|
Collection | getCollection(String uri, String username, String password) - Retrieves a
Collection instance based on the URI provided
in the uri parameter.
|
DATA_PREFIX
protected static final String DATA_PREFIX
The default directory to look for to find the data files.
DIR_PROP
protected static final String DIR_PROP
The property to look for to set the directory
SEP
protected static final String SEP
The characters expected to separate the INSTANCE_NAME from the file system
path
getCollection
public Collection getCollection(String uri,
String username,
String password)
throws XMLDBException
Retrieves a Collection
instance based on the URI provided
in the uri
parameter. The URI format for this implementation
is ref:///path where path is a path in the file system. To locate the data
files the database expects a directory data to exist in the current
directory.
- getCollection in interface Database
- getCollection in interface SimpleDatabase
uri
- the URI to use to locate the collection.