AGISWCASWC2007.java
package com.franz.agbase.examples;
import com.franz.agbase.*;
public class AGISWCASWC2007 {
@param
@throws
public static void main(String[] args) throws AllegroGraphException {
AllegroGraphConnection ags = new AllegroGraphConnection();
try {
ags.enable();
} catch (Exception e) {
throw new AllegroGraphException("Server connection problem", e);
}
AllegroGraph ts = ags.renew("iwscawsc2007", AGPaths.TRIPLE_STORES);
AGLoadRDF.loadRDFWithTiming(ts,AGPaths.dataSources("iswc-aswc-2007-complete.rdf"));
AGIndexAllTriples.indexAllTriplesWithTiming(ts);
String query =
"PREFIX tutorial: <http://data.semanticweb.org/conference/iswc-aswc/2007/tutorial/> " +
"PREFIX ical: <http://www.w3.org/2002/12/cal/ical#> " +
"SELECT ?summary " +
"WHERE { tutorial:business-intelligence ical:summary ?summary }";
SPARQLQuery sq = new SPARQLQuery();
sq.setTripleStore(ts);
sq.setQuery(query);
AGSparqlSelect.doSparqlSelect(sq);
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next