/** * {@inheritDoc} */ @Override public RSIterator listReifiedStatements() { return super.object.listReifiedStatements(); }
/** * {@inheritDoc} */ @Override public RSIterator listReifiedStatements(Statement st) { return super.object.listReifiedStatements(st); }
public RSIterator listReifiedStatements() { return model.listReifiedStatements(); }
public RSIterator listReifiedStatements(Statement st) { return model.listReifiedStatements(st); }
/** * @param type * The type of reified statements to retrieve, i.e. anonymous or named ones. * @return Every reified statements of the model, having a type as <code>type</code>. */ private List<ReifiedStatement> listReifStats(final ResourceTypes type) { final RSIterator rsi = this.model.listReifiedStatements(); final List<ReifiedStatement> rss = new ArrayList<ReifiedStatement>(); if (type.equals(ResourceTypes.ANON)) { while (rsi.hasNext()) { final ReifiedStatement rs = rsi.nextRS(); if (rs.isAnon()) { rss.add(rs); } } } else if (type.equals(ResourceTypes.NAMED)) { while (rsi.hasNext()) { final ReifiedStatement rs = rsi.nextRS(); if (rs.isURIResource()) { rss.add(rs); } } } else { LogFactory.getLog(this.getClass()).warn("Error in listReifiedStatement " + "ResourceType was neither an " + "anon nor a named resource..."); } rsi.close(); return rss; }
/** * @return A list containing every statements including the one that are subject of reifications but not the reification implementation ones (subject, * object...). */ protected List<Statement> listStatements() { final List<Statement> stats = new ArrayList<Statement>(); final StmtIterator sit = this.model.listStatements(); while (sit.hasNext()) { final Statement stat = sit.nextStatement(); // Filtering reified statement if (!stat.getPredicate().equals(RDF.subject) && !stat.getPredicate().equals(RDF.predicate) && !stat.getPredicate().equals(RDF.object)) { if (stat.getPredicate().equals(RDF.type) && stat.getObject().isResource()) { if (!((Resource) stat.getObject()).equals(RDF.Statement)) { stats.add(stat); } } else { stats.add(stat); } } } sit.close(); final RSIterator rsit = this.model.listReifiedStatements(); while (rsit.hasNext()) { stats.add(rsit.nextRS().getStatement()); } rsit.close(); return stats; }
@Override public void clear() { Model graph = null; GraphConnection graphConnection = null; try { graphConnection = openGraph(); graph = graphConnection.getGraph(); graph.enterCriticalSection(Lock.READ); graph.removeAll(); // XXX AT: remove reification quadlets explicitly RSIterator it = graph.listReifiedStatements(); List<ReifiedStatement> rss = new ArrayList<ReifiedStatement>(); while (it.hasNext()) { rss.add(it.nextRS()); } for (ReifiedStatement rs : rss) { graph.removeReification(rs); } } finally { if (graph != null) { graph.leaveCriticalSection(); } if (graphConnection != null) { graphConnection.close(); } } }
RSIterator rsIter = resultModel.listReifiedStatements(); if (!rsIter.hasNext()) { executeAllMappings = true; resultModel.listReifiedStatements(); RSIterator rsExistingIter = resultModel.listReifiedStatements(); while (rsExistingIter.hasNext()) { ReifiedStatement rstmt = rsExistingIter.next(); RSIterator rsIter = resultModel.listReifiedStatements(); long addedStatements = 0; while (rsIter.hasNext()) {
&& ((obj == null) || s.getObject().equals(obj))) { if (s.isReified()) { final RSIterator rsit = this.model.listReifiedStatements(s); while (rsit.hasNext()) { final ReifiedStatement rs = rsit.nextRS();
graph.remove(jenaStmt); RSIterator it = graph.listReifiedStatements(jenaStmt); while (it.hasNext()) { ReifiedStatement rs = it.nextRS();