• Save

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Making Topicmaps SPARQL

on

  • 1,260 views

This presentation describes a proposal for using SPARQL as a query language for topic maps repositories.

This presentation describes a proposal for using SPARQL as a query language for topic maps repositories.

Statistics

Views

Total Views
1,260
Views on SlideShare
1,240
Embed Views
20

Actions

Likes
1
Downloads
0
Comments
1

6 Embeds 20

http://www.topicmapslab.de 10
http://tmra.de 3
http://www.slideshare.net 3
http://www.linkedin.com 2
http://www.tmra.de 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Oxford-based software technology company developing products focussed on helping organisations to better manage the complex relationships between conceptual models such as business processes and domain knowledge and documents, data and other information that people use on a day-to-day basis.Developed out of working on the ISO standard for structured information exchange – Topic Maps.
  • For the (typical) binary association case, or for associations that have only two distinct role types, this produces an intuitive result.

Making Topicmaps SPARQL Making Topicmaps SPARQL Presentation Transcript

  • Making Topic MapsSparql
  • Agenda
    Rationale
    SPARQL
    Theory
    Some examples
  • TMSparql
    A set of conventions and a small pseudo-ontology to enable a topic map to present itself as a SPARQL end-point
  • Rationale
    Integration
    A Simple Query Language
  • SPARQL
    A query language based on graph pattern matching with support for value testing.
    The result of a SPARQL query is a list of the different combination of variable-to-term mappings that match against the queried graph
  • Basic Matching
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    SELECT ?name ?mbox WHERE
    {
    ?x foaf:name ?name .
    ?x foaf:mbox ?mbox
    }
  • Filtering
    PREFIX dc: <http://purl.org/dc/elements/1.1/>
    PREFIX ns: <http://example.org/ns#>
    SELECT ?title ?price WHERE
    {
    ?x ns:price ?price .
    FILTER (?price < 30.5)
    ?x dc:title ?title .
    }
  • Optional Pattern Matching
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    SELECT ?name ?mbox WHERE
    {
    ?x foaf:name ?name .
    OPTIONAL { ?x foaf:mbox ?mbox }
    }
  • Alternative Patterns
    PREFIX dc10: <http://purl.org/dc/elements/1.0/>
    PREFIX dc11: <http://purl.org/dc/elements/1.1/>
    SELECT ?title WHERE
    {
    { ?book dc10:title ?title } UNION { ?book dc11:title ?title }
    }
  • Goals
    Don’t get caught up in RDF <-> Topic Maps conversion
    Make the result as intuitive and interoperable as possible
    No extensions to the SPARQL syntax
    Limited use of “magic” identifiers
    Linked Data Query Interop
    Make it possible to fire the same queries at RDF-based and Topic Maps-based SPARQL endpoints and get equivalent results.
  • Resource Identifiers
    In RDF, every resource has a single URI identifier.
    In Topic Maps topics in particular have multiple identifiers.
    Solution:
    Any subject identifier can be used to refer to a topic item.
    Any item identifier can be used to refer to a topic map item
  • Basic Triple Patterns
    To make TMSparql intuitive and to make SPARQL queries to Topic Maps equivalent to RDF we introduce a number of basic triple matching patterns.
    The intuitive nature of TMSparql comes from being selective and restrictive about how these patterns are defined.
  • Type-Instance Triple
    ?instance a ?type
    ?instance rdf:type ?type
    ?type identifies a topic item
    ?instance identifies a topic, association, occurrence or role item that is an instance of the topic identified by ?type
  • Examples
    SELECT ?person {
    ?person a ont:person
    }
    Finds all instances of ont:person
    SELECT ?type {
    http://www.networkedplanet.com/ a ?type
    }
    Returns the topics that define the type(s) of the topic with the subject or item identifier http://www.networkedplanet.com.
  • Topic Property Triple
    ?topic ?type ?value
    ?topic bound to a topic item
    ?type bound to a topic item
    ?value bound to the value of an occurrence or name of ?topic where the occurrence type is defined by ?type
  • Examples
    SELECT ?person, ?age {
    ?person a ont:person .
    ?person ont:age ?age
    }
    Finds all instances of ont:person that have an ont:age occurrence and returns the each matching person/age pair.
  • Examples
    The object part of the triple binds to a literal value, so we can also make use of SPARQL FILTER
    SELECT ?person , ?age {
    ?person a ont:person .
    ?person ont:age ?age .
    FILTER ( ?age >= 18 )
    }
    Find all people we can serve beer to
  • Related Topics Triple
    ?topic ?roleType ?relatedTopic
    Binds ?topic to any topic that plays a role of a type other than the type bound to ?roleType in an association
    Binds ?roleType to the type of role played by the topic bound to ?relatedTopic
    Binds ?relatedTopic to any topic that plays a role of the type bound to ?roleType
    Allows us to traverse an association using the target role type as the predicate.
  • Example
    SELECT ?person, ?company {
    ?person ont:employer ?company
    }
    Binds ?company to any topic that plays a role of type ont:employer in an association and binds ?person to the topic(s) that play any other type of role in that association.
  • Aside: Mapping RDF Vocabularies
    Map RDF predicates that have a literal range to occurrence types.
    Map RDF predicates that have a resource range to role types (and generate the association type and inverse role type).
    E.g. If we have:
    foaf:namemapped to a name type and
    foaf:membermapped to a role type
    Then the following query works against an RDF-based or TM-based endpoint:
    SELECT ?memberName, ?groupName {
    ?g foaf:member ?m .
    ?m foaf:name ?memberName .
    ?g foaf:name ?groupName
    }
  • TMSparql Predicates
    The basic triple patterns introduced above provide the ability to traverse from topic to topic and to retrieve and filter on the properties of topics.
    For the occasions when a topic map practitioner needs to get into more detail, we introduce a number of predicates that perform different model traversals.
    All TMSparql predicates use the namespace http://www.networkedplanet.com/tmsparql (mapped to tms: in the following examples)
  • TMSparql Predicates
    tms:reifier
    Traversal from a topic map item to its reifier.
    tms:topicProperty
    Traversal from a topic item to its name and occurrence items
    tms:value
    Traversal from a name or occurrence item to its value
    tms:role
    Traversal from an association item to its role items
    tms:player
    Traversal from a role item to the role player topic item
    tms:scope
    Traversal from a scoped topic map item to the topic items in its scope.
  • Example
    SELECT ?employmentAssoc, ?person, ?company, ?position {
    ?employmentAssoc a ont:worksFor .
    ?employmentAssoctms:role ?r1 .
    ?r1 a ont:employee .
    ?r1 tms:player ?person .
    ?r2 a ont:employer .
    ?r2 tms:player ?company .
    }
    Finds all associations of type ont:worksFor with at least one role of type ont:employee and one of type ont:employer and binds the role players to ?person and ?company respectively.
  • Conclusion
    TMSparql is an implementation of the SPARQL query language on top of the TMDM.
    With careful mapping of ontologies, it is possible to create a TMDM repository for RDF data that responds to SPARQL queries in the same way as a “native” RDF repository would
    TMSparql makes it possible for TMDM repositories to participate more fully in the Linked Data web