public class Writer
extends java.lang.Object
| Constructor and Description |
|---|
Writer(org.semanticweb.owlapi.model.IRI ontIRI,
java.util.Map<java.lang.String,TClass> classes)
CONSTRUCTOR : initiate a new writer
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Boolean |
generateRandomBoolean()
Generate a random boolean
|
static java.lang.Double |
generateRandomDouble(double min,
double max)
Generate a random Double based on predefined criterias
|
static java.lang.Float |
generateRandomFloat(float min,
float max)
Generate a random Float based on predefined criterias
|
long |
generateRandomInstances(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation,
javax.swing.JProgressBar progressBar)
Generate the instances in the specified output file
Multithread : no Properties generated : data only |
long |
generateRandomInstancesMultiThread2(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation)
Generate the instances in the specified output file
Multithread : yes Properties generated : data only |
long |
generateRandomInstancesObj(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation)
Generate the instances in the specified output file
Multithread : no Properties generated : data and object |
long |
generateRandomInstancesObjMultiThread(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation)
Generate the instances in the specified output file
Multithread : yes Properties generated : data only |
static java.lang.Integer |
generateRandomInteger(int min,
int max)
Generate a random Integer based on predefined criterias
|
static java.lang.Long |
generateRandomLong(long min,
long max)
Generate a random Long based on predefined criterias
|
static java.lang.Short |
generateRandomShort(short min,
short max)
Generate a random Short based on predefined criterias
|
static java.lang.String |
generateRandomString(int minlength,
int maxlength,
boolean useUpperCase,
boolean useNumbers,
boolean firstCharIsAnUpperCase)
Generate a random String based on predefined criterias
|
public Writer(org.semanticweb.owlapi.model.IRI ontIRI,
java.util.Map<java.lang.String,TClass> classes)
ontIRI - The IRI of the output ontologyclasses - An array of TClass, containing the information needed to
generate the instancesTClasspublic long generateRandomInstances(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation,
javax.swing.JProgressBar progressBar)
throws java.lang.IllegalArgumentException,
java.io.IOException
inputFile - (File) input ontology file (must exist)outputFile - (File) Output instances file, will be created if not
exists, replaced elseminInstance - The number of instances per class to generatemaxInstance - The maximal number of instances per class to generate.
If more than minInstances, a random number between both will be
chosenuseMaterialisation - (bool) Determine if the materialization will be
used during the generation progressBar - (optional) can give a feedback on a GUI about the
progressing status of this computation if filledjava.io.IOException - if an error occurs while reading or writing in a filejava.lang.IllegalArgumentException - if one of the input parameters is
incorrectpublic long generateRandomInstancesMultiThread2(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation)
throws java.lang.IllegalArgumentException,
java.io.IOException
inputFile - (File) input ontology file (must exist)outputFile - (File) Output instances file, will be created if not
exists, replaced elseminInstance - The number of instances per class to generatemaxInstance - The maximal number of instances per class to generate.
If more than minInstances, a random number between both will be
chosenuseMaterialisation - (bool) Determine if the materialization will be
used during the generation java.io.IOException - if an error occurs while reading or writing in a filejava.lang.IllegalArgumentException - if one of the input parameters is
incorrectpublic long generateRandomInstancesObj(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation)
throws java.lang.IllegalArgumentException,
java.io.IOException
inputFile - (File) input ontology file (must exist)outputFile - (File) Output instances file, will be created if not
exists, replaced elseminInstance - The number of instances per class to generatemaxInstance - The maximal number of instances per class to generate.
If more than minInstances, a random number between both will be
chosenuseMaterialisation - (bool) Determine if the materialization will be
used during the generation java.io.IOException - if an error occurs while reading or writing in a filejava.lang.IllegalArgumentException - if one of the input parameters is
incorrectpublic long generateRandomInstancesObjMultiThread(java.io.File inputFile,
java.io.File outputFile,
long minInstance,
long maxInstance,
boolean useMaterialisation)
throws java.lang.IllegalArgumentException,
java.io.IOException
inputFile - (File) input ontology file (must exist)outputFile - (File) Output instances file, will be created if not
exists, replaced elseminInstance - The number of instances per class to generatemaxInstance - The maximal number of instances per class to generate.
If more than minInstances, a random number between both will be
chosenuseMaterialisation - (bool) Determine if the materialization will be
used during the generation java.io.IOException - if an error occurs while reading or writing in a filejava.lang.IllegalArgumentException - if one of the input parameters is
incorrectpublic static java.lang.String generateRandomString(int minlength,
int maxlength,
boolean useUpperCase,
boolean useNumbers,
boolean firstCharIsAnUpperCase)
minlength - the minimum size of the string to generatemaxlength - the maximal size of the string to generateuseUpperCase - determines if the String can contain Uppercase
characters or notuseNumbers - determines if the string can contain numbers or nofirstCharIsAnUpperCase - determine if the first character must be in
uppercase or notpublic static java.lang.Integer generateRandomInteger(int min,
int max)
min - minimal range of the integermax - maximal range of the integerpublic static java.lang.Short generateRandomShort(short min,
short max)
min - minimal range of the shortmax - maximal range of the shortpublic static java.lang.Long generateRandomLong(long min,
long max)
min - minimal range of the longmax - maximal range of the longpublic static java.lang.Double generateRandomDouble(double min,
double max)
min - minimal range of the doublemax - maximal range of the doublepublic static java.lang.Float generateRandomFloat(float min,
float max)
min - minimal range of the floatmax - maximal range of the floatpublic static java.lang.Boolean generateRandomBoolean()