Re: Store query results in new RDF

2013-11-12 Thread Adeeb Noor
Hi Andy: Thanks for the response. And here are the answers of all questions: My TDB is on my hard drive with 17GB and my PC is Mac Pro with 2.4 GHZ and 4GB of memory. The number of triples is: 37397456 My java: java version 1.6.0_65 Java(TM) SE Runtime Environment (build

Re: Store query results in new RDF

2013-11-12 Thread Andy Seaborne
On 12/11/13 08:17, Adeeb Noor wrote: Hi Andy: Thanks for the response. And here are the answers of all questions: And version of Jena? And [[ And how much of the DB does the SELECT query match? What's SELECT (count(*) AS ?c) What's SELECT (count(distinct *) AS ?c) ]] Without

Re: Store query results in new RDF

2013-11-10 Thread Andy Seaborne
On 10/11/13 06:21, Adeeb Noor wrote: Any help guys . There is information about your data that I've asked for, twice, earlier in this thread. Without that information, anything is just guessing. Only in your last message did you say inferredData so now maybe your are updating through an

Re: Store query results in new RDF

2013-11-09 Thread Adeeb Noor
Any help guys . On Thu, Nov 7, 2013 at 9:51 PM, Adeeb Noor adeeb.n...@colorado.edu wrote: Here is the new version of the code using QueryExecution.execConstructTriples: FileLoader fileLoader = new FileLoader(src/aaCONSTRUCT.tql); String q = fileLoader.loadAll(); Query query =

Re: Store query results in new RDF

2013-11-07 Thread Andy Seaborne
On 07/11/13 02:55, Adeeb Noor wrote: On Wed, Nov 6, 2013 at 5:23 AM, Andy Seaborne a...@apache.org mailto:a...@apache.org wrote: On 06/11/13 00:31, Adeeb Noor wrote: Any help with my question please. AdeeB On Mon, Nov 4, 2013 at 1:48 PM, Adeeb Noor

Re: Store query results in new RDF

2013-11-07 Thread Adeeb Noor
Here is the new version of the code using QueryExecution.execConstructTriples: FileLoader fileLoader = new FileLoader(src/aaCONSTRUCT.tql); String q = fileLoader.loadAll(); Query query = QueryFactory.create(q) ; QueryExecution qexec = QueryExecutionFactory.create(query, data.tdb);

Re: Store query results in new RDF

2013-11-06 Thread Andy Seaborne
On 06/11/13 00:31, Adeeb Noor wrote: Any help with my question please. AdeeB On Mon, Nov 4, 2013 at 1:48 PM, Adeeb Noor adeeb.n...@colorado.edu wrote: Hi Andy: Thanks for the response. My TDB is on my hard drive with 15GB size wise. How many triples? And how much of the DB does the

Re: Store query results in new RDF

2013-11-05 Thread Adeeb Noor
Any help with my question please. AdeeB On Mon, Nov 4, 2013 at 1:48 PM, Adeeb Noor adeeb.n...@colorado.edu wrote: Hi Andy: Thanks for the response. My TDB is on my hard drive with 15GB size wise. and my PC is Mac Pro with 2.4 GHZ and 4GB of memory. I was not able to use

Re: Store query results in new RDF

2013-11-03 Thread Adeeb Noor
Hi Andy: I did figure it out, however it takes to much time (CONSTRUCT) to finish as my query is complex. Is that something normal ? in fact, it is still running AdeeB On Sat, Nov 2, 2013 at 9:56 AM, Adeeb Noor adeeb.n...@colorado.edu wrote: Hi Andy: Thanks for the quick response. I tried

Re: Store query results in new RDF

2013-11-03 Thread Andy Seaborne
On 02/11/13 15:56, Adeeb Noor wrote: Hi Andy: Thanks for the quick response. I tried CONSTRUCT and it did work out. But how can I reformat such a query to CONSTRUCT one: CONSTRUCT WHERE { ... } is a shorthand for CONSTRUCT { template } WHERE { pattern } where the template and the pattern

Re: Store query results in new RDF

2013-11-03 Thread Andy Seaborne
On 03/11/13 07:05, Adeeb Noor wrote: Hi Andy: I did figure it out, however it takes to much time (CONSTRUCT) to finish as my query is complex. Is that something normal ? in fact, it is still running Hard to tell - it depends on many factors such as machine setup, where the data is stored,

Re: Store query results in new RDF

2013-11-02 Thread Andy Seaborne
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

Re: Store query results in new RDF

2013-11-02 Thread Adeeb Noor
Hi Andy: Thanks for the quick response. I tried CONSTRUCT and it did work out. But how can I reformat such a query to CONSTRUCT one: SELECT DISTINCT * { ?ddi ddids:has_association ?c . ?ddi ddids:has_association ?c2 . ?c ddids:chemical_or_drug_affects_gene_product ?omim . ?omim

Store query results in new RDF

2013-11-01 Thread Adeeb Noor
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