public SingleStatementIterator( Resource subject, Resource predicate, Value object) { _statement = new StatementImpl(subject, (URI)predicate, object); _hasNext = true; }
/** * Gives a String-representation of this Statement that can be used for * debugging. */ @Override public String toString() { StringBuilder sb = new StringBuilder(256); sb.append("("); sb.append(getSubject()); sb.append(", "); sb.append(getPredicate()); sb.append(", "); sb.append(getObject()); sb.append(")"); return sb.toString(); } }
public Statement createStatement(Resource subject, URI predicate, Value object) { return new StatementImpl(subject, predicate, object); } }
public Statement createStatement(Resource subject, URI predicate, Value object) { return new StatementImpl(subject, predicate, object); }
@Override public Statement createStatement(final Resource subject, final URI predicate, final Value object) { return new StatementImpl(subject, predicate, object); }
private Statement stmt(Resource s, URI p, Value o) { return new StatementImpl(s, p, o); }
@Override public Statement createStatement(final Resource subject, final URI predicate, final Value object) { return new StatementImpl(subject, predicate, object); }
public Statement createStatement(Resource subject, URI predicate, Value object) { return new StatementImpl(subject, predicate, object); }
public Statement createStatement(Resource subject, URI predicate, Value object) { return new StatementImpl(subject, predicate, object); }
/** * Adds transient statement. The added statements will be revised on commit * of the current transaction. Then their relevance to the security setup * will be tested and the irrelevant will be deleted in a new transaction. * * @param subject * @param predicate * @param object */ private void addTransient(Resource subject, URI predicate, Value object) { org.openrdf.model.Statement st = new org.openrdf.model.impl.StatementImpl( subject, predicate, object); transients.add(st); } // addTransient(Resource,URI,Value)
@Override public void add(final Resource s, final URI p, final Value o, final Resource... c) throws RepositoryException { add(new StatementImpl(s, p, o), c); }
@Override public org.openrdf.model.Statement createDataProperty(org.openrdf.model.Resource r, QualifiedName pred, LiteralImpl literalImpl) { return new StatementImpl(r, qualifiedNameToURI(pred), literalImpl); }
public void triple(Resource subj, URI pred, Value obj) throws IOException { Statement statement = new StatementImpl(subj, pred, obj); if (!_queryResult.contains(statement)) { // new unique result _queryResult.add(statement); // forward the result _listener.triple(subj, pred, obj); } }
@SuppressWarnings("unchecked") public void add(Resource s, URI p, Value o) { add((F)new StatementImpl(s,p,o)); }
@SuppressWarnings("unchecked") public void add(Resource s, URI p, Value o) { add((F)new StatementImpl(s,p,o)); }
@Override public org.openrdf.model.Statement createDataProperty(org.openrdf.model.Resource r, QualifiedName pred, LiteralImpl literalImpl) { return new StatementImpl(r, qualifiedNameToURI(pred), literalImpl); }
private Statement stmt(Resource s, URI p, Value o) { return new StatementImpl(s, p, o); }
private boolean isManaged(RepositoryConnection conn, Resource subject, URI predicate, Value object, String operation) { try { if (conn.hasStatement(subject, predicate, object, true, managedContext)) { // Ignore/Strip any triple that is already present in the mgmt-context (i.e. "unchanged" props). if (log.isTraceEnabled()) { log.trace("[{}] filtering out statement that is already present in the managed context: {}", operation, new StatementImpl(subject, predicate, object)); } return true; } else if (this.subject.equals(subject) && managedProperties.contains(predicate)) { // We do NOT allow changing server-managed properties. if (log.isTraceEnabled()) { log.trace("[{}] filtering out statement with managed propterty {}: {}", operation, predicate, new StatementImpl(subject, predicate, object)); } deniedProperties.add(predicate); return true; } } catch (RepositoryException e) { log.error("Error while filtering server managed properties: {}", e.getMessage()); } return false; }
private void addSubClassOf(final Resource s, final Resource o) { final Statement statement = new StatementImpl(s, RDFS.SUBCLASSOF, o); final String edgeName = RDFS.SUBCLASSOF.stringValue(); addStatementEdge(subClassOfGraph.get(), edgeName, statement); }
/** * Add an unvalidated tuple to this subgraph. * @param predicate The predicate * @param object The object * @throws IllegalArgumentException if this subgraph does not allow * unvalidated tuples to be added */ public void addUnvalidatedTuple( final URI predicate, final Value object ) throws IllegalArgumentException { if( this.allowUnvalidatedTriples ) this.unvalidatedTriples.add( new StatementImpl( new URIImpl( this.uri ), predicate, object ) ); else throw new IllegalArgumentException( "Adding tuples to a validated subgraph" ); }