AGGeonames.java
package com.franz.agbase.examples;
import com.franz.agbase.*;
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);
AGLoadRDF.loadRDFWithTiming(ts, AGPaths.dataSources("Geonames_v2.0_Lite.rdf"));
ts.indexAllTriples(true);
TriplesIterator it = ts.getStatements(null, null, null);
AGUtils.showTriples(it,100);
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next