Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.GraphImpl


      String configString = configTemplate.render(valueMap);
      // writeln(configString);

      ValueFactory vf = systemRepo.getValueFactory();

      Graph graph = new GraphImpl(vf);

      RDFParser rdfParser = Rio.createParser(RDFFormat.TURTLE, vf);
      rdfParser.setRDFHandler(new StatementCollector(graph));
      rdfParser.parse(new StringReader(configString), RepositoryConfigSchema.NAMESPACE);
View Full Code Here


      // No need to record, starting from scratch anyway
      return;
    }

    if (newStatements == null) {
      newStatements = new GraphImpl();
    }
    newStatements.add(st);
  }
View Full Code Here

    if (statementsRemoved) {
      logger.debug("statements removed, starting inferencing from scratch");
      clearInferred();
      addAxiomStatements();

      newStatements = new GraphImpl();
      Iterations.addAll(getWrappedConnection().getStatements(null, null, null, true), newStatements);

      statementsRemoved = false;
    }
View Full Code Here

      // reset for next iteration:
      checkRuleNextIter[i] = false;
    }

    newThisIteration = newStatements;
    newStatements = new GraphImpl();
  }
View Full Code Here

  }

  public static Graph toGraph(TupleQueryResult tqr)
    throws QueryEvaluationException
  {
    Graph graph = new GraphImpl();
    DAWGTestResultSetWriter writer = new DAWGTestResultSetWriter(new StatementCollector(graph));

    try {
      writer.startQueryResult(tqr.getBindingNames());
      while (tqr.hasNext()) {
View Full Code Here

      /* There's nothing to do */
      return false;
    }
   
    Graph iterationStatements = newStatements;
    newStatements = new GraphImpl();
   
    Iterator<Statement> iter = iterationStatements.iterator();
    while (iter.hasNext()) {
      Statement s = iter.next();
      if (s.getPredicate().equals(OWL.SAMEAS) && s.getObject() instanceof Resource)
View Full Code Here

        if (!found)
          return;
      }
     
      if (newStatements == null) {
        newStatements = new GraphImpl();
      }
     
      newStatements.add(st);
    }
View Full Code Here

   *
   * @param out The OutputStream to write the RDF/XML document to.
   */
  public RDFXMLWriterUnique(OutputStream out) {
    super(out);
    statementsWritten = new GraphImpl();
    acceptedResources = new HashMap<Value, Boolean>();
  }
View Full Code Here

   *
   * @param writer The Writer to write the RDF/XML document to.
   */
  public RDFXMLWriterUnique(Writer writer) {
    super(writer);
    statementsWritten = new GraphImpl();
    acceptedResources = new HashMap<Value, Boolean>();
  }
View Full Code Here

   * @throws RDFHandlerException
   * @throws RDFParseException
   */
  private Graph parseRdf(HttpMethod method, RDFFormat format) throws RDFParseException, RDFHandlerException, IOException {
    LimitedInputStream lis = new LimitedInputStream(method.getResponseBodyAsStream(), maxfilesize);
    Graph graph = new GraphImpl();
    URI urlContext = graph.getValueFactory().createURI(task.getURI().toString());
   
    addData(graph, lis, format, task.getURI().toString(), urlContext);
   
    return graph;
  }
View Full Code Here

TOP

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

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.