AGLoadGzip.java
package com.franz.agbase.examples;
import com.franz.agbase.*;
public class AGLoadGzip {
@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("loadgzip", AGPaths.TRIPLE_STORES);
long n = ts.loadNTriples(AGPaths.dataSources("wilburwine.nt.gz"), "", false, null, null, true);
System.out.println("Loaded " + n + " triples.");
TriplesIterator it = ts.getStatements(null, null, null);
AGUtils.showTriples(it);
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next