python_psynth
This is the official python package for generating graphs in Psymphonic Psynth
psynth.psynth.Detail Class Reference

Detail objects contain links or text, and can be attached to Node objects and Link objects. More...

Public Member Functions

def __init__
 Constructs a Detail object. More...
 
def anchor (self)
 Returns the object this Detail is anchored to. More...
 
def dictionary (self)
 Returns a dictionary of this LinkType's properties, as required by the API. More...
 
def update
 Updates the server's registry of this Detail. More...
 

Public Attributes

 anchor_uid
 str :: The global unique identifier of the object this Detail is anchored to. More...
 
 anchor_type
 str :: The type of object this Detail is anchored to. More...
 
 content
 str :: The content of this Detail. More...
 
 x
 float :: The x-coordinate of the Detail. More...
 
 y
 float :: The y-coordinate of the Detail. More...
 
 type
 str :: The type of this detail. More...
 
 name
 str :: The name of this detail. More...
 
 uid
 str :: The global unique identifier of this Detail
 
 created
 bool :: Whether or not this Detail has been created on the server. More...
 

Static Public Attributes

 graph = None
 Graph :: The Graph to which this Detail belongs. More...
 

Detailed Description

Detail objects contain links or text, and can be attached to Node objects and Link objects.

Constructor & Destructor Documentation

def psynth.psynth.Detail.__init__ (   self,
  content,
  anchor_uid = None,
  anchor_type = None,
  x = None,
  y = None,
  type = 'comment',
  name = None,
  uid = None 
)

Constructs a Detail object.

Parameters
contentstr :: The content of this Detail.
anchor_uidstr :: The uid of the object this Detail is attached to.
anchor_typestr :: The type of object this Detail is attached to.
xfloat :: The x-coordinate of this Detail.
yfloat :: The y-coordinate of this Detail.
typestr :: The type of Detail this is. 'link', 'comment', 'video', 'image'
namestr :: The name of this Detail. This is not currently used for anything on the front-end.
uidstr :: A global unique identifier for this Detail.
1 d = Detail("http://psymphonic.com/", type="link")
2 n.add_detail(d)

Member Function Documentation

def psynth.psynth.Detail.anchor (   self)

Returns the object this Detail is anchored to.

Returns
object: Node|Link ::
1 for d in g.detail_list():
2  print d.anchor().name
def psynth.psynth.Detail.dictionary (   self)

Returns a dictionary of this LinkType's properties, as required by the API.

Generally used internally to build queries.

Returns
dict: dict ::
1 q = d.dictionary()
2 q['query'] = "newdetail"
3 g.queue(q)
def psynth.psynth.Detail.update (   self,
  callback = None 
)

Updates the server's registry of this Detail.

Parameters
callbackfunction :: An optional function to handle the server's response to the query.
1 d.content = "http://en.wikipedia.org/wiki/Christopher_Alexander"
2 d.update()

Member Data Documentation

psynth.psynth.Detail.anchor_type

str :: The type of object this Detail is anchored to.

psynth.psynth.Detail.anchor_uid

str :: The global unique identifier of the object this Detail is anchored to.

psynth.psynth.Detail.content

str :: The content of this Detail.

psynth.psynth.Detail.created

bool :: Whether or not this Detail has been created on the server.

psynth.psynth.Detail.graph = None
static

Graph :: The Graph to which this Detail belongs.

psynth.psynth.Detail.name

str :: The name of this detail.

Currently not used on the front end.

psynth.psynth.Detail.type

str :: The type of this detail.

'link', 'comment', 'image', 'video'

psynth.psynth.Detail.x

float :: The x-coordinate of the Detail.

psynth.psynth.Detail.y

float :: The y-coordinate of the Detail.


The documentation for this class was generated from the following file: