Package org.openrdf.model

Examples of org.openrdf.model.Value


    while (ntIter.hasNext()) {
      Statement nt = ntIter.next();

      Resource xxx = nt.getSubject();
      Value yyy = nt.getObject();

      if (yyy instanceof Resource) {
        Cursor<? extends Statement> t1Iter;
        t1Iter = getDelegate().getStatements(null, RDF.TYPE, xxx, true);
View Full Code Here


    while (ntIter.hasNext()) {
      Statement nt = ntIter.next();

      Resource aaa = nt.getSubject();
      Value xxx = nt.getObject();

      if (xxx instanceof Resource) {
        Cursor<? extends Statement> t1Iter;
        t1Iter = getDelegate().getStatements((Resource)xxx, RDFS.SUBCLASSOF, null, true);

        Statement t1;
        while ((t1 = t1Iter.next()) != null) {

          Value yyy = t1.getObject();

          if (yyy instanceof Resource) {
            boolean added = addInferredStatement(aaa, RDF.TYPE, yyy);
            if (added) {
              nofInferred++;
View Full Code Here

    while (ntIter.hasNext()) {
      Statement nt = ntIter.next();

      Resource xxx = nt.getSubject();
      Value yyy = nt.getObject();

      if (yyy instanceof Resource) {
        Cursor<? extends Statement> t1Iter;
        t1Iter = getDelegate().getStatements((Resource)yyy, RDFS.SUBCLASSOF, null, true);

        Statement t1;
        while ((t1 = t1Iter.next()) != null) {

          Value zzz = t1.getObject();

          if (zzz instanceof Resource) {
            boolean added = addInferredStatement(xxx, RDFS.SUBCLASSOF, zzz);
            if (added) {
              nofInferred++;
View Full Code Here

    while (ntIter.hasNext()) {
      Statement nt = ntIter.next();

      Resource yyy = nt.getSubject();
      Value zzz = nt.getObject();

      if (zzz instanceof Resource) {
        Cursor<? extends Statement> t1Iter;
        t1Iter = getDelegate().getStatements(null, RDFS.SUBCLASSOF, yyy, true);
View Full Code Here

          return false;
        }
      }
    }

    Value obj1 = st1.getObject();
    Value obj2 = st2.getObject();

    if (!(obj1 instanceof BNode)) {
      if (!obj1.equals(obj2)) {
        // objects are not bNodes and don't match
        return false;
      }
    }
    else { // obj1 instanceof BNode
      BNode mappedBNode = bNodeMapping.get(obj1);

      if (mappedBNode != null) {
        // bNode 'obj1' was already mapped to some other bNode
        if (!obj2.equals(mappedBNode)) {
          // 'obj1' and 'obj2' do not match
          return false;
        }
      }
      else {
View Full Code Here

        ValueFactory vf = getValueFactory();

        BindingSet bindings;
        while ((bindings = bindingsIter.next()) != null) {

          Value subj = bindings.getValue("subject");
          Value pred = bindings.getValue("predicate");
          Value obj = bindings.getValue("object");

          if (subj instanceof Resource && pred instanceof URI && obj != null) {
            statements.add(vf.createStatement((Resource)subj, (URI)pred, obj));
          }
        }
View Full Code Here

      if (!subj1.equals(subj2)) {
        return false;
      }
    }

    Value obj1 = st1.getObject();
    Value obj2 = st2.getObject();

    if (obj1 instanceof BNode && obj2 instanceof BNode) {
      BNode mappedBNode = bNodeMapping.get(obj1);

      if (mappedBNode != null) {
        // bNode 'obj1' was already mapped to some other bNode
        if (!obj2.equals(mappedBNode)) {
          // 'obj1' and 'obj2' do not match
          return false;
        }
      }
      else {
View Full Code Here

   *         its return value is not a Resource.
   */
  public static Resource getUniqueObjectResource(Model model, Resource subj, URI pred)
    throws ModelException
  {
    Value obj = getUniqueObject(model, subj, pred);

    if (obj instanceof Resource) {
      return (Resource)obj;
    }
    else {
View Full Code Here

   *         its return value is not a URI.
   */
  public static URI getUniqueObjectURI(Model model, Resource subj, URI pred)
    throws ModelException
  {
    Value obj = getUniqueObject(model, subj, pred);

    if (obj instanceof URI) {
      return (URI)obj;
    }
    else {
View Full Code Here

   *         its return value is not a Literal.
   */
  public static Literal getUniqueObjectLiteral(Model model, Resource subj, URI pred)
    throws ModelException
  {
    Value obj = getUniqueObject(model, subj, pred);

    if (obj instanceof Literal) {
      return (Literal)obj;
    }
    else {
View Full Code Here

TOP

Related Classes of org.openrdf.model.Value

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.