This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package example; | |
| import com.hp.hpl.jena.query.larq.IndexLARQ; | |
| import com.hp.hpl.jena.query.larq.LARQ; | |
| import org.apache.lucene.index.CorruptIndexException; | |
| import org.apache.lucene.index.IndexReader; | |
| import org.apache.lucene.store.FSDirectory; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.zip.GZIPInputStream; | |
| import java.io.*; | |
| import java.util.*; | |
| import java.util.concurrent.*; | |
| public class Calc | |
| { | |
| public static void main(final String... args) throws Exception { | |
| if (args.length == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ilrt.researchrevealed.describehandler; | |
| import com.hp.hpl.jena.query.Dataset; | |
| import com.hp.hpl.jena.rdf.model.Model; | |
| import com.hp.hpl.jena.rdf.model.ModelFactory; | |
| import com.hp.hpl.jena.rdf.model.RDFNode; | |
| import com.hp.hpl.jena.rdf.model.Resource; | |
| import com.hp.hpl.jena.rdf.model.Statement; | |
| import com.hp.hpl.jena.rdf.model.StmtIterator; | |
| import com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ export TDBROOT=/path/to/tdb/dir | |
| $ $TDBROOT/bin/tdbloader --loc=db file1.nt file2.nt | |
| ...loads data into db/... | |
| $ $TDBROOT/bin/tdbquery --results=RDF/XML --loc=db "construct { ?s ?p ?o } { ?s ?p ?o }" > out.rdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashH2.java | |
| =================================================================== | |
| --- src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashH2.java (revision 8270) | |
| +++ src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashH2.java (working copy) | |
| @@ -30,7 +30,7 @@ | |
| } | |
| @Override | |
| - public boolean clearsOnCommit() { return true; } | |
| + public boolean clearsOnCommit() { return false; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ilrt.researchrevealed.describehandler; | |
| import com.hp.hpl.jena.query.Dataset; | |
| import com.hp.hpl.jena.rdf.model.Model; | |
| import com.hp.hpl.jena.rdf.model.ModelFactory; | |
| import com.hp.hpl.jena.rdf.model.RDFNode; | |
| import com.hp.hpl.jena.rdf.model.Resource; | |
| import com.hp.hpl.jena.sparql.ARQConstants; | |
| import com.hp.hpl.jena.sparql.core.Quad; | |
| import com.hp.hpl.jena.sparql.core.describe.DescribeHandler; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ilrt.researchrevealed.describehandler; | |
| import com.hp.hpl.jena.query.Dataset; | |
| import com.hp.hpl.jena.rdf.model.Model; | |
| import com.hp.hpl.jena.rdf.model.ModelFactory; | |
| import com.hp.hpl.jena.rdf.model.RDFNode; | |
| import com.hp.hpl.jena.rdf.model.Resource; | |
| import com.hp.hpl.jena.sparql.ARQConstants; | |
| import com.hp.hpl.jena.sparql.core.Quad; | |
| import com.hp.hpl.jena.sparql.core.describe.DescribeHandler; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Joseki 3.4.2, own describe handler | |
| SELECT count(?g) { graph ?g { ?s a ?type } } | |
| 90743 | |
| DROP GRAPH <http://resrev.ilrt.bris.ac.uk/research-revealed-merb/people/4021#person> | |
| ... Time passes ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CONSTRUCT { | |
| ?s1 ?p1 ?o1 . | |
| <http://rdf4ecommerce.esolda.com/digicam#digitalZoomFactor> ?p2 <http://rdf4ecommerce.esolda.com/digicam#GeneralFeatures> . | |
| } | |
| WHERE { | |
| { ?s1 ?p1 ?o1 . | |
| filter ( ?s1 != <http://rdf4ecommerce.esolda.com/digicam#digitalZoomFactor> || ?p1 != rdf4ec:belongsToDomainSegment || ?o1 != <http://rdf4ecommerce.esolda.com/digicam#LensFeatures> ) } | |
| UNION | |
| { <http://rdf4ecommerce.esolda.com/digicam#digitalZoomFactor> ?p2 ?o2 . | |
| filter ( ?p2 = rdf4ec:belongsToDomainSegment && ?o2 = <http://rdf4ecommerce.esolda.com/digicam#LensFeatures> ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CONSTRUCT { | |
| ?s1 ?p1 ?o1 . | |
| ?s2 ?p2 <GenerallFeatures> . # Object case | |
| } | |
| WHERE { | |
| { ?s1 ?p1 ?o1 . | |
| filter ( ?o1 != <LensFeatures> ) } # filter out problem cases | |
| UNION | |
| { ?s2 ?p2 <LensFeatures> } # Object case | |
| } |