TMAPI 2.0

Loading...

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

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Event

    TMAPI 2.0 - Presentation Transcript

    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 \"null\" 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(\"value\") xsd:string occ.setValue(1.0F) xsd:float occ.setValue(\"value\", 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: \"null\" represents the unconstrained scope in factory methods: createName(\"The Beatles\", null) TMAPI 2.0: If the scope is not specified, the statement is in the unconstrained scope (variable argument): createName(\"The Beatles\") createName(\"Pilzköpfe\", 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

    + tmratmra, 2 years ago

    custom

    519 views, 0 favs, 3 embeds more stats

    This talk introduces a new generation of the common more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 519
      • 511 on SlideShare
      • 8 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 18
    Most viewed embeds
    • 4 views on http://www.topic-maps-buch.de
    • 3 views on http://www.topicmapslab.de
    • 1 views on http://portal.topicmapslab.de

    more

    All embeds
    • 4 views on http://www.topic-maps-buch.de
    • 3 views on http://www.topicmapslab.de
    • 1 views on http://portal.topicmapslab.de

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events