Presentation is loading. Please wait.

Presentation is loading. Please wait.

Semantic Web 2010. State of SemWeb Promotes flexibility, software reuse. SOA Styled architecture that exposes business processes and rules regarding IT.

Similar presentations


Presentation on theme: "Semantic Web 2010. State of SemWeb Promotes flexibility, software reuse. SOA Styled architecture that exposes business processes and rules regarding IT."— Presentation transcript:

1 Semantic Web 2010

2 State of SemWeb Promotes flexibility, software reuse. SOA Styled architecture that exposes business processes and rules regarding IT governance. RDFa used in mashups, semantic enhancements to web pages, social networking (foaf) linking data to aid in e-commerce purchasing, browsing and advertising

3 State of SemWeb RDF/OWL not precise enough in meaning requiring rules, inferencing Performance at scale has been making steady progress in competing with relational databases (Nosql movement needs to combine with semweb technologies to create more synergies )

4 Sales Demo

5 Demo Overview RDF and Triples D2RQ Overview and Setup Ontology and Mappings Sales Demo Model Inferencing

6 RDF, OWL and Triples Subject, Predicate, Object RDF,OWL defines Relations between classes Equiv. Class Disjoint Class Complex Classes Properties Constraints

7 D2RQ As Semantic Web technologies are getting mature, there is a growing need for RDF applications to access the content of huge, live, non-RDF, legacy databases without having to replicate the whole database into RDF. The D2RQ mapping language for treating non- RDF relational databases as virtual RDF graphs, and the D2RQ Platform that enables applications to access these graphs through the Jena and Sesame APIs, as well as over the Web via the SPARQL Protocol and as Linked Data. JenaSesameSPARQL ProtocolLinked Data

8 D2RQ Setup Create Mappings Review Generated Ontology Review Generated RDF

9 DB Model (TODO: place datamodel diagram here)

10 Create Mappings To create the d2rq mappings and run from the location d2rq was downloaded. generate-mapping -o salesdemoExample.n3 -d com.mysql.jdbc.Driver jdbc:mysql://127.0.0.1/salesdemo dump-rdf -m salesdemo.n3 -f N3 -o salesdemoExample.n3 -b http://salesdemo/

11 Generated Ontology map:database a d2rq:Database; d2rq:jdbcDriver "com.mysql.jdbc.Driver"; d2rq:jdbcDSN "jdbc:mysql://127.0.0.1/salesdemo"; jdbc:autoReconnect "true"; jdbc:zeroDateTimeBehavior "convertToNull";

12 Generated Ontology # Table employees map:employees a d2rq:ClassMap; d2rq:dataStorage map:database; d2rq:uriPattern "employees/@@employees.ID@@"; d2rq:class vocab:employees; d2rq:classDefinitionLabel "employees"; map:employees_ID a d2rq:PropertyBridge; d2rq:belongsToClassMap map:employees; d2rq:property vocab:employees_ID; d2rq:propertyDefinitionLabel "employees ID"; d2rq:column "employees.ID"; d2rq:datatype xsd:int; References database used in 2rq:Database Class References metadata about field in table Used as Subject in Sparql Query

13 Generated RDF a vocab:employees ; rdfs:label "employees #2" ; vocab:employees_ADDRESS_ID "2"^^xsd:int ; vocab:employees_AGE "31"^^xsd:int ; vocab:employees_FNAME "Rodney" ; vocab:employees_GENDER "M" ; vocab:employees_ID "2"^^xsd:int ; vocab:employees_LNAME "Mckee" ; vocab:employees_MNAME "Stephen".

14 Simple Filtering (By State) String vocab = "http://localhost:2020/vocab/resource/"; Node predicate = Node.createURI(vocab + "address_STATE_CD"); Node object = Node.createLiteral("PA"); Model result = SalesModelFactory.createFilteredModel(m, Triple.createMatch(Node.ANY, predicate, object)); result.write(System.out, FileUtils.langN3); "PA". "PA".

15 Sparql (by State) PREFIX xsd: PREFIX rdfs: PREFIX rdf: PREFIX owl: PREFIX vocab: SELECT DISTINCT ?subj ?id ?stateCD WHERE { ?subj vocab:address_STATE_CD ?stateCD. ?subj vocab:address_ID ?id. FILTER (?stateCD = str(?code)). }

16 Sparql Filtering String result = SalesModelFactory.createFilteredModel(m, SparqlConstants.QUERY_ALL); http://salesdemo/products/2 http://localhost:2020/vocab/resource/products_SUGGESTED_PRICE 209.99

17 Inferencing

18 Linked Open Data

19 Related Links http://www4.wiwiss.fu- berlin.de/bizer/D2RQ/spec/ http://sourceforge.net/projects/d2rq-map/


Download ppt "Semantic Web 2010. State of SemWeb Promotes flexibility, software reuse. SOA Styled architecture that exposes business processes and rules regarding IT."

Similar presentations


Ads by Google