Module ExampleModule :: Class ExampleDataType
[hide private]

Class ExampleDataType

source code


A sample conduit.DataType.DataType used to represent a page from the GNOME wiki.

DataSources should try to used the supplied types (Note, File, etc) but if they must define their own then this class shows how.

Instance Methods [hide private]
 
__init__(self, uri, **kwargs)
It is recommended to have compulsory parameters and then kwargs as arguments to the constructor
source code
 
__str__(self)
The result of str may be shown to the user if there is a conflict.
source code
 
get_hash(self)
The hash should be able to detect if the data has been modified, irrespective of the mtime - i.e.
source code
 
get_string(self) source code

Inherited from conduit.datatypes.DataType.DataType: __getstate__, __setstate__, compare, get_UID, get_mtime, get_open_URI, get_rid, get_snippet, get_tags, get_type, set_UID, set_mtime, set_open_URI, set_tags

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
string _name_ = "exampledata"
The name of the type
Instance Variables [hide private]

Inherited from conduit.datatypes.DataType.DataType: UID, URI

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, uri, **kwargs)
(Constructor)

source code 
It is recommended to have compulsory parameters and then kwargs as arguments to the constructor
Overrides: conduit.datatypes.DataType.DataType.__init__

__str__(self)
(Informal representation operator)

source code 
The result of str may be shown to the user if there is a conflict. It should represent a small descriptive snippet of the Datatype.
Overrides: object.__str__

get_hash(self)

source code 
The hash should be able to detect if the data has been modified, irrespective of the mtime - i.e. use the page contents directly
Overrides: conduit.datatypes.DataType.DataType.get_hash