Package org.openrdf.model

Examples of org.openrdf.model.ValueFactory.createStatement()


          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));
          }
        }
      }
      finally {
        bindingsIter.close();
View Full Code Here


        URI predicate = (URI)bindingSet.getValue("predicate");
        Value object = bindingSet.getValue("object");
        Resource context = (Resource)bindingSet.getValue("context");

        if (context == null) {
          return vf.createStatement(subject, predicate, object);
        }
        else {
          return vf.createStatement(subject, predicate, object, context);
        }
      }
View Full Code Here

        if (context == null) {
          return vf.createStatement(subject, predicate, object);
        }
        else {
          return vf.createStatement(subject, predicate, object, context);
        }
      }

      @Override
      protected String getName() {
View Full Code Here

      moleculeURI = factory.createURI(NAMESPACE, moleculeID);
    }
    URI partOfURI = factory.createURI(NAMESPACE, "partOf");
    URI hasAtomURI = factory.createURI(NAMESPACE, "hasAtom")
    URI bondURI = factory.createURI(NAMESPACE, "hasBond");
    moleculeRDF.add(factory.createStatement(moleculeURI, RDF.TYPE, factory.createURI(NAMESPACE, "Molecule")));

    for (UNode<String> node : graph.nodes()) {
      BNode bn = factory.createBNode(moleculeID + "_" + node.index());
      nodeMap.put(node.index(), bn);
      moleculeRDF.add(factory.createStatement(moleculeURI, hasAtomURI, bn));
View Full Code Here

    moleculeRDF.add(factory.createStatement(moleculeURI, RDF.TYPE, factory.createURI(NAMESPACE, "Molecule")));

    for (UNode<String> node : graph.nodes()) {
      BNode bn = factory.createBNode(moleculeID + "_" + node.index());
      nodeMap.put(node.index(), bn);
      moleculeRDF.add(factory.createStatement(moleculeURI, hasAtomURI, bn));
      moleculeRDF.add(factory.createStatement(bn, partOfURI, moleculeURI));
      moleculeRDF.add(factory.createStatement(bn, RDF.TYPE, factory.createURI(NAMESPACE + "atom/", node.label())));
    }
    for (ULink<String> link : graph.links()) {
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.first().index()), bondURI, nodeMap.get(link.second().index())));
View Full Code Here

    for (UNode<String> node : graph.nodes()) {
      BNode bn = factory.createBNode(moleculeID + "_" + node.index());
      nodeMap.put(node.index(), bn);
      moleculeRDF.add(factory.createStatement(moleculeURI, hasAtomURI, bn));
      moleculeRDF.add(factory.createStatement(bn, partOfURI, moleculeURI));
      moleculeRDF.add(factory.createStatement(bn, RDF.TYPE, factory.createURI(NAMESPACE + "atom/", node.label())));
    }
    for (ULink<String> link : graph.links()) {
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.first().index()), bondURI, nodeMap.get(link.second().index())));
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.second().index()), bondURI, nodeMap.get(link.first().index())));
View Full Code Here

    for (UNode<String> node : graph.nodes()) {
      BNode bn = factory.createBNode(moleculeID + "_" + node.index());
      nodeMap.put(node.index(), bn);
      moleculeRDF.add(factory.createStatement(moleculeURI, hasAtomURI, bn));
      moleculeRDF.add(factory.createStatement(bn, partOfURI, moleculeURI));
      moleculeRDF.add(factory.createStatement(bn, RDF.TYPE, factory.createURI(NAMESPACE + "atom/", node.label())));
    }
    for (ULink<String> link : graph.links()) {
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.first().index()), bondURI, nodeMap.get(link.second().index())));
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.second().index()), bondURI, nodeMap.get(link.first().index())));
    }
View Full Code Here

      moleculeRDF.add(factory.createStatement(moleculeURI, hasAtomURI, bn));
      moleculeRDF.add(factory.createStatement(bn, partOfURI, moleculeURI));
      moleculeRDF.add(factory.createStatement(bn, RDF.TYPE, factory.createURI(NAMESPACE + "atom/", node.label())));
    }
    for (ULink<String> link : graph.links()) {
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.first().index()), bondURI, nodeMap.get(link.second().index())));
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.second().index()), bondURI, nodeMap.get(link.first().index())));
    }
    return moleculeRDF;
  }
View Full Code Here

      moleculeRDF.add(factory.createStatement(bn, partOfURI, moleculeURI));
      moleculeRDF.add(factory.createStatement(bn, RDF.TYPE, factory.createURI(NAMESPACE + "atom/", node.label())));
    }
    for (ULink<String> link : graph.links()) {
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.first().index()), bondURI, nodeMap.get(link.second().index())));
      moleculeRDF.add(factory.createStatement(nodeMap.get(link.second().index()), bondURI, nodeMap.get(link.first().index())));
    }
    return moleculeRDF;
  }

View Full Code Here

     
    URI platformURI = factory.createURI(NAMESPACE + "ducktape/", InetAddress.getLocalHost().getHostName() + "/" + Global.getSerialversionuid());
    URI workflowURI = factory.createURI(NAMESPACE + "workflow/", workflow.file().getAbsolutePath() + "/" + workflowMD5sum);
     
    // The software is the agent and the workflow is the plan
    stmts.add(factory.createStatement(platformURI, RDF.TYPE, agURI));
    stmts.add(factory.createStatement(workflowURI, RDF.TYPE, planURI));
   
    stmts.add(factory.createStatement(platformURI, RDFS.LABEL,
        Literals.createLiteral(factory, "ducktape on: " + InetAddress.getLocalHost().getHostName() + ", versionID: " + Global.getSerialversionuid())));
    stmts.add(factory.createStatement(workflowURI, RDFS.LABEL,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.