辅导案例-CO7216

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
CO7216 Semantic Web
Coursework 3
Programming in Jena and OWL API
Important Dates:
Handed out: 17-March-2020
Deadline: 30-April-2020 at 17:00 BST
 This coursework counts as 20% of your final mark.
 This coursework is an individual assignment, not based on group work.
 Please read guidelines on plagiarism on
https://www2.le.ac.uk/offices/sas2/assessments/plagiarism/penalties
 This coursework requires knowledge of RDFS, SPARQL, Java, Apache Jena and OWL
API.
 Please submit a signed cover sheet electronically to Blackboard.
Instructions:
 You need to use the same domain as in CW1/CW2.
 Make sure that you understand “what is expected” in this assignment, well before the
deadline.
 Setup Instructions:
o Task 2: create a Java Project, download and import OntologyDataImporter.java
from Blackboard. Use Maven (or Gradle) to download all necessary dependency
libraries.
Note: Please refer to the tutorial on Blackboard (“Programming the Semantic
Web”) for more detail.
Tasks:
The aims of this coursework is to develop a data importer that access various triplestores via
SPARQL endpoints, and use the data collected to populate an OWL ontology that you created in
CW2.
Part 1
Create a “lightweight” version of an OWL2 ontology in your chosen domain – This could be
derived from the ontology you created for CW2, or you may create a new one from scratch. Please
make sure that you have addressed any issues in the feedback to CW1/2. This ontology must
contain at least ten core classes and twenty core DataType and Object properties. Use
HermiT/FaCT++ reasoner to make sure the ontology is consistent.
[25 Marks]
Part 2
Use Protégé OWL code generator to generate Java templates from the ontology created in Task 1
(Please refer to “Programming the Semantic Web” on Blackboard). Complete the missing methods
in OntologyaImportor.java, and use generated classes to populate the ontology.
Your program should be able to:
 Search online triplestores via SPARQL endpoints, including, but not limited to some of the
endpoints listed below:
 DBpedia https://dbpedia.org/sparql
 Office for National Statistics http://statistics.data.gov.uk/sparql
 Companies House http://business.data.gov.uk/companies/app/explore/sparql.html
 W3C SPARQL endpoints https://www.w3.org/wiki/SparqlEndpoints
 WU endpoints http://sparqles.ai.wu.ac.at/availability
(Note: add new classes to your ontology if necessary)
 Use the data obtained from the previous step to populate your ontology (e.g. creating
instances, assigning property values and establishing relationships).
[40 Marks]
Part 3
Write a short description (approximately 200 words) about your domain in an HTML page
(about_us.html), and then annotate the content of this webpage in RDFa, using the ontology
created in Task 1, together with other vocabularies, including (but not limited to):
 FOAF: http://xmlns.com/foaf/spec/
 Dublin Core: http://www.dublincore.org/specifications/dublin-core/dcmi-terms/
Hint: You may use this RDFa tool for editing http://rdfa.info/play/
[15 Marks]
Part 4
Develop a simple web application that allows users to query your OWL file. The web interface:
 Should use ontology-based repository as the backend (e.g. OWL files or RDF stores, not
SQL or JSON database)
 Should provide an interface that allows users to answer at least two competency questions
provided in CW1.
Note: Task 4 may be implemented in any programming languages (e.g., ASP.NET, Python, PHP
etc.). Although it might be necessary to expose some functions as REST services, if OWL API is
not available in the language you chose. [see Appendix 1]
[20 Marks]
Submission
 Question 1: Save the ontology as *.owl.
 Question 2: OntologyDataImporter.java and any other files, including all auto-
generated java classes.
 Question 3: Write the answer in Answers.pdf.
 Question 4: Submit the entire web application project, you might include a note describing
how to run your application.
Compress all files in a single zip. The zip file should be named CO7216_CW3_your_email_id.zip
(e.g. CO7216_CW3_abc123.zip). Your submission should also include a completed coursework
plagiarism coversheet (print and signed PDF or image). You need to submit the zip file via
Blackboard and you are allowed to re-submit as many times as you like before the deadline. Marks
for any coursework which does not have the accompanying cover sheet will be withheld till you
provide one.
Anonymous marking
We operate an anonymous marking scheme. Your email id will be hashed before grading. All
submitted OWL files and the Java programs will be marked anonymously.
Marking Scheme
<50% 50-60% 60-70% 70%+
Task 1 The lightweight
version of the OWL
ontology still has major
problems with the
class/property
hierarchy of the
taxonomy
Insufficient number of
classes or properties.
HermiT/FaCT++
reasoner shows
inconsistencies. No
attempt was made to
resolve these problems.
The taxonomy of the
OWL2 ontology is
mostly correct despite
some issues with the
class hierarchy.
Most core classes and
properties are
presented.
HermiT/FaCT++
reasoner shows
inconsistencies. Some
attempts were made to
resolve the problems.
The OWL2
ontology has a
good class
hierarchy and
reasonable
DataType/Object
properties.
HermiT/FaCT++
reasoner confirms
the ontology is
mostly consistent.
Well-defined class
hierarchy and
DataType/Object
properties of
OWL2 ontology.
Necessary SWRL
or other reasoning
rules are also
integrated
HermiT/FaCT++
reasoner confirms
the ontology is
consistent.
Task 2 The generated Java
code failed to compile.
The program failed to
retrieve the data from
remote SPARQL
endpoints
The generated Java
code compiles and
runs.
The program can
access at least one
remote SPARQL
endpoint and the data
obtained is used for
creating instances, but
there are still issues
with the mapping.
No property value or
relationships are
created.
The program can
access multiple
remote
triplestores via
remote SPARQL
endpoints, and at
least three classes
are populated with
the data collected.
Some property
values are
relationships are
established,
though still
limited.
The program can
query multiple
remote triplestores
via remote
SPARQL
Task 3 The HTML
document is not
annotated with
RDFa, or the
RDFa content
failed
validation
check at https://
www.w3.org/2
012/pyRdfa/Val
idator.html
The HTML document
meets the syntax
specification for
RDFa, and its content
passes the validation
check, but the
annotated content is
still minimal.
RDFa content
passed the
validation check,
annotations
generally well
written.
RDFa content
passed the
validation check,
well-written
annotations using
properties/classes
from a variety of
external
ontologies.
Task 4 The web
interface does
The application has an
ontological backend,
The application
has an RDF/OWL
The users can
query the ontology
not use any
backend (e.g.
OWL
file/triplestore),
or the interface
provided cannot
answer any of
the competency
questions
and users can search
the data by editing
pre-define SPARQL
templates from the
web interface, though
there might still be
some problems.
file-based
ontological
backend, and
users can search
the ontology by
dynamically
constructing
SPARQL queries
using a form-
based interface.
There might still
be some minor
issues but at least
three competency
questions can be
answered
answered using
the interface
developed.
by dynamically
constructing
SPARQL queries
using an
interactive (e.g.
Ajax) interface. At
least all five
competency
questions can be
answered
answered using the
interface
developed.
Appendix 1
Java Web Application tutorial
https://www.javahelps.com/2015/04/java-web-application-hello-world.html
Building a simple web application using Spring boots
https://dzone.com/articles/creating-a-web-application-with-spring-boot
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468