1 6 package com.hp.hpl.jena.shared; 7 8 import com.hp.hpl.jena.graph.*; 9 import com.hp.hpl.jena.rdf.model.*; 10 import com.hp.hpl.jena.util.iterator.*; 11 import com.hp.hpl.jena.graph.impl.WrappedGraph; 12 13 19 public class RandomOrderGraph extends WrappedGraph { 20 21 public static Graph createDefaultGraph() { 22 return new RandomOrderGraph(Factory.createDefaultGraph()); 23 } 24 public static Model createDefaultModel() { 25 return ModelFactory.createModelForGraph(createDefaultGraph()); 26 } 27 final private int bufsz; 28 31 public RandomOrderGraph(int bufsz, Graph base) { 32 super(base); 33 this.bufsz = bufsz; 34 } 35 38 public RandomOrderGraph(Graph base) { 39 this(10,base); 40 } 41 42 public ExtendedIterator find( TripleMatch m ) 43 { return new RandomOrderIterator(bufsz,super.find( m )); 44 } 45 46 public ExtendedIterator find( Node s, Node p, Node o ) 47 { return new RandomOrderIterator(bufsz,super.find( s, p, o )); 48 } 49 50 51 } 52 53 82 | Popular Tags |