/** * Shows some interesting details about the terms index. * * @param cxn The connection. */ public static void showLexiconIndexDetails(final BigdataSailConnection cxn) { final IIndex ndx = cxn.getTripleStore().getLexiconRelation().getBlobsIndex(); final IndexMetadata md = ndx.getIndexMetadata(); System.out.println("Lexicon:"); System.out.println(md.toString()); System.out.println(md.getTupleSerializer().toString()); }
/** * Shows some interesting details about the terms index. * * @param cxn The connection. */ public static void showLexiconIndexDetails(final BigdataSailConnection cxn) { final IIndex ndx = cxn.getTripleStore().getLexiconRelation().getBlobsIndex(); final IndexMetadata md = ndx.getIndexMetadata(); System.out.println("Lexicon:"); System.out.println(md.toString()); System.out.println(md.getTupleSerializer().toString()); }
private static PipelineOp convertCreateEntailments(PipelineOp left, AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin compute closure"); } context.conn.getSailConnection().computeClosure(); if (log.isDebugEnabled()) { long inferredCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true) - stmtCount; log.debug("Inferred statements = " + inferredCount); } return left; }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { // final Properties properties = conn.getProperties(); final AbstractTripleStore tripleStore = conn.getTripleStore(); if (Boolean.valueOf(tripleStore.getProperty( BigdataSail.Options.HISTORY_SERVICE, BigdataSail.Options.DEFAULT_HISTORY_SERVICE))) { conn.addChangeLog(new HistoryChangeLogListener(conn)); } }
private static PipelineOp convertCreateEntailments(PipelineOp left, AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin compute closure"); } context.conn.getSailConnection().computeClosure(); if (log.isDebugEnabled()) { long inferredCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true) - stmtCount; log.debug("Inferred statements = " + inferredCount); } return left; }
private static PipelineOp convertDropEntailments(final PipelineOp left, final AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin drop entailments"); } context.conn.getSailConnection().removeAllEntailments(); if (log.isDebugEnabled()) { long removedCount = stmtCount - context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.debug("Removed statements = " + removedCount); } return left; }
private CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(final String query, final SailConnection con, final BindingSet bs) throws Exception { // new pattern ((BigdataSailConnection) con).flush(); final AbstractTripleStore db = ((BigdataSailConnection) con).getTripleStore(); final ASTContainer astContainer = new Bigdata2ASTSPARQLParser().parseQuery2(query, null); final QueryRoot originalQuery = astContainer.getOriginalAST(); originalQuery.setIncludeInferred(false); final TupleQueryResult queryResult = ASTEvalHelper.evaluateTupleQuery( db, astContainer, new QueryBindingSet( bs), null /* dataset */); return queryResult; }
private CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(final String query, final SailConnection con, final BindingSet bs) throws Exception { // new pattern ((BigdataSailConnection) con).flush(); final AbstractTripleStore db = ((BigdataSailConnection) con).getTripleStore(); final ASTContainer astContainer = new Bigdata2ASTSPARQLParser().parseQuery2(query, null); final QueryRoot originalQuery = astContainer.getOriginalAST(); originalQuery.setIncludeInferred(false); final TupleQueryResult queryResult = ASTEvalHelper.evaluateTupleQuery( db, astContainer, new QueryBindingSet( bs), null /* dataset */); return queryResult; }
private static PipelineOp convertDropEntailments(final PipelineOp left, final AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin drop entailments"); } context.conn.getSailConnection().removeAllEntailments(); if (log.isDebugEnabled()) { long removedCount = stmtCount - context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.debug("Removed statements = " + removedCount); } return left; }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { // final Properties properties = conn.getProperties(); final AbstractTripleStore tripleStore = conn.getTripleStore(); if (Boolean.valueOf(tripleStore.getProperty( BigdataSail.Options.HISTORY_SERVICE, BigdataSail.Options.DEFAULT_HISTORY_SERVICE))) { conn.addChangeLog(new HistoryChangeLogListener(conn)); } }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { final AbstractTripleStore database = conn.getTripleStore(); if (database.isRDRHistory()) { final RDRHistory history = database.getRDRHistoryInstance(); history.init(); conn.addChangeLog(history); } }
public BufferStatementHandler(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]; } }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { final AbstractTripleStore database = conn.getTripleStore(); if (database.isRDRHistory()) { final RDRHistory history = database.getRDRHistoryInstance(); history.init(); conn.addChangeLog(history); } }
public BufferStatementHandler(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]; } }
/** * Return the backing {@link AbstractTripleStore} object. Caution MUST be * used when accessing this object as the access goes around the SAIL API. */ public AbstractTripleStore getTripleStore() { return ((BigdataSailConnection) getSailConnection()).getTripleStore(); }
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]; } }
/** * Return the backing {@link AbstractTripleStore} object. Caution MUST be * used when accessing this object as the access goes around the SAIL API. */ public AbstractTripleStore getTripleStore() { return ((BigdataSailConnection) getSailConnection()).getTripleStore(); }
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]; } }