AGKennedy.java
package com.franz.ag.examples;
import com.franz.ag.*;
public class AGKennedy {
@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("kennedy", AGPaths.TRIPLE_STORES);
String ntripleFile = AGPaths.dataSources("kennedy.ntriples");
System.out.println("Loading N-Triples " + ntripleFile);
Long n = ts.loadNTriples(ntripleFile);
System.out.println("Loaded " + n + " triples.");
ts.indexAllTriples(true);
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next