org.openrdf.model.Graph.size()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(113)

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

Graph.size介绍

暂无

代码示例

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

/**
 * Compare two graphs for equality.
 * <p>
 * Note: This is not very efficient if the {@link Graph} implementations are
 * not indexed.
 * <p>
 * Note: This does not handle equality testing with blank nodes (it does not
 * test for isomorphic graphs).
 * 
 * @param expected
 * @param actual
 */
static protected void assertSameGraph(final Graph expected, final Graph actual) {
  for (Statement s : expected) {
   if (!actual.contains(s))
     fail("Expecting: " + s);
  }
   assertEquals("size", expected.size(), actual.size());
 }

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

@Override
public void handleStatement(Statement st)
  throws RDFHandlerException
{
  synchronized (bufferLock) {
    bufferedStatements.add(st);
    contexts.add(st.getContext());
    if (bufferedStatements.size() >= this.bufferSize) {
      processBuffer();
    }
  }
}

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

case DESCRIBE:
case CONSTRUCT:
  nresults = buildGraph(conn).size();
  break;
case ASK: // I think that there are some alternative mime types for ask...

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

case DESCRIBE:
case CONSTRUCT:
  nresults = buildGraph(conn).size();
  break;
case ASK: // I think that there are some alternative mime types for ask...

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

/**
 * Compare two graphs for equality.
 * <p>
 * Note: This is not very efficient if the {@link Graph} implementations are
 * not indexed.
 * <p>
 * Note: This does not handle equality testing with blank nodes (it does not
 * test for isomorphic graphs).
 * 
 * @param expected
 * @param actual
 */
static protected void assertSameGraph(final Graph expected, final Graph actual) {
  for (Statement s : expected) {
   if (!actual.contains(s))
     fail("Expecting: " + s);
  }
   assertEquals("size", expected.size(), actual.size());
 }

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

assertEquals(1, g2.size());

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

assertEquals(1, g2.size());

相关文章