SlideShare a Scribd company logo
1 of 54
Download to read offline
CTM 1.0
Compact Topic Maps Syntax
                  Tutorial



 Lars Heuer <heuer@semagia.com>

   TMRA 2008, Leipzig · 15.10.2008
Table of Contents
     Introduction
     Overview
     Details
     Create your own topic map
     Questions / Answers




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   2
Introduction
     CTM is a textual Topic Maps syntax (like LTM
     and AsTMa=)
     Is meant to be human-friendly
     Supports TMDM
     Standard format (ISO 13250-6) unlike LTM
     and AsTMa=
     Human-readable, usable for examples,
     papers
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   3
Introduction
     CTM is utilised by TMCL to define constraints
     CTM will be used by TMQL for
           INSERT operations
           UPDATE operations
           DELETE operations
     Shares some similarities with TMQL (syntax
     wise)
     Current draft (slightly outdated)
     http://www.isotopicmaps.org/ctm/
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   4
Introduction
     CTM is nearly finished (feature-wise, syntax-
     wise)
     Next draft will appear within the next two
     months
     Currently no stable, upto-date CTM parser is
     available (should change soon)



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   5
Overview – ToC
     Topcis
     Names
     Occurrences
     Literals
     Associations
     Comments
     Summary

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   6
Overview – Topics
     Topics are introduced with an identity and
     end with a dot (quot;.quot;) (often labeled as quot;topic
     blockquot;)
     Typically topics start with a simple identifier,
     a subject identifier, or subject locator.
john-lennon . # Topic with an item identifier

http://en.wikipedia.org/wiki/John_Lennon . # subj. ident.

= http://www.google.com/ .                                      # subject locator

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008        7
Overview – Topics
     An IRI is interpreted as subject identifier
     unless it is prefixed by an equal sign
     (or it is used as occurrence / variant value)
     Rootless IRIs (IRIs without quot;://quot;) are not
     detected, they have to be embedded into quot;<quot;
     quot;>quot;:
     Topic with a subject identifier:
           <mailto:heuer@semagia.com> .

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   8
Overview – Topics
     Topic statements like names and
     occurrences are delimited by a semicolon
     (quot;;quot;)
     The semicolon is optional iff it is the last
     statement (if the next character is the dot
     which marks the end of the topic)



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   9
Overview – Names
     Names are introduced by a hyphen, followed
     by an optional name type and the value
     Example:
     john-lennon
     - quot;John Lennonquot;;
     - surname: quot;Lennonquot;.




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   10
Overview – Names
     Names are introduced by a hyphen, followed
     by an optional name type and the value
     Example:
                                Name value
     john-lennon
     - quot;John Lennonquot;;
     - surname: quot;Lennonquot;.

                                         Name type



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   11
Overview – Names
     If the name type is not specified, the name
     uses automatically the default topic name
     type
     The name scope is introduced by an @ sign
     followed by comma delimited themes
     Example:
     The-Beatles - quot;The Beatlesquot;;
     - quot;Fab Fourquot; @nickname;
     - quot;Pilzköpfequot; @nickname, de .
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   12
Overview – Occurrences
     Occurrences start with the type, a colon
     followed by the value
     Example:
     The-Beatles
     website: http://www.beatles.com.uk
     .




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   13
Overview – Occurrence Scope
     The scope is introduced by an @ sign followed
     by the themes
     Example:
     The-Beatles
     website: http://www.beatles.com.uk ;
     website: http://beatles.de/ @de .




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   14
Overview – Literals
     CTM provides some built-in datatypes:
           String
           Date
           DateTime
           Integer
           Decimal
           IRI
     These datatypes can be used as occurrence
     and variant value
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   15
Overview – Literals – String
     Example:
     TopicMaps
     - quot;Topic Mapsquot;;
     description: quot;A technology …quot;.
     The datatype of the occurrence quot;descriptionquot; is
     set to xsd:string



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   16
Overview – Literals – Dates
     Examples:
     McCartney
     birthday: 1942-02-18.

     Blog-Entry
     created: 2008-10-12T17:30:22 .
     Datatype of quot;birthdayquot; is set to xsd:date,
     dataype of quot;createdquot; is xsd:dateTime

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   17
Overview – Literals – Numbers
     Examples:
     McCartney
     age: 66 .

     CTM
     version: 1.0 .
     Datatype of quot;agequot; is set to xsd:integer, dataype
     of quot;versionquot; is xsd:decimal

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   18
Overview – Literals
     Non-built-in datatypes can be expressed using
     the string value with an explicit datatype:
     quot;valuequot;^^datatype
     The quot;datatypequot; is specified by an IRI or a
     QName
     Examples:
     quot;09-19quot;^^xsd:gMonthDay
     quot;truequot;^^http://www.w3.org/2001/XMLSchema#
     boolean
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   19
Overview – Associations



              member-of(group: TheBeatles,

                                             member: john-lennon)




© 2008 Lars Heuer · http://www.semagia.com    TMRA 2008, Leipzig · 15.10.2008   20
Overview – Associations
  Association type




              member-of(group: TheBeatles,

                                             member: john-lennon)
                       Role types




© 2008 Lars Heuer · http://www.semagia.com    TMRA 2008, Leipzig · 15.10.2008   21
Overview – Associations
  Association type

                                                                                Role players


              member-of(group: TheBeatles,

                                             member: john-lennon)
                       Role types




© 2008 Lars Heuer · http://www.semagia.com    TMRA 2008, Leipzig · 15.10.2008              22
Overview – Associations
     The (optional) scope is added to an
     association by the @ sign followed by the
     themes
     Example:
     member-of(group: blind-faith,
                   member: eric) @year-1969




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   23
Overview – Comments
     Single line comments start with a hash (quot;#quot;)
     and reach until the end of a line
     Multiline comments start with #( and end with
     )#
     Examples:
     # I am a single line comment

     #( line 1
        line 2 )#
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   24
Overview – Summary
     Topics are introduced by an identity and end
     with a dot (quot;.quot;). The quot;topic blockquot;
     Topic statements must be delimited by a
     semicolon (quot;;quot;) unless it is the last statement
     Names are introduced with a hyphen (quot;-quot;), they
     have an optional explicit type and a value
     (string)
     Occurrences are introduced by the type
     followed by a literal
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   25
Overview – Summary
     CTM has built-in literals but the user can
     specify any datatype using the
     quot;valuequot;^^datatype notation
     Notation for associations:
       assoc-type(role-type1: role-player1,
                    role-type2: role-player2, …)
     The scope of a statement is introduced by the
     @ sign followed by comma-delimited themes

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   26
Details – ToC
     Assigning additional identities to topics
     Creating type-instance / supertype-subtype
     relationships
     Reification
     Embedded Topics
     Directives
     Templates

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   27
Details - Topics
     Topics are not limited to one identity, any
     number of identities can be specified
     Example:

     McCartney
     http://en.wikipedia.org/Paul_McCartney ;
     http://de.wikipedia.org/Paul_McCartney .

       Topic with the item identifier quot;McCartneyquot;
     and two subject identifiers
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   28
Details - Topics
     Example:

     GoogleWebsite
     = http://www.google.com/ .

       Topic with the item identifier
     quot;GoogleWebsitequot; and a subject locator



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   29
Details – Type-Instance
     CTM provides the keyword quot;isaquot; to establish
     type-instance relationships between topics
     Example:
     john isa person .

        Creates a type-instance association
     between quot;johnquot; and quot;personquot; where quot;johnquot;
     plays the quot;instancequot; role and quot;personquot; plays
     the quot;typequot; role
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   30
Details – Supertype-Subtype
     The keyword quot;akoquot; creates a supertype-
     subtype association between topics
     Example:
     album ako work .

        Creates a supertype-subtype association
     between quot;albumquot; and quot;workquot; where quot;albumquot;
     plays the quot;subtypequot; role and quot;workquot; plays the
     quot;supertypequot; role
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   31
Details – Reification
     To reify a statment, use a tilde (quot;~quot;) followed
     by a topic reference
     Example:
     works-for(company: BigCo,
       employee: Barney) ~ barneys-employment

     barneys-employment
     descr: quot;Barneys employment during 1980quot;.

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   32
Details – Embedded Topics
     Everywhere where a topic reference is
     excpected (i.e. as type) an embedded topic
     can be used
     Embedded topics get an automatically
     generated item identifier
     It's possible to define additional (stable
     identities)
     Handy for reification or where an explicit
     reference to a topic is not needed
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   33
Details – Embedded Topics
     Example:

     works-for(company: BigCo,
       employee: Barney) ~ [descr: quot;Barneys…quot;]




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   34
Details – Directives – Prefix
     The quot;%prefixquot; directive can be used to assign
     an IRI to an identifier
     The identifier can be is used as prefix within a
     QName
     Example:

     %prefix wp http://en.wikipedia.org/ ;
     wp:John_Lennon – quot;John Lennonquot;.

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   35
Details – Directives – Prefix
     QNames can also be used for subject locators:

     %prefix wp http://en.wikipedia.org/ ;

     = wp:John_Lennon
     decription: quot;Wikipedia page about
     John Lennonquot;.



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   36
Details – Directives – Prefix
     QNames can be used everywhere where a
     reference to a topic should be made (i.e. as
     association type, occurrence type, name type
     etc.)




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   37
Details – Directives –
Mergemap
     The %mergemap directive has the same
     semantics as the mergemap element in XTM
     2.0 (merge the current topic map with the
     referenced one).
     In CTM it will be possible to specify the syntax
     of the referenced file. I.e. it will be possible to
     merge-in a topic map which is encoded in XTM
     2.0, or in LTM etc.
     This directive will change, current spec is
     outdated
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   38
Details – Directives – Include
     %include:
     The include directive imports the referenced
     CTM file into the current one. Including a file
     makes the templates of the other file available
     in the current one and topics with an equal
     local identifier (like quot;johnquot;) are merged (this
     would not be the case if the %mergemap
     directive is used)
     Prefixes are not imported!
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   39
Details – Directives – Include
     Example:
     File A:
     john – quot;John Lennonquot;.

     File B:
     john – surname: quot;Lennonquot;.
     If file A includes file B the result would be:
     john – quot;John Lennonquot;; - surname: quot;Lennonquot;.

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   40
Details – Templates
     Templates are used to shorten the CTM code
     Especially useful for facts which occur often in
     a specific domain
     Example:
     def plays-for($player, $group, $instrument)
        plays(player: $player, group: $group,
              instrument: $instrument)
     end
      McCartney plays-for(The-Beatles, piano).
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   41
Details – Templates
     If templates are invoked within a topic block,
     the first argument of the template is the topic!
     Again:
          McCartney plays-for(The-Beatles, piano).
     is translated to:
         plays-for(McCartney, The-Beatles, piano)
     If a templates are invoked outside a topic block,
     all parameters have to be specified:
          plays-for(McCartney, The-Beatles, piano)
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   42
Details – Templates
     Since the topic is always used as first
     argument, it is not possible to invoke a
     template with no arguments within a topic
     block
     Within a template literals and topic references can
     be replaced with variables




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   43
Details – Templates
def born($person, $date, $place)
  $person isa person;
  birthday: $date .
  born-in(person : $person, birthplace : $place).
end

mccartney born(1942-06-12, Liverpool).


© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   44
Details – Templates
     Result:

mccartney isa person;
birthday: 1942-06-12 .

born-in(person: mccartney, birthplace: Liverpool)



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   45
Details – Templates
     Don't try to reify something within a template unless
     the reifier is variable otherwise the CTM processor
     reports violations of Topic Maps constraints
     Example (don't do that):
     def works-for($person, $company)
        works-for(company: $company,
                     person: $person) ~ employment
     end
     Everytime the quot;works-forquot; template is invoked, the
     processor tries to reify the newly created association
     which leads to an error because a topic can reify only
     one statement
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   46
Details – Templates
     This works:
     def works-for($person, $company, $reifier)
        works-for(company: $company,
                  person: $person) ~ $reifier
     end




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   47
Details – Templates
def is-beatle($beatle) # quot;Decorates 'is-member-of'
   is-member-of($beatle, The-Beatles)
end
def is-member-of($member, $group)
  member-of(member: $member, group: $group)
end
is-member-of(sting, The-Police)
is-beatle(john)


© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   48
Details – Wildcards
     ?foo creates an automatically generated item
     identifier. Everytime the parser sees ?foo
     again, the same topic will be reused
     ? creates a topic with an automatically
     generated item identifier, it is not possible to
     create a reference to the topic (c.f embedded
     topics)


© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   49
Details – Wildcards
     Wildcards in templates create a new item
     identifier for every invokation

      def tpl()
         ?foo – quot;Fooquot;.
          assoc(role-type: ?foo)
      end
      tpl();
      tpl(); #   two topics created from ?foo
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   50
Create your own topic map
     Think of a music collection, where each album is specified by a
     PSI which starts with quot;http://psi.example.org/album/quot; (i.e.
     http://psi.example.org/album/WhiteAlbum )
     Create at least two album topics incl. a name and an occurrence
     (i.e. a description)
     Both albums are instances of http://psi.music.com/albumquot;
     Create a quot;createdquot; association between a musician or group and
     the first album (the musician plays the quot;creatorquot; role, the album the
     quot;workquot; role)
     Create a template quot;created-byquot; for the quot;createdquot; association
     The second album should use the quot;created-byquot; template to
     establish an association between the album and the musician
     Use QNames where reasonable

© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   51
Possible solution
%prefix album http://psi.example.org/album/ ;

album:WhiteAlbum – quot;White Albumquot;;
descr: quot;The White Album was one of the last
  album releases of The Beatlesquot;.

The-Beatles – quot;The Beatlesquot;.

created(creator: The-Beatles,
        work: album:WhiteAlbum)
© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   52
Possible solution
def created-by($work, $creator)
    created(creator: $creator,
            work: $work)
end

album:SgtPepper – quot;Sgt. Pepperquot;;
created-by(The-Beatles);
descr: quot;One of the first concept albumsquot;.



© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   53
Discussion

                                             Questions?

                                             Answers! ☺




© 2008 Lars Heuer · http://www.semagia.com   TMRA 2008, Leipzig · 15.10.2008   54

More Related Content

Similar to Ctm 1.0 Tutorial

TMAPI 2.0
TMAPI 2.0TMAPI 2.0
TMAPI 2.0tmra
 
JSUG - TeX Day by Christoph Pickl
JSUG - TeX Day by Christoph PicklJSUG - TeX Day by Christoph Pickl
JSUG - TeX Day by Christoph PicklChristoph Pickl
 
Creative Commons @ Seybold San Francisco 2004 - DRM Roundtable
Creative Commons @ Seybold San Francisco 2004 - DRM RoundtableCreative Commons @ Seybold San Francisco 2004 - DRM Roundtable
Creative Commons @ Seybold San Francisco 2004 - DRM RoundtableMike Linksvayer
 
SessionTen_CaseStudies
SessionTen_CaseStudiesSessionTen_CaseStudies
SessionTen_CaseStudiesHellen Gakuruh
 
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic RepresentationGetty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic RepresentationVladimir Alexiev, PhD, PMP
 
Wire It Presentation
Wire It PresentationWire It Presentation
Wire It PresentationEric Abouaf
 
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)Carles Farré
 
HTML5 & CSS3 -- UPA Iowa
HTML5 & CSS3 -- UPA IowaHTML5 & CSS3 -- UPA Iowa
HTML5 & CSS3 -- UPA IowaIan Lintner
 
Lecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPLecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPyucefmerhi
 
XML and XPath with PHP
XML and XPath with PHPXML and XPath with PHP
XML and XPath with PHPTobias Schlitt
 
Have Some Rest Building Web2.0 Apps And Services
Have Some Rest   Building Web2.0 Apps And ServicesHave Some Rest   Building Web2.0 Apps And Services
Have Some Rest Building Web2.0 Apps And ServicesNenad Nikolic
 
BNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demoBNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demoBookNet Canada
 
Kurzeinführung: Atom Publishing Protocol
Kurzeinführung: Atom Publishing ProtocolKurzeinführung: Atom Publishing Protocol
Kurzeinführung: Atom Publishing ProtocolDirk Haun
 

Similar to Ctm 1.0 Tutorial (20)

TMAPI 2.0
TMAPI 2.0TMAPI 2.0
TMAPI 2.0
 
JSUG - TeX Day by Christoph Pickl
JSUG - TeX Day by Christoph PicklJSUG - TeX Day by Christoph Pickl
JSUG - TeX Day by Christoph Pickl
 
Creative Commons @ Seybold San Francisco 2004 - DRM Roundtable
Creative Commons @ Seybold San Francisco 2004 - DRM RoundtableCreative Commons @ Seybold San Francisco 2004 - DRM Roundtable
Creative Commons @ Seybold San Francisco 2004 - DRM Roundtable
 
JSON Viewer XPATH Workbook
JSON Viewer XPATH WorkbookJSON Viewer XPATH Workbook
JSON Viewer XPATH Workbook
 
SessionTen_CaseStudies
SessionTen_CaseStudiesSessionTen_CaseStudies
SessionTen_CaseStudies
 
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic RepresentationGetty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
 
HTML5 & CSS3
HTML5 & CSS3 HTML5 & CSS3
HTML5 & CSS3
 
Wire It Presentation
Wire It PresentationWire It Presentation
Wire It Presentation
 
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
 
Xml Demystified
Xml DemystifiedXml Demystified
Xml Demystified
 
HTML5 & CSS3 -- UPA Iowa
HTML5 & CSS3 -- UPA IowaHTML5 & CSS3 -- UPA Iowa
HTML5 & CSS3 -- UPA Iowa
 
Cs 891 2rev B
Cs 891 2rev BCs 891 2rev B
Cs 891 2rev B
 
Lecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPLecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITP
 
XML and XPath with PHP
XML and XPath with PHPXML and XPath with PHP
XML and XPath with PHP
 
Have Some Rest Building Web2.0 Apps And Services
Have Some Rest   Building Web2.0 Apps And ServicesHave Some Rest   Building Web2.0 Apps And Services
Have Some Rest Building Web2.0 Apps And Services
 
BNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demoBNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demo
 
Class2
Class2Class2
Class2
 
Kurzeinführung: Atom Publishing Protocol
Kurzeinführung: Atom Publishing ProtocolKurzeinführung: Atom Publishing Protocol
Kurzeinführung: Atom Publishing Protocol
 
What is xml
What is xmlWhat is xml
What is xml
 
Head first latex
Head first latexHead first latex
Head first latex
 

More from tmra

Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...tmra
 
External Schema for Topic Map Database
External Schema for Topic Map DatabaseExternal Schema for Topic Map Database
External Schema for Topic Map Databasetmra
 
Weber 2010 brn
Weber 2010 brnWeber 2010 brn
Weber 2010 brntmra
 
Subject Headings make information to be topic maps
Subject Headings make information to be topic mapsSubject Headings make information to be topic maps
Subject Headings make information to be topic mapstmra
 
Inquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map DatabaseInquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map Databasetmra
 
Topic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge FederationTopic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge Federationtmra
 
JavaScript Topic Maps in server environments
JavaScript Topic Maps in server environmentsJavaScript Topic Maps in server environments
JavaScript Topic Maps in server environmentstmra
 
Modelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic MapsModelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic Mapstmra
 
Hatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map MergingHatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map Mergingtmra
 
Designing a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_mapsDesigning a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_mapstmra
 
Tmra2010 matsuuraposter
Tmra2010 matsuuraposterTmra2010 matsuuraposter
Tmra2010 matsuurapostertmra
 
Automatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge managementAutomatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge managementtmra
 
Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010tmra
 
Presentation final
Presentation finalPresentation final
Presentation finaltmra
 
Evaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based OntologyEvaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based Ontologytmra
 
Mappe1
Mappe1Mappe1
Mappe1tmra
 
Et Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse SemanticsEt Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse Semanticstmra
 
A PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS IntegrationA PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS Integrationtmra
 
Live Integration Framework
Live Integration FrameworkLive Integration Framework
Live Integration Frameworktmra
 
Hatana tmra 2010
Hatana tmra 2010Hatana tmra 2010
Hatana tmra 2010tmra
 

More from tmra (20)

Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...
 
External Schema for Topic Map Database
External Schema for Topic Map DatabaseExternal Schema for Topic Map Database
External Schema for Topic Map Database
 
Weber 2010 brn
Weber 2010 brnWeber 2010 brn
Weber 2010 brn
 
Subject Headings make information to be topic maps
Subject Headings make information to be topic mapsSubject Headings make information to be topic maps
Subject Headings make information to be topic maps
 
Inquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map DatabaseInquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map Database
 
Topic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge FederationTopic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge Federation
 
JavaScript Topic Maps in server environments
JavaScript Topic Maps in server environmentsJavaScript Topic Maps in server environments
JavaScript Topic Maps in server environments
 
Modelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic MapsModelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic Maps
 
Hatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map MergingHatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map Merging
 
Designing a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_mapsDesigning a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_maps
 
Tmra2010 matsuuraposter
Tmra2010 matsuuraposterTmra2010 matsuuraposter
Tmra2010 matsuuraposter
 
Automatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge managementAutomatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge management
 
Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010
 
Presentation final
Presentation finalPresentation final
Presentation final
 
Evaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based OntologyEvaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based Ontology
 
Mappe1
Mappe1Mappe1
Mappe1
 
Et Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse SemanticsEt Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse Semantics
 
A PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS IntegrationA PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS Integration
 
Live Integration Framework
Live Integration FrameworkLive Integration Framework
Live Integration Framework
 
Hatana tmra 2010
Hatana tmra 2010Hatana tmra 2010
Hatana tmra 2010
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Ctm 1.0 Tutorial

  • 1. CTM 1.0 Compact Topic Maps Syntax Tutorial Lars Heuer <heuer@semagia.com> TMRA 2008, Leipzig · 15.10.2008
  • 2. Table of Contents Introduction Overview Details Create your own topic map Questions / Answers © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 2
  • 3. Introduction CTM is a textual Topic Maps syntax (like LTM and AsTMa=) Is meant to be human-friendly Supports TMDM Standard format (ISO 13250-6) unlike LTM and AsTMa= Human-readable, usable for examples, papers © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 3
  • 4. Introduction CTM is utilised by TMCL to define constraints CTM will be used by TMQL for INSERT operations UPDATE operations DELETE operations Shares some similarities with TMQL (syntax wise) Current draft (slightly outdated) http://www.isotopicmaps.org/ctm/ © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 4
  • 5. Introduction CTM is nearly finished (feature-wise, syntax- wise) Next draft will appear within the next two months Currently no stable, upto-date CTM parser is available (should change soon) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 5
  • 6. Overview – ToC Topcis Names Occurrences Literals Associations Comments Summary © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 6
  • 7. Overview – Topics Topics are introduced with an identity and end with a dot (quot;.quot;) (often labeled as quot;topic blockquot;) Typically topics start with a simple identifier, a subject identifier, or subject locator. john-lennon . # Topic with an item identifier http://en.wikipedia.org/wiki/John_Lennon . # subj. ident. = http://www.google.com/ . # subject locator © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 7
  • 8. Overview – Topics An IRI is interpreted as subject identifier unless it is prefixed by an equal sign (or it is used as occurrence / variant value) Rootless IRIs (IRIs without quot;://quot;) are not detected, they have to be embedded into quot;<quot; quot;>quot;: Topic with a subject identifier: <mailto:heuer@semagia.com> . © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 8
  • 9. Overview – Topics Topic statements like names and occurrences are delimited by a semicolon (quot;;quot;) The semicolon is optional iff it is the last statement (if the next character is the dot which marks the end of the topic) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 9
  • 10. Overview – Names Names are introduced by a hyphen, followed by an optional name type and the value Example: john-lennon - quot;John Lennonquot;; - surname: quot;Lennonquot;. © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 10
  • 11. Overview – Names Names are introduced by a hyphen, followed by an optional name type and the value Example: Name value john-lennon - quot;John Lennonquot;; - surname: quot;Lennonquot;. Name type © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 11
  • 12. Overview – Names If the name type is not specified, the name uses automatically the default topic name type The name scope is introduced by an @ sign followed by comma delimited themes Example: The-Beatles - quot;The Beatlesquot;; - quot;Fab Fourquot; @nickname; - quot;Pilzköpfequot; @nickname, de . © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 12
  • 13. Overview – Occurrences Occurrences start with the type, a colon followed by the value Example: The-Beatles website: http://www.beatles.com.uk . © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 13
  • 14. Overview – Occurrence Scope The scope is introduced by an @ sign followed by the themes Example: The-Beatles website: http://www.beatles.com.uk ; website: http://beatles.de/ @de . © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 14
  • 15. Overview – Literals CTM provides some built-in datatypes: String Date DateTime Integer Decimal IRI These datatypes can be used as occurrence and variant value © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 15
  • 16. Overview – Literals – String Example: TopicMaps - quot;Topic Mapsquot;; description: quot;A technology …quot;. The datatype of the occurrence quot;descriptionquot; is set to xsd:string © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 16
  • 17. Overview – Literals – Dates Examples: McCartney birthday: 1942-02-18. Blog-Entry created: 2008-10-12T17:30:22 . Datatype of quot;birthdayquot; is set to xsd:date, dataype of quot;createdquot; is xsd:dateTime © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 17
  • 18. Overview – Literals – Numbers Examples: McCartney age: 66 . CTM version: 1.0 . Datatype of quot;agequot; is set to xsd:integer, dataype of quot;versionquot; is xsd:decimal © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 18
  • 19. Overview – Literals Non-built-in datatypes can be expressed using the string value with an explicit datatype: quot;valuequot;^^datatype The quot;datatypequot; is specified by an IRI or a QName Examples: quot;09-19quot;^^xsd:gMonthDay quot;truequot;^^http://www.w3.org/2001/XMLSchema# boolean © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 19
  • 20. Overview – Associations member-of(group: TheBeatles, member: john-lennon) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 20
  • 21. Overview – Associations Association type member-of(group: TheBeatles, member: john-lennon) Role types © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 21
  • 22. Overview – Associations Association type Role players member-of(group: TheBeatles, member: john-lennon) Role types © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 22
  • 23. Overview – Associations The (optional) scope is added to an association by the @ sign followed by the themes Example: member-of(group: blind-faith, member: eric) @year-1969 © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 23
  • 24. Overview – Comments Single line comments start with a hash (quot;#quot;) and reach until the end of a line Multiline comments start with #( and end with )# Examples: # I am a single line comment #( line 1 line 2 )# © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 24
  • 25. Overview – Summary Topics are introduced by an identity and end with a dot (quot;.quot;). The quot;topic blockquot; Topic statements must be delimited by a semicolon (quot;;quot;) unless it is the last statement Names are introduced with a hyphen (quot;-quot;), they have an optional explicit type and a value (string) Occurrences are introduced by the type followed by a literal © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 25
  • 26. Overview – Summary CTM has built-in literals but the user can specify any datatype using the quot;valuequot;^^datatype notation Notation for associations: assoc-type(role-type1: role-player1, role-type2: role-player2, …) The scope of a statement is introduced by the @ sign followed by comma-delimited themes © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 26
  • 27. Details – ToC Assigning additional identities to topics Creating type-instance / supertype-subtype relationships Reification Embedded Topics Directives Templates © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 27
  • 28. Details - Topics Topics are not limited to one identity, any number of identities can be specified Example: McCartney http://en.wikipedia.org/Paul_McCartney ; http://de.wikipedia.org/Paul_McCartney . Topic with the item identifier quot;McCartneyquot; and two subject identifiers © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 28
  • 29. Details - Topics Example: GoogleWebsite = http://www.google.com/ . Topic with the item identifier quot;GoogleWebsitequot; and a subject locator © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 29
  • 30. Details – Type-Instance CTM provides the keyword quot;isaquot; to establish type-instance relationships between topics Example: john isa person . Creates a type-instance association between quot;johnquot; and quot;personquot; where quot;johnquot; plays the quot;instancequot; role and quot;personquot; plays the quot;typequot; role © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 30
  • 31. Details – Supertype-Subtype The keyword quot;akoquot; creates a supertype- subtype association between topics Example: album ako work . Creates a supertype-subtype association between quot;albumquot; and quot;workquot; where quot;albumquot; plays the quot;subtypequot; role and quot;workquot; plays the quot;supertypequot; role © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 31
  • 32. Details – Reification To reify a statment, use a tilde (quot;~quot;) followed by a topic reference Example: works-for(company: BigCo, employee: Barney) ~ barneys-employment barneys-employment descr: quot;Barneys employment during 1980quot;. © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 32
  • 33. Details – Embedded Topics Everywhere where a topic reference is excpected (i.e. as type) an embedded topic can be used Embedded topics get an automatically generated item identifier It's possible to define additional (stable identities) Handy for reification or where an explicit reference to a topic is not needed © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 33
  • 34. Details – Embedded Topics Example: works-for(company: BigCo, employee: Barney) ~ [descr: quot;Barneys…quot;] © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 34
  • 35. Details – Directives – Prefix The quot;%prefixquot; directive can be used to assign an IRI to an identifier The identifier can be is used as prefix within a QName Example: %prefix wp http://en.wikipedia.org/ ; wp:John_Lennon – quot;John Lennonquot;. © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 35
  • 36. Details – Directives – Prefix QNames can also be used for subject locators: %prefix wp http://en.wikipedia.org/ ; = wp:John_Lennon decription: quot;Wikipedia page about John Lennonquot;. © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 36
  • 37. Details – Directives – Prefix QNames can be used everywhere where a reference to a topic should be made (i.e. as association type, occurrence type, name type etc.) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 37
  • 38. Details – Directives – Mergemap The %mergemap directive has the same semantics as the mergemap element in XTM 2.0 (merge the current topic map with the referenced one). In CTM it will be possible to specify the syntax of the referenced file. I.e. it will be possible to merge-in a topic map which is encoded in XTM 2.0, or in LTM etc. This directive will change, current spec is outdated © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 38
  • 39. Details – Directives – Include %include: The include directive imports the referenced CTM file into the current one. Including a file makes the templates of the other file available in the current one and topics with an equal local identifier (like quot;johnquot;) are merged (this would not be the case if the %mergemap directive is used) Prefixes are not imported! © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 39
  • 40. Details – Directives – Include Example: File A: john – quot;John Lennonquot;. File B: john – surname: quot;Lennonquot;. If file A includes file B the result would be: john – quot;John Lennonquot;; - surname: quot;Lennonquot;. © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 40
  • 41. Details – Templates Templates are used to shorten the CTM code Especially useful for facts which occur often in a specific domain Example: def plays-for($player, $group, $instrument) plays(player: $player, group: $group, instrument: $instrument) end McCartney plays-for(The-Beatles, piano). © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 41
  • 42. Details – Templates If templates are invoked within a topic block, the first argument of the template is the topic! Again: McCartney plays-for(The-Beatles, piano). is translated to: plays-for(McCartney, The-Beatles, piano) If a templates are invoked outside a topic block, all parameters have to be specified: plays-for(McCartney, The-Beatles, piano) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 42
  • 43. Details – Templates Since the topic is always used as first argument, it is not possible to invoke a template with no arguments within a topic block Within a template literals and topic references can be replaced with variables © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 43
  • 44. Details – Templates def born($person, $date, $place) $person isa person; birthday: $date . born-in(person : $person, birthplace : $place). end mccartney born(1942-06-12, Liverpool). © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 44
  • 45. Details – Templates Result: mccartney isa person; birthday: 1942-06-12 . born-in(person: mccartney, birthplace: Liverpool) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 45
  • 46. Details – Templates Don't try to reify something within a template unless the reifier is variable otherwise the CTM processor reports violations of Topic Maps constraints Example (don't do that): def works-for($person, $company) works-for(company: $company, person: $person) ~ employment end Everytime the quot;works-forquot; template is invoked, the processor tries to reify the newly created association which leads to an error because a topic can reify only one statement © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 46
  • 47. Details – Templates This works: def works-for($person, $company, $reifier) works-for(company: $company, person: $person) ~ $reifier end © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 47
  • 48. Details – Templates def is-beatle($beatle) # quot;Decorates 'is-member-of' is-member-of($beatle, The-Beatles) end def is-member-of($member, $group) member-of(member: $member, group: $group) end is-member-of(sting, The-Police) is-beatle(john) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 48
  • 49. Details – Wildcards ?foo creates an automatically generated item identifier. Everytime the parser sees ?foo again, the same topic will be reused ? creates a topic with an automatically generated item identifier, it is not possible to create a reference to the topic (c.f embedded topics) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 49
  • 50. Details – Wildcards Wildcards in templates create a new item identifier for every invokation def tpl() ?foo – quot;Fooquot;. assoc(role-type: ?foo) end tpl(); tpl(); # two topics created from ?foo © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 50
  • 51. Create your own topic map Think of a music collection, where each album is specified by a PSI which starts with quot;http://psi.example.org/album/quot; (i.e. http://psi.example.org/album/WhiteAlbum ) Create at least two album topics incl. a name and an occurrence (i.e. a description) Both albums are instances of http://psi.music.com/albumquot; Create a quot;createdquot; association between a musician or group and the first album (the musician plays the quot;creatorquot; role, the album the quot;workquot; role) Create a template quot;created-byquot; for the quot;createdquot; association The second album should use the quot;created-byquot; template to establish an association between the album and the musician Use QNames where reasonable © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 51
  • 52. Possible solution %prefix album http://psi.example.org/album/ ; album:WhiteAlbum – quot;White Albumquot;; descr: quot;The White Album was one of the last album releases of The Beatlesquot;. The-Beatles – quot;The Beatlesquot;. created(creator: The-Beatles, work: album:WhiteAlbum) © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 52
  • 53. Possible solution def created-by($work, $creator) created(creator: $creator, work: $work) end album:SgtPepper – quot;Sgt. Pepperquot;; created-by(The-Beatles); descr: quot;One of the first concept albumsquot;. © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 53
  • 54. Discussion Questions? Answers! ☺ © 2008 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 15.10.2008 54