AGGeonames.java
package com.franz.ag.examples;
import com.franz.ag.*;
public class AGGeonames {
@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("geonames", AGPaths.TRIPLE_STORES);
String rdfFile = AGPaths.dataSources("Geonames_v2.0_Lite.rdf");
System.out.println("Loading RDF " + rdfFile);
AGUtils.loadRDFWithTiming(ts, rdfFile);
ts.indexAllTriples(true);
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next