@Override public NotifyingSailConnection getConnection() throws SailException { return new ShaclSailConnection(this, super.getConnection(), super.getConnection()); }
@Override public void addSailChangedListener(SailChangedListener listener) { verifyBaseSailSet(); getBaseSail().addSailChangedListener(listener); }
/** * Creates a new SailWrapper that wraps the supplied Sail. */ public NotifyingSailWrapper(NotifyingSail baseSail) { setBaseSail(baseSail); }
throws SailException super.initialize(); if (parameters.containsKey(INDEXEDFIELDS)) { String indexedfieldsString = parameters.getProperty(INDEXEDFIELDS);
try { SailRepository repo = new SailRepository(new NotifyingSailWrapper(getBaseSail()) {
@Override public NotifyingSailConnection getConnection() throws SailException { return new ShaclSailConnection(this, super.getConnection(), super.getConnection()); }
@Override public void removeSailChangedListener(SailChangedListener listener) { verifyBaseSailSet(); getBaseSail().removeSailChangedListener(listener); } }
public void initialize() throws SailException { super.initialize(); InferencerConnection con = getConnection(); try { con.begin(); con.flushUpdates(); con.commit(); } finally { con.close(); } }
/** * Creates a new SailWrapper that wraps the supplied Sail. */ public NotifyingSailWrapper(NotifyingSail baseSail) { setBaseSail(baseSail); }
public SchemaCachingRDFSInferencerConnection getConnection() throws SailException { InferencerConnection e = (InferencerConnection)super.getConnection(); return new SchemaCachingRDFSInferencerConnection(this, e); }
@Override public void removeSailChangedListener(SailChangedListener listener) { verifyBaseSailSet(); getBaseSail().removeSailChangedListener(listener); } }
@Override public void initialize() throws SailException { super.initialize(); InferencerConnection con = getConnection(); try { con.begin(); con.flushUpdates(); con.commit(); } finally { con.close(); } }
@Override public InferencerConnection getConnection() throws SailException { try { InferencerConnection con = (InferencerConnection)super.getConnection(); return new Connection(con); } catch (ClassCastException e) { throw new SailException(e.getMessage(), e); } }
@Override public void addSailChangedListener(SailChangedListener listener) { verifyBaseSailSet(); getBaseSail().addSailChangedListener(listener); }
public void initialize() throws SailException { super.initialize(); if (sharedSchema) { return; } try (final SchemaCachingRDFSInferencerConnection conn = getConnection()) { conn.begin(); conn.addAxiomStatements(); List<Statement> tboxStatments = new ArrayList<>(); if (schema != null) { try (RepositoryConnection schemaConnection = schema.getConnection()) { schemaConnection.begin(); RepositoryResult<Statement> statements = schemaConnection.getStatements(null, null, null); tboxStatments = Iterations.stream(statements).peek(conn::processForSchemaCache).collect( Collectors.toList()); schemaConnection.commit(); } } calculateInferenceMaps(conn); if (schema != null) { tboxStatments.forEach(statement -> conn.addStatement(statement.getSubject(), statement.getPredicate(), statement.getObject(), statement.getContext())); } conn.commit(); } }
@Override public NotifyingSailConnection getConnection() throws SailException { if (!closed.get()) { return new LuceneSailConnection(super.getConnection(), luceneIndex, this); } else { throw new SailException("Sail is shut down or not initialized"); } }
@Override public InferencerConnection getConnection() throws SailException { try { InferencerConnection con = (InferencerConnection)super.getConnection(); return new DirectTypeHierarchyInferencerConnection(con); } catch (ClassCastException e) { throw new SailException(e.getMessage(), e); } }
/** * @return @throws SailException */ @Override public NotifyingSailConnection getConnection() throws SailException { if (si == null) { throw new SailException("Index is not created"); } // the connection from the super is created only when the index exists return new LuceneSpinSailConnection(super.getConnection(), si, this); }
@Override public InferencerConnection getConnection() throws SailException { try { InferencerConnection con = (InferencerConnection)super.getConnection(); return new DedupingInferencerConnection(con, getValueFactory()); } catch (ClassCastException e) { throw new SailException(e.getMessage(), e); } } }