Class RandomStatementGenerator

  • All Implemented Interfaces:
    java.util.Iterator<Statement>

    public class RandomStatementGenerator
    extends com.google.common.collect.UnmodifiableIterator<Statement>
    Generates an infinite sequence of random RDF triples. Configuration options can be used to control what kind of triples are generated.
    Since:
    3.1.2
    Version:
    6.0
    Author:
    Evren Sirin
    • Constructor Detail

      • RandomStatementGenerator

        public RandomStatementGenerator()
      • RandomStatementGenerator

        public RandomStatementGenerator​(RandomValueGenerator theRandomValueGenerator)
    • Method Detail

      • hasNext

        public boolean hasNext()
      • getNumberOfDistinctProperties

        public int getNumberOfDistinctProperties()
      • setNumberOfDistinctProperties

        public void setNumberOfDistinctProperties​(int theNumberOfDistinctProperties)
        Sets the number of distinct properties to be used. If set to 0, completely random set of properties will be generated.
      • getNumberOfStatementsPerSubject

        public int getNumberOfStatementsPerSubject()
      • setNumberOfStatementsPerSubject

        public void setNumberOfStatementsPerSubject​(int theNumberOfStatementsPerSubject)
        Sets the number of statements to be generated for a given subject. Set to 0 to use completely random set of properties.
      • getNumberOfDistinctClasses

        public int getNumberOfDistinctClasses()
      • setNumberOfDistinctClasses

        public void setNumberOfDistinctClasses​(int theNumberOfDistinctClasses)
        Sets the number of distinct classes to be used as types. If set to 0, no rdf:type triples will be generated.
      • getNumberOfSubjectsPerGraph

        public int getNumberOfSubjectsPerGraph()
      • setNumberOfSubjectsPerGraph

        public void setNumberOfSubjectsPerGraph​(int theNumberOfSubjectsPerGraph)
        Sets the number of subjects generated per graph. Default is 0 which means no named graphs are generated. Set to Integer.MAX_VALUE to generate a single named graph.
      • next

        public Statement next()
        Returns the next random triple.
      • main

        public static void main​(java.lang.String[] args)