You need to use a CONSTRUCT query, not a SELECT one.
outputAsRDF encodes the result set (i.e. the table) as RDF - it is not
the datamodel of the original data.
CONSTRUCT allows you to create one RDF graph from data from another.
See also SPARQL Update for doign that from one graph to another in the
same database.
Andy
On 02/11/13 05:35, Adeeb Noor wrote:
Hi guys:
I would like to save my SPARQL result coming from ResultSet into new rdf.
(new rdf resources) cause I want to do more work on this subgraph and it
has to be in the original rdf format.
I tried outputAsRDF function and it worked however the result I got the
following:
<rdf:Description rdf:nodeID="A5">
<rs:value rdf:resource="
https://csel.cs.colorado.edu/~noor/Drug_Disease_ontology/DDID.owl#genotypePhenotype
"/>
<rs:variable>omimt</rs:variable>
</rdf:Description>
<rdf:Description rdf:nodeID="A6">
<rs:value rdf:resource="
https://csel.cs.colorado.edu/~noor/Drug_Disease_ontology/DDID.rdf#C0007589
"/>
<rs:variable>w</rs:variable>
</rdf:Description>
<rdf:Description rdf:nodeID="A7">
<rs:binding rdf:nodeID="A8"/>
<rs:binding rdf:nodeID="A9"/>
<rs:binding rdf:nodeID="A10"/>
<rs:binding rdf:nodeID="A11"/>
<rs:binding rdf:nodeID="A12"/>
<rs:binding rdf:nodeID="A13"/>
<rs:binding rdf:nodeID="A14"/>
<rs:binding rdf:nodeID="A15"/>
<rs:binding rdf:nodeID="A16"/>
<rs:binding rdf:nodeID="A17"/>
<rs:binding rdf:nodeID="A18"/>
<rs:binding rdf:nodeID="A19"/>
<rs:binding rdf:nodeID="A20"/>
<rs:binding rdf:nodeID="A21"/>
<rs:binding rdf:nodeID="A22"/>
<rs:binding rdf:nodeID="A23"/>
<rs:binding rdf:nodeID="A24"/>
<rs:binding rdf:nodeID="A25"/>
<rs:binding rdf:nodeID="A26"/>
<rs:binding rdf:nodeID="A27"/>
</rdf:Description>
how I can remove this nodes things and make it something like:
<rdf:Description rdf:about="
https://csel.cs.colorado.edu/~noor/Drug_Disease_ontology/DDID.rdf#C3229174">
<j.0:label>Cytra-K Oral Product</j.0:label>
<rdf:type rdf:resource="
https://csel.cs.colorado.edu/~noor/Drug_Disease_ontology/DDID.owl#chemical
"/>
</rdf:Description>
please help me out