org::openisis::Db Class Reference
List of all members.
Public Member Functions |
abstract Rec | readRow (int rowid) |
abstract short | writeRow (Rec rec) |
abstract short | writeXRow (Rec rec, Rec idx) |
abstract Rec | scanRow (int rowid, int tag, String txt) |
abstract int[] | search (String key, int mode) |
abstract Iterator | terms (String prefix) |
Static Public Member Functions |
static synchronized Db | open (String dbname, String[] args) throws IOException |
static int[] | AND (int[] set, int[] nset) |
Public Attributes |
final String | encoding |
Static Public Attributes |
static final String | DEFAULT_ENCODING = "ISO-8859-1" |
static final String | EMPTY = "" |
static final int | QRY_KEYEQ = 0 |
static final int | QRY_KEYPF = 1 |
static final int | PREFIX = QRY_KEYPF |
static final int | QRY_KEYAT = 2 |
static final int | QRY_SCANE = 64 |
static final int | QRY_SCANC = 65 |
static final int | QRY_SIMPLE = 128 |
static final int | QRY_PROPER = 129 |
static final int | MHL = 0x10000 |
static final int | MD = 0x20000 |
static final int | MDL = 0x30000 |
static final int | MXU = 0x40000 |
static final int | MHU = 0x50000 |
static final int | MDU = 0x70000 |
static final int | MI = 0x80000 |
static final int | HTU = 0x100000 |
static final int | HTI = 0x300000 |
static final int | HTA = 0x700000 |
static final int | PP = 0x2000000 |
static final int | PS = 0x1000000 |
static final int | DS = 0x4000000 |
static final int | NS = 0x8000000 |
static final int | LOCC = 0xffff << 16 |
Protected Member Functions |
| Db (String enc) |
Static Package Attributes |
static final Map | _dbs = new HashMap() |
Detailed Description
This class represents an isis db. The actual implementation is done in derived classes.
- Id
- Db.java,v 1.6 2003/04/08 00:20:53 kripke Exp
- Version:
- Revision
- 1.6
- Author:
- Author
- kripke
Member Function Documentation
static synchronized Db org::openisis::Db::open |
( |
String |
dbname, |
|
|
String[] |
args | |
|
) |
| | throws IOException [inline, static] |
open an isis database. The following options are supported as text-style parameters:
-
-db <name>
basename of database. same as param dbname.
-
-dbpath <path>
path to database. usefull when opening secondary indexes or other files whose names are not based on the db basename.
-
-v <level>
set verbosity level
-
-encoding <enc>
select encoding used in db bytes. default is DEFAULT_ENCODING.
-
-puredb
select pure java implementation. by default the NativeDb is used.
- Parameters:
-
| dbname | basename of database. the dbhome arg, if given, will be prepended, and the ISIS file extensions appended to build the actual filename. Therefore, depending on the value of dbhome and location of files, this may need to include a path. db may be null , if argv includes a dbname arg. |
| argv | array of names and values. May be null . argv contains parameter names, which may be prefixed by a dash '-'. Depending on the actual parameter, the next string may or must contain a corresponding parameter value. An optional parameter value may be omitted, if at end of argv or the next name is prefixed with a dash. To avoid ambiguity, values never start with a dash. See above for a list of supported parameter names. Unrecognized parameter names are ignored. |
- Returns:
- a new Db (unless some RuntimeException is thrown)
- Exceptions:
-
| IoException | especially FileNotFoundExceptiond and UnsupportedEncodingException |
abstract Rec org::openisis::Db::readRow |
( |
int |
rowid |
) |
[pure virtual] |
abstract Rec org::openisis::Db::scanRow |
( |
int |
rowid, |
|
|
int |
tag, |
|
|
String |
txt | |
|
) |
| | [pure virtual] |
abstract int [] org::openisis::Db::search |
( |
String |
key, |
|
|
int |
mode | |
|
) |
| | [pure virtual] |
read the array of rowids matching key.
- Parameters:
-
| key | key to look for |
| mode | one of the QRY_ constants above. may be ored with a tag<<16 to limit search to that field |
Implemented in org::openisis::NativeDb, and org::openisis::PureDb.
abstract short org::openisis::Db::writeRow |
( |
Rec |
rec |
) |
[pure virtual] |
abstract short org::openisis::Db::writeXRow |
( |
Rec |
rec, |
|
|
Rec |
idx | |
|
) |
| | [pure virtual] |
Member Data Documentation
the default encoding. the constant String value is "ISO-8859-1".
rec v: dummy presence selector Dn
encoding used for records in this db. NOTE that String args are not converted according to this encoding, but rather are passed as Java UTF-8, so you better stick to 7 bits.
field v: 7bit ASCII HTML. HTML-entities and all chars greater than 127 are escaped.
field v: 8bit ISO-8859-1 HTML. HTML-entities and all chars greater than 255 are escaped.
field v: 16bit UNICODE HTML. HTML-entities are escaped.
rec v: occurence range up to last occ
field v: data flag (no effect w/o heading)
field v: data mode (includes heading flag)
field v: uppercase data mode
field v: uppercase heading mode
field v: index formatting flag
field v: uppercase mode flag
rec v: dummy absence selector Nn
rec v: repeated prefix plus operator (not on 1st occ)
rec v: repeated suffix plus operator (not on last occ)
index scan key auto (checks for '$')
query expression with proper binding using precedence, ()
fulltext scan for contains
query expression with simple left-to-right binding
The documentation for this class was generated from the following file:
- contrib/openisis/org/openisis/Db.java