Class RandomizedIDGenerator

java.lang.Object
org.incenp.obofoundry.kgcl.RandomizedIDGenerator
All Implemented Interfaces:
IAutoIDGenerator

public class RandomizedIDGenerator extends Object implements IAutoIDGenerator
Generates numerical IDs within a given a range. This class is similar to SequentialIDGenerator except that numerical IDs are chosen randomly within the target range, instead of being chosen sequentially.
  • Constructor Details

    • RandomizedIDGenerator

      public RandomizedIDGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, String format, int min, int max)
      Creates a new instance.
      Parameters:
      ontology - The ontology to generate IDs for. Its contents will be checked to ensure the generated IDs do not clash with existing entities.
      format - The format of newly generated IDs. It must contain a C-style format specified indicating where the numerical portion of the ID should appear and in which format.
      min - The lower bound (inclusive) for newly generated IDs.
      max - The upper bound (exclusive) for newly generated IDs.
  • Method Details