spec.setReasoner( new PelletReasoner() );
OntModel model = ModelFactory.createOntologyModel( spec, null );
OntClass HomeOwner = model.createClass( ns + "HomeOwner" );
Individual bob = model.createIndividual( ns + "bob", HomeOwner );
ObjectProperty hasNeighbor = model.createObjectProperty( ns + "hasNeighbor" );
OntClass NeighborOfBob = model.createClass( ns + "NeighborOfBob" );
NeighborOfBob
.addEquivalentClass( model.createHasValueRestriction( null, hasNeighbor, bob ) );
Individual susan = model.createIndividual( ns + "susan", HomeOwner );
susan.setPropertyValue( hasNeighbor, bob );
// model.write(System.out, "RDF/XML-ABBREV");