Assignment title: Java


In order to import Protege-OWL Java library for eclipse, follow the following steps – Start Eclipse, create a new Java project and import family.txt to the project. – Create a Java package co7216.programming then import FOAFDemoApplication.java. – Select Project ! Properties ! Java Build Path – Switch to libraries tab then click on Add External JARs – Browser Protege Installation folder and add protege.jar to the library. – Add *.jars within /plugins/edu.stanford.smi.protegex.owl/ folder to the library. Programming Exercise • Part 1: Load and Modify FOAF Ontology – Create a JenaOWLModel, import FOAF ontology from http://xmlns.com /foaf/spec/index.rdf (10%) – Create two new subclass of class foaf:Person ! foaf:Man, foaf:Woman(10%) – Create an ObjectProperty foaf:hasChild, both domain and range should be foaf:Person. (10%) – Create an ObjectProperty foaf:isChildOf, whose inverse property is foaf:hasChild.(5%) • Part 2: Create Instances according to input files. 2009/2010 1 1 – Read CSV input file family.txt using Java, each line in this CSV file contains 4 fields (personID, gender, motherID, fatherID), symbol "?" means unknown. D,male,B,A C,female,B,A I,male,G,F H,female,G,F F,male,E,D A,male,?,? B,female,?,? G,female,?,? E,female,?,? Figure 1: family hierarchy – You task is to create ontol