Assuming that:
- You know how to populate your model by reading in the ontology that you built.
- Pellet
- IRI ,
x-test://individual , , SWIRL, .
final OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
model.read( ont );
final Resource Adult = ResourceFactory.createResource("x-domain://Adult");
final Property hasAge = ResourceFactory.createProperty("x-domain://hasAge");
final Resource res = model.createResource("x-test://individual");
res.addLiteral(hasAge, 19);
assert( res.hasProperty(RDF.type, Adult) );