<?xml version="1.0" encoding="iso-8859-1"?>
<module name="Ft.Server.Server.Drivers.FlatFile" file="/work/a/ports/textproc/py-4suite/work/4Suite-1.0b1/build/lib.freebsd-7.1-RELEASE-i386-2.4/Ft/Server/Server/Drivers/FlatFile/__init__.py">
  <modification-date>2005-03-30 23:06:12</modification-date>
  <abstract>4Suite repository low-level driver for ordinary file system storage</abstract>
  <description>Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/</description>
  <classes>
    <class name="FlatFileContainer" public="yes">
      <bases>
        <base documented="yes" class="DataStoreContainer" module="Ft.Server.Server.Drivers.FtssDriver"/>
      </bases>
      <abstract>Implements repository containers as directories on the underlying file system.
Overides _createContainer to attempt an os.mkdir on the filesystem</abstract>
      <description/>
      <method-resolution-order>
        <base name="FlatFileContainer" module="Ft.Server.Server.Drivers.FlatFile"/>
        <base name="DataStoreContainer" module="Ft.Server.Server.Drivers.FtssDriver"/>
      </method-resolution-order>
      <methods documented="yes" class="FlatFileContainer" module="Ft.Server.Server.Drivers.FlatFile" inherited="no">
        <method public="no" name="__init__" id="FlatFileContainer-__init__">
          <abstract>Used if instanciated directly in order to do initialization</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="db"/>
          </arguments>
        </method>
        <method public="yes" name="deleteContainer" id="FlatFileContainer-deleteContainer">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="path"/>
          </arguments>
          <overrides name="DataStoreContainer" module="Ft.Server.Server.Drivers.FtssDriver"/>
        </method>
        <method public="yes" name="fetchChildren" id="FlatFileContainer-fetchChildren">
          <abstract>Returns a list of child uris for the given parent.  Parent is a PathImp
Needs to hit the file system to do a directory listing of the parent PathImp as a file system path</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="parent"/>
          </arguments>
        </method>
        <method public="yes" name="initialize" id="FlatFileContainer-initialize">
          <abstract>Initialize the table</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="manageChildren" id="FlatFileContainer-manageChildren">
          <abstract>Adds/remove the child specified by the given path to the parent (parent - a PathImp)
Needs to add/remove children from _children (so they are accounted for if accessed within the same transaction)</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="parent"/>
            <arg name="child"/>
            <arg default="True" name="add"/>
          </arguments>
        </method>
      </methods>
      <methods documented="yes" class="DataStoreContainer" module="Ft.Server.Server.Drivers.FtssDriver" inherited="yes">
        <member-reference name="childReferenceXML" public="yes"/>
        <member-reference name="createContainer" public="yes"/>
      </methods>
    </class>
    <class name="FlatFileDriver" public="yes">
      <bases>
        <base documented="yes" class="FlatFileContainer" module="Ft.Server.Server.Drivers.FlatFile"/>
      </bases>
      <abstract>    The FlatFile Driver will store information in a directory tree.  This
    driver will not support any locking or concurrency.  See
    ConcurrentFlatFileDriver for information on that.</abstract>
      <description>    To store information, the flat file driver will create two directories
    in its root directory.  The first will be called 'metadata' and under
    it will be a picture of the metadata in the tree.  The second will be
    called content and will contain the content of the tree.

    In the root, it will also create a file called system-rdf which is the
    RDF of the system using the Dbm driver of 4RDF.
from Ft.Server.Server.Drivers.FlatFile import 
    Also in the Root will be a file called user.rdf which is a second RDF
    Model with user information.</description>
      <method-resolution-order>
        <base name="FlatFileDriver" module="Ft.Server.Server.Drivers.FlatFile"/>
        <base name="FlatFileContainer" module="Ft.Server.Server.Drivers.FlatFile"/>
        <base name="DataStoreContainer" module="Ft.Server.Server.Drivers.FtssDriver"/>
      </method-resolution-order>
      <methods documented="yes" class="FlatFileDriver" module="Ft.Server.Server.Drivers.FlatFile" inherited="no">
        <method public="no" name="__init__" id="FlatFileDriver-__init__">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="root"/>
          </arguments>
          <overrides name="FlatFileContainer" module="Ft.Server.Server.Drivers.FlatFile"/>
        </method>
        <method public="yes" name="commit" id="FlatFileDriver-commit">
          <abstract>Make it so!</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="createFile" id="FlatFileDriver-createFile">
          <abstract>When creating a resource, 
store the content.</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="path"/>
            <arg name="typ"/>
            <arg name="content"/>
          </arguments>
        </method>
        <method public="yes" name="deleteFile" id="FlatFileDriver-deleteFile">
          <abstract>Delete an object</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="path"/>
            <arg name="typ"/>
          </arguments>
        </method>
        <method public="yes" name="fetchFile" id="FlatFileDriver-fetchFile">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="path"/>
            <arg name="typ"/>
          </arguments>
        </method>
        <method public="yes" name="getSystemModel" id="FlatFileDriver-getSystemModel">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="getUserModel" id="FlatFileDriver-getUserModel">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="hasFile" id="FlatFileDriver-hasFile">
          <abstract>See if we have any meta information about this resource</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="path"/>
            <arg name="typ"/>
          </arguments>
        </method>
        <method public="yes" name="rollback" id="FlatFileDriver-rollback">
          <abstract>Undo it</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="yes" name="updateFile" id="FlatFileDriver-updateFile">
          <abstract>Update only the content about this resource</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="path"/>
            <arg name="typ"/>
            <arg name="content"/>
          </arguments>
        </method>
      </methods>
      <methods documented="yes" class="FlatFileContainer" module="Ft.Server.Server.Drivers.FlatFile" inherited="yes">
        <member-reference name="deleteContainer" public="yes"/>
        <member-reference name="fetchChildren" public="yes"/>
        <member-reference name="initialize" public="yes"/>
        <member-reference name="manageChildren" public="yes"/>
      </methods>
      <methods documented="yes" class="DataStoreContainer" module="Ft.Server.Server.Drivers.FtssDriver" inherited="yes">
        <member-reference name="childReferenceXML" public="yes"/>
        <member-reference name="createContainer" public="yes"/>
      </methods>
    </class>
  </classes>
  <functions>
    <function public="yes" name="Begin" id="Begin">
      <abstract>Begin a new transaction.  Every driver must support this interface.
The properties keyword arguments are passed from the config file
(or where ever) to the driver.  The Begin file is responsible
for doing what ever is needed to validate these arguements</abstract>
      <description/>
      <arguments>
        <var-keywords name="properties"/>
      </arguments>
    </function>
    <function public="yes" name="CONTENT_PATH" realname="createFlatFilePath" id="CONTENT_PATH">
      <abstract>Given the absolute path of a directory on the file system to use as
the root container of the repository, plus a repo path and a
resource type, returns a file system path corresponding to the
given repo path and type.</abstract>
      <description/>
      <arguments>
        <arg name="root"/>
        <arg name="path"/>
        <arg name="t"/>
      </arguments>
    </function>
    <function public="yes" name="Destroy" id="Destroy">
      <abstract>Completly destroy the repo</abstract>
      <description/>
      <arguments>
        <arg name="properties"/>
        <arg default="0" name="tryOnly"/>
      </arguments>
    </function>
    <function public="yes" name="Exists" id="Exists">
      <abstract>See if this repo exists.  The return value for this is three states:
1.  Everything is present
0.  Some things are there
-1  Nothing is there.</abstract>
      <description/>
      <arguments>
        <arg name="properties"/>
      </arguments>
    </function>
    <function public="yes" name="GetLock" id="GetLock">
      <abstract/>
      <description/>
      <arguments>
        <arg name="fName"/>
        <arg name="typ"/>
      </arguments>
    </function>
    <function public="yes" name="Initialize" id="Initialize">
      <abstract>Initialize a new copy of the repo.  This is not the same as a
'4ss_manager init'.  This is very raw.  The adapter will take care of
calling our other interfaces (createContainer, createUser, etc) with all
of the information about the rest of the 'init' stuff to do.</abstract>
      <description/>
      <arguments>
        <arg name="properties"/>
      </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="yes" name="Maintain" id="Maintain">
      <abstract>Perform any maintenance on the db</abstract>
      <description/>
      <arguments>
        <arg name="properties"/>
      </arguments>
    </function>
    <function public="yes" name="createFlatFilePath" id="createFlatFilePath">
      <abstract>Given the absolute path of a directory on the file system to use as
the root container of the repository, plus a repo path and a
resource type, returns a file system path corresponding to the
given repo path and type.</abstract>
      <description/>
      <arguments>
        <arg name="root"/>
        <arg name="path"/>
        <arg name="t"/>
      </arguments>
    </function>
  </functions>
  <fields>
    <field public="yes" name="FTSERVER_NAMESPACE" id="FTSERVER_NAMESPACE">
      <value>'http://xmlns.4suite.org/reserved'</value>
    </field>
    <field public="yes" name="NAME" id="NAME">
      <value>'Flat File'</value>
    </field>
    <field public="yes" name="SYSTEM_RDF_FILE" id="SYSTEM_RDF_FILE">
      <value>'system-rdf'</value>
    </field>
    <field public="yes" name="USER_RDF_FILE" id="USER_RDF_FILE">
      <value>'user-rdf'</value>
    </field>
    <field public="yes" name="XLINK_NAMESPACE" id="XLINK_NAMESPACE">
      <value>u'http://www.w3.org/1999/xlink'</value>
    </field>
    <field public="yes" name="g_fileLocks" id="g_fileLocks">
      <value>{}</value>
    </field>
    <field public="yes" name="g_typeDirs" id="g_typeDirs">
      <value>{1: 'metadata', 2: 'content', 3: 'cache', 4: 'sessions'}</value>
    </field>
  </fields>
</module>
