@Override public int size() { return graph.size() ; }
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." }
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." }
@Override public long size() { return graph.size(); }
@Override public int size() { return base.size(); }
@Override protected int performSize() { return jenaGraph.size(); }
@Override public int size() { return g.size(); }
@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); } }
@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); } }
/** * Return the number of triples in the just the base graph */ @Override public int graphBaseSize() { checkOpen(); return fdata.getGraph().size(); }
/** * 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; }
/** * 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; }
logger.debug("model size: " + model.getGraph().size());
@Test public void load_graph_01() { DatasetGraphTDB dsg = TDBFactory.createDatasetGraph() ; TDBLoader.load(dsg, DIR+"data-2.nt", false) ; assertEquals(1, dsg.getDefaultGraph().size()) ; }
@Test public void load_graph_02() { DatasetGraphTDB dsg = TDBFactory.createDatasetGraph() ; TDBLoader.load(dsg.getDefaultGraphTDB(), DIR+"data-2.nt", false) ; assertEquals(1, dsg.getDefaultGraph().size()) ; }
@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()) ; }
@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()) ; }