work in progress: provide XML-RPC interface to concept space
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1417 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									18489753b4
								
							
						
					
					
						commit
						3c791fa2a2
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -92,7 +92,7 @@ Now we are ready to deal with children and parents...
 | 
			
		|||
  >>> pa[0]['name']
 | 
			
		||||
  u'hasType'
 | 
			
		||||
  >>> sorted(p['name'] for p in pa[0]['objects'])
 | 
			
		||||
  u'predicate'
 | 
			
		||||
  [u'predicate']
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Fin de partie
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -102,7 +102,10 @@ def formatRelations(rels, useSecond=True):
 | 
			
		|||
            predIds[predId] = len(result)
 | 
			
		||||
            result.append({'id': predId, 'name': getName(pred),
 | 
			
		||||
                           'title': pred.title, 'objects': []})
 | 
			
		||||
        result[predIds[predId]]['objects'].append(
 | 
			
		||||
            objectAsDict(useSecond and rel.second or rel.first))
 | 
			
		||||
        if useSecond:
 | 
			
		||||
            other = rel.second
 | 
			
		||||
        else:
 | 
			
		||||
            other = rel.first
 | 
			
		||||
        result[predIds[predId]]['objects'].append(objectAsDict(other))
 | 
			
		||||
    return result
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue