The code written below gives the following output:
Code:
person = BNode()
dataStore.add((URIRef(stringrd),FOAF_NS['knows'],person))
dataStore.add((person,FOAF_NS['Person'],URIRef(fetchKnowsRowString)))
dataStore.add((person,TRUST_NS['hasValue'],Literal(trustString)))
Output:
<rdf:Description rdf:about="http://www.iamresearcher.com/profiles/id/luc.moreau">
<foaf:knows rdf:nodeID="kdOAGjqG160"/>
</rdf:Description>
<rdf:Description rdf:nodeID="kdOAGjqG160">
<t:data>1</t:data>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/patrick.hayes"/>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/christian.queinnec"/>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/thanassis.tiropanis"/>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/ian.foster"/>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/nicholas.gibbins"/>
</rdf:Description>
But I need following output, could you please guide what is wrong with it.
<rdf:Description rdf:about="http://www.iamresearcher.com/profiles/id/luc.moreau">
<foaf:knows>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/patrick.hayes">
<t:data>1</t:data>
</foaf:Person>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/christian.queinnec">
<t:data>1</t:data>
</foaf:Person>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/thanassis.tiropanis">
<t:data>1</t:data>
</foaf:Person>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/ian.foster">
<t:data>1</t:data>
</foaf:Person>
<foaf:Person rdf:resource="http://www.iamresearcher.com/profiles/id/nicholas.gibbins">
<t:data>1</t:data>
</foaf:Person>
</foaf:knows>
</rdf:Description>
Thanks in advance.