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

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

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

RDFHandler.handleComment介绍

[英]Handles a comment.
[中]处理评论。

代码示例

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

public void handleComment(String comment)
    throws RDFHandlerException
  {
    for (RDFHandler rdfHandler : rdfHandlers) {
      rdfHandler.handleComment(comment);
    }
  }
}

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

public void handleComment(final String comment) throws RDFHandlerException {
    baseHandler.handleComment(comment);
  }
}

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

public void handleComment(final String comment) throws RDFHandlerException {
    baseHandler.handleComment(comment);
  }
}

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

public void handleComment(String s) throws RDFHandlerException {
  wrappedHandler.handleComment(s);
}

代码示例来源:origin: com.github.ansell.owlapi/owlapi-rio

private void writeComment(final String comment) throws IOException
{
  try
  {
    this.writer.handleComment(comment);
  }
  catch(final RDFHandlerException e)
  {
    throw new IOException(e);
  }
  // write("###  ");
  // write(comment);
  // writeNewLine();
  // writeNewLine();
}

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

private void readComment()
  throws IOException, RDFHandlerException
{
  String comment = readString();
  if (rdfHandler != null) {
    rdfHandler.handleComment(comment);
  }
}

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

/**
 * Consumes characters from reader until the first EOL has been read. This
 * line of text is then passed to the {@link #rdfHandler} as a comment.
 */
protected void processComment()
  throws IOException, RDFHandlerException
{
  StringBuilder comment = new StringBuilder(64);
  int c = readCodePoint();
  while (c != -1 && c != 0xD && c != 0xA) {
    comment.append(Character.toChars(c));
    c = readCodePoint();
  }
  // c is equal to -1, \r or \n.
  // In case c is equal to \r, we should also read a following \n.
  if (c == 0xD) {
    c = readCodePoint();
    if (c != 0xA) {
      unread(c);
    }
  }
  if (rdfHandler != null) {
    rdfHandler.handleComment(comment.toString());
  }
  reportLocation();
}

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

public SesameOutputAdapter(final RDFHandler handler) {
  this.handler = handler;
  stSink = st -> {
    try {
      handler.handleStatement(st);
    } catch (RDFHandlerException e) {
      throw new RippleException(e);
    }
  };
  nsSink = ns -> {
    try {
      handler.handleNamespace(ns.getPrefix(), ns.getName());
    } catch (RDFHandlerException e) {
      throw new RippleException(e);
    }
  };
  cmtSink = comment -> {
    try {
      handler.handleComment(comment);
    } catch (RDFHandlerException e) {
      throw new RippleException(e);
    }
  };
}

相关文章