で空白ノードを追加:以下に書かれたコードは、次の出力を与えるトリプル
コード:
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)))
が出力:
<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>
しかし、私は次の出力を必要とし、あなたは何を案内してください可能性それは間違っています。
<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>
ありがとうございます。