Package conduit :: Package datatypes :: Module DataType :: Class DataType
[hide private]

Class DataType

source code


Base DataType which represents any thing which can be synchronized between two DataProviders

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
string
get_type(self)
Returns: The type (name) of this datatype
source code
 
compare(self, B)
Comparison function to be overridden by datatypes who support two way synchronisation.
source code
 
get_hash(self) source code
 
get_UID(self)
Returns the UID of the datatype
source code
 
set_UID(self, UID)
Sets the UID of the datatype
source code
 
set_mtime(self, mtime)
Sets the modification time of the datatype.
source code
datetime.datetime
get_mtime(self)
Returns: The file modification time (or None) as a python datetime object
source code
 
get_tags(self)
Returns: the current list of tags
source code
 
set_tags(self, tags)
Sets the tags of the datatype
source code
 
get_open_URI(self)
Returns: The URI that can be opened through gnome-open (or None)
source code
 
set_open_URI(self, URI)
Saves the URI that can be opened through gnome-open
source code
 
get_snippet(self)
Returns a small representation of the data that may be shown to the user.
source code
 
get_rid(self)
Returns: The record identifier (Rid) for this data
source code
 
__getstate__(self)
Store the object state in a dict for pickling
source code
 
__setstate__(self, data)
Set object state from dict (after unpickling)
source code

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

Class Variables [hide private]
string _name_ = ""
The name of the type
Instance Variables [hide private]
string UID
A Unique identifier for this type.
string URI
A URI which uniquely represents the location of the datatype.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

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

get_type(self)

source code 
Returns: string
The type (name) of this datatype

compare(self, B)

source code 

Comparison function to be overridden by datatypes who support two way synchronisation.

This funcion should compare self with B. All answers are from the perspective of the me (the instance)

set_UID(self, UID)

source code 
Sets the UID of the datatype

set_mtime(self, mtime)

source code 
Sets the modification time of the datatype.

get_mtime(self)

source code 
Returns: datetime.datetime
The file modification time (or None) as a python datetime object

get_tags(self)

source code 
Returns:
the current list of tags

get_open_URI(self)

source code 
Returns:
The URI that can be opened through gnome-open (or None)

get_snippet(self)

source code 
Returns a small representation of the data that may be shown to the user. Derived types may override this function.

get_rid(self)

source code 
Returns:
The record identifier (Rid) for this data

Instance Variable Details [hide private]

UID

A Unique identifier for this type. This is particuarly neccessary on types that are used in two-way sync.
Type:
string