@Override public Graph getDefaultGraph() { return GraphView.createDefaultGraph(this) ; }
@Override public Graph getDefaultGraph() { return GraphView.createDefaultGraph(this); }
@Override public Graph getDefaultGraph() { return GraphView.createDefaultGraph(this) ; }
@Override public Graph getDefaultGraph() { Graph g = GraphView.createDefaultGraph(this); return new GraphReadOnly(g); }
@Override protected Graph makeDefaultGraph(DatasetGraph dsg) { return GraphView.createDefaultGraph(dsg) ; }
@Override public Graph getGraph() { final GraphView g = GraphView.createDefaultGraph(datasetGraph); return new JenaGraphImpl(g, salt); }
@Override public Graph getDefaultGraph() { return GraphView.createDefaultGraph(getWrapped()) ; }
/** * @see org.apache.jena.sparql.core.DatasetGraph */ @Override public Graph getDefaultGraph() { checkIsOpen(); sync(); return GraphView.createDefaultGraph(this); }
@Test public void graphDSG_view_txn_2() { DatasetGraph dsg = DatasetGraphFactory.createGeneral(); // NOT dsg.getDefaultGraph() Graph graph = GraphView.createDefaultGraph(dsg); assertTrue( graph instanceof GraphView ); assertFalse(graph.getTransactionHandler().transactionsSupported()); }
public DatasetGraphText(DatasetGraph dsg, TextIndex index, TextDocProducer producer, boolean closeIndexOnClose) { super(dsg, producer) ; this.textIndex = index ; dftGraph = GraphView.createDefaultGraph(this) ; this.closeIndexOnClose = closeIndexOnClose; if ( org.apache.jena.tdb.sys.TDBInternal.isTDB1(dsg) ) { TransactionManager txnMgr = org.apache.jena.tdb.sys.TDBInternal.getTransactionManager(dsg); txnMgr.addAdditionComponent(new TextIndexTDB1(textIndex)); commitAction = delegateCommit; abortAction = delegateAbort; } else if ( org.apache.jena.tdb2.sys.TDBInternal.isTDB2(dsg) ) { TransactionCoordinator coord = org.apache.jena.tdb2.sys.TDBInternal.getTransactionCoordinator(dsg); // Does not overlap with the ids used by TDB2. byte[] componentID = { 2,4,6,10 } ; TransactionalComponent tc = new TextIndexDB(ComponentId.create(null, componentID), textIndex); coord.modify(()->coord.add(tc)); commitAction = delegateCommit; abortAction = delegateAbort; } else { commitAction = nonDelegatedCommit; abortAction = nonDelegatedAbort; } }
public DatasetGraphText(DatasetGraph dsg, TextIndex index, TextDocProducer producer, boolean closeIndexOnClose) { super(dsg, producer) ; this.textIndex = index ; dftGraph = GraphView.createDefaultGraph(this) ; this.closeIndexOnClose = closeIndexOnClose; if ( org.apache.jena.tdb.sys.TDBInternal.isTDB1(dsg) ) { TransactionManager txnMgr = org.apache.jena.tdb.sys.TDBInternal.getTransactionManager(dsg); txnMgr.addAdditionComponent(new TextIndexTDB1(textIndex)); commitAction = delegateCommit; abortAction = delegateAbort; } else if ( org.apache.jena.tdb2.sys.TDBInternal.isTDB2(dsg) ) { TransactionCoordinator coord = org.apache.jena.tdb2.sys.TDBInternal.getTransactionCoordinator(dsg); // Does not overlap with the ids used by TDB2. byte[] componentID = { 2,4,6,10 } ; TransactionalComponent tc = new TextIndexDB(ComponentId.create(null, componentID), textIndex); coord.modify(()->coord.add(tc)); commitAction = delegateCommit; abortAction = delegateAbort; } else { commitAction = nonDelegatedCommit; abortAction = nonDelegatedAbort; } }