FileOps.clearDirectory( path );
Location location = new Location ( path );
Dataset dataset = TDBFactory.createDataset ( location );
dataset.begin ( ReadWrite.WRITE );
try {
DatasetGraph dsg = dataset.asDatasetGraph();
DatasetGraph dsg2 = RiotLoader.datasetFromString("<http://example/org> <http://www.w3.org/2000/01/rdf-schema#label> \"Hello \n World!\" .", Lang.TURTLE, null);
Iterator<Quad> quads = dsg2.find();
while ( quads.hasNext() ) {
Quad quad = quads.next();
dsg.add(quad);