Package Pyblio :: Module Attribute :: Class Txo
[show private | hide private]
[frames | no frames]

Type Txo

object --+    
         |    
_Qualified --+
             |
            Txo


Element of a taxonomy.

In the simplest case, this can be seen as a value in a enumerated set of possible values. The possible values are defined as Pyblio.Schema.TxoItems, and are stored in the Store.Database, in the txo attribute, and Store.Records can contain Txo attributes which refer to these Pyblio.Schema.TxoItems. Say you have a list of known document types in the document-type taxonomy. You can then affect the document type to the type attribute of a record with the following operations:
>>> item = db.txo['document-type'].byname('article')
>>> record.add('type', item, Attribute.Txo)

Method Summary
  __init__(self, item)
  __cmp__(self, other)
  __hash__(self)
  __repr__(self)
  deep_equal(self, other)
  index(self)
  sort(self)
  xmlread(k, xml)
(Class method)
  xmlwrite(self, fd, offset)
    Inherited from _Qualified
  _xmlsubwrite(self, fd, offset)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Generated by Epydoc 2.1 on Sun Sep 24 23:52:43 2006 http://epydoc.sf.net