XSD.integer, "77", XSD.xlong, "214", XSD.negativeInteger, "-123",
XSD.nonNegativeInteger, "2", XSD.nonPositiveInteger, "0", XSD.positiveInteger,
"500", XSD.xshort, "476", XSD.xstring, "Test", XSD.time, "13:02:00", };
OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
Individual ind = model.createIndividual( ns + "test", OWL.Thing );
for( int i = 0; i < datatypes.length; ) {
Resource datatype = (Resource) datatypes[i++];
OntProperty p = model.createDatatypeProperty( ns + "prop_" + datatype.getLocalName() );
p.addRange( datatype );
while( i < datatypes.length && datatypes[i] instanceof String ) {
Literal value = model.createTypedLiteral( (String) datatypes[i], datatype.getURI() );
ind.addProperty( p, value );
i++;
}
}
model.prepare();