private final SPOKeyOrder getKeyOrder(final AbstractTripleStore kb, final boolean inEdges) { final SPOKeyOrder keyOrder; if (inEdges) { // in-edges: OSP / OCSP : [u] is the Object. keyOrder = kb.isQuads() ? SPOKeyOrder.OCSP : SPOKeyOrder.OSP; } else { // out-edges: SPO / (SPOC|SOPC) : [u] is the Subject. keyOrder = kb.isQuads() ? SPOKeyOrder.SPOC : SPOKeyOrder.SPO; } return keyOrder; }
private final SPOKeyOrder getKeyOrder(final AbstractTripleStore kb, final boolean inEdges) { final SPOKeyOrder keyOrder; if (inEdges) { // in-edges: OSP / OCSP : [u] is the Object. keyOrder = kb.isQuads() ? SPOKeyOrder.OCSP : SPOKeyOrder.OSP; } else { // out-edges: SPO / (SPOC|SOPC) : [u] is the Subject. keyOrder = kb.isQuads() ? SPOKeyOrder.SPOC : SPOKeyOrder.SPO; } return keyOrder; }
public RemoveStatementHandler(final BigdataSailConnection conn, final AtomicLong nmodified, final Resource... defaultContext) { this.conn = conn; this.nmodified = nmodified; final boolean quads = conn.getTripleStore().isQuads(); if (quads && defaultContext != null) { // The context may only be specified for quads. this.defaultContext = defaultContext; //new Resource[] { defaultContext }; } else { this.defaultContext = new Resource[0]; } }
public RemoveStatementHandler(final BigdataSailConnection conn, final AtomicLong nmodified, final Resource... defaultContext) { this.conn = conn; this.nmodified = nmodified; final boolean quads = conn.getTripleStore().isQuads(); if (quads && defaultContext != null) { // The context may only be specified for quads. this.defaultContext = defaultContext; //new Resource[] { defaultContext }; } else { this.defaultContext = new Resource[0]; } }
public AddStatementHandler(final BigdataSailConnection conn, final AtomicLong nmodified, final Resource defaultContext) { this.conn = conn; this.nmodified = nmodified; final boolean quads = conn.getTripleStore().isQuads(); if (quads && defaultContext != null) { // The default context may only be specified for quads. this.defaultContexts = new Resource[] { defaultContext }; } else { this.defaultContexts = new Resource[0]; } }
@Override public boolean isTriples() { return !db.isQuads() && !db.isStatementIdentifiers(); }
@Override final public long getNamedGraphCount() { if(!isQuads()) throw new UnsupportedOperationException(); final Iterator<?> itr = getSPORelation().distinctTermScan( SPOKeyOrder.CSPO); long n = 0; while(itr.hasNext()) { itr.next(); n++; } return n; }
public void test_namedGraphs_01d() throws Exception { if(!store.isQuads()) return; new TestHelper( "named-graphs-01d",// testURI "named-graphs-01d.rq", // queryURI "named-graphs-01.trig", // dataURI "named-graphs-01.srx" // resultURI ).runTest(); }
public void test_namedGraphs_01c() throws Exception { if(!store.isQuads()) return; new TestHelper( "named-graphs-01c",// testURI "named-graphs-01c.rq", // queryURI "named-graphs-01.trig", // dataURI "named-graphs-01.srx" // resultURI ).runTest(); }
public void test_namedGraphs_01c() throws Exception { if(!store.isQuads()) return; new TestHelper( "named-graphs-01c",// testURI "named-graphs-01c.rq", // queryURI "named-graphs-01.trig", // dataURI "named-graphs-01.srx" // resultURI ).runTest(); }
public void test_namedGraphs_01d() throws Exception { if(!store.isQuads()) return; new TestHelper( "named-graphs-01d",// testURI "named-graphs-01d.rq", // queryURI "named-graphs-01.trig", // dataURI "named-graphs-01.srx" // resultURI ).runTest(); }
public AddStatementHandler(final BigdataSailConnection conn, final AtomicLong nmodified, final Resource defaultContext) { this.conn = conn; this.nmodified = nmodified; final boolean quads = conn.getTripleStore().isQuads(); if (quads && defaultContext != null) { // The default context may only be specified for quads. this.defaultContexts = new Resource[] { defaultContext }; } else { this.defaultContexts = new Resource[0]; } }
@Override public RDFHandler newRDFHandler() { defaultGraphURI = null != defaultGraph && buffer.getDatabase().isQuads() ? buffer.getDatabase ().getValueFactory ().createURI ( defaultGraph ) : null ; return this; }
public ChunkTask(final BOpContext<IBindingSet> context, final RemoveStatementsOp op) { this.context = context; final String namespace = ((String[]) op .getRequiredProperty(Annotations.RELATION_NAME))[0]; final long timestamp = (Long) op .getRequiredProperty(Annotations.TIMESTAMP); this.tripleStore = (AbstractTripleStore) context.getResource( namespace, timestamp); this.sids = tripleStore.isStatementIdentifiers(); this.quads = tripleStore.isQuads(); }
public ChunkTask(final BOpContext<IBindingSet> context, final InsertStatementsOp op) { this.context = context; final String namespace = ((String[]) op .getRequiredProperty(Annotations.RELATION_NAME))[0]; final long timestamp = (Long) op .getRequiredProperty(Annotations.TIMESTAMP); this.tripleStore = (AbstractTripleStore) context.getResource( namespace, timestamp); this.sids = tripleStore.isStatementIdentifiers(); this.quads = tripleStore.isQuads(); }
@Override public RDFHandler newRDFHandler() { defaultGraphURI = null != defaultGraph && buffer.getDatabase().isQuads() ? buffer.getDatabase ().getValueFactory ().createURI ( defaultGraph ) : null ; return this; }
public ChunkTask(final BOpContext<IBindingSet> context, final InsertStatementsOp op) { this.context = context; final String namespace = ((String[]) op .getRequiredProperty(Annotations.RELATION_NAME))[0]; final long timestamp = (Long) op .getRequiredProperty(Annotations.TIMESTAMP); this.tripleStore = (AbstractTripleStore) context.getResource( namespace, timestamp); this.sids = tripleStore.isStatementIdentifiers(); this.quads = tripleStore.isQuads(); }
public ChunkTask(final BOpContext<IBindingSet> context, final RemoveStatementsOp op) { this.context = context; final String namespace = ((String[]) op .getRequiredProperty(Annotations.RELATION_NAME))[0]; final long timestamp = (Long) op .getRequiredProperty(Annotations.TIMESTAMP); this.tripleStore = (AbstractTripleStore) context.getResource( namespace, timestamp); this.sids = tripleStore.isStatementIdentifiers(); this.quads = tripleStore.isQuads(); }
public void test_namedGraphs_01d() throws Exception { if(!store.isQuads()) return; new TestHelper( "named-graphs-01d",// testURI "named-graphs-01d.rq", // queryURI "named-graphs-01.trig", // dataURI "named-graphs-01.srx" // resultURI ).runTest(); }
public void test_namedGraphs_01c() throws Exception { if(!store.isQuads()) return; new TestHelper( "named-graphs-01c",// testURI "named-graphs-01c.rq", // queryURI "named-graphs-01.trig", // dataURI "named-graphs-01.srx" // resultURI ).runTest(); }