String ns = "urn:test:";
OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
OntClass Person = model.createClass( ns + "Person" );
Individual john = model.createIndividual( ns + "JohnDoe", Person );
DatatypeProperty email = model.createDatatypeProperty( ns + "email", false );
john.addProperty( email, "john.doe@unknown.org" );
john.addProperty( email, "jdoe@unknown.org" );
assertTrue( model.validate().isValid() );
assertIteratorValues( model.listSubjectsWithProperty( email, "john.doe@unknown.org" ),
new Resource[] { john } );
assertTrue( model.contains( null, email, "john.doe@unknown.org" ) );
assertTrue( !model.contains( null, email, john ) );
DatatypeProperty name1 = model.createDatatypeProperty( ns + "name1", true );
john.addProperty( name1, "Name", "en" );
john.addProperty( name1, "Nom", "fr" );
assertTrue( model.validate().isValid() );
DatatypeProperty name2 = model.createDatatypeProperty( ns + "name2", true );
john.addProperty( name2, "Name" );
john.addProperty( name2, "Nom" );
assertTrue( !model.validate().isValid() );