SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
TMAPI 2.0
         Topic Maps API 2.0


    Lars Heuer <heuer@semagia.com>
Johannes Schmidt <js@sixgroups.com>

     TMRA 2008, Leipzig · 17.10.2008
Table of Contents
     Introduction
     Design Objectives
     Core Interfaces
     Details – Core
     Details – Index
     Questions / Answers



Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   2
Johannes Schmidt · http://www.sixgroups.com
Introduction
     TMAPI is a set of Java interfaces to interact with
     topic maps
     TMAPI makes applications Topic Maps engine
     independent
     TMAPI 1.0 has been implemented by several Open
     Source and commercial Topic Maps engines
     TMAPI 1.0 has been ported to other programming
     languages
     Not designed by a standards body but a de-facto
     standard
Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   3
Johannes Schmidt · http://www.sixgroups.com
Design Objectives
     Topic Maps – Data Model (TMDM) compatible
     (TMAPI 1.0 is not)
     Respect TMDM constraints to some extend (i.e.
     disallow quot;nullquot; in serveral places)
     Java 1.5
     Userfriendly (depends on the perspective, though)
     More tests (TMAPI 1.0: 89 tests TMAPI 2.0: approx.
     250 tests)
     Apply lessons learned from TMAPI 1.0

Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   4
Johannes Schmidt · http://www.sixgroups.com
Core Interfaces
     Construct
       Reifiable
       Typed
       Scoped
     DatatypeAware(Reifiable, Scoped)
     TopicMap(Reifiable)
     Topic(Construct)
     Association(Reifiable, Typed, Scoped)
     Role(Reifiable, Typed)
     Occurrence(Datatyped, Typed)
     Name(Typed, Scoped)
     Variant(Datatyped)

Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   5
Johannes Schmidt · http://www.sixgroups.com
Details – Topic Map
     Object / Topic lookup methods moved from
     the TopicsIndex to the TopicMap interface:
           getConstructByItemIdentifier
           getTopicBySubjectIdentifier
           getTopicBySubjectLocator




Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   6
Johannes Schmidt · http://www.sixgroups.com
Details – Topics
     TMAPI 1.0: One method to create topics
     (createTopic  Topic without any identity)
     TMAPI 2.0: Four methods to create topics:
           createTopicBySubjectIdentifier
           createTopicBySubjectLocator
           createTopicByItemIdentifier
           createTopic ( Topic with an automatically
           generated item identifier)

Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   7
Johannes Schmidt · http://www.sixgroups.com
Details – Topics
Create or reuse existing topic with a sid in TMAPI 1.0:
     TopicsIndex tIdx =
          (TopicsIndex) tm.getHelperObject(TopicsIndex.class);
     if (!tIdx.isOpen()) { tIdx.open(); }
     if (!tIdx.getIndexFlags().isAutoUpdated()) {
           tIdx.reindex();
     }
     Topic topic = tIdx.getTopicBySubjectIdentifier(sid);
     if (topic == null) {
         TopicMapObject tmo = tm.getObjectBySourceLocator(sid);
         if (tmo instanceof Topic) { topic = (Topic) tmo; }
     }
    if (topic == null) {
        topic = tm.createTopic(); topic.addSubjectIdentifier(sid);
    }
Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   8
Johannes Schmidt · http://www.sixgroups.com
Details – Topic Creation
Algorithm
                              createTopicBySubjectIdentifier




Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   9
Johannes Schmidt · http://www.sixgroups.com
Details – Topic Creation
Algorithm
                              createTopicBySubjectIdentifier



               Exists a topic with the specified subject identifier?




Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   10
Johannes Schmidt · http://www.sixgroups.com
Details – Topic Creation
  Algorithm
                                createTopicBySubjectIdentifier



                 Exists a topic with the specified subject identifier?


                              Yes
Return existing topic




  Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   11
  Johannes Schmidt · http://www.sixgroups.com
Details – Topic Creation
  Algorithm
                                createTopicBySubjectIdentifier



                 Exists a topic with the specified subject identifier?


                              Yes                           No

Return existing topic                                        Exists a topic with an
                                                item identifier == specified subject identifier?




  Lars Heuer · http://www.semagia.com            TMRA 2008, Leipzig · 17.10.2008                   12
  Johannes Schmidt · http://www.sixgroups.com
Details – Topic Creation
  Algorithm
                                createTopicBySubjectIdentifier



                 Exists a topic with the specified subject identifier?


                              Yes                           No

Return existing topic                                        Exists a topic with an
                                                item identifier == specified subject identifier?

                                                  Yes

 Add the subject identifier to the
existing topic and return the topic

  Lars Heuer · http://www.semagia.com            TMRA 2008, Leipzig · 17.10.2008                   13
  Johannes Schmidt · http://www.sixgroups.com
Details – Topic Creation
  Algorithm
                                createTopicBySubjectIdentifier



                 Exists a topic with the specified subject identifier?


                              Yes                           No

Return existing topic                                        Exists a topic with an
                                                item identifier == specified subject identifier?

                                                                                   No
                                                  Yes

 Add the subject identifier to the                             Create a topic with the subject identifier
existing topic and return the topic                                      and return the topic

  Lars Heuer · http://www.semagia.com            TMRA 2008, Leipzig · 17.10.2008                     14
  Johannes Schmidt · http://www.sixgroups.com
Details – Topics – Best
Practise
     If possible use an explicit identity (subject
     identifier, subject locator or item identifier)
     createTopic() is implementation dependent
     and not reliable




Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   15
Johannes Schmidt · http://www.sixgroups.com
Details - Occurrences
     TMAPI 1.0: Untyped occurrences possible,
     only strings and locators are supported
     TMAPI 2.0: Untyped occurrences are
     disallowed, any datatype possible (c.f.
     interface core.DatatypeAware)
     occ.setValue(1)     xsd:int
     occ.setValue(quot;valuequot;)     xsd:string
     occ.setValue(1.0F)     xsd:float
     occ.setValue(quot;valuequot;, locator)
        datatype = locator
Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   16
Johannes Schmidt · http://www.sixgroups.com
Details - Associations
     TMAPI 1.0: Untyped associations and roles
     without a type or player are allowed
     TMAPI 2.0: Untyped associations are
     disallowed, every role has a type and a
     player
           Caution:
                TMAPI 1.0: createAssociationRole(player, type)
                TMAPI 2.0: createRole(type, player)


Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   17
Johannes Schmidt · http://www.sixgroups.com
Details - Scope
     TMAPI 1.0: quot;nullquot; represents the
     unconstrained scope in factory methods:
           createName(quot;The Beatlesquot;, null)
     TMAPI 2.0: If the scope is not specified, the
     statement is in the unconstrained scope
     (variable argument):
           createName(quot;The Beatlesquot;)
           createName(quot;Pilzköpfequot;, nickname, german)
     Scope definition works also for associations,
     occurrences and variants
Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   18
Johannes Schmidt · http://www.sixgroups.com
Details – Index
     TMAPI 1.0: 8 indexes which implement a construct-centric view:
        TopicMapObjectsIndex
        ScopedObjectsIndex
        TopicsIndex
        TopicNamesIndex
        VariantsIndex
        OccurrencesIndex
        AssociationsIndex
        AssociationRolesIndex
     TMAPI 2.0: 3 indexes which implement a generalized view on a
     topic map:
        LiteralIndex (Occurrences, Names, Variants)
        ScopedIndex (Associations, Occurrences, Names, Variants)
        TypeInstanceIndex (Topics, Associations, Roles, Occurrences,
        Names)
Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   19
Johannes Schmidt · http://www.sixgroups.com
Details – Index
     TMAPI 1.0:
     TopicsIndex idx = (TopicsIndex)
                    tm.getHelperObject(TopicsIndex.class);
     (Exception handling omitted)

     TMAPI 2.0:
     TypeInstanceIndex idx =
                   tm.getIndex(TypeInstanceIndex.class);
     (No checked exceptions)


Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   20
Johannes Schmidt · http://www.sixgroups.com
Outlook
     Notifications
     Transactions
     Advanced filter API (XPath aka TMPath
     expressions are implemented by TMAPIX)
     Participate! http://www.tmapi.org/




Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   21
Johannes Schmidt · http://www.sixgroups.com
References
     TMAPI
     http://www.tmapi.org/
     TMAPI 2.0
     http://www.tmapi.org/2.0/
     tinyTiM
     TMAPI 1.0 / TMAPI 2.0 Topic Maps engine
     http://tinytim.sourceforge.net/
     PHPTMAPI
     http://phptmapi.sourceforge.net/
     QuaaxTM
     PHPTMAPI 1.0 / PHPTMAPI 2.0 Topic Maps engine
     http://quaaxtm.sourceforge.net/
Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   22
Johannes Schmidt · http://www.sixgroups.com
References
     TMAPI.NET (C#)
     http://sourceforge.net/project/tmapinet
     TMAPIX
     Utilities for TMAPI (Java)
     http://tmapix.googlecode.com/




Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   23
Johannes Schmidt · http://www.sixgroups.com
Discussion

                                              Questions?

                                              Answers! ☺




Lars Heuer · http://www.semagia.com           TMRA 2008, Leipzig · 17.10.2008   24
Johannes Schmidt · http://www.sixgroups.com

Más contenido relacionado

Similar a TMAPI 2.0

TMAPI 2.0 tutorial
TMAPI 2.0 tutorialTMAPI 2.0 tutorial
TMAPI 2.0 tutorialtmra
 
Ctm 1.0 Tutorial
Ctm 1.0 TutorialCtm 1.0 Tutorial
Ctm 1.0 Tutorialtmra
 
Streaming Topic Maps API
Streaming Topic Maps APIStreaming Topic Maps API
Streaming Topic Maps APItmra
 
Ruby On Rails Intro
Ruby On Rails IntroRuby On Rails Intro
Ruby On Rails IntroSarah Allen
 
Jwt == insecurity?
Jwt == insecurity?Jwt == insecurity?
Jwt == insecurity?snyff
 
How We Learned To Stop Worrying And Love (or at least live with) GitHub
How We Learned To Stop Worrying And Love (or at least live with) GitHubHow We Learned To Stop Worrying And Love (or at least live with) GitHub
How We Learned To Stop Worrying And Love (or at least live with) GitHubdreamwidth
 
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
 
Cache Me If You Can - Tuist Quick Start .pptx
Cache Me If You Can - Tuist Quick Start .pptxCache Me If You Can - Tuist Quick Start .pptx
Cache Me If You Can - Tuist Quick Start .pptxRonanOCiosoig1
 
doT.py - a python template engine.
doT.py - a python template engine.doT.py - a python template engine.
doT.py - a python template engine.David Chen
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UITech OneStop
 
2014 10-14: GitHub plus FOSS == 1 million SPDX
2014 10-14: GitHub plus FOSS == 1 million SPDX2014 10-14: GitHub plus FOSS == 1 million SPDX
2014 10-14: GitHub plus FOSS == 1 million SPDXNuno Brito
 
Creating Enterprise Web Applications with Node.js
Creating Enterprise Web Applications with Node.jsCreating Enterprise Web Applications with Node.js
Creating Enterprise Web Applications with Node.jsSebastian Springer
 

Similar a TMAPI 2.0 (16)

TMAPI 2.0 tutorial
TMAPI 2.0 tutorialTMAPI 2.0 tutorial
TMAPI 2.0 tutorial
 
Ctm 1.0 Tutorial
Ctm 1.0 TutorialCtm 1.0 Tutorial
Ctm 1.0 Tutorial
 
Ontopia tutorial
Ontopia tutorialOntopia tutorial
Ontopia tutorial
 
Streaming Topic Maps API
Streaming Topic Maps APIStreaming Topic Maps API
Streaming Topic Maps API
 
Ruby On Rails Intro
Ruby On Rails IntroRuby On Rails Intro
Ruby On Rails Intro
 
Jwt == insecurity?
Jwt == insecurity?Jwt == insecurity?
Jwt == insecurity?
 
How We Learned To Stop Worrying And Love (or at least live with) GitHub
How We Learned To Stop Worrying And Love (or at least live with) GitHubHow We Learned To Stop Worrying And Love (or at least live with) GitHub
How We Learned To Stop Worrying And Love (or at least live with) GitHub
 
Reversing JavaScript
Reversing JavaScriptReversing JavaScript
Reversing JavaScript
 
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
 
NLBSE’22: Tool Competition
NLBSE’22: Tool CompetitionNLBSE’22: Tool Competition
NLBSE’22: Tool Competition
 
Cache Me If You Can - Tuist Quick Start .pptx
Cache Me If You Can - Tuist Quick Start .pptxCache Me If You Can - Tuist Quick Start .pptx
Cache Me If You Can - Tuist Quick Start .pptx
 
doT.py - a python template engine.
doT.py - a python template engine.doT.py - a python template engine.
doT.py - a python template engine.
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
 
KubeSecOps
KubeSecOpsKubeSecOps
KubeSecOps
 
2014 10-14: GitHub plus FOSS == 1 million SPDX
2014 10-14: GitHub plus FOSS == 1 million SPDX2014 10-14: GitHub plus FOSS == 1 million SPDX
2014 10-14: GitHub plus FOSS == 1 million SPDX
 
Creating Enterprise Web Applications with Node.js
Creating Enterprise Web Applications with Node.jsCreating Enterprise Web Applications with Node.js
Creating Enterprise Web Applications with Node.js
 

Más de 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
 
Maiana - The social Topic Maps explorer
Maiana - The social Topic Maps explorerMaiana - The social Topic Maps explorer
Maiana - The social Topic Maps explorertmra
 
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
 
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path ExpressionsDefining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressionstmra
 
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
 

Más de 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
 
Maiana - The social Topic Maps explorer
Maiana - The social Topic Maps explorerMaiana - The social Topic Maps explorer
Maiana - The social Topic Maps explorer
 
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
 
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path ExpressionsDefining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
 
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
 

Último

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
[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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 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
 
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
 
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
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
[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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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...
 

TMAPI 2.0

  • 1. TMAPI 2.0 Topic Maps API 2.0 Lars Heuer <heuer@semagia.com> Johannes Schmidt <js@sixgroups.com> TMRA 2008, Leipzig · 17.10.2008
  • 2. Table of Contents Introduction Design Objectives Core Interfaces Details – Core Details – Index Questions / Answers Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 2 Johannes Schmidt · http://www.sixgroups.com
  • 3. Introduction TMAPI is a set of Java interfaces to interact with topic maps TMAPI makes applications Topic Maps engine independent TMAPI 1.0 has been implemented by several Open Source and commercial Topic Maps engines TMAPI 1.0 has been ported to other programming languages Not designed by a standards body but a de-facto standard Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 3 Johannes Schmidt · http://www.sixgroups.com
  • 4. Design Objectives Topic Maps – Data Model (TMDM) compatible (TMAPI 1.0 is not) Respect TMDM constraints to some extend (i.e. disallow quot;nullquot; in serveral places) Java 1.5 Userfriendly (depends on the perspective, though) More tests (TMAPI 1.0: 89 tests TMAPI 2.0: approx. 250 tests) Apply lessons learned from TMAPI 1.0 Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 4 Johannes Schmidt · http://www.sixgroups.com
  • 5. Core Interfaces Construct Reifiable Typed Scoped DatatypeAware(Reifiable, Scoped) TopicMap(Reifiable) Topic(Construct) Association(Reifiable, Typed, Scoped) Role(Reifiable, Typed) Occurrence(Datatyped, Typed) Name(Typed, Scoped) Variant(Datatyped) Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 5 Johannes Schmidt · http://www.sixgroups.com
  • 6. Details – Topic Map Object / Topic lookup methods moved from the TopicsIndex to the TopicMap interface: getConstructByItemIdentifier getTopicBySubjectIdentifier getTopicBySubjectLocator Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 6 Johannes Schmidt · http://www.sixgroups.com
  • 7. Details – Topics TMAPI 1.0: One method to create topics (createTopic Topic without any identity) TMAPI 2.0: Four methods to create topics: createTopicBySubjectIdentifier createTopicBySubjectLocator createTopicByItemIdentifier createTopic ( Topic with an automatically generated item identifier) Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 7 Johannes Schmidt · http://www.sixgroups.com
  • 8. Details – Topics Create or reuse existing topic with a sid in TMAPI 1.0: TopicsIndex tIdx = (TopicsIndex) tm.getHelperObject(TopicsIndex.class); if (!tIdx.isOpen()) { tIdx.open(); } if (!tIdx.getIndexFlags().isAutoUpdated()) { tIdx.reindex(); } Topic topic = tIdx.getTopicBySubjectIdentifier(sid); if (topic == null) { TopicMapObject tmo = tm.getObjectBySourceLocator(sid); if (tmo instanceof Topic) { topic = (Topic) tmo; } } if (topic == null) { topic = tm.createTopic(); topic.addSubjectIdentifier(sid); } Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 8 Johannes Schmidt · http://www.sixgroups.com
  • 9. Details – Topic Creation Algorithm createTopicBySubjectIdentifier Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 9 Johannes Schmidt · http://www.sixgroups.com
  • 10. Details – Topic Creation Algorithm createTopicBySubjectIdentifier Exists a topic with the specified subject identifier? Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 10 Johannes Schmidt · http://www.sixgroups.com
  • 11. Details – Topic Creation Algorithm createTopicBySubjectIdentifier Exists a topic with the specified subject identifier? Yes Return existing topic Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 11 Johannes Schmidt · http://www.sixgroups.com
  • 12. Details – Topic Creation Algorithm createTopicBySubjectIdentifier Exists a topic with the specified subject identifier? Yes No Return existing topic Exists a topic with an item identifier == specified subject identifier? Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 12 Johannes Schmidt · http://www.sixgroups.com
  • 13. Details – Topic Creation Algorithm createTopicBySubjectIdentifier Exists a topic with the specified subject identifier? Yes No Return existing topic Exists a topic with an item identifier == specified subject identifier? Yes Add the subject identifier to the existing topic and return the topic Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 13 Johannes Schmidt · http://www.sixgroups.com
  • 14. Details – Topic Creation Algorithm createTopicBySubjectIdentifier Exists a topic with the specified subject identifier? Yes No Return existing topic Exists a topic with an item identifier == specified subject identifier? No Yes Add the subject identifier to the Create a topic with the subject identifier existing topic and return the topic and return the topic Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 14 Johannes Schmidt · http://www.sixgroups.com
  • 15. Details – Topics – Best Practise If possible use an explicit identity (subject identifier, subject locator or item identifier) createTopic() is implementation dependent and not reliable Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 15 Johannes Schmidt · http://www.sixgroups.com
  • 16. Details - Occurrences TMAPI 1.0: Untyped occurrences possible, only strings and locators are supported TMAPI 2.0: Untyped occurrences are disallowed, any datatype possible (c.f. interface core.DatatypeAware) occ.setValue(1) xsd:int occ.setValue(quot;valuequot;) xsd:string occ.setValue(1.0F) xsd:float occ.setValue(quot;valuequot;, locator) datatype = locator Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 16 Johannes Schmidt · http://www.sixgroups.com
  • 17. Details - Associations TMAPI 1.0: Untyped associations and roles without a type or player are allowed TMAPI 2.0: Untyped associations are disallowed, every role has a type and a player Caution: TMAPI 1.0: createAssociationRole(player, type) TMAPI 2.0: createRole(type, player) Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 17 Johannes Schmidt · http://www.sixgroups.com
  • 18. Details - Scope TMAPI 1.0: quot;nullquot; represents the unconstrained scope in factory methods: createName(quot;The Beatlesquot;, null) TMAPI 2.0: If the scope is not specified, the statement is in the unconstrained scope (variable argument): createName(quot;The Beatlesquot;) createName(quot;Pilzköpfequot;, nickname, german) Scope definition works also for associations, occurrences and variants Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 18 Johannes Schmidt · http://www.sixgroups.com
  • 19. Details – Index TMAPI 1.0: 8 indexes which implement a construct-centric view: TopicMapObjectsIndex ScopedObjectsIndex TopicsIndex TopicNamesIndex VariantsIndex OccurrencesIndex AssociationsIndex AssociationRolesIndex TMAPI 2.0: 3 indexes which implement a generalized view on a topic map: LiteralIndex (Occurrences, Names, Variants) ScopedIndex (Associations, Occurrences, Names, Variants) TypeInstanceIndex (Topics, Associations, Roles, Occurrences, Names) Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 19 Johannes Schmidt · http://www.sixgroups.com
  • 20. Details – Index TMAPI 1.0: TopicsIndex idx = (TopicsIndex) tm.getHelperObject(TopicsIndex.class); (Exception handling omitted) TMAPI 2.0: TypeInstanceIndex idx = tm.getIndex(TypeInstanceIndex.class); (No checked exceptions) Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 20 Johannes Schmidt · http://www.sixgroups.com
  • 21. Outlook Notifications Transactions Advanced filter API (XPath aka TMPath expressions are implemented by TMAPIX) Participate! http://www.tmapi.org/ Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 21 Johannes Schmidt · http://www.sixgroups.com
  • 22. References TMAPI http://www.tmapi.org/ TMAPI 2.0 http://www.tmapi.org/2.0/ tinyTiM TMAPI 1.0 / TMAPI 2.0 Topic Maps engine http://tinytim.sourceforge.net/ PHPTMAPI http://phptmapi.sourceforge.net/ QuaaxTM PHPTMAPI 1.0 / PHPTMAPI 2.0 Topic Maps engine http://quaaxtm.sourceforge.net/ Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 22 Johannes Schmidt · http://www.sixgroups.com
  • 23. References TMAPI.NET (C#) http://sourceforge.net/project/tmapinet TMAPIX Utilities for TMAPI (Java) http://tmapix.googlecode.com/ Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 23 Johannes Schmidt · http://www.sixgroups.com
  • 24. Discussion Questions? Answers! ☺ Lars Heuer · http://www.semagia.com TMRA 2008, Leipzig · 17.10.2008 24 Johannes Schmidt · http://www.sixgroups.com