golem.db.berkeley
index
/opt/local/lib/python2.4/site-packages/golem/db/berkeley.py

# Part of pyGolem. See LICENSE in the root of your distribution for the license.
# Andrew Walkingshaw <andrew@lexical.org.uk>

 
Modules
       
StringIO
dbxml
lxml.etree
golem
os
sys

 
Classes
       
__builtin__.list(__builtin__.object)
xpathlist
__builtin__.object
xmldb

 
class xmldb(__builtin__.object)
     Methods defined here:
__init__(self, f)
open-or-create xml database/collection
add(self, *files)
add files to database
cquery(self, *conceptsets)
assemble XPath from components in a Golem dictionary
getcontext(self)
get the default query-context handler, with the cml namespace
already set
query(self, *conceptsets)
xquery(self, *xpathsets)
turn xpaths into xquery and query database

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x23bd910>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'xmldb' objects>
list of weak references to the object (if defined)

 
class xpathlist(__builtin__.list)
    
Method resolution order:
xpathlist
__builtin__.list
__builtin__.object

Methods defined here:
__init__(self, *args)
getpredicate(self)
setpredicate(self, predicate)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x23bdb30>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'xpathlist' objects>
list of weak references to the object (if defined)

Methods inherited from __builtin__.list:
__add__(...)
x.__add__(y) <==> x+y
__contains__(...)
x.__contains__(y) <==> y in x
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__delslice__(...)
x.__delslice__(i, j) <==> del x[i:j]
 
Use of negative indices is not supported.
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__iadd__(...)
x.__iadd__(y) <==> x+=y
__imul__(...)
x.__imul__(y) <==> x*=y
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__mul__(...)
x.__mul__(n) <==> x*n
__ne__(...)
x.__ne__(y) <==> x!=y
__repr__(...)
x.__repr__() <==> repr(x)
__reversed__(...)
L.__reversed__() -- return a reverse iterator over the list
__rmul__(...)
x.__rmul__(n) <==> n*x
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
__setslice__(...)
x.__setslice__(i, j, y) <==> x[i:j]=y
 
Use  of negative indices is not supported.
append(...)
L.append(object) -- append object to end
count(...)
L.count(value) -> integer -- return number of occurrences of value
extend(...)
L.extend(iterable) -- extend list by appending elements from the iterable
index(...)
L.index(value, [start, [stop]]) -> integer -- return first index of value
insert(...)
L.insert(index, object) -- insert object before index
pop(...)
L.pop([index]) -> item -- remove and return item at index (default last)
remove(...)
L.remove(value) -- remove first occurrence of value
reverse(...)
L.reverse() -- reverse *IN PLACE*
sort(...)
L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
cmp(x, y) -> -1, 0, 1

Data and other attributes inherited from __builtin__.list:
__new__ = <built-in method __new__ of type object at 0x2de940>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
Functions
       
DB(...)
DBEnv(...)
DBSequence(...)
bigtest()
version(...)
Returns a tuple of major, minor, and patch release numbers of the
underlying DB library.

 
Data
        DATABASE = 'NaCl.dbxml'
DATABASE_ERROR = 5
DB_AFTER = 1
DB_AGGRESSIVE = 1
DB_APPEND = 2
DB_ARCH_ABS = 1
DB_ARCH_DATA = 2
DB_ARCH_LOG = 4
DB_ARCH_REMOVE = 8
DB_AUTO_COMMIT = 33554432
DB_BEFORE = 3
DB_BTREE = 1
DB_BUFFER_SMALL = -30999
DB_CDB_ALLDB = 16384
DB_CHECKPOINT = 0
DB_CHKSUM = 16384
DB_CONSUME = 4
DB_CONSUME_WAIT = 5
DB_CREATE = 1
DB_CURRENT = 6
DB_DIRECT_DB = 32768
DB_DIRECT_LOG = 65536
DB_DIRTY_READ = 134217728
DB_DONOTINDEX = -30998
DB_DUP = 32768
DB_DUPSORT = 65536
DB_ENCRYPT = 131072
DB_ENCRYPT_AES = 1
DB_EXCL = 16384
DB_EXTENT = 32768
DB_FAST_STAT = 1
DB_FCNTL_LOCKING = 32768
DB_FIRST = 7
DB_FLUSH = 1
DB_FORCE = 4
DB_GET_BOTH = 8
DB_GET_RECNO = 11
DB_HASH = 2
DB_INCOMPLETE = 0
DB_INIT_CDB = 16384
DB_INIT_LOCK = 32768
DB_INIT_LOG = 65536
DB_INIT_MPOOL = 131072
DB_INIT_REP = 262144
DB_INIT_TXN = 524288
DB_JOINENV = 0
DB_JOIN_ITEM = 12
DB_JOIN_NOSORT = 1
DB_KEYEMPTY = -30997
DB_KEYEXIST = -30996
DB_KEYFIRST = 13
DB_KEYLAST = 14
DB_LAST = 15
DB_LOCKDOWN = 1048576
DB_LOCK_CONFLICT = 0
DB_LOCK_DEADLOCK = -30995
DB_LOCK_DEFAULT = 1
DB_LOCK_DUMP = 0
DB_LOCK_GET = 1
DB_LOCK_INHERIT = 3
DB_LOCK_IREAD = 5
DB_LOCK_IWR = 6
DB_LOCK_IWRITE = 4
DB_LOCK_MAXLOCKS = 3
DB_LOCK_MINLOCKS = 5
DB_LOCK_MINWRITE = 6
DB_LOCK_NG = 0
DB_LOCK_NORUN = 0
DB_LOCK_NOTGRANTED = -30994
DB_LOCK_NOWAIT = 2
DB_LOCK_OLDEST = 7
DB_LOCK_PUT = 4
DB_LOCK_PUT_ALL = 5
DB_LOCK_PUT_OBJ = 6
DB_LOCK_RANDOM = 8
DB_LOCK_READ = 1
DB_LOCK_READ_UNCOMMITTED = 7
DB_LOCK_RECORD = 4
DB_LOCK_SWITCH = 16
DB_LOCK_UPGRADE = 32
DB_LOCK_UPGRADE_WRITE = 10
DB_LOCK_WAIT = 3
DB_LOCK_WRITE = 2
DB_LOCK_WWRITE = 8
DB_LOCK_YOUNGEST = 9
DB_LOG_AUTOREMOVE = 524288
DB_LOG_INMEMORY = 1048576
DB_LSTAT_ABORTED = 1
DB_LSTAT_FREE = 3
DB_LSTAT_HELD = 4
DB_LSTAT_PENDING = 5
DB_LSTAT_WAITING = 6
DB_MAX_PAGES = -1
DB_MAX_RECORDS = -1
DB_MULTIPLE = 268435456
DB_MULTIPLE_KEY = 536870912
DB_NEXT = 16
DB_NEXT_DUP = 17
DB_NEXT_NODUP = 18
DB_NODUPDATA = 19
DB_NOLOCKING = 2097152
DB_NOMMAP = 16
DB_NOORDERCHK = 2
DB_NOOVERWRITE = 20
DB_NOPANIC = 4194304
DB_NOSERVER = -30992
DB_NOSERVER_HOME = -30991
DB_NOSERVER_ID = -30990
DB_NOSYNC = 21
DB_NOTFOUND = -30989
DB_ODDFILESIZE = 65536
DB_OLD_VERSION = -30988
DB_OPFLAGS_MASK = 255
DB_ORDERCHKONLY = 4
DB_PAGE_NOTFOUND = -30987
DB_PANIC_ENVIRONMENT = 16777216
DB_POSITION = 22
DB_PREV = 23
DB_PREV_NODUP = 24
DB_PRIVATE = 2097152
DB_PR_PAGE = 8
DB_PR_RECOVERYTEST = 16
DB_QUEUE = 4
DB_RDONLY = 32
DB_RDWRMASTER = 131072
DB_READ_COMMITTED = 67108864
DB_READ_UNCOMMITTED = 134217728
DB_RECNO = 3
DB_RECNUM = 524288
DB_RECOVER = 64
DB_RECOVER_FATAL = 4194304
DB_REGION_INIT = 536870912
DB_RENUMBER = 1048576
DB_REVSPLITOFF = 2097152
DB_RMW = 1073741824
DB_RPCCLIENT = 2
DB_RUNRECOVERY = -30975
DB_SALVAGE = 64
DB_SECONDARY_BAD = -30974
DB_SEQ_DEC = 1
DB_SEQ_INC = 2
DB_SEQ_WRAP = 8
DB_SET = 25
DB_SET_LOCK_TIMEOUT = 26
DB_SET_RANGE = 27
DB_SET_RECNO = 28
DB_SET_TXN_TIMEOUT = 30
DB_SNAPSHOT = 4194304
DB_STAT_CLEAR = 4
DB_SYSTEM_MEM = 16777216
DB_THREAD = 128
DB_TIME_NOTGRANTED = 1073741824
DB_TRUNCATE = 256
DB_TXN_NOSYNC = 512
DB_TXN_NOT_DURABLE = 1024
DB_TXN_NOWAIT = 16384
DB_TXN_SYNC = 32768
DB_TXN_WRITE_NOSYNC = 2048
DB_UNKNOWN = 5
DB_UPGRADE = 1
DB_USE_ENVIRON = 4096
DB_USE_ENVIRON_ROOT = 8192
DB_VERIFY = 2
DB_VERIFY_BAD = -30973
DB_VERSION_MAJOR = 4
DB_VERSION_MINOR = 5
DB_VERSION_PATCH = 20
DB_VERSION_STRING = 'Berkeley DB 4.5.20: (September 20, 2006)'
DB_WRITECURSOR = 32
DB_XA_CREATE = 2
DB_YIELDCPU = -2147483648
EACCES = 13
EAGAIN = 35
EBUSY = 16
EEXIST = 17
EINVAL = 22
ENOENT = 2
ENOMEM = 12
ENOSPC = 28
EPERM = 1
cvsid = '$Id: _bsddb.c 53253 2007-01-05 02:06:17Z gregory.p.smith $'
namespaces = {'cml': 'http://www.xml-cml.org/schema', 'golem': 'http://www.lexical.org.uk/golem', 'h': 'http://www.w3.org/1999/xhtml', 'xsd': 'http://www.w3.org/2001/XMLSchema', 'xsl': 'http://www.w3.org/1999/XSL/Transform'}