AGRDFAxioms.java
package com.franz.ag.examples;
import com.franz.ag.*;
public class AGRDFAxioms {
@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("RDFAxioms", AGPaths.TRIPLE_STORES);
String rdf = AGPaths.dataSources("rdf-axioms.rdf");
System.out.println("Loading RDF from " + rdf);
Long n = ts.loadRDF(rdf);
System.out.println("Loaded " + n + " triples.");
ts.indexAllTriples(true);
Cursor cc = ts.getStatements(null, null, null);
AGUtils.showTriples(cc);
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next