This file contains 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
<http://example.org/person/Davy_Suvee> <http://example.org/person/first_name> "Davy" . | |
<http://example.org/person/Davy_Suvee> <http://example.org/person/last_name> "Suvee" . | |
<http://example.org/person/Davy_Suvee> <http://example.org/person/age> "31" . | |
<http://example.org/person/Davy_Suvee> <http://example.org/company> <http://example.org/company/DataBlend> . | |
<http://example.org/company/DataBlend> <http://example.org/company/name> "DataBlend" . | |
<http://example.org/company/DataBlend> <http://example.org/company/vat> "BE0894.523.805" . |
This file contains 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
PREFIX person: <http://www.example.org/person/> | |
SELECT ?first_name ?age | |
WHERE { | |
person:Davy_Suvee person:first_name ?first_name . | |
person:Davy_Suvee person:age ?age | |
} |
This file contains 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
<http://example.org/person/Davy_Suvee> <http://example.org/person/first_name> "Davy" . | |
<http://example.org/person/Davy_Suvee> <http://example.org/person/last_name> "Suvee" . | |
<http://example.org/person/Davy_Suvee> <http://example.org/person/age> "31" . | |
<http://example.org/person/Davy_Suvee> <http://example.org/company> <http://example.org/company/DataBlend> . | |
<http://example.org/company/DataBlend> <http://example.org/company/name> "DataBlend" . | |
<http://example.org/company/DataBlend> <http://example.org/company/vat> "BE0894.523.805" . |
This file contains 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
// Create the sail graph database | |
graphDb = new EmbeddedGraphDatabase("var/flights"); | |
indexService = new LuceneIndexService(graphDb); | |
fulltextIndex = new SimpleFulltextIndex(graphDb, new File("var/flights/lucene-fulltext")); | |
rdfStore = new VerboseQuadStore(graphDb, indexService, null, fulltextIndex); | |
sail = new GraphDatabaseSail(graphDb, rdfStore); | |
// Initialize the sail store | |
sail.initialize(); |
This file contains 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
connection.add(getResource("sneeair.rdf"), null, RDFFormat.RDFXML, new Resource[]{}); |
This file contains 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
// Create query | |
TupleQuery durationquery = connection.prepareTupleQuery(QueryLanguage.SPARQL, | |
"PREFIX io: <http://www.daml.org/2001/06/itinerary/itinerary-ont#> " + | |
"PREFIX fl: <http://www.snee.com/ns/flights#> " + | |
"SELECT ?number ?departure ?destination " + | |
"WHERE { " + | |
"?flight io:flight ?number . " + | |
"?flight fl:flightFromCityName ?departure . " + | |
"?flight fl:flightToCityName ?destination . " + | |
"?flight io:duration \"1:35\" . " + |
This file contains 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
connection.add(getResource("sneeair.rdf"), null, RDFFormat.RDFXML, new Resource[]{}); |
This file contains 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
// Create the sail graph database | |
graph = new MyNeo4jGraph("var/flights", 100000); | |
graph.setTransactionMode(TransactionalGraph.Mode.MANUAL); | |
sail = new GraphSail(graph); | |
// Initialize the sail store | |
sail.initialize(); | |
// Get the sail repository connection | |
connection = new SailRepository(sail).getConnection(); |
This file contains 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
public class MyNeo4jGraph extends Neo4jGraph { | |
private long numberOfItems = 0; | |
private long maxNumberOfItems = 1; | |
public MyNeo4jGraph(final String directory, long maxNumberOfItems) { | |
super(directory, null); | |
this.maxNumberOfItems = maxNumberOfItems; | |
} |
This file contains 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
{ | |
"fingerprint" : "0[N]1[C O]2[C C C]", | |
"count" : 472 | |
} | |
{ | |
"fingerprint" : "0[N]1[C O]2[C C C]3[C C C C C]", | |
"count" : 41 | |
} | |
{ | |
"fingerprint" : "0[O]1[C]2[C O]3[C C C]", |
OlderNewer