////////////////////////////// // PROPERTY ASSERTION METHODS// ////////////////////////////// public boolean assertPropertyInstance( String comboBoxObjectPropertyEntry, String room1Hash, String room2Hash) { OWLObjectProperty objProp = OWLFactory.getOWLObjectProperty( IRI.create(propEntryNametoPropEntryIRI.get(comboBoxObjectPropertyEntry))); OWLIndividual room1Individual = OWLFactory.getOWLNamedIndividual(':' + room1Hash, topIxPrefixManager); OWLIndividual room2Individual = OWLFactory.getOWLNamedIndividual(':' + room2Hash, topIxPrefixManager); manager.addAxiom( topIxOnt, OWLFactory.getOWLObjectPropertyAssertionAxiom(objProp, room1Individual, room2Individual)); return true; }
public boolean assertRoomIndividual( String roomName, String roomIndividualHash, String roomIndividualAnnotation) { OWLClassExpression tempClassExpression = OWLFactory.getOWLClass( IRI.create( roomToIRI.get( roomName))); // retrieves the Room Class IRI fron the roomToIRI map, using // roomID as a key. OWLIndividual tempIndividual = OWLFactory.getOWLNamedIndividual(':' + roomIndividualHash, topIxPrefixManager); manager.addAxiom( topIxOnt, OWLFactory.getOWLClassAssertionAxiom(tempClassExpression, tempIndividual)); manager.addAxiom( topIxOnt, OWLFactory.getOWLAnnotationAssertionAxiom( OWLFactory.getOWLAnnotationProperty( IRI.create( topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + "individualName")), IRI.create( topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + roomIndividualHash), OWLFactory.getOWLLiteral(String.format(roomIndividualAnnotation)))); return true; }