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

Class Txo

source code

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)


Instance Methods [hide private]
 
__init__(self, item=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
xmlwrite(self, fd, offset=0) source code
 
index(self) source code
 
sort(self) source code
 
__repr__(self)
repr(x)
source code
 
__cmp__(self, other) source code
 
deep_equal(self, other) source code
 
__hash__(self)
hash(x)
source code

Inherited from _Qualified: is_complete

Inherited from _Qualified (private): _xmlsubwrite

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Methods [hide private]
 
xmlread(k, xml) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, item=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

deep_equal(self, other)

source code 
Overrides: _Qualified.deep_equal

__hash__(self)
(Hashing function)

source code 
hash(x)
Overrides: object.__hash__
(inherited documentation)