<?xml version="1.0" encoding="iso-8859-1"?>
<module name="Ft.Rdf.Drivers.MetaKit" file="/work/a/ports/textproc/py-4suite/work/4Suite-1.0b1/build/lib.freebsd-8.0-RELEASE-p2-i386-2.4/Ft/Rdf/Drivers/MetaKit.py">
  <modification-date>2005-03-29 00:30:48</modification-date>
  <abstract>A persistent RDF model driver using MetaKit database files</abstract>
  <description>MetaKit is an efficient embedded database library with a small footprint.
See http://www.equi4.com/metakit/

This driver originally donated by Alexander Smishlajev:
http://lists.fourthought.com/pipermail/4suite-dev/2002-August/000621.html
with copyright transferred to Fourthought.

Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/</description>
  <classes>
    <class name="DbAdapter" public="yes">
      <bases>
      </bases>
      <abstract/>
      <description/>
      <method-resolution-order>
        <base name="DbAdapter" module="Ft.Rdf.Drivers.MetaKit"/>
      </method-resolution-order>
      <methods documented="yes" class="DbAdapter" module="Ft.Rdf.Drivers.MetaKit" inherited="no">
        <method public="no" name="__init__" id="DbAdapter-__init__">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="name"/>
            <arg default="'default'" name="modelName"/>
          </arguments>
        </method>
        <method public="yes" name="add" id="DbAdapter-add">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="statements"/>
          </arguments>
        </method>
        <method public="yes" name="begin" id="DbAdapter-begin">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="bind" id="DbAdapter-bind">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="object"/>
            <arg name="name"/>
            <arg name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="commit" id="DbAdapter-commit">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="complete" id="DbAdapter-complete">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="subject"/>
            <arg name="predicate"/>
            <arg name="object"/>
            <arg name="statementUri"/>
            <arg name="scope"/>
            <arg name="flags"/>
          </arguments>
        </method>
        <method public="yes" name="contains" id="DbAdapter-contains">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="subject"/>
            <arg name="predicate"/>
            <arg name="object"/>
            <arg name="statementUri"/>
            <arg name="scope"/>
            <arg name="flags"/>
          </arguments>
        </method>
        <method public="yes" name="has_key" id="DbAdapter-has_key">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="name"/>
            <arg name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="isResource" id="DbAdapter-isResource">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="res"/>
          </arguments>
        </method>
        <method public="yes" name="keys" id="DbAdapter-keys">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="lookup" id="DbAdapter-lookup">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="name"/>
            <arg name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="mk_bound_view" id="DbAdapter-mk_bound_view">
          <abstract>return the MetaKit view containing RDF bindings</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="mk_get_objects" id="DbAdapter-mk_get_objects">
          <abstract>return disctinct (object, otype) pairs from listed rows</abstract>
          <description>Parameters:
    view - RDF Model (MetaKit view)
    indices - list of row indexes
Return value:
    list of unique (object, otype) pairs</description>
          <arguments>
            <arg name="self"/>
            <arg name="view"/>
            <arg name="indices"/>
          </arguments>
        </method>
        <method public="yes" name="mk_get_subjects" id="DbAdapter-mk_get_subjects">
          <abstract>return disctinct subjects from listed rows</abstract>
          <description>Parameters:
    view - RDF Model (MetaKit view)
    indices - list of row indexes
Return value:
    list of unique subjects</description>
          <arguments>
            <arg name="self"/>
            <arg name="view"/>
            <arg name="indices"/>
          </arguments>
        </method>
        <method public="yes" name="mk_select" id="DbAdapter-mk_select">
          <abstract>complete the statement; return MetaKit view</abstract>
          <description>parameters:
    statement - 5-element sequence
        (subject, predicate, object, statementUri, scope)
    flags - dictionary with following recognized keys:
        &quot;subjectFlags&quot;, &quot;predicateFlags&quot;, &quot;objectFlags&quot;,
        &quot;statementUriFlags&quot;, &quot;scopeFlags&quot;.
        dictionary values are any combination
        of IGNORE_CASE and REGEX</description>
          <arguments>
            <arg name="self"/>
            <arg name="statement"/>
            <arg name="flags"/>
          </arguments>
        </method>
        <method public="yes" name="mk_statement_view" id="DbAdapter-mk_statement_view">
          <abstract>return the MetaKit view containing RDF statements</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="mk_versa_list" id="DbAdapter-mk_versa_list">
          <abstract>Versa query utility: return rownums for all sel_col in sel_val</abstract>
          <description>Parameters:
    view - MetaKit view used for lookups.
    sel_col - name of the filter column.
        Lookup is performed on this column for values in sel_val
    sel_val - sequence of the lookup values.
        When sel_col value matches any value in sel_val,
        value from val_sel column is returned.
Return value:
    list of matching row numbers</description>
          <arguments>
            <arg name="self"/>
            <arg name="view"/>
            <arg name="sel_col"/>
            <arg name="sel_val"/>
          </arguments>
        </method>
        <method public="yes" name="objectsFromSubAndPreds" id="DbAdapter-objectsFromSubAndPreds">
          <abstract>Get a list of objects with the given predicates and subject</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="subject"/>
            <arg name="predicates"/>
            <arg default="None" name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="properties" id="DbAdapter-properties">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="remove" id="DbAdapter-remove">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="statements"/>
          </arguments>
        </method>
        <method public="yes" name="removePattern" id="DbAdapter-removePattern">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="subject"/>
            <arg name="predicate"/>
            <arg name="object"/>
            <arg name="statementUri"/>
            <arg name="scope"/>
            <arg name="flags"/>
          </arguments>
        </method>
        <method public="yes" name="require_transaction" id="DbAdapter-require_transaction">
          <abstract>raise an exception if transaction was not opened</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="resources" id="DbAdapter-resources">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="rollback" id="DbAdapter-rollback">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="size" id="DbAdapter-size">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="subjectsFromPredAndObjs" id="DbAdapter-subjectsFromPredAndObjs">
          <abstract>Get a list of subjects with the given predicate and objects</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="predicate"/>
            <arg name="objects"/>
            <arg default="None" name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="subjectsFromPredsAndObj" id="DbAdapter-subjectsFromPredsAndObj">
          <abstract>Get a list of subjects with the given predicates and object</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="predicates"/>
            <arg name="object"/>
            <arg default="None" name="scope"/>
          </arguments>
        </method>
        <method public="yes" name="unbind" id="DbAdapter-unbind">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="name"/>
            <arg name="scope"/>
          </arguments>
        </method>
      </methods>
    </class>
  </classes>
  <functions>
    <function public="yes" name="CheckVersion" id="CheckVersion">
      <abstract/>
      <description/>
      <arguments>
        <arg name="dbName"/>
      </arguments>
    </function>
    <function public="yes" name="CreateDb" id="CreateDb">
      <abstract/>
      <description/>
      <arguments>
        <arg name="dbName"/>
        <arg default="'default'" name="modelName"/>
      </arguments>
    </function>
    <function public="yes" name="CreateFileName" id="CreateFileName">
      <abstract/>
      <description/>
      <arguments>
        <arg name="dbName"/>
      </arguments>
    </function>
    <function public="yes" name="DestroyDb" id="DestroyDb">
      <abstract/>
      <description/>
      <arguments>
        <arg name="dbName"/>
        <arg default="'default'" name="modelName"/>
      </arguments>
    </function>
    <function public="yes" name="ExistsDb" id="ExistsDb">
      <abstract/>
      <description/>
      <arguments>
        <arg name="dbName"/>
        <arg default="'default'" name="modelName"/>
      </arguments>
    </function>
    <function public="yes" name="GetDb" id="GetDb">
      <abstract/>
      <description/>
      <arguments>
        <arg name="dbName"/>
        <arg default="'default'" name="modelName"/>
      </arguments>
    </function>
    <function public="yes" name="InitializeModule" id="InitializeModule">
      <abstract>Post-import hook to initialize module's runtime variables that are not
required at import time, but will be needed before the module-level
functions are called.</abstract>
      <description/>
      <arguments>
      </arguments>
    </function>
    <function public="no" name="_filter_function" id="_filter_function">
      <abstract>apply each function in filter to corresp. rowref attrs; return truth</abstract>
      <description>parameters:
    rowref - parameter passed to the filtering function by
        MetaKit view: row refference
    filter - maps row attribute names to filters.

return True if all of attribute filtering functions returned True</description>
      <arguments>
        <arg name="rowref"/>
        <arg default="{}" name="filter"/>
      </arguments>
    </function>
    <function public="yes" name="dec_utf8" realname="lambda" id="dec_utf8">
      <abstract/>
      <description/>
      <arguments>
        <arg name="s"/>
      </arguments>
    </function>
    <function public="yes" name="enc_utf8" realname="lambda" id="enc_utf8">
      <abstract/>
      <description/>
      <arguments>
        <arg name="u"/>
      </arguments>
    </function>
  </functions>
  <fields>
    <field public="yes" name="BOUND_VIEW" id="BOUND_VIEW">
      <value>'ftrdf_%s_bound[name:S,object:B,scope:S]'</value>
    </field>
    <field public="yes" name="MODE_RW" id="MODE_RW">
      <value>1</value>
    </field>
    <field public="yes" name="STATEMENT_ATTRS" id="STATEMENT_ATTRS">
      <value>('subject', 'predicate', 'object', 'statementUri', 'scope')</value>
    </field>
    <field public="yes" name="STATEMENT_FLAGS" id="STATEMENT_FLAGS">
      <value>['subjectFlags', 'predicateFlags', 'objectFlags', 'statementUriFlags', 'scopeFlags']</value>
    </field>
    <field public="yes" name="STATEMENT_VIEW" id="STATEMENT_VIEW">
      <value>'ftrdf_%s_statement[subject:S,predicate:S,object:S,statementUri:S,scope:S,otype:S]'</value>
    </field>
    <field public="yes" name="VERSION" id="VERSION">
      <value>'0.1'</value>
    </field>
    <field public="yes" name="VERSION_VIEW" id="VERSION_VIEW">
      <value>'ftrdf_version[version:S]'</value>
    </field>
  </fields>
</module>
