Slide 1Jena Framework ArchitectureJena Major Java ClassesJena Framework Architecture‘Hello to Me’ TriplesSlide 6‘Hello to My Friend’ Triples PatternHello Semantic Web – Other PiecesSteven SeidaJena Structure Introduction*And Hello Semantic World Introduction*Summarized from Semantic Web Programming by Hebeler, et al. 2009, pp. 270-271 and https://jena.apache.org/getting_started/index.htmlJena Framework ArchitectureJena* Framework Architecture*Free and open source Java framework for building Semantic Web and Linked Data applicationsLikely useful for custom team projectsLabs use here downJena Major Java ClassesClass DescriptionResource / PropertyA subject, predicate, or object (effectively an RDF resource). Or a reified statement (considering a triple as a single resource).Statement A triple (s,p,o). OR a reified statement (which is also a single resource in Jena)Graph Storage of triples – has add, delete, find, and contain operations. This is really for the low-level mechanisms (allowing easy replacement).Model / OntModelRich semantic web interaction – read, write, reason, and query. Model is for RDF, OntModel for OWL (InfModel for in-between).Query/ ResultSetSPARQL query and results. Applications iterate through ResultSet and output using ResultSetFormatter. (Query is actually part of the ARQ portion of Jena.)Reasoner Reasoner processing. Internal uses Jena reasoning (many flavors), External allows third party access (e.g. Pellet is popular).ObjectListener Support for event-driven processing.Jena Framework ArchitectureHello World Semantic WebSay Hello to MyselfSay Hello to My Friends1. Load a set of RDF data2. Query the data for my name3. Print “Hello to <my name>”4. Query the data for my friends5. Print “Hello to <friend name>” for each friend‘Hello to Me’ TriplesPeople:mefoaf:name “Semantic Web”The QuerySELECT ?name WHERE { People:me foaf:name ?name . } ?name is a variable. Only answers bound to variables return from a queryTriple pattern(s) to match“People” is abbreviation for http://org.semwebprogramming/chapter2/people#What should be the graph pattern for pointing me to my friends? “People” is abbreviation for http://org.semwebprogramming/chapter2/people#People:mefoaf:name “Semantic Web”foaf:knows“Ican Reason”foaf:knowsPeople:615441.or2.‘Hello to My Friend’ Triples Pattern“People” is abbreviation for http://org.semwebprogramming/chapter2/people#People:mefoaf:name “Semantic Web”“Ican Reason”foaf:knowsPeople:61544foaf:name The QuerySelect ?name where{ People:me foaf:knows ?friend . ?friend foaf:name ?name}‘and’ relationship between triple patterns so must satisfy both.Hello Semantic Web – Other Pieces Add ontology informationTwo different ontologiesAdd ontology alignment informationInference using ontology and alignmentAdd restriction and inference for
View Full Document