To create nodes in the database of  various types.

object type: University    
input = { 'status':'public','attributes':[('title','University'),('description','University is the governing body of all colleges under it')], 'nodetype':'objecttype','nid':'University','uid':'1'}
print con.setnode(input)


Attribute type: Location for University  
input={'status':'public', 'nodetype':'attributetype', 'nid':'Location' , 'subjecttypes':['University'], 'restrictiontype':'1', 'datatype':'text[]', 'applicablenodetypes':'types', 'uid':'1'}
print con.setnode(input)

Object type: College 
input = { 'status':'public','attributes':[('title','College'),('description','College is for graduation and post graduation education')],'nodetype':'objecttype','nid':'College','uid':'1'}
print con.setnode(input)



Attribute type: typeof for college    
input={'status':'public', 'nodetype':'attributetype', 'nid':'typeof' , 'subjecttypes':['College'], 'restrictiontype':'1', 'datatype':'text[]', 'applicablenodetypes':'types', 'uid':'1'}
print con.setnode(input)


 Mumbai University :Object of University    
input ={'status':'public', 'nodetype':'object', 'nid':'Mumbai_University', 'instanceof':['110'], 'attributes':[('title','Mumbai University'),( 'description','This is the university followed by Mumbai colleges')], 'language':'english' }
print con.setnode(input)

 Pune University :Object of University    
input ={'status':'public', 'nodetype':'object', 'nid':'Pune_University', 'instanceof':['110'],'attributes':[('title','Pune University'), ('description','This is the university followed by Pune colleges')],'language':'english' }
print con.setnode(input)




relation type : Follows , College follows University    
input={ 'status':'public', 'nodetype':'relationtype', 'nid':'follows' ,'subjecttype1':['College'], 'subjecttype2':['University'], 'applicablenodetypes1':'types', 'applicablenodetypes2':'types', 'inversename':'governs' }
print con.setnode(input)


Harvard :object of College   
input ={'status':'public' , 'nodetype':'object' , 'nid':'Harvard'  , 'relation':[('follows',['1671'])], 'instanceof':['111']}
print con.setnode(input)


MIT :object of College   
input ={'status':'public' , 'nodetype':'object' , 'nid':'MIT' ,   'relation':[('follows',['1674'])],'instanceof':['111']}
print con.setnode(input)


object type: Person  
input ={ 'status':'public','title':'Person','nodetype':'objecttype','nid':'Person','uid':'1'}
print con.setnode(input)


Attribute type: age of person  
input={'status':'public', 'nodetype':'attributetype', 'nid':'age' , 'subjecttypes':['Person'], 'restrictiontype':'1', 'datatype':'text[]', 'applicablenodetypes':'types', 'uid':'1'}
print con.setnode(input)



Object type: Student subtype of Person   
input = { 'status':'public','attributes':[('title','Student'),('description','Student is a person who gains knowledge')],'nodetype':'objecttype','nid':'Student','uid':'1', 'subtypeof':['54']}
print con.setnode(input)

Object type: Faculty subtype of Person   
input = { 'status':'public','attributes':[('title','Faculty'),('description','Faculty is a person who gives knowledge')],'nodetype':'objecttype','nid':'Faculty','uid':'1', 'subtypeof':['54']}
print con.setnode(input)

relation type : studies in , student studies in college  
input={ 'status':'public', 'nodetype':'relationtype', 'nid':'studies in' ,'subjecttype1':['Student'], 'subjecttype2':['College'], 'applicablenodetypes1':'types', 'applicablenodetypes2':'types', 'inversename':'enrolls' }
print con.setnode(input)


 relation type : Teaches , Faculty Teaches student  
input={ 'status':'public', 'nodetype':'relationtype', 'nid':'Teaches' ,'subjecttype1':['Faculty'], 'subjecttype2':['Student'],'applicablenodetypes1':'types', 'applicablenodetypes2':'types', 'inversename':'is taught by' }
print con.setnode(input)

Henry Williams :object of Student  
input ={'status':'public' , 'nodetype':'object' , 'nid':'Henry Williams' , 'attributes':[('firstname','Henry'),('lastname','Williams')], 'relation':[('studies in',['1683'])], 'instanceof':['1696'],'language':'english' }
print con.setnode(input)

 
