本文整理了Java中com.hp.hpl.jena.graph.Graph.size()
方法的一些代码示例,展示了Graph.size()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.size()
方法的具体详情如下:
包路径:com.hp.hpl.jena.graph.Graph
类名称:Graph
方法名:size
[英]For a concrete graph this returns the number of triples in the graph. For graphs which might infer additional triples it results an estimated lower bound of the number of triples. For example, an inference graph might return the number of triples in the raw data graph.
[中]
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
@Override
public int size()
{
return graph.size() ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
ReorderStatsHandler(Graph graph, GraphStatisticsHandler stats)
{
this.stats = stats ;
N = graph.size() ;
// Note: when these are too badly wrong, the app can supply a statistics file.
TERM_S = 10 ; // Wild guess: "An average subject has 10 properties".
TERM_P = N/10 ; // Wild guess: "An average vocabulary has 10 properties"
TERM_O = 20 ; // Wild guess: "An average object is in 20 triples".
TERM_TYPE = N/10 ; // Wild guess: "An average class has 1/10 of the resources."
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
ReorderStatsHandler(Graph graph, GraphStatisticsHandler stats)
{
this.stats = stats ;
N = graph.size() ;
// Note: when these are too badly wrong, the app can supply a statistics file.
TERM_S = 10 ; // Wild guess: "An average subject has 10 properties".
TERM_P = N/10 ; // Wild guess: "An average vocabulary has 10 properties"
TERM_O = 20 ; // Wild guess: "An average object is in 20 triples".
TERM_TYPE = N/10 ; // Wild guess: "An average class has 1/10 of the resources."
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
@Override
public long size()
{ return graph.size(); }
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
@Override
public int graphBaseSize()
{
return base.size() + L.size() - R.size() ;
}
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
@Override
public int size()
{ return base.size(); }
代码示例来源:origin: org.apache.clerezza/rdf.jena.storage
@Override
protected int performSize() {
return jenaGraph.size();
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.remote
@Override public int size() {
return g.size();
}
代码示例来源:origin: openimaj/openimaj
@Override
public void write(Kryo kryo, Output output, Graph object) {
output.writeInt(object.size());
final Iterator<Triple> it = object.find(null, null, null);
while (it.hasNext()) {
final Triple next = it.next();
kryo.writeClassAndObject(output, next);
}
}
代码示例来源:origin: org.openimaj.storm/core-storm
@Override
public void write(Kryo kryo, Output output, Graph object) {
output.writeInt(object.size());
final Iterator<Triple> it = object.find(null, null, null);
while (it.hasNext()) {
final Triple next = it.next();
kryo.writeClassAndObject(output, next);
}
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/**
* Return the number of triples in the just the base graph
*/
@Override
public int graphBaseSize() {
checkOpen();
return fdata.getGraph().size();
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/**
* Return the number of triples in the inferred graph
*/
@Override
public int graphBaseSize() {
checkOpen();
this.requirePrepared();
int baseSize = fdata.getGraph().size();
int dedSize = fdeductions.getGraph().size();
// System.err.println( ">> BasicForwardRuleInfGraph::size = " + baseSize + "(base) + " + dedSize + "(deductions)" );
return baseSize + dedSize;
}
代码示例来源:origin: com.marklogic/marklogic-spring-batch
/**
* Returns the triple count for the graph that was inserted into MarkLogic
* @return
*/
public int getTripleCount()
{
int tripleCount = 0;
if (dsg.containsGraph(graphNode))
{
tripleCount = dsg.getGraph(graphNode).size();
}
return tripleCount;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
&& m.size() < other.m.size() )
return null;
if (other.m.getCapabilities().sizeAccurate()
&& m.size() > other.m.size() )
return null;
int myPrep = prepare(other.m);
代码示例来源:origin: usc-isi-i2/Web-Karma
logger.debug("model size: " + model.getGraph().size());
代码示例来源:origin: com.hp.hpl.jena/tdb
@Test public void load_graph_01()
{
DatasetGraphTDB dsg = TDBFactory.createDatasetGraph() ;
TDBLoader.load(dsg, DIR+"data-2.nt", false) ;
assertEquals(1, dsg.getDefaultGraph().size()) ;
}
代码示例来源:origin: com.hp.hpl.jena/tdb
@Test public void load_graph_02()
{
DatasetGraphTDB dsg = TDBFactory.createDatasetGraph() ;
TDBLoader.load(dsg.getDefaultGraphTDB(), DIR+"data-2.nt", false) ;
assertEquals(1, dsg.getDefaultGraph().size()) ;
}
代码示例来源:origin: com.hp.hpl.jena/tdb
@Test public void load_dataset_01()
{
DatasetGraphTDB dsg = TDBFactory.createDatasetGraph() ;
TDBLoader.load(dsg, DIR+"data-1.nq", false) ;
assertTrue(dsg.getDefaultGraph().isEmpty()) ;
assertEquals(1, dsg.getGraph(g).size()) ;
}
代码示例来源:origin: com.hp.hpl.jena/tdb
@Test public void load_dataset_02()
{
DatasetGraphTDB dsg = TDBFactory.createDatasetGraph() ;
InputStream in = IO.openFile(DIR+"data-1.nq") ;
TDBLoader.load(dsg, in, false) ;
assertTrue(dsg.getDefaultGraph().isEmpty()) ;
assertEquals(1, dsg.getGraph(g).size()) ;
}
代码示例来源:origin: com.hp.hpl.jena/tdb
assertEquals(0, dsg.getDefaultGraph().size()) ;
assertEquals(1, dsg.getGraph(g).size()) ;
内容来源于网络,如有侵权,请联系作者删除!