MarkLogicDatasetGraph extends DatasetGraphTriplesQuads implements
        DatasetGraph, Transactional { public Dataset toDataset() { checkIsOpen(); return DatasetFactory.wrap(this); } MarkLogicDatasetGraph(JenaDatabaseClient jenaClient); @Override Iterator<Node> listGraphNodes(); @Override Lock getLock(); @Override void clear(); static SPARQLQueryDefinition bindObject(SPARQLQueryDefinition qdef,
            String variableName, Node objectNode); @Override /** * @see org.apache.jena.sparql.core.DatasetGraph */ void setDefaultGraph(Graph g); @Override /** * Start a transaction. */ void begin(ReadWrite readWrite); @Override /** * Commit the current transaction. */ void commit(); @Override /** * Abort the current transaction with a rollback operation. */ void abort(); @Override /** * @return true if there is a multi-statement transaction in play. */ boolean isInTransaction(); @Override /** * Synonymous with abort(); */ void end(); Dataset toDataset(); @Override Graph getDefaultGraph(); @Override Graph getGraph(Node graphNode); @Override void addGraph(Node graphName, Graph graph); void mergeGraph(Node graphName, Graph graph); @Override void removeGraph(Node graphName); @Override /** * Not supported by MarkLogicDatasetGraph. */ long size(); GraphPermissions getPermissions(Node graphName); void addPermissions(Node graphName, GraphPermissions permissions); void clearPermissions(Node graphName); void writePermissions(Node graphName, GraphPermissions permissions); void sync(); void syncAdds(); void setRulesets(SPARQLRuleset... rulesets); SPARQLRuleset[] getRulesets(); MarkLogicDatasetGraph withRulesets(SPARQLRuleset... rulesets); void setConstrainingQueryDefinition(
            QueryDefinition constrainingQueryDefinition); QueryDefinition getConstrainingQueryDefinition(); JenaDatabaseClient getDatabaseClient(); void setSPARQLUpdatePermissions(GraphPermissions permissions); GraphPermissions getSPARQLUpdatePermissions(); @Override void close(); @Override boolean supportsTransactions(); static final String DEFAULT_GRAPH_URI; }
@Test public void testSmallFileInsert() { Dataset dataSet = getMarkLogicDatasetGraph("testdata/smallfile.nt") .toDataset(); Query query = QueryFactory .create("select (count(?s) as ?ct) where { ?s ?p ?o }"); QueryExecution execution = QueryExecutionFactory.create(query, dataSet); ResultSet results = execution.execSelect(); int i; for (i = 0; results.hasNext(); i++) { results.next(); } assertEquals("One triple inserted", 1, i); }
@Test public void testRIOTWrite() { Dataset dataSet = getMarkLogicDatasetGraph("testdata/smallfile.nt") .toDataset(); RDFDataMgr.write(System.out, dataSet, RDFFormat.TRIG_PRETTY); }