TERM END EXAM Date: 06/05/2014 Slot: L10+L11 Instructions to Students You can use Protg editor to create ontology All ontologies should be fully commented Notepad++ can be used for creating RDF or Turtle DATA Apache and Fuseki Server can be used to execute the SPARQL queries You can use any of the following standard namespaces in your Turtle or RDF or ontology file o xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" o xmlns:dc="http://purl.org/dc/elements/1.1/" o xmlns:foaf="http://xmlns.com/foaf/0.1/" o xmlns:ex ="http://www.employee.com/data#" o xmlns:xsd="http://www.w3.org/2001/XMLSchema#" o xmlns:sam=http://www.yourdomain.com/data# Write the following components in your front page of the answer sheet Components Marks (50) Program 1 (15) Output 1 (5) Program 2 (5) Output 2 (10) Viva (10)
Activities 1. Create a schema for the document and then add a reference to the schema in the XML document. Schema specifications The root element books should have one or more book entries (minimum of one). Each book must contain the following elements, in sequence: title, edition, author (one or more), publishedDate, type, and price Page | 2
Each book contains an isbn number as an ID and is required. title can contain any characters (type of string). title has a type attribute that can contain only the values "P" and "H". edition is an optional element, and must contain only numbers that would never use more than one byte of storage.
2. Create a XML DTD for following story grammar XML document and test with validation [Note: add more nodes and values] <?xml version="1.0" " ?> <!DOCTYPE story SYSTEM "story-grammar.dtd"> <?xml-stylesheet href="story-grammar.css" type="text/css"?> <story> <title>The little XMLer</title> <context></context> <problem></problem> <goal></goal> <episode> <subgoal>I have to do it ...</subgoal> <result></result> </episode> <moral></moral> </story>
3. Create XML document and Schema for Mobile Phones (Brand Name, Model, configuration details etc . . .)
Page | 3
4. Create a XML Schema for the following XML Document <?xml version="1.0"?> <catalog> <book> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book> <author>Knorr, Stefan</author> <title>Creepy Crawlies</title> <genre>Horror</genre> <price>4.95</price> <publish_date>2000-12-06</publish_date> <description>An anthology of horror stories about roaches, centipedes, scorpions and other insects.</description> </book> </catalog> 5. Parse the following XML file using DOM parser <university> <student> <name>Raja</name> <semester>Winter</semester> <course>M.Tech</course> <age>22</age> Page | 4
6. Create a SOAP Web Service that accepts a base ten (non-fractional decimal) number from the client and outputs the binary representation of that number.
7. Compose a REST (HTTP-GET) request that determines all major Indian cities provided by the web service. You can check your solution with any client.
8. Create a SOAP web service for "Feedback" and test the service using proper website in client side.
9. Create N-Turtle for Guest Book and try to retrieve some information using SPARQL.
10. Create a RESTful web service that stores phone book entries in the database PhoneBookDB and a web client application that consumes this service.
11. Represent the following information by means of RDF/S triples, using the Turtle syntax: Document 1 has been created by Paul on 29 November 2013. Document 2 and document 3 have been created by the same (unknown) author. Page | 5
Document 3 says that document 1 has been published by W3C. Represent the following query in SPARQL: Find the authors of documents together with the date of creation.