/** * Creates a debug dataset connection * @throws SQLException */ public DebugMemConnection() throws SQLException { this(DatasetFactory.createMem()); }
/** * Creates a debug dataset connection * @throws SQLException */ public DebugTdbConnection() throws SQLException { this(DatasetFactory.createMem()); }
Dataset ds = DatasetFactory.createMem(); RDFDataMgr.read(ds, dsObj.toString()); return new MemConnection(ds, JenaConnection.DEFAULT_HOLDABILITY, JenaConnection.DEFAULT_AUTO_COMMIT, return new MemConnection(DatasetFactory.createMem(), JenaConnection.DEFAULT_HOLDABILITY, JenaConnection.DEFAULT_AUTO_COMMIT, JenaConnection.DEFAULT_ISOLATION_LEVEL, compatibilityLevel); } else {
@Override protected JenaConnection getConnection() throws SQLException { return new MemConnection(DatasetFactory.createMem(), JenaConnection.DEFAULT_HOLDABILITY, false, Connection.TRANSACTION_NONE, JdbcCompatibility.DEFAULT); }
Dataset ds = DatasetFactory.createMem(); RDFDataMgr.read(ds, dsObj.toString()); return new MemConnection(ds, JenaConnection.DEFAULT_HOLDABILITY, JenaConnection.DEFAULT_AUTO_COMMIT, return new MemConnection(DatasetFactory.createMem(), JenaConnection.DEFAULT_HOLDABILITY, JenaConnection.DEFAULT_AUTO_COMMIT, JenaConnection.DEFAULT_ISOLATION_LEVEL, compatibilityLevel); } else {
@Override protected DatasetWrapper getDatasetWrapper() { Dataset d = null; if (dataset != null) { d = dataset; } else { d = DatasetFactory.createMem(); if (modelName == null) { d.setDefaultModel(this.model); } else { d.addNamedModel(this.modelName, model); } } DatasetWrapper datasetWrapper = new DatasetWrapper(d); return datasetWrapper; }
private static void read_stream(String filename, Lang lang) throws IOException { filename = filename(filename) ; // Read with a base @SuppressWarnings("deprecation") Dataset ds0 = DatasetFactory.createMem() ; try(FileInputStream in0 = new FileInputStream(filename)) { RDFDataMgr.read(ds0, in0, "http://example/base2", lang) ; } // Read again, but without base @SuppressWarnings("deprecation") Dataset ds1 = DatasetFactory.createMem() ; try(FileInputStream in1 = new FileInputStream(filename)) { RDFDataMgr.read(ds1, in1, null, lang) ; } }
private static void read(String dataurl, Lang lang) { dataurl = filename(dataurl) ; @SuppressWarnings("deprecation") Dataset ds = DatasetFactory.createMem() ; RDFDataMgr.read(ds, dataurl, lang) ; }
public TripleStoreJena() { // creates an in-memory Jena model that is able to contain multiple graphs dataset = DatasetFactory.createMem(); // Create a model just to obtain a writer and configure it writer = ModelFactory.createDefaultModel().getWriter("RDF/XML-ABBREV"); writer.setProperty("showXmlDeclaration", "true"); writer.setProperty("tab", "8"); writer.setProperty("relativeURIs", "same-document,relative"); // We create a model that will be the union of all loaded graphs, // to be able to make queries over all data without the need for specifying a // graph // https://stackoverflow.com/questions/6981467/jena-arq-difference-between-model-graph-and-dataset union = ModelFactory.createDefaultModel(); }
Dataset ds = DatasetFactory.createMem(); if (graphURI == null) { ds.setDefaultModel(dataset.getDefaultModel());
public static Dataset makeInMemoryDataset(Model assertions, Model inferences) { Dataset dataset = DatasetFactory.createMem(); OntModel union = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM); if (assertions != null) { dataset.addNamedModel( ModelNames.ABOX_ASSERTIONS, assertions); union.addSubModel(assertions); } if (inferences != null) { dataset.addNamedModel(ModelNames.ABOX_INFERENCES, inferences); union.addSubModel(inferences); } dataset.setDefaultModel(union); return dataset; }
@Before public void setup() { model = ModelFactory.createDefaultModel(); Dataset ds = DatasetFactory.createMem(); ds.addNamedModel(GRAPH_URI, model); rdfService = new RDFServiceModel(ds); }
String s = StrUtils.fromUTF8bytes(out.toByteArray()) ; @SuppressWarnings("deprecation") Dataset ds2 = DatasetFactory.createMem() ; try { RDFDataMgr.read(ds2, in, lang) ;
/** * This constructor is used for the unit tests only * * @param tboxModel - input. This model contains both asserted and inferred TBox axioms * @param aboxModel - input. This model contains asserted ABox statements * @param inferenceModel - output. This is the model in which inferred (materialized) * ABox statements are maintained (added or retracted). */ public SimpleReasoner(OntModel tboxModel, OntModel aboxModel, Model inferenceModel) { this.searchIndexer = null; this.tboxModel = tboxModel; this.aboxModel = aboxModel; this.inferenceModel = inferenceModel; this.fullModel = VitroModelFactory.createUnion(aboxModel, VitroModelFactory.createOntologyModel(inferenceModel)); Dataset ds = DatasetFactory.createMem(); ds.addNamedModel(ModelNames.ABOX_ASSERTIONS, aboxModel); ds.addNamedModel(ModelNames.ABOX_INFERENCES, inferenceModel); ds.addNamedModel(ModelNames.TBOX_ASSERTIONS, tboxModel); ds.setDefaultModel(ModelFactory.createUnion(fullModel, tboxModel)); recomputer = new ABoxRecomputer(tboxModel, aboxModel, new RDFServiceModel(ds), this, searchIndexer); }
Dataset ds2 = DatasetFactory.createMem() ; RDFDataMgr.read(ds2, r, null, JSONLD) ;
try { Model tree = qee.execDescribe(); Dataset ds = DatasetFactory.createMem(); if (graphURI == null) { ds.setDefaultModel(dataset.getDefaultModel());