Package org.incenp.obofoundry.kgcl
Class SequentialIDGenerator
java.lang.Object
org.incenp.obofoundry.kgcl.SequentialIDGenerator
- All Implemented Interfaces:
IAutoIDGenerator
Generates numerical IDs sequentially within a given range.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected int
protected org.semanticweb.owlapi.model.OWLOntology
protected int
-
Constructor Summary
ConstructorsConstructorDescriptionSequentialIDGenerator
(org.semanticweb.owlapi.model.OWLOntology ontology, String format, int min, int max) Creates a new instance. -
Method Summary
-
Field Details
-
ontology
protected org.semanticweb.owlapi.model.OWLOntology ontology -
format
-
lowerBound
protected int lowerBound -
upperBound
protected int upperBound
-
-
Constructor Details
-
SequentialIDGenerator
public SequentialIDGenerator(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 specifier 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
-
nextID
Description copied from interface:IAutoIDGenerator
Generates a new automatic ID.- Specified by:
nextID
in interfaceIAutoIDGenerator
- Returns:
- The newly generated ID.
-