org.openrdf.rio.RDFHandler.endRDF()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(63)

本文整理了Java中org.openrdf.rio.RDFHandler.endRDF方法的一些代码示例,展示了RDFHandler.endRDF的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RDFHandler.endRDF方法的具体详情如下:
包路径:org.openrdf.rio.RDFHandler
类名称:RDFHandler
方法名:endRDF

RDFHandler.endRDF介绍

[英]Signals the end of the RDF data. This method is called when all data has been reported.
[中]指示RDF数据的结束。当所有数据都已报告时,将调用此方法。

代码示例

代码示例来源:origin: org.openrdf.sesame/sesame-rio-api

public void endRDF()
  throws RDFHandlerException
{
  for (RDFHandler rdfHandler : rdfHandlers) {
    rdfHandler.endRDF();
  }
}

代码示例来源:origin: net.fortytwo.extendo/extendo-brain

public void endRDF() throws RDFHandlerException {
  wrappedHandler.endRDF();
}

代码示例来源:origin: net.fortytwo.sesametools/common

public void endRDF() throws RDFHandlerException {
  baseHandler.endRDF();
}

代码示例来源:origin: net.fortytwo.sesametools/common

public void reallyEndRDF() throws RDFHandlerException {
  baseHandler.endRDF();
}

代码示例来源:origin: joshsh/ripple

public void endRDF() throws RDFHandlerException {
  handler.endRDF();
}

代码示例来源:origin: org.openrdf.sesame/sesame-query

@Override
public void endQueryResult()
  throws TupleQueryResultHandlerException
{
  resultSetNode = null;
  try {
    rdfHandler.endRDF();
  }
  catch (RDFHandlerException e) {
    throw new TupleQueryResultHandlerException(e);
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-store

public void endQueryResult()
  throws TupleQueryResultHandlerException
{
  resultSetNode = null;
  try {
    rdfHandler.endRDF();
  }
  catch (RDFHandlerException e) {
    throw new TupleQueryResultHandlerException(e);
  }
}

代码示例来源:origin: org.semarglproject/semargl-sesame

@Override
public void endStream() throws ParseException {
  try {
    handler.endRDF();
  } catch(RDFHandlerException e) {
    throw new ParseException(e);
  }
}

代码示例来源:origin: eu.fbk.rdfpro/rdfpro-jsonld

@Override
public void endStream() throws ParseException {
  try {
    this.handler.endRDF();
  } catch (final RDFHandlerException e) {
    throw new ParseException(e);
  }
}

代码示例来源:origin: blazegraph/database

@Override
public void endQueryResult() throws TupleQueryResultHandlerException {
  try {
    getRDFHandler().endRDF();
  } catch (RDFHandlerException e) {
    throw new TupleQueryResultHandlerException(e);
  }
}

代码示例来源:origin: com.blazegraph/bigdata-core

@Override
public void endQueryResult() throws TupleQueryResultHandlerException {
  try {
    getRDFHandler().endRDF();
  } catch (RDFHandlerException e) {
    throw new TupleQueryResultHandlerException(e);
  }
}

代码示例来源:origin: org.apache.marmotta/marmotta-commons

/**
 * Export all triples in the model passed as argument to the RDF handler passed as second argument. Similar to
 * RepositoryConnection.export.
 *
 * @param model
 * @param handler
 * @throws RDFHandlerException
 */
public static void export(Model model, RDFHandler handler) throws RDFHandlerException {
  handler.startRDF();
  for(Statement stmt : model) {
    handler.handleStatement(stmt);
  }
  handler.endRDF();
}

代码示例来源:origin: apache/marmotta

/**
 * Export all triples in the model passed as argument to the RDF handler passed as second argument. Similar to
 * RepositoryConnection.export.
 *
 * @param model
 * @param handler
 * @throws RDFHandlerException
 */
public static void export(Model model, RDFHandler handler) throws RDFHandlerException {
  handler.startRDF();
  for(Statement stmt : model) {
    handler.handleStatement(stmt);
  }
  handler.endRDF();
}

代码示例来源:origin: ldp4j/ldp4j

private void exportTriples(Iterable<Triple> triples, RDFHandler handler) throws RDFHandlerException {
  handler.startRDF();
  addNamespaces(handler);
  populateRepository(triples, handler);
  handler.endRDF();
}

代码示例来源:origin: org.openrdf.elmo/elmo-repository

public void handleGraphQuery(ParsedGraphQuery query) {
  try {
    init();
    Map<String, String> ns = query.getQueryNamespaces();
    for (Map.Entry<String, String> e : ns.entrySet()) {
      rdf.handleNamespace(e.getKey(), e.getValue());
    }
    subject = vf.createBNode();
    handleType(SeRQO.GRAPHQUERY);
    handleChild(SeRQO.TUPLEEXPR, query.getTupleExpr());
    rdf.endRDF();
  } catch (RDFHandlerException e) {
    throw new UndeclaredThrowableException(e);
  }
}

代码示例来源:origin: org.openrdf.elmo/elmo-repository

public void handleTupleQuery(ParsedTupleQuery query) {
  try {
    init();
    subject = vf.createBNode();
    handleType(SeRQO.TUPLEQUERY);
    handleChild(SeRQO.TUPLEEXPR, query.getTupleExpr());
    rdf.endRDF();
  } catch (RDFHandlerException e) {
    throw new UndeclaredThrowableException(e);
  }
}

代码示例来源:origin: net.fortytwo.sesametools/rdfjson

public void parse(final Reader reader,
         final String baseURI) throws IOException, RDFParseException, RDFHandlerException {
  if (null == rdfHandler) {
    throw new IllegalStateException("RDF handler has not been set");
  }
  String s = toString(reader);
  Collection<Statement> g = RDFJSON.rdfJsonToGraph(s);
  
  if(g == null) {
    throw new RDFParseException("Could not parse JSON RDF Graph");
  }
  
  rdfHandler.startRDF();
  for (Statement statement : g) {
    rdfHandler.handleStatement(statement);
  }
  rdfHandler.endRDF();
}

代码示例来源:origin: it.unibz.inf.ontop/ontop-quest-sesame

@Override
  public void evaluate(RDFHandler handler) throws QueryEvaluationException,
      RDFHandlerException {
    GraphQueryResult result =  evaluate();
    handler.startRDF();
    while (result.hasNext())
      handler.handleStatement(result.next());
    handler.endRDF();

  }
}

代码示例来源:origin: eu.fbk.rdfpro/rdfpro-rules

@Override
public void reduce(final Value key, final Statement[] stmts,
    final RDFHandler handler) throws RDFHandlerException {
  final RDFHandler session = RuleProcessor.this.engine.newSession(RDFHandlers
      .ignoreMethods(handler, RDFHandlers.METHOD_START_RDF
          | RDFHandlers.METHOD_END_RDF | RDFHandlers.METHOD_CLOSE));
  try {
    session.startRDF();
    for (final Statement stmt : stmts) {
      session.handleStatement(stmt);
    }
    session.endRDF();
  } finally {
    IO.closeQuietly(session);
  }
}

代码示例来源:origin: blazegraph/database

@Override
    public void evaluate(RDFHandler handler) throws QueryEvaluationException,
        RDFHandlerException {
      GraphQueryResult gqr = evaluate();
      try {
        handler.startRDF();
        while (gqr.hasNext()) {
          handler.handleStatement(gqr.next());
        }
        handler.endRDF();;
      } finally {
        gqr.close();
      }
    }
}

相关文章