Package bw :: Package poseidon :: Module neurons :: Class N
[frames] | no frames]

Class N

object --+
         |
        N

This is the superclass which represents all neurons. All neurons have:

  1. A 128-bit (16 byte) UUID stored as a 16-byte string
  2. A certificate which is a pair of timestamps (created, accessed)
  3. A dictionary of additional metadata which is initialized to None.

This implies that links can also contain metadata.

Instance Methods
 
get_id(self)
Returns a 32 character hex (ascii compatible) representation of the id.
 
get_raw_id(self)
Returns the 16 byte raw representation of the id.
 
modify(self)
Modify the last-accessed timestamp to the current timestamp
 
getCurrentData(self)
 
dictionary(self)
 
__init__(self, i, c, d)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__hash__(self)
hash(x)

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

Class Variables
  id = property(fget= get_id, fset= None, fdel= None, doc= """Th...
  createdOn = property(fget= __GetCreated, doc= "Returns the cre...
  modified = property(fget= __GetModified, doc= "Returns the las...
  currentData = property(fget= __GetCurrentData, fset= __SetCurr...
Properties

Inherited from object: __class__

Method Details

get_id(self)

 

Returns a 32 character hex (ascii compatible) representation of the id. It is prefixed by an '!' and can safely be passed to the client.

Warning: Calling this method frequently can be slow. It is recommended that the user save the hex-representation in a local variable instead.

getCurrentData(self)

 

Deprecated: Not used anymore

__init__(self, i, c, d)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__hash__(self)
(Hashing function)

 

hash(x)

Overrides: object.__hash__
(inherited documentation)

Class Variable Details

id

Value:
property(fget= get_id, fset= None, fdel= None, doc= """The default
	accessor for the id returns the ascii-safe hex representation. It can\
not be changed""")

createdOn

Value:
property(fget= __GetCreated, doc= "Returns the created-on timestamp. C\
annot be changed.")

modified

Value:
property(fget= __GetModified, doc= "Returns the last-modified timestam\
p. It cannot be directly changed. @see: L{modify}")

currentData

Value:
property(fget= __GetCurrentData, fset= __SetCurrentData, fdel= __DelCu\
rrentData, doc= "A dictionary containing arbitrary metadata")