Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.StatementImpl


  public NativeLiteral createLiteral(String value, URI datatype) {
    return new NativeLiteral(revision, value, datatype);
  }

  public Statement createStatement(Resource subject, URI predicate, Value object) {
    return new StatementImpl(subject, predicate, object);
  }
View Full Code Here


    @Override
    public void handleStatement(Statement st) {
      Resource s = st.getSubject();
      URI p = st.getPredicate();
      Value o = st.getObject();
      super.handleStatement(new StatementImpl(s, p, o, graph));
    }
View Full Code Here

      return null;
    }
    Resource subj = sign(st.getSubject());
    Value obj = sign(st.getObject());
    Resource ctx = sign(st.getContext());
    return new StatementImpl(subj, st.getPredicate(), obj, ctx);
  }
View Full Code Here

  public NativeLiteral createLiteral(String value, URI datatype) {
    return new NativeLiteral(revision, value, datatype);
  }

  public Statement createStatement(Resource subject, URI predicate, Value object) {
    return new StatementImpl(subject, predicate, object);
  }
View Full Code Here

    protected static void addStatement(final Resource subject, final URI predicate, final Value object, final Resource context, final SailConnection sailConnection) {
        Statement statement;
        if (null != context) {
            statement = new ContextStatementImpl(subject, predicate, object, context);
        } else {
            statement = new StatementImpl(subject, predicate, object);
        }
        SailHelper.addStatement(statement, sailConnection);
    }
View Full Code Here

    public <T> T removeProperty(final String key) {
        if (key.equals(SailTokens.NAMED_GRAPH)) {
            try {
                Resource ng = this.rawEdge.getContext();
                SailHelper.removeStatement(this.rawEdge, this.graph.getSailConnection().get());
                this.rawEdge = new StatementImpl(this.rawEdge.getSubject(), this.rawEdge.getPredicate(), this.rawEdge.getObject());
                SailHelper.addStatement(this.rawEdge, this.graph.getSailConnection().get());
                return (T) ng;
            } catch (Exception e) {
                throw new RuntimeException(e.getMessage(), e);
            }
View Full Code Here

        if (!(outVertexValue instanceof Resource)) {
            throw new IllegalArgumentException(outVertex.toString() + " is not a legal URI or blank node");
        }
        try {
            URI labelURI = new URIImpl(this.expandPrefix(label));
            Statement statement = new StatementImpl((Resource) outVertexValue, labelURI, inVertexValue);
            SailHelper.addStatement(statement, this.sailConnection.get());
            return new SailEdge(statement, this);
        } catch (Exception e) {
            throw new RuntimeException(e.getMessage(), e);
        }
View Full Code Here

  public NativeLiteral createLiteral(String value, URI datatype) {
    return new NativeLiteral(revision, value, datatype);
  }

  public Statement createStatement(Resource subject, URI predicate, Value object) {
    return new StatementImpl(subject, predicate, object);
  }
View Full Code Here

    return sharedLiteral;
  }

  public Statement createStatement(Resource subject, URI predicate, Value object) {
    return new StatementImpl(subject, predicate, object);
  }
View Full Code Here

    return new StatementImpl(subject, predicate, object);
  }

  public Statement createStatement(Resource subject, URI predicate, Value object, Resource context) {
    if (context == null) {
      return new StatementImpl(subject, predicate, object);
    }
    else {
      return new ContextStatementImpl(subject, predicate, object, context);
    }
  }
View Full Code Here

TOP

Related Classes of org.openrdf.model.impl.StatementImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.