====== RDF ====== ===== Before the lab ===== === Reading: === * Quick introduction [[http://www.w3schools.com/rdf/rdf_intro.asp| by w3schools]] * [[ http://www.inf.unibz.it/~debruijn/teaching/swt/lecture-1-handouts.pdf|RDF ]] and [[http://www.inf.unibz.it/~debruijn/teaching/swt/lecture-2-handouts.pdf|RDFS]] * [[http://www.cs.rpi.edu/~puninj/XMLJ/classes/class8/all.html| RDF and RDFS summary]] Further reading: * [[http://www.w3.org/TR/2003/PR-rdf-primer-20031215/| RDF Primer]] by w3.org === Control questions: === * what are: * resources, * properties, * statesmets. * what does RDF use to identify resources? * what are the required elements of RDF file? * what are namespaces, how they are defined and what they are used for? * what listed tags are used for: * * * * * what container elements are available in RDF? * what is RDF Schema? * what are core RDFS Classes and properties? * how constraints on domain and range of properties are added? ===== Lab instructions 1 ===== ==== Basic RDF and RDFS concepts ==== - RDF: Develop the example from XML labs, which describes your faculty: * choose which elements from your example are resources and define it using rdf:Description tag * add your own namespace to the document and put into it all the properties * use a container element to group students from one faculty * after changes validate your example on the page [[http://www.w3.org/RDF/Validator//| RDF Validator from w3.org]] and analyze generated graph * turn two of your statements into resources using rdf:Statement tag - RDFS Schema: In a new file create RDF Schema class and properties hierarchy: * define classes for all existing resources - use rdfs:Class tag * with rdf:Property tag create properties for all informations about resources (like _name_of_the_faculty, group_id etc.), define domain and range for each property - Linking RDF with RDF Schema * save your rdf file from the first exercise as a new file * edit the file to use elements from the RDF Schema file from the second exercise - Look at prepared graph((example taken from [[http://www.cse.lehigh.edu/~heflin/courses/sw-2008/hw1.pdf|cse homeworks]])) representing some relations: * {{ :pl:dydaktyka:piw:2010:sw:classes_rdf.png?500 }} * translate the RDF Graph into the RDF XML syntax * check results with [[http://www.w3.org/RDF/Validator//| RDF Validator from w3.org]] or [[http://semweb.salzburgresearch.at/apps/rdf-gravity/download.html|RDF Gravity]] - Read about entailment rules in [[http://www.w3.org/TR/rdf-mt/#rules |the RDF Semantics recommendation]], Section 7 * using the RDFS entailment rules: rdfs2, rdfs3, rdfs5, rdfs7, rdfs9, and rdfs11 determine what triples can be inferred from the example in the previous exercise. ==== RDFStore ==== An RDF store (or triple store) is a system for storing and managing RDF data. List of tripe stores can be found on the page [[http://semanticweb.org/wiki/Category:RDF_store|SemanticWeb.org]] or in [[http://en.wikipedia.org/wiki/Triplestore|wikipedia.org]] - Read about [[http://wiki.dbpedia.org/Datasets| DBPedia data Set]] - Browse the DBPedia content starting from one of the listed examples. ===== Komentarze ===== Z braku lepszego miejsca tutaj studenci wpisują komentarze natury ogólnej do tego lab. 8-)