AGISWCASWC2007.java
package com.franz.ag.examples;
import com.franz.ag.*;
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);
AGUtils.loadRDFWithTiming(ts,AGPaths.dataSources("iswc-aswc-2007-complete.rdf"));
AGUtils.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 }";
AGUtils.doSparqlSelect(ts, query);
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next