AGCreateTripleStore.java
package com.franz.ag.examples;
import com.franz.ag.*;
public class AGCreateTripleStore {
@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);
}
System.out.println("Attempting to create a triple store.");
try {
AllegroGraph ts = ags.create("nonexistingstore", AGPaths.TRIPLE_STORES);
System.out.println("Triple store created.");
System.out.println("Closing the triple store.");
ts.closeTripleStore();
} catch (Exception e) {
System.out.println(e.getMessage());
}
System.out.println("Disconnecting from the server.");
ags.disable();
System.out.println("Done.");
}
}
Up |
Next