SlideShare a Scribd company logo
Introduction to Topic Maps




                    Topic Maps Query Language
                                  Session 1




         Sven Krusty M. Sc.
         Topic Maps Lab at the University of Leipzig
         krosse@informatik.uni-leipzig.de



  topicmapslab.de
Introduction to Topic Maps
Agenda
 1. Basics
    ●   TMQL metamodel
         -   Compared to TMDM
    ●   Grammar
 2. TMQL as language
    ●   Topic identification
    ●   Navigation concept



   topicmapslab.de
Introduction to Topic Maps




                     Basics
                             Metamodel




  topicmapslab.de
Introduction to Topic Maps
Metamodel
 ●   represented as a topic map
 ●   each topic can be used in the query
 ●   Topic Maps represent different elements in TMDM




     topicmapslab.de
Introduction to Topic Maps
TMDM




  topicmapslab.de
Introduction to Topic Maps
TMQL




  ●   Topic Map construct does not exist
        ●   no reification of topic maps possible
        ●   Query all topics difficult or Association


  topicmapslab.de
Introduction to Topic Maps
TMDM




  topicmapslab.de
Introduction to Topic Maps
TMDM → TMQL




  topicmapslab.de
Introduction to Topic Maps
TMQL




  ●   No distinction between name and Occurrence
      → Characteristics




  topicmapslab.de
Introduction to Topic Maps
TMDM




  topicmapslab.de
Introduction to Topic Maps
TMDM → TMQL




  topicmapslab.de
Introduction to Topic Maps
TMQL




  ●   no direct support of variants
      → Query only special feature




  topicmapslab.de
Introduction to Topic Maps
TMDM




  topicmapslab.de
Introduction to Topic Maps
TMDM → TMQL




  topicmapslab.de
Introduction to Topic Maps
TMQL




  ●   no role constructs
      → no reification of roles




  topicmapslab.de
Introduction to Topic Maps
Summary
 ●   No distinction between name and
     Occurrences
 ●   No variations of name
 ●   no role constructs
 ●   A topic map construct




     topicmapslab.de
Introduction to Topic Maps




                     Basics
                             Grammar




  topicmapslab.de
Introduction to Topic Maps
Grammar
 ●   defined in three levels
 ●   each level was inspired by other standards




     topicmapslab.de
Introduction to Topic Maps
Token Level
 ●   Terminal symbols of the language
 ●   Definition based on regular expressions




                                Token Level


     topicmapslab.de
                                               19
Introduction to Topic Maps
Canonical Level
 ●   Definition of production rules


     Example: tuple-expression: = <value-expression>




                              Canonical Level


                               Token Level


     topicmapslab.de
                                                       20
Introduction to Topic Maps
Non-Canonical Level
 ●   Term substitution as new production rules
 ●   Definition of shorter terms
     anchor / tm: name ==> anchor>> chracteristics tm: name


                          Non-Canonical Level


                              Canonical Level


                               Token Level


     topicmapslab.de
                                                              21
Introduction to Topic Maps




                    Language skills of
                       Literals and constants




  topicmapslab.de
Introduction to Topic Maps
Literals and constants
 ●   Constants (atoms) are data types and operators
 ●   Acquisition of CTM data types




     topicmapslab.de
Introduction to Topic Maps
Literals and constants
    Atom                                         possible value
    Atom      Undefined | boolean | number | date | datetime | string | iri
  undefined undef
   boolean    true or false
   number     decimal or integer
   decimal    /[+-]?/ +(/./ D d +)? /
    integer   /[+-]?/ D + /
     date     '-'? yyyy '-' mm '-' dd (zzzzzz)?
  DateTime '-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s +)? (Zzzzzz)?
      iri     see RFC 3987
    string     /"([^"]|/")*"/ | /'([^']|/')*'/



   topicmapslab.de
Introduction to Topic Maps




                    Language skills of
                       Topic identification




  topicmapslab.de
Introduction to Topic Maps
Topic identification
 ●   Use of references or string literals


 ●   String literals translated by axes


 ●   References are automatically translated
      ●   Subject identifier
      ●   Subject Locator
      ●   Item Identifier

     topicmapslab.de
Introduction to Topic Maps
Topic identification
 ●   item-identifier
             puccini

 ●   subject-identifier
             http://en.wikipedia.org/wiki/Puccini

 ●   subject-locator
             http://en.wikipedia.org/wiki/Puccini


     topicmapslab.de
Introduction to Topic Maps
Topic identification
 ●   Item identifier
             "Puccini" <<item

 ●   Subject-identifier
             "Http://en.wikipedia.org/wiki/Puccini"<<Indicators


 ●   Subject locator
             "Http://en.wikipedia.org/wiki/Puccini"<<Locators


     topicmapslab.de
Introduction to Topic Maps




                    Language skills of
                       Navigation concept




  topicmapslab.de
Introduction to Topic Maps
Navigation concept
 ●   based on the proxy concept of TMRM
 ●   Model of the topic map as an abstract bi-directional graph
 ●   Definition of 12 axes (+2 NCL)




     topicmapslab.de
                                                                  30
Introduction to Topic Maps
Navigation concept - Syntax
   DIRECTION:: = '<<' | '>>'


   AXIS-NAME:: = 'item' | 'indicators' | 'locators' | 'traverse' |
                  'Players' | 'roles' | 'types' | 'reifier' | 'atomify' |
                  'Characteristics' | 'super types' | 'scope'


   STEP:: = DIRECTION AXIS-NAME [TOPIC-REF]




   topicmapslab.de
                                                                            31
Introduction to Topic Maps
Axis - indicators
 ●   no optional types
 ●   Next: All Subject identifier of a topic
 ●   Prev: addressing a topic with subject identifier




     topicmapslab.de
                                                        32
Introduction to Topic Maps
Axis - indicators


         http://en.wikipedia.org/wiki/Puccini>> indicators




         "Http://en.wikipedia.org/wiki/Puccini" <<indicators




   topicmapslab.de
                                                               33
Introduction to Topic Maps
Axis - locators
 ●   no optional types
 ●   Next: All Subject locator of a topic
 ●   Prev: addressing a topic with subject Locator




     topicmapslab.de
                                                     34
Introduction to Topic Maps
Axis - locators


         http://en.wikipedia.org/wiki/Puccini>> locators




         "Http://en.wikipedia.org/wiki/Puccini" <<locators




   topicmapslab.de
                                                             35
Introduction to Topic Maps
Axis - item
 ●   no optional types
 ●   without pluralization!
                       Items →

 ●   Next: all item identifier of a topic
 ●   Prev: Addressing a topic of Item Identifier




     topicmapslab.de
                                                   36
Introduction to Topic Maps
Axis - item


         http://en.wikipedia.org/wiki/Puccini>> item




         "Http://en.wikipedia.org/wiki/Puccini" <<item




   topicmapslab.de
                                                         37
Introduction to Topic Maps
Axis - types
 ●   no optional types
 ●   Next: all types of a topic or the type of topic maps
     Construct
 ●   Prev: all instances of a type Topic


 ●   NCL:     instances - Axis
      ●   Next: all instances of a topic type
      ●   Prev: all types of topics or the type of Topic
          Maps construct

     topicmapslab.de
                                                            38
Introduction to Topic Maps
Axis - types


         http://en.wikipedia.org/wiki/Puccini>> types
         http://en.wikipedia.org/wiki/Puccini <<instances



         http://psi.ontopia.net/music/composer <<types
         http://psi.ontopia.net/music/composer>> instances



   topicmapslab.de
                                                             39
Introduction to Topic Maps
Axis - super types
 ●   no optional types
 ●   forward: all the super types of a type Topic
 ●   Prev: all sub-types of a type Topic


 ●   NCL:     subtypes - Axis
      ●   Next: all sub-types of a type Topic
      ●   Prev: all super types of a type Topic



     topicmapslab.de
                                                    40
Introduction to Topic Maps
Axis - super types


         http://psi.ontopia.net/music/composer>> super types
         http://psi.ontopia.net/music/composer <<subtypes



         http://psi.ontopia.net/music/musician <<super types
         http://psi.ontopia.net/music/musician>> subtypes



   topicmapslab.de
                                                               41
Introduction to Topic Maps
TMQL - Type Hierarchy

                                  A


            D                 B           C


                     E                F            G



                e1       e2                   g1       g2



   topicmapslab.de
                                                            42
Introduction to Topic Maps
TMQL - Type Hierarchy

                                  A


            D                 B              C


                     E                F               G



                e1       e2                      g1

                                      e1>> types

   topicmapslab.de
                                                          43
Introduction to Topic Maps
TMQL - Type Hierarchy

                                  A


                              B              C


                     E                F



              e1         e2                      g1     g2

                                      E>> super types

   topicmapslab.de
                                                             44
TMQL - Type Hierarchy

                              A


       D               B                 C


                                  F               G



           e1                                g1       g2

                TMQL Query:       A>> instances


                                                           45
Introduction to Topic Maps
Axis - characteristics
 ●   forward: all the features of a topic


 ●   Prev: the topic with the property


 ●   predefined types
     ●   all name
     ●   All Occurrences




                                            46
>> Characteristics




            http://en.wikipedia.org/wiki/Puccini
                        >> Characteristics tm: occurrence




topicmapslab.de
                                                            47
Name 1        t


                                      g


                  e1


                       Occurrence 1       t


                                          g




topicmapslab.de
Introduction to Topic Maps
TMQL - characteristics axis

                               Name 1             t


                                                 g


                     e1


                              Occurrence 1            t


                              Occurrence 2            g


                TMQL Query:           e1>> characteristics g



   topicmapslab.de
Introduction to Topic Maps




                             END




  topicmapslab.de
Introduction to Topic Maps




                    Topic Maps Query Language
                                  Session 2




         Sven Krusty M. Sc.
         Topic Maps Lab at the University of Leipzig
         krosse@informatik.uni-leipzig.de



  topicmapslab.de
Introduction to Topic Maps
Agenda
 1. Navigation Concept II
 2. Path Language - Draft 2010 (short view)




   topicmapslab.de
Introduction to Topic Maps




                    Language skills of
                       Navigation concept




  topicmapslab.de
Introduction to Topic Maps
Navigation concept
 ●   based on the proxy concept of TMRM


 ●   Definition of 12 axes (+2 NCL)




     topicmapslab.de
                                          4
DIRECTION:: = '<<' | '>>'


AXIS-NAME:: = 'item' | 'indicators' | 'locators' | 'traverse' |

                  'Characteristics' | 'super types' | 'scope'


STEP:: = DIRECTION AXIS-NAME [TOPIC-REF]




topicmapslab.de
                                                                  5
Introduction to Topic Maps
Axis - indicators
 ●



 ●   Next: All Subject identifier of a topic
 ●




     topicmapslab.de
Axis - indicators


      http://en.wikipedia.org/wiki/Puccini>> indicators




                                                          7
topicmapslab.de
topicmapslab.de
Introduction to Topic Maps



  no optional types


                    Items →

  Next: all item identifier of a topic




  topicmapslab.de
                                         10
Introduction to Topic Maps
Axis - item




                              11
●   no optional types
●


    Construct
●




         Next: all instances of a topic type
     ●   Prev: all types of topics or the type of Topic


    topicmapslab.de
Introduction to Topic Maps




       http://en.wikipedia.org/wiki/Puccini <<instances




       http://psi.ontopia.net/music/composer>> instances




                                                           13
no optional types
    forward: all the super types of a type Topic
●




                      -




    topicmapslab.de
http://psi.ontopia.net/music/musician <<super types
Introduction to Topic Maps



                                 A


           D                 B           C


                    E                F            G



               e1       e2                   g1       g2



  topicmapslab.de
                                                           16
Introduction to Topic Maps
TMQL - Type Hierarchy

                                  A


            D                 B              C


                     E                F               G



                e1       e2                      g1       g2

                                      e1>> types

   topicmapslab.de
                                                               17
A


                         B


                                    F   G



                                            g2

                  TMQL Query:

topicmapslab.de
C


                      G



           e1



topicmapslab.de
forward: all the features of a topic




    all name
●   All Occurrences
Axis - characteristics



               http://en.wikipedia.org/wiki/Puccini
                           >> Characteristics tm: name




   topicmapslab.de
Introduction to Topic Maps




                             Name 2




                                              t




                                  e1>> characteristics g
Introduction to Topic Maps



  Next: Literal of the specific object
http://en.wikipedia.org/wiki/Puccini
            >> Characteristics>> atomify
Axis - players
 ●   Next: all players an association
      ●   by an association of type Topic
      ●   optional type = Role Type


 ●   Prev: all association with the player
      ●   optional type = Role Type




     topicmapslab.de
                                             26
Introduction to Topic Maps
Axis - players



        http://psi.ontopia.net/music/composed-by>> players



            http://en.wikipedia.org/wiki/Puccini <<players




   topicmapslab.de
                                                             27
Introduction to Topic Maps
Axis - roles
 ●   Next: all types of roles an association
      ●




 ●



          optional type = type of association




     topicmapslab.de
Introduction to Topic Maps




       http://psi.ontopia.net/music/composed-by>> roles




  topicmapslab.de
                                                          29
●   Concatenation of an association between two topics




●


●




                                                         30
topicmapslab.de
                  31
Introduction to Topic Maps




                             r2



         p1                       p2   p3




                                            32
TMQL - association axes




          r1   a1



                              p2



                    p2 <<play>> roles [. >> Players == p2]
r3
p1




     35
http://psi.ontopia.net/music/composed-by>> scope
Axis - reifier
 ●   no optional type


     Next: the construct of Reifier


 ●   Prev: the reified element
Axis - reifier



        http://psi.ontopia.net/music/composed-by>> reifier




   topicmapslab.de
Introduction to Topic Maps




                    Language skills of
                             Draft 2010




  topicmapslab.de
Introduction to Topic Maps
Draft 2010
 ●   only path expression
 ●   Changes
      ●   navigation similar concept with a modified syntax
      ●


      ●   additional axes
      ●   Removal of some axes
          Syntax closer to XPath
          Standard axles for each construct type (axes optional)


     topicmapslab.de
                                                                   41
Introduction to Topic Maps




  pathspec → axis '::' anyref | axis '::' | anyref | assocpattern
  filter       → boolfilter | scope filter




  topicmapslab.de
                                                                    42
Introduction to Topic Maps




      type, direct-type, instance, direct-instance




  topicmapslab.de
●



        -   Boolean expression
        -   Filter types
   ●   Projection
2. Operators




 topicmapslab.de
Introduction to Topic Maps




                    Language skills of
                             Postfix




  topicmapslab.de
Introduction to Topic Maps
Postfix
     as a supplement for Path Expression (simple content)
 ●   allow precise definition of the result set in Path
     Expressions
 ●   Types
     ●   Filter
     ●   Projection
Introduction to Topic Maps




                    Language skills of
                             Filter




  topicmapslab.de
Introduction to Topic Maps
Filter

    ●




    ●




                              7
●




                      NOT




    topicmapslab.de
●   Number of satisfying tuples
At most 3
    $ Opera IN / / o: opera


]
/ / O: composer




       $ Opera IN / / o: opera
       Satisfies $ opera>> traverse o: composed-by ==.
   ]

                                        Condition
Introduction to Topic Maps
Quantitative Boolean expression
   % Prefix o http://psi.ontopia.net/music/
   / / O: composer
       [
           At most 3
           $ Opera IN / / o: opera
           Satisfies $ opera>> traverse o: composed-by ==.
       ]
       → all the composers who composed more than 3 opera
       have

   topicmapslab.de
                                                             15
Quantitative Boolean expression
     numerically-free condition
 ●   exact number of satisfying tuples irrelevant




 ●   Maximum upper
         EVERY binding-set satisfies boolean-expression




     topicmapslab.de
                                                          16
Introduction to Topic Maps




  / / O: composer




  topicmapslab.de
                             17
% Prefix o http://psi.ontopia.net/music/




    ]
        all composers, which at least one opera


topicmapslab.de
NCL-Filter - Filter Index
 ●   special tuple from the result sequence


 ●   empty set if index is outside the possible range
 ●   Syntax:
        [Number] → [$ # == number]
 ●   Example:
        / / Http://psi.ontopia.net/music/composer / tm: name [0]
Introduction to Topic Maps



●



●   Zero-based indexes
    all items covered by the index range
●   Syntax
        [A .. b] → [a <= $ # $ # AND <b]
●




    topicmapslab.de
                                           24
Introduction to Topic Maps
NCL-Filter - Filter Scope
     Filtering by Themes
     @ Theme           → [. >> Scope == theme]
     [@ Theme]         → [. >> Scope == theme]
 ●   Example:




     / / Http://psi.ontopia.net/music/composer / tm: name
                       [@ Http://psi.ontopia.net/basename/short-name]
     topicmapslab.de
NCL-filter - Type filter
   Filtering by Type




   % Prefix o http://psi.ontopia.net/music/




                                              26
Compare Draft 2010



    Combination of filters
Introduction to Topic Maps



  % Prefix o http://psi.ontopia.net/music/
  / / O: composer
      (
          .,


          . / Tm: occurrence,
          . >> Indicators




  topicmapslab.de
                                             33
Introduction to Topic Maps
Projection
   % Prefix o http://psi.ontopia.net/music/
   / / O: composer
       (                           Projektionstupel
           .,
           . / Tm: name,
           . / Tm: occurrence,
           . >> Indicators
       )


   topicmapslab.de
                                                      34
Introduction to Topic Maps




                    Language skills of
                             Operators




  topicmapslab.de
Introduction to Topic Maps



●   allowed in so-called value-expression or content
    ●   eg part of a Boolean expression
●   different types
        Mathematical Operators
        Comparison operators
    ●




                                                       36
Introduction to Topic Maps



  less-than "<"


           Number
       -   String
       -

       -

       -




                             43
Introduction to Topic Maps
Comparison operators
 ●   less than or equal '<='
      ●   Supported data types:
           -   Number
           -   String
           -   Date
           -   Time
           -   DateTime




     topicmapslab.de
                                  44
Introduction to Topic Maps
Comparison operators
   greater-than '>'
       Supported data types:
         -

         -



             Time




   topicmapslab.de
Comparison operators




      DateTime
regular expressions '= ~'
●
NOTE: replaces the Draft 2010 by "minus"
●   Intersection of '=='
     ●   returns the intersection of both sets
     ●   Example:




    Note: Draft 2010 replaced by 'intersect'



                                                 51
Introduction to Topic Maps




                             END




  topicmapslab.de
Session 4




       Topic Maps Lab at the University of Leipzig
       krosse@informatik.uni-leipzig.de



topicmapslab . De
Introduction to Topic Maps
Review - Session 3
Postfix
    ●     Filter
           -   Boolean expression
           -   Filter types
          Projection
Operators




   topicmapslab.de
Introduction to Topic Maps



1. Features
   ●   Draft 2007 Features




  topicmapslab.de
topicmapslab.de
Introduction to Topic Maps
Features

    ●




                              5
●   Description:
    ●   returns the length of string literals
        other constructs are converted to literal




    Note Draft 2010: renamed 'string-length'
Introduction to Topic Maps
Feature - length
 ●   Example
     % Prefix o http://psi.ontopia.net/music/




     → all the names of Puccini with length 10




     topicmapslab.de
                                                 11
Introduction to Topic Maps
Construct literal transformation
 ●   Topic → Name, Subject, Identifier, Subject locator Item Identifier
 ●   Name → string literal
 ●   Occurrence → string literal
 ●   Variant → string literal
 ●   Role → Item Identifier
     Association → Item Identifier




     topicmapslab.de
                                                                      12
Introduction to Topic Maps
Function - slice
 ●



 ●




 ●   Description:




     topicmapslab.de
                              13
●   Identifier:




    topicmapslab.de
Functions TMQL4J
 ●   Identifier:
 ●   Arguments:     a set and two numeric values
 ●   Description:
         Sub-set of strings defined by numerical values
     ●   numeric values define maximum range
     ●   Example:      substring ("abc", 0, 9)
                    = {"Abc"}

     Note Draft 2010: 3 Argument defines the set of characters
Introduction to Topic Maps
Features - Draft 2010
 ●   Identifier:       starts-with
 ●   Arguments:        a set of literals and Vergleichsliteral
 ●   Description:
          Checking whether literal begins with Vergleichsliteral
      ●   Example:        starts-with ({"ab", "bc"}, "a")




     topicmapslab.de
                                                                   20
Identifier:   ends-with




   Example:
              =
22
{"", "C"}
Features - Draft 2010
     Identifier:       normalize-space
 ●   Arguments:
 ●   Description:
      ●   remove multiple occurrences of spaces
      ●                   normalize-space ({"ab", "bc"})
                       = {"Ab", "bc"}




     topicmapslab.de
Features - Draft 2010
 ●   Identifier:    translate
 ●   Arguments:     a set of literals, and two more literals
 ●   Description:
        replaces each character of the 2nd Literal characters by the 3rd

        Example:        translate ("Puccini", "PCI", "xyz")
                    = {"Xuyyznz"}




                                                                           26
●              find
               a set of literals and other literal




    Example:
               =
extract-regexp


Description:



●



                 {"Pucc"}
a lot of numeric literals
●



    ●


    ●       round ({1.5, - 1.5, 5.1})
        = {2, -1, 5}
Introduction to Topic Maps



    Identifier:       TopicMap
    Arguments:        no
●   Description:
     ●   returns the instance of the Topic Map




    topicmapslab.de
                                                 32
Introduction to Topic Maps
Features - Draft 2010
 ●   Lite Ralf fonctions
 ●   Transformation of construct to literals of the
     Type
 ●   Features
          string
      ●   boolean
      ●   number




     topicmapslab.de
                                                      33
END
Session 5




       Sven Krusty M. Sc.


       krosse@informatik.uni-leipzig.de



topicmapslab . De
No sorting, as no keyword found!
unsorted result
     {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]}
Result?
1: {["A", "BA"] ["C", "AA"] ["C", "AB"] ["D", "AD"]}
2:
Introduction to Topic Maps
Sorting - Routine


       ... (/ Tm. Name [0] / tm. Name [1] ASC)


   unsorted result
       {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]}


       {["A", "BA"] ["C", "AA"] ["C", "AB"] ["D", "AD"]}




                                                           10
Introduction to Topic Maps
Sorting - Routine
   Query
       ... (/ Tm. Name [0] DESC, / tm. Name [1])


   unsorted result
       {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]}


       sorted result?



   topicmapslab.de
                                                           11
Introduction to Topic Maps
Sorting - Routine
   Query
       ... (/ Tm. Name [0] DESC, / tm. Name [1])


   unsorted result
       {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]}


       {["D", "AD"] ["C", "AA"] ["C", "AB"] ["A", "BA"]}



   topicmapslab.de
                                                           12
... (/ Tm. Name [0] DESC, / tm. Name [1] DESC)




    {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]}


    sorted result?



topicmapslab.de
                                                        13
Sorting - Routine




  topicmapslab.de
Introduction to Topic Maps
Transitivity
Pragma-definition - transitivity
   Draft only defined as a transitive pragma
   Signature
    ●   identifier:   taxonometry
        QIRI:         tm: intransitive




   topicmapslab.de
Introduction to Topic Maps
Pragma-definition - transitivity
   % Prefix o http://psi.ontopia.net/
   % Prefix tml http://www.topicmapslab.de/
   % Pragma taxonometry tm: intransitive
   / / O: Composer + + / / tml: person




   topicmapslab.de
                                              23
Introduction to Topic Maps




                    Language skills of
                             Select - Style




  topicmapslab.de
Introduction to Topic Maps
Select Style
     syntactic similarity to SQL
 ●   consists of a set of sub-expressions
 ●   allow binding of variables
 ●   single type with key word for duplicate - treatment and
     Selection




     topicmapslab.de
                                                               25
<Value-expression>




    order


[
    Limit




                                 26
●



    Commitment to values at run time by conditions
●



     -
Introduction to Topic Maps
predefined variables
 ●   reserved system variables
        @_          Current Tuple
        $#          current index
        %%          Environment Topic Map
        %_          requested Topic Map
        $ [0-9] +   indexed element of a tuple
        $_          write-only variable
Introduction to Topic Maps
Where clause
   % Prefix o http://psi.ontopia.net/music/
   SELECT $ composer
   WHERE $ o ISA composer: composer


   % Prefix o http://psi.ontopia.net/music/
   % Prefix l http://psi.ontopia.net/literature/
   SELECT $ composer, $ opera
   WHERE $ composer ISA o: o AND composer: composed-by (l: work:
   $ Opera, o: composer: $ composer)

   topicmapslab.de
                                                                   36
Introduction to Topic Maps




                    Language skills of




  topicmapslab.de
Introduction to Topic Maps




  Definition of path expressions
   ●




  topicmapslab.de
●




3. Content Types


   ●   CTM
Introduction to Topic Maps




                    Language skills of
                             FLW (O) R-Style




  topicmapslab.de
Introduction to Topic Maps
FLW (O) R-Style
 ●   syntactic similarity to XML FLW (O) R or

 ●



 ●   limited syntactic thickness (um Cf SELCT)
 ●   allow binding of variables
 ●




     topicmapslab.de
                                                 5
Introduction to Topic Maps



  [< for <Binding-set>>]
  [           boolean-expression]
  [           by <Value-expression>]
  return




  topicmapslab.de
                                       6
Introduction to Topic Maps



●




        → defined content type and content of return




    topicmapslab.de
→ Topic for Puccini




RETURN wiki: Puccini / tm: name, wiki: Puccini>> indicators




                                                              9
RETURN $ composer, $ opera


   → Sort by Name of the composer
Introduction to Topic Maps




               Language skills of
                        For - Clause
Introduction to Topic Maps
For clause
     defined range of values to bind variables
     can contain multiple binding definitions
 ●   Pattern
         FOR variable IN context
         For other IN other context-
         ...




     topicmapslab.de
                                                 18
Introduction to Topic Maps
For clause
   % Prefix o http://psi.ontopia.net/music/
   % Prefix l http://psi.ontopia.net/literature/
   IN FOR $ composer / o: composer
   WHERE o: composed-by (l: work: $ opera, o: composer: $ composer)
   ORDER BY $ composer / tm: name [0], $ opera / tm: name [0] DESC
   RETURN $ composer, $ opera


   → Area of the variable $ composer limited to all composers


   topicmapslab.de
                                                                      19
Introduction to Topic Maps
For clause
   % Prefix o http://psi.ontopia.net/music/


   IN FOR $ composer http://en.wikipedia.org/wiki/Puccini
   WHERE o: composed-by (l: work: $ opera, o: composer: $ composer)
   ORDER BY $ composer / tm: name [0], $ opera / tm: name [0] DESC




   topicmapslab.de
Introduction to Topic Maps
●




    Variables only have validity within their queries
    (Inheritance of "child" query)
23
RETURN "" "$ {composer}" ""
Introduction to Topic Maps
Introduction to Topic Maps
XML - Content
 ●   XML fragments are defined by XML tags


     XML fragments can contain a lot of queries
     ●


 ●   To use information as XML fragments
     Export (Web Services)
Introduction to Topic Maps
XML - Content
   % Prefix o http://psi.ontopia.net/music/
   % Prefix l http://psi.ontopia.net/literature/
   RETURN <yml>
   {
       IN FOR $ composer / o: composer
       RETURN <composer> $ {Composer} </composer>
   }
   </yml>

   topicmapslab.de
                                                    31
Introduction to Topic Maps
XML - Content
 ●   Topic Maps elements are transformed into XTM fragment
 ●   simple data types are translated into strings
     Strings are not processed in the current written




     topicmapslab.de
                                                             32
Introduction to Topic Maps
Topic Maps Query Language




       Sven Krusty M. Sc.
       Topic Maps Lab at the University of Leipzig
       krosse@informatik.uni-leipzig.de



topicmapslab.de
WHERE Clause




topicmapslab.de
Introduction to Topic Maps
Conditional statement NCL

 IN FOR $ topic / / tm: subject
 RETURN
    $ Topic>> indicators>> atomify [0] | | $ topic>> locator>> atomify [0]
Introduction to Topic Maps




                    TMQL - Part II




  topicmapslab.de
Introduction to Topic Maps
TMQL Part II
 ●



 ●   TMQL based on Part I (TMQL - Query Language)
 ●   syntactically based on the Draft 2007




     topicmapslab.de
                                                    11
Introduction to Topic Maps
TMQL Part II
 ●   defined change operations for Topic Maps
      ●   Insert operation
      ●   Delete operation
      ●   Change operation
      ●   Merge rules




     topicmapslab.de
                                                12
Introduction to Topic Maps




                    Language skills of




  topicmapslab.de
Introduction to Topic Maps
Insert Expression
 ●



     Use of CTM as a definition language




     topicmapslab.de
                                           14
Introduction to Topic Maps
Merge expression
 ●   Merging of Topics under TMDM
 ●   Definition of a set of topics that are to be merged
 ●   Using variables
 ●   Where clause restricts a range of values of the variables
 ●   Grammar
         merge-expression:: = MERGE <value-expression>
                                   WHERE boolean-expression




     topicmapslab.de
                                                                 23
Introduction to Topic Maps
Merge expression
 MERGE / / http://psi.example.org/type [. / Email == "person@gmail.com"]


 → all topics that meet the following condition to be merged
         Instance of type http://psi.example.org/type
     ●


     ●   Occurrence is worth at least one of these person@gmail.com




    topicmapslab.de
                                                                       24
Merge expression



    AND $ person / email == $ other / email


 → People with the same e-mail address are merged




   topicmapslab.de
                                                    25
Introduction to Topic Maps




  Definition of a set of association which are to merge




      merge-expression:: = MERGE association definition
                              WHERE boolean-expression




  topicmapslab.de
Introduction to Topic Maps



    equivalent to Predicate Invocation (limited syntax)
●   supply quantity of the Association to match the defined pattern
●   Ellipse highlights strict processing


    association-definition     :: = <Part [...]>
    part                       :: = (Ident | variable) ':' (ident | variable)




                                                                            27
Introduction to Topic Maps
Association definition


   m: composed-by (
       m: composer: http://en.wikipedia.net/wiki/Puccini)


       → delivers all the associations which
             ●   of type "composer" is
             ●   exact role of type "composer" played by
                 Puccini has


   topicmapslab.de
                                                            28
Introduction to Topic Maps
Association definition


   m: composed-by (
       tm: subject: http://en.wikipedia.net/wiki/Puccini, ...)


       → delivers all the associations which

             ●   at least played a role of Puccini has
                 → type of role is not restricted


   topicmapslab.de
                                                                 29
% Prefix m http://psi.ontopia.net/music/
MERGE m: composed-by (
   tm: subject: http://en.wikipedia.net/wiki/Puccini, ...)


   → merge all associations of type "composed"




                                                             30
Conditions
   own type
   themselves Scope
Sven Krusty M. Sc.
optional argument
Value-Ex: new value of the change
Introduction to Topic Maps



●   context-free changes (context, topic map!)


        Add new association
        → without CTM




    topicmapslab.de
Create New Topic
 ●   Keyword:           topics
 ●   Definition of Identifier
 ●   Identifier already in use? → no change


     UPDATE topics ADD "http://psi.example.org/topic"
     → no identifier type defined (default: Subject identifier)




     topicmapslab.de
                                                                  8
Introduction to Topic Maps
Topic with subject identifiers to create


   UPDATE topics ADD "http://psi.example.org/topic"
   UPDATE topics ADD "http://psi.example.org/topic" ~
   UPDATE topics ADD "http://psi.example.org/topic" <<indicators
   → new topic with a subject identifier




   topicmapslab.de
                                                                   9
Introduction to Topic Maps
Topic with Item Identifier Create


   UPDATE topics ADD "http://psi.example.org/topic!




   topicmapslab.de
topicmapslab.de
                  11
Introduction to Topic Maps



●




    UPDATE associations ADD association-type (role-type: player)


    → all topics are not produced in existence
Introduction to Topic Maps



  Variables can be bound by where clause
Keyword:         names
●   Optional:        Name type
    Context:         Topic




    WHERE http://en.wikipedia.org/wiki/Puccini
Introduction to Topic Maps
Name change
 ●   Keyword:          names
 ●   Optional:         no
 ●   Context:


     UPDATE names SET "name"
     WHERE http://en.wikipedia.org/wiki/Puccini>> characteristics
     tm: name @ short-name




     topicmapslab.de
                                                                    19
Introduction to Topic Maps
Create New Occurrence
 ●   Keyword:         occurrences
 ●   Optional:
 ●   Context:




                                    20
●   Keyword:           occurrences
                       no




    UPDATE SET occurrences "1" ^ ^ xsd: integer




    topicmapslab.de
super types
    Optional:
●   Context:         Topic




    WHERE http://en.wikipedia.org/wiki/Puccini
Introduction to Topic Maps
Add new subtype
 ●                    subtypes
                      no
     Context:         Topic


     UPDATE ADD subtypes http://en.wikipedia.org/wiki/Puccini
     WHERE http://psi.example.org/type




                                                                27
Introduction to Topic Maps
Players change
 ●   Keyword:          players
 ●   Optional:         Role type (default: all roles!)
 ●




     UPDATE players SET composer http://psi.example.org/me
     WHERE http://en.wikipedia.org/wiki/Puccini <<players




     topicmapslab.de
                                                             28
Introduction to Topic Maps



    Keyword:
●                     Topic (players)
    Context:




    WHERE http://en.wikipedia.org/wiki/Puccini <<players



    topicmapslab.de
Introduction to Topic Maps
Reifier change
   Keyword:
                      no
Tmql tutorials (english)
Tmql tutorials (english)
Tmql tutorials (english)
Tmql tutorials (english)
Tmql tutorials (english)

More Related Content

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Tmql tutorials (english)

  • 1. Introduction to Topic Maps Topic Maps Query Language Session 1 Sven Krusty M. Sc. Topic Maps Lab at the University of Leipzig krosse@informatik.uni-leipzig.de topicmapslab.de
  • 2. Introduction to Topic Maps Agenda 1. Basics ● TMQL metamodel - Compared to TMDM ● Grammar 2. TMQL as language ● Topic identification ● Navigation concept topicmapslab.de
  • 3. Introduction to Topic Maps Basics Metamodel topicmapslab.de
  • 4. Introduction to Topic Maps Metamodel ● represented as a topic map ● each topic can be used in the query ● Topic Maps represent different elements in TMDM topicmapslab.de
  • 5. Introduction to Topic Maps TMDM topicmapslab.de
  • 6. Introduction to Topic Maps TMQL ● Topic Map construct does not exist ● no reification of topic maps possible ● Query all topics difficult or Association topicmapslab.de
  • 7. Introduction to Topic Maps TMDM topicmapslab.de
  • 8. Introduction to Topic Maps TMDM → TMQL topicmapslab.de
  • 9. Introduction to Topic Maps TMQL ● No distinction between name and Occurrence → Characteristics topicmapslab.de
  • 10. Introduction to Topic Maps TMDM topicmapslab.de
  • 11. Introduction to Topic Maps TMDM → TMQL topicmapslab.de
  • 12. Introduction to Topic Maps TMQL ● no direct support of variants → Query only special feature topicmapslab.de
  • 13. Introduction to Topic Maps TMDM topicmapslab.de
  • 14. Introduction to Topic Maps TMDM → TMQL topicmapslab.de
  • 15. Introduction to Topic Maps TMQL ● no role constructs → no reification of roles topicmapslab.de
  • 16. Introduction to Topic Maps Summary ● No distinction between name and Occurrences ● No variations of name ● no role constructs ● A topic map construct topicmapslab.de
  • 17. Introduction to Topic Maps Basics Grammar topicmapslab.de
  • 18. Introduction to Topic Maps Grammar ● defined in three levels ● each level was inspired by other standards topicmapslab.de
  • 19. Introduction to Topic Maps Token Level ● Terminal symbols of the language ● Definition based on regular expressions Token Level topicmapslab.de 19
  • 20. Introduction to Topic Maps Canonical Level ● Definition of production rules Example: tuple-expression: = <value-expression> Canonical Level Token Level topicmapslab.de 20
  • 21. Introduction to Topic Maps Non-Canonical Level ● Term substitution as new production rules ● Definition of shorter terms anchor / tm: name ==> anchor>> chracteristics tm: name Non-Canonical Level Canonical Level Token Level topicmapslab.de 21
  • 22. Introduction to Topic Maps Language skills of Literals and constants topicmapslab.de
  • 23. Introduction to Topic Maps Literals and constants ● Constants (atoms) are data types and operators ● Acquisition of CTM data types topicmapslab.de
  • 24. Introduction to Topic Maps Literals and constants Atom possible value Atom Undefined | boolean | number | date | datetime | string | iri undefined undef boolean true or false number decimal or integer decimal /[+-]?/ +(/./ D d +)? / integer /[+-]?/ D + / date '-'? yyyy '-' mm '-' dd (zzzzzz)? DateTime '-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s +)? (Zzzzzz)? iri see RFC 3987 string /"([^"]|/")*"/ | /'([^']|/')*'/ topicmapslab.de
  • 25. Introduction to Topic Maps Language skills of Topic identification topicmapslab.de
  • 26. Introduction to Topic Maps Topic identification ● Use of references or string literals ● String literals translated by axes ● References are automatically translated ● Subject identifier ● Subject Locator ● Item Identifier topicmapslab.de
  • 27. Introduction to Topic Maps Topic identification ● item-identifier puccini ● subject-identifier http://en.wikipedia.org/wiki/Puccini ● subject-locator http://en.wikipedia.org/wiki/Puccini topicmapslab.de
  • 28. Introduction to Topic Maps Topic identification ● Item identifier "Puccini" <<item ● Subject-identifier "Http://en.wikipedia.org/wiki/Puccini"<<Indicators ● Subject locator "Http://en.wikipedia.org/wiki/Puccini"<<Locators topicmapslab.de
  • 29. Introduction to Topic Maps Language skills of Navigation concept topicmapslab.de
  • 30. Introduction to Topic Maps Navigation concept ● based on the proxy concept of TMRM ● Model of the topic map as an abstract bi-directional graph ● Definition of 12 axes (+2 NCL) topicmapslab.de 30
  • 31. Introduction to Topic Maps Navigation concept - Syntax DIRECTION:: = '<<' | '>>' AXIS-NAME:: = 'item' | 'indicators' | 'locators' | 'traverse' | 'Players' | 'roles' | 'types' | 'reifier' | 'atomify' | 'Characteristics' | 'super types' | 'scope' STEP:: = DIRECTION AXIS-NAME [TOPIC-REF] topicmapslab.de 31
  • 32. Introduction to Topic Maps Axis - indicators ● no optional types ● Next: All Subject identifier of a topic ● Prev: addressing a topic with subject identifier topicmapslab.de 32
  • 33. Introduction to Topic Maps Axis - indicators http://en.wikipedia.org/wiki/Puccini>> indicators "Http://en.wikipedia.org/wiki/Puccini" <<indicators topicmapslab.de 33
  • 34. Introduction to Topic Maps Axis - locators ● no optional types ● Next: All Subject locator of a topic ● Prev: addressing a topic with subject Locator topicmapslab.de 34
  • 35. Introduction to Topic Maps Axis - locators http://en.wikipedia.org/wiki/Puccini>> locators "Http://en.wikipedia.org/wiki/Puccini" <<locators topicmapslab.de 35
  • 36. Introduction to Topic Maps Axis - item ● no optional types ● without pluralization! Items → ● Next: all item identifier of a topic ● Prev: Addressing a topic of Item Identifier topicmapslab.de 36
  • 37. Introduction to Topic Maps Axis - item http://en.wikipedia.org/wiki/Puccini>> item "Http://en.wikipedia.org/wiki/Puccini" <<item topicmapslab.de 37
  • 38. Introduction to Topic Maps Axis - types ● no optional types ● Next: all types of a topic or the type of topic maps Construct ● Prev: all instances of a type Topic ● NCL: instances - Axis ● Next: all instances of a topic type ● Prev: all types of topics or the type of Topic Maps construct topicmapslab.de 38
  • 39. Introduction to Topic Maps Axis - types http://en.wikipedia.org/wiki/Puccini>> types http://en.wikipedia.org/wiki/Puccini <<instances http://psi.ontopia.net/music/composer <<types http://psi.ontopia.net/music/composer>> instances topicmapslab.de 39
  • 40. Introduction to Topic Maps Axis - super types ● no optional types ● forward: all the super types of a type Topic ● Prev: all sub-types of a type Topic ● NCL: subtypes - Axis ● Next: all sub-types of a type Topic ● Prev: all super types of a type Topic topicmapslab.de 40
  • 41. Introduction to Topic Maps Axis - super types http://psi.ontopia.net/music/composer>> super types http://psi.ontopia.net/music/composer <<subtypes http://psi.ontopia.net/music/musician <<super types http://psi.ontopia.net/music/musician>> subtypes topicmapslab.de 41
  • 42. Introduction to Topic Maps TMQL - Type Hierarchy A D B C E F G e1 e2 g1 g2 topicmapslab.de 42
  • 43. Introduction to Topic Maps TMQL - Type Hierarchy A D B C E F G e1 e2 g1 e1>> types topicmapslab.de 43
  • 44. Introduction to Topic Maps TMQL - Type Hierarchy A B C E F e1 e2 g1 g2 E>> super types topicmapslab.de 44
  • 45. TMQL - Type Hierarchy A D B C F G e1 g1 g2 TMQL Query: A>> instances 45
  • 46. Introduction to Topic Maps Axis - characteristics ● forward: all the features of a topic ● Prev: the topic with the property ● predefined types ● all name ● All Occurrences 46
  • 47. >> Characteristics http://en.wikipedia.org/wiki/Puccini >> Characteristics tm: occurrence topicmapslab.de 47
  • 48. Name 1 t g e1 Occurrence 1 t g topicmapslab.de
  • 49. Introduction to Topic Maps TMQL - characteristics axis Name 1 t g e1 Occurrence 1 t Occurrence 2 g TMQL Query: e1>> characteristics g topicmapslab.de
  • 50. Introduction to Topic Maps END topicmapslab.de
  • 51. Introduction to Topic Maps Topic Maps Query Language Session 2 Sven Krusty M. Sc. Topic Maps Lab at the University of Leipzig krosse@informatik.uni-leipzig.de topicmapslab.de
  • 52. Introduction to Topic Maps Agenda 1. Navigation Concept II 2. Path Language - Draft 2010 (short view) topicmapslab.de
  • 53. Introduction to Topic Maps Language skills of Navigation concept topicmapslab.de
  • 54. Introduction to Topic Maps Navigation concept ● based on the proxy concept of TMRM ● Definition of 12 axes (+2 NCL) topicmapslab.de 4
  • 55. DIRECTION:: = '<<' | '>>' AXIS-NAME:: = 'item' | 'indicators' | 'locators' | 'traverse' | 'Characteristics' | 'super types' | 'scope' STEP:: = DIRECTION AXIS-NAME [TOPIC-REF] topicmapslab.de 5
  • 56. Introduction to Topic Maps Axis - indicators ● ● Next: All Subject identifier of a topic ● topicmapslab.de
  • 57. Axis - indicators http://en.wikipedia.org/wiki/Puccini>> indicators 7
  • 60. Introduction to Topic Maps no optional types Items → Next: all item identifier of a topic topicmapslab.de 10
  • 61. Introduction to Topic Maps Axis - item 11
  • 62. no optional types ● Construct ● Next: all instances of a topic type ● Prev: all types of topics or the type of Topic topicmapslab.de
  • 63. Introduction to Topic Maps http://en.wikipedia.org/wiki/Puccini <<instances http://psi.ontopia.net/music/composer>> instances 13
  • 64. no optional types forward: all the super types of a type Topic ● - topicmapslab.de
  • 66. Introduction to Topic Maps A D B C E F G e1 e2 g1 g2 topicmapslab.de 16
  • 67. Introduction to Topic Maps TMQL - Type Hierarchy A D B C E F G e1 e2 g1 g2 e1>> types topicmapslab.de 17
  • 68. A B F G g2 TMQL Query: topicmapslab.de
  • 69. C G e1 topicmapslab.de
  • 70. forward: all the features of a topic all name ● All Occurrences
  • 71. Axis - characteristics http://en.wikipedia.org/wiki/Puccini >> Characteristics tm: name topicmapslab.de
  • 72.
  • 73. Introduction to Topic Maps Name 2 t e1>> characteristics g
  • 74. Introduction to Topic Maps Next: Literal of the specific object
  • 75. http://en.wikipedia.org/wiki/Puccini >> Characteristics>> atomify
  • 76. Axis - players ● Next: all players an association ● by an association of type Topic ● optional type = Role Type ● Prev: all association with the player ● optional type = Role Type topicmapslab.de 26
  • 77. Introduction to Topic Maps Axis - players http://psi.ontopia.net/music/composed-by>> players http://en.wikipedia.org/wiki/Puccini <<players topicmapslab.de 27
  • 78. Introduction to Topic Maps Axis - roles ● Next: all types of roles an association ● ● optional type = type of association topicmapslab.de
  • 79. Introduction to Topic Maps http://psi.ontopia.net/music/composed-by>> roles topicmapslab.de 29
  • 80. Concatenation of an association between two topics ● ● 30
  • 82. Introduction to Topic Maps r2 p1 p2 p3 32
  • 83. TMQL - association axes r1 a1 p2 p2 <<play>> roles [. >> Players == p2]
  • 84. r3
  • 85. p1 35
  • 86.
  • 88. Axis - reifier ● no optional type Next: the construct of Reifier ● Prev: the reified element
  • 89. Axis - reifier http://psi.ontopia.net/music/composed-by>> reifier topicmapslab.de
  • 90. Introduction to Topic Maps Language skills of Draft 2010 topicmapslab.de
  • 91. Introduction to Topic Maps Draft 2010 ● only path expression ● Changes ● navigation similar concept with a modified syntax ● ● additional axes ● Removal of some axes Syntax closer to XPath Standard axles for each construct type (axes optional) topicmapslab.de 41
  • 92. Introduction to Topic Maps pathspec → axis '::' anyref | axis '::' | anyref | assocpattern filter → boolfilter | scope filter topicmapslab.de 42
  • 93. Introduction to Topic Maps type, direct-type, instance, direct-instance topicmapslab.de
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102. - Boolean expression - Filter types ● Projection 2. Operators topicmapslab.de
  • 103. Introduction to Topic Maps Language skills of Postfix topicmapslab.de
  • 104. Introduction to Topic Maps Postfix as a supplement for Path Expression (simple content) ● allow precise definition of the result set in Path Expressions ● Types ● Filter ● Projection
  • 105. Introduction to Topic Maps Language skills of Filter topicmapslab.de
  • 106. Introduction to Topic Maps Filter ● ● 7
  • 107. NOT topicmapslab.de
  • 108. Number of satisfying tuples
  • 109.
  • 110.
  • 111.
  • 112. At most 3 $ Opera IN / / o: opera ]
  • 113. / / O: composer $ Opera IN / / o: opera Satisfies $ opera>> traverse o: composed-by ==. ] Condition
  • 114. Introduction to Topic Maps Quantitative Boolean expression % Prefix o http://psi.ontopia.net/music/ / / O: composer [ At most 3 $ Opera IN / / o: opera Satisfies $ opera>> traverse o: composed-by ==. ] → all the composers who composed more than 3 opera have topicmapslab.de 15
  • 115. Quantitative Boolean expression numerically-free condition ● exact number of satisfying tuples irrelevant ● Maximum upper EVERY binding-set satisfies boolean-expression topicmapslab.de 16
  • 116. Introduction to Topic Maps / / O: composer topicmapslab.de 17
  • 117. % Prefix o http://psi.ontopia.net/music/ ] all composers, which at least one opera topicmapslab.de
  • 118.
  • 119.
  • 120.
  • 121.
  • 122. NCL-Filter - Filter Index ● special tuple from the result sequence ● empty set if index is outside the possible range ● Syntax: [Number] → [$ # == number] ● Example: / / Http://psi.ontopia.net/music/composer / tm: name [0]
  • 123. Introduction to Topic Maps ● ● Zero-based indexes all items covered by the index range ● Syntax [A .. b] → [a <= $ # $ # AND <b] ● topicmapslab.de 24
  • 124. Introduction to Topic Maps NCL-Filter - Filter Scope Filtering by Themes @ Theme → [. >> Scope == theme] [@ Theme] → [. >> Scope == theme] ● Example: / / Http://psi.ontopia.net/music/composer / tm: name [@ Http://psi.ontopia.net/basename/short-name] topicmapslab.de
  • 125. NCL-filter - Type filter Filtering by Type % Prefix o http://psi.ontopia.net/music/ 26
  • 126. Compare Draft 2010 Combination of filters
  • 127.
  • 128.
  • 129.
  • 130.
  • 131.
  • 132. Introduction to Topic Maps % Prefix o http://psi.ontopia.net/music/ / / O: composer ( ., . / Tm: occurrence, . >> Indicators topicmapslab.de 33
  • 133. Introduction to Topic Maps Projection % Prefix o http://psi.ontopia.net/music/ / / O: composer ( Projektionstupel ., . / Tm: name, . / Tm: occurrence, . >> Indicators ) topicmapslab.de 34
  • 134. Introduction to Topic Maps Language skills of Operators topicmapslab.de
  • 135. Introduction to Topic Maps ● allowed in so-called value-expression or content ● eg part of a Boolean expression ● different types Mathematical Operators Comparison operators ● 36
  • 136.
  • 137.
  • 138.
  • 139.
  • 140.
  • 141.
  • 142. Introduction to Topic Maps less-than "<" Number - String - - - 43
  • 143. Introduction to Topic Maps Comparison operators ● less than or equal '<=' ● Supported data types: - Number - String - Date - Time - DateTime topicmapslab.de 44
  • 144. Introduction to Topic Maps Comparison operators greater-than '>' Supported data types: - - Time topicmapslab.de
  • 145. Comparison operators DateTime
  • 147.
  • 148.
  • 149. NOTE: replaces the Draft 2010 by "minus"
  • 150. Intersection of '==' ● returns the intersection of both sets ● Example: Note: Draft 2010 replaced by 'intersect' 51
  • 151. Introduction to Topic Maps END topicmapslab.de
  • 152. Session 4 Topic Maps Lab at the University of Leipzig krosse@informatik.uni-leipzig.de topicmapslab . De
  • 153. Introduction to Topic Maps Review - Session 3 Postfix ● Filter - Boolean expression - Filter types Projection Operators topicmapslab.de
  • 154. Introduction to Topic Maps 1. Features ● Draft 2007 Features topicmapslab.de
  • 156. Introduction to Topic Maps Features ● 5
  • 157.
  • 158.
  • 159.
  • 160.
  • 161. Description: ● returns the length of string literals other constructs are converted to literal Note Draft 2010: renamed 'string-length'
  • 162. Introduction to Topic Maps Feature - length ● Example % Prefix o http://psi.ontopia.net/music/ → all the names of Puccini with length 10 topicmapslab.de 11
  • 163. Introduction to Topic Maps Construct literal transformation ● Topic → Name, Subject, Identifier, Subject locator Item Identifier ● Name → string literal ● Occurrence → string literal ● Variant → string literal ● Role → Item Identifier Association → Item Identifier topicmapslab.de 12
  • 164. Introduction to Topic Maps Function - slice ● ● ● Description: topicmapslab.de 13
  • 165. Identifier: topicmapslab.de
  • 166.
  • 167.
  • 168.
  • 169.
  • 170. Functions TMQL4J ● Identifier: ● Arguments: a set and two numeric values ● Description: Sub-set of strings defined by numerical values ● numeric values define maximum range ● Example: substring ("abc", 0, 9) = {"Abc"} Note Draft 2010: 3 Argument defines the set of characters
  • 171. Introduction to Topic Maps Features - Draft 2010 ● Identifier: starts-with ● Arguments: a set of literals and Vergleichsliteral ● Description: Checking whether literal begins with Vergleichsliteral ● Example: starts-with ({"ab", "bc"}, "a") topicmapslab.de 20
  • 172. Identifier: ends-with Example: =
  • 173. 22
  • 174.
  • 176. Features - Draft 2010 Identifier: normalize-space ● Arguments: ● Description: ● remove multiple occurrences of spaces ● normalize-space ({"ab", "bc"}) = {"Ab", "bc"} topicmapslab.de
  • 177. Features - Draft 2010 ● Identifier: translate ● Arguments: a set of literals, and two more literals ● Description: replaces each character of the 2nd Literal characters by the 3rd Example: translate ("Puccini", "PCI", "xyz") = {"Xuyyznz"} 26
  • 178. find a set of literals and other literal Example: =
  • 180.
  • 181.
  • 182. a lot of numeric literals ● ● ● round ({1.5, - 1.5, 5.1}) = {2, -1, 5}
  • 183. Introduction to Topic Maps Identifier: TopicMap Arguments: no ● Description: ● returns the instance of the Topic Map topicmapslab.de 32
  • 184. Introduction to Topic Maps Features - Draft 2010 ● Lite Ralf fonctions ● Transformation of construct to literals of the Type ● Features string ● boolean ● number topicmapslab.de 33
  • 185. END
  • 186. Session 5 Sven Krusty M. Sc. krosse@informatik.uni-leipzig.de topicmapslab . De
  • 187.
  • 188.
  • 189.
  • 190.
  • 191.
  • 192.
  • 193. No sorting, as no keyword found!
  • 194. unsorted result {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]} Result? 1: {["A", "BA"] ["C", "AA"] ["C", "AB"] ["D", "AD"]} 2:
  • 195. Introduction to Topic Maps Sorting - Routine ... (/ Tm. Name [0] / tm. Name [1] ASC) unsorted result {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]} {["A", "BA"] ["C", "AA"] ["C", "AB"] ["D", "AD"]} 10
  • 196. Introduction to Topic Maps Sorting - Routine Query ... (/ Tm. Name [0] DESC, / tm. Name [1]) unsorted result {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]} sorted result? topicmapslab.de 11
  • 197. Introduction to Topic Maps Sorting - Routine Query ... (/ Tm. Name [0] DESC, / tm. Name [1]) unsorted result {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]} {["D", "AD"] ["C", "AA"] ["C", "AB"] ["A", "BA"]} topicmapslab.de 12
  • 198. ... (/ Tm. Name [0] DESC, / tm. Name [1] DESC) {["C", "AA"] ["A", "BA"] ["C", "AB"] ["D", "AD"]} sorted result? topicmapslab.de 13
  • 199. Sorting - Routine topicmapslab.de
  • 200.
  • 202.
  • 203.
  • 204.
  • 205.
  • 207. Pragma-definition - transitivity Draft only defined as a transitive pragma Signature ● identifier: taxonometry QIRI: tm: intransitive topicmapslab.de
  • 208. Introduction to Topic Maps Pragma-definition - transitivity % Prefix o http://psi.ontopia.net/ % Prefix tml http://www.topicmapslab.de/ % Pragma taxonometry tm: intransitive / / O: Composer + + / / tml: person topicmapslab.de 23
  • 209. Introduction to Topic Maps Language skills of Select - Style topicmapslab.de
  • 210. Introduction to Topic Maps Select Style syntactic similarity to SQL ● consists of a set of sub-expressions ● allow binding of variables ● single type with key word for duplicate - treatment and Selection topicmapslab.de 25
  • 211. <Value-expression> order [ Limit 26
  • 212.
  • 213.
  • 214.
  • 215.
  • 216.
  • 217.
  • 218.
  • 219. Commitment to values at run time by conditions ● -
  • 220. Introduction to Topic Maps predefined variables ● reserved system variables @_ Current Tuple $# current index %% Environment Topic Map %_ requested Topic Map $ [0-9] + indexed element of a tuple $_ write-only variable
  • 221. Introduction to Topic Maps Where clause % Prefix o http://psi.ontopia.net/music/ SELECT $ composer WHERE $ o ISA composer: composer % Prefix o http://psi.ontopia.net/music/ % Prefix l http://psi.ontopia.net/literature/ SELECT $ composer, $ opera WHERE $ composer ISA o: o AND composer: composed-by (l: work: $ Opera, o: composer: $ composer) topicmapslab.de 36
  • 222. Introduction to Topic Maps Language skills of topicmapslab.de
  • 223. Introduction to Topic Maps Definition of path expressions ● topicmapslab.de
  • 224.
  • 225.
  • 226.
  • 227.
  • 228.
  • 229.
  • 230.
  • 232. Introduction to Topic Maps Language skills of FLW (O) R-Style topicmapslab.de
  • 233. Introduction to Topic Maps FLW (O) R-Style ● syntactic similarity to XML FLW (O) R or ● ● limited syntactic thickness (um Cf SELCT) ● allow binding of variables ● topicmapslab.de 5
  • 234. Introduction to Topic Maps [< for <Binding-set>>] [ boolean-expression] [ by <Value-expression>] return topicmapslab.de 6
  • 235.
  • 236. Introduction to Topic Maps ● → defined content type and content of return topicmapslab.de
  • 237. → Topic for Puccini RETURN wiki: Puccini / tm: name, wiki: Puccini>> indicators 9
  • 238.
  • 239.
  • 240.
  • 241.
  • 242.
  • 243.
  • 244. RETURN $ composer, $ opera → Sort by Name of the composer
  • 245. Introduction to Topic Maps Language skills of For - Clause
  • 246. Introduction to Topic Maps For clause defined range of values to bind variables can contain multiple binding definitions ● Pattern FOR variable IN context For other IN other context- ... topicmapslab.de 18
  • 247. Introduction to Topic Maps For clause % Prefix o http://psi.ontopia.net/music/ % Prefix l http://psi.ontopia.net/literature/ IN FOR $ composer / o: composer WHERE o: composed-by (l: work: $ opera, o: composer: $ composer) ORDER BY $ composer / tm: name [0], $ opera / tm: name [0] DESC RETURN $ composer, $ opera → Area of the variable $ composer limited to all composers topicmapslab.de 19
  • 248. Introduction to Topic Maps For clause % Prefix o http://psi.ontopia.net/music/ IN FOR $ composer http://en.wikipedia.org/wiki/Puccini WHERE o: composed-by (l: work: $ opera, o: composer: $ composer) ORDER BY $ composer / tm: name [0], $ opera / tm: name [0] DESC topicmapslab.de
  • 250. Variables only have validity within their queries (Inheritance of "child" query)
  • 251. 23
  • 252.
  • 253.
  • 254.
  • 255.
  • 256. RETURN "" "$ {composer}" ""
  • 258. Introduction to Topic Maps XML - Content ● XML fragments are defined by XML tags XML fragments can contain a lot of queries ● ● To use information as XML fragments Export (Web Services)
  • 259. Introduction to Topic Maps XML - Content % Prefix o http://psi.ontopia.net/music/ % Prefix l http://psi.ontopia.net/literature/ RETURN <yml> { IN FOR $ composer / o: composer RETURN <composer> $ {Composer} </composer> } </yml> topicmapslab.de 31
  • 260. Introduction to Topic Maps XML - Content ● Topic Maps elements are transformed into XTM fragment ● simple data types are translated into strings Strings are not processed in the current written topicmapslab.de 32
  • 262. Topic Maps Query Language Sven Krusty M. Sc. Topic Maps Lab at the University of Leipzig krosse@informatik.uni-leipzig.de topicmapslab.de
  • 264.
  • 265.
  • 266.
  • 267.
  • 268.
  • 269.
  • 270. Introduction to Topic Maps Conditional statement NCL IN FOR $ topic / / tm: subject RETURN $ Topic>> indicators>> atomify [0] | | $ topic>> locator>> atomify [0]
  • 271. Introduction to Topic Maps TMQL - Part II topicmapslab.de
  • 272. Introduction to Topic Maps TMQL Part II ● ● TMQL based on Part I (TMQL - Query Language) ● syntactically based on the Draft 2007 topicmapslab.de 11
  • 273. Introduction to Topic Maps TMQL Part II ● defined change operations for Topic Maps ● Insert operation ● Delete operation ● Change operation ● Merge rules topicmapslab.de 12
  • 274. Introduction to Topic Maps Language skills of topicmapslab.de
  • 275. Introduction to Topic Maps Insert Expression ● Use of CTM as a definition language topicmapslab.de 14
  • 276.
  • 277.
  • 278.
  • 279.
  • 280.
  • 281.
  • 282.
  • 283.
  • 284. Introduction to Topic Maps Merge expression ● Merging of Topics under TMDM ● Definition of a set of topics that are to be merged ● Using variables ● Where clause restricts a range of values of the variables ● Grammar merge-expression:: = MERGE <value-expression> WHERE boolean-expression topicmapslab.de 23
  • 285. Introduction to Topic Maps Merge expression MERGE / / http://psi.example.org/type [. / Email == "person@gmail.com"] → all topics that meet the following condition to be merged Instance of type http://psi.example.org/type ● ● Occurrence is worth at least one of these person@gmail.com topicmapslab.de 24
  • 286. Merge expression AND $ person / email == $ other / email → People with the same e-mail address are merged topicmapslab.de 25
  • 287. Introduction to Topic Maps Definition of a set of association which are to merge merge-expression:: = MERGE association definition WHERE boolean-expression topicmapslab.de
  • 288. Introduction to Topic Maps equivalent to Predicate Invocation (limited syntax) ● supply quantity of the Association to match the defined pattern ● Ellipse highlights strict processing association-definition :: = <Part [...]> part :: = (Ident | variable) ':' (ident | variable) 27
  • 289. Introduction to Topic Maps Association definition m: composed-by ( m: composer: http://en.wikipedia.net/wiki/Puccini) → delivers all the associations which ● of type "composer" is ● exact role of type "composer" played by Puccini has topicmapslab.de 28
  • 290. Introduction to Topic Maps Association definition m: composed-by ( tm: subject: http://en.wikipedia.net/wiki/Puccini, ...) → delivers all the associations which ● at least played a role of Puccini has → type of role is not restricted topicmapslab.de 29
  • 291. % Prefix m http://psi.ontopia.net/music/ MERGE m: composed-by ( tm: subject: http://en.wikipedia.net/wiki/Puccini, ...) → merge all associations of type "composed" 30
  • 292. Conditions own type themselves Scope
  • 293.
  • 295.
  • 296.
  • 297.
  • 298.
  • 299. optional argument Value-Ex: new value of the change
  • 300. Introduction to Topic Maps ● context-free changes (context, topic map!) Add new association → without CTM topicmapslab.de
  • 301. Create New Topic ● Keyword: topics ● Definition of Identifier ● Identifier already in use? → no change UPDATE topics ADD "http://psi.example.org/topic" → no identifier type defined (default: Subject identifier) topicmapslab.de 8
  • 302. Introduction to Topic Maps Topic with subject identifiers to create UPDATE topics ADD "http://psi.example.org/topic" UPDATE topics ADD "http://psi.example.org/topic" ~ UPDATE topics ADD "http://psi.example.org/topic" <<indicators → new topic with a subject identifier topicmapslab.de 9
  • 303. Introduction to Topic Maps Topic with Item Identifier Create UPDATE topics ADD "http://psi.example.org/topic! topicmapslab.de
  • 305. Introduction to Topic Maps ● UPDATE associations ADD association-type (role-type: player) → all topics are not produced in existence
  • 306. Introduction to Topic Maps Variables can be bound by where clause
  • 307.
  • 308.
  • 309.
  • 310.
  • 311. Keyword: names ● Optional: Name type Context: Topic WHERE http://en.wikipedia.org/wiki/Puccini
  • 312. Introduction to Topic Maps Name change ● Keyword: names ● Optional: no ● Context: UPDATE names SET "name" WHERE http://en.wikipedia.org/wiki/Puccini>> characteristics tm: name @ short-name topicmapslab.de 19
  • 313. Introduction to Topic Maps Create New Occurrence ● Keyword: occurrences ● Optional: ● Context: 20
  • 314. Keyword: occurrences no UPDATE SET occurrences "1" ^ ^ xsd: integer topicmapslab.de
  • 315.
  • 316.
  • 317.
  • 318.
  • 319. super types Optional: ● Context: Topic WHERE http://en.wikipedia.org/wiki/Puccini
  • 320. Introduction to Topic Maps Add new subtype ● subtypes no Context: Topic UPDATE ADD subtypes http://en.wikipedia.org/wiki/Puccini WHERE http://psi.example.org/type 27
  • 321. Introduction to Topic Maps Players change ● Keyword: players ● Optional: Role type (default: all roles!) ● UPDATE players SET composer http://psi.example.org/me WHERE http://en.wikipedia.org/wiki/Puccini <<players topicmapslab.de 28
  • 322. Introduction to Topic Maps Keyword: ● Topic (players) Context: WHERE http://en.wikipedia.org/wiki/Puccini <<players topicmapslab.de
  • 323. Introduction to Topic Maps Reifier change Keyword: no