JRuby Topic Maps

  • 667 views
Uploaded on

The Topic Maps Application Programming Interface (TMAPI) provides a standardized way for working with Topic Maps, but only in Java. TMAPI implementations in other programming languages use a different …

The Topic Maps Application Programming Interface (TMAPI) provides a standardized way for working with Topic Maps, but only in Java. TMAPI implementations in other programming languages use a different stack - not harnessing the existing Java code. In this paper we describe a different approach, reusing Java TMAPI implementations to build a high level Topic Maps API for the Ruby programming language without a heavy wrapper layer around the Java Objects.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
667
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
7
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. JRuby  Topic  Maps   Arnim  Bleier,  Benjamin  Bock,     Uta  Schulze  and  Lutz  Maicher   {bleier,  bock,  uta.schulze,  maicher}   @informa:k.uni-­‐leipzig.de   Agenda:   • Java,  Ruby  and  Topic  Maps     • Re)using  Exis@ng  Code   ( • Scalability  and  Performance     Fi>h  Interna@onal  Conference  on     Topic  Maps  Research  and  Applica@ons   Talks@TMRA  Leipzig,  2009-­‐13-­‐11   topicmapslab.de  
  • 2. Introduc@on   The  Seman@c  Web  is  about  Integra@on  of  Data.   Java  and  Ruby  equally  have  something  to  offer.   Why  not  combine  them  and  get  the  best  of  booth   languages?     topicmapslab.de  
  • 3. What  has  Java  to  offer?   high  performance   easy  hos@ng   mul@ple,  fast  TMAPI  Implementa@ons   reuse  of  exis@ng  Very  Good  Code   topicmapslab.de  
  • 4. …and  What  is  Ruby  for?   crea@ng  Domain  Specific  Languages   rapid  Prototyping     rapid    Web  Development   rapid  Applica@on  Development   topicmapslab.de  
  • 5. Bringing  booth  together   So>ware  and  its  development  needs  to  be   integrated,  too.   topicmapslab.de  
  • 6. Goals  of  JRTM   • Keeping  the  TMAPI  contract  intact     • Suppor@ng  different  engines  in  parallel     • Each  TMQL  axis  as  one  method  call     • A  single  IO  interface     • Maintaining  the  syntax  from  RTM     • Performance     topicmapslab.de  
  • 7. So  …  let’s  connect   tms = RTM.connect! :implementation => :TINYTIM" topicmapslab.de  
  • 8. So  …  let’s  connect   tms = RTM.connect (:implementation => :ONTOPIA," ! ! ! ! ! ! :backend! => :RDBMS," ! ! ! ! ! ! :properties => “path/to/jdbc.props”)" topicmapslab.de  
  • 9. and  create  a  Topic   tms = RTM.connect" tm = tms.create http://example.com/tm/" locator = tm.createLocator “http://ex.com/Thing”" topic = tm.createTopicByItemIdentifier locator " topicmapslab.de  
  • 10. and  create  a  Topic   tms = RTM.connect" tm = tms.create “http://example.com/tm/” " topic = tm.get! “ii:http://ex.com/Thing”" Topic  Reference:   subject  iden@fier:   nothing  or  “si:”   subject  locator:       “=”  or    “sl:”         item  iden@fier:       “^”  or    “ii:”   topicmapslab.de  
  • 11. and  create  a  Topic   tms = RTM.connect" tm = tms.create “http://example.com/tm/” " topic = tm.get! “^http://ex.com/Thing”" Topic  Reference:   subject  iden@fier:   nothing  or  “si:”   subject  locator:       “=”  or    “sl:”         item  iden@fier:       “^”  or    “ii:”   topicmapslab.de  
  • 12. Hash  Access   topic[“-nickname @office”] = “Lutz”" topic[“email”] = “maicher@informatik.uni-leipzig.de”" university_of_leipzig = association[“employer”] Topics[“type  @scope1,  scope2”]   -Names  are  prefixed  with  “-”        Occurrences  are  not  prefixed   Associa9ons[“type  @scope1”]      Roles   topicmapslab.de  
  • 13. TMQL  -­‐  Naviga@on   tel_nums = Employee.tmql.reverse_types." ! characteristics(“Tel_Nr”).atomify.result" Keywords:   Enter  &  leave  the  mode:   tmql,  result   The  12  axes:     roles,  traverse,  characteris9cs  ...   topicmapslab.de  
  • 14. JRTM::IO   tm.from_jtm “path/to/file.jtm”" tm.to_jtm “path/to/file.jtm”, “http://ex.com/baseIRI”" TMXML   RDF/N3   XTM1   JTM   RDF/XML   XTM20   LTM   Thanks  to  Lars  Heuer’s   topicmapslab.de  
  • 15. Under  the  hood     …  and  in  the  perspec@ve   Your Application RTM RTMAPI   topicmapslab.de  
  • 16. Under  the  hood     …  and  in  the  perspec@ve   Your Application RTM tmapiX   RTMAPI   ONTOPIA   @nyTiM   …  ?   TMAPI   topicmapslab.de  
  • 17. Under  the  hood     …  and  in  the  perspec@ve   Your Application RTM::Sugar RTM::TMQL RTM::IO RTMAPI   RTM::CoreExtensions tmapiX   ONTOPIA   @nyTiM   …  ?   TMAPI   topicmapslab.de  
  • 18. Under  the  hood     …  and  in  the  perspec@ve   Musica Your Majana Migrans Application RTM::Sugar RTM::TMQL RTM::IO RTMAPI   RTM::CoreExtensions tmapiX   RTM::AR ONTOPIA   @nyTiM   …  ?   TMAPI   topicmapslab.de  
  • 19. But  is  it  produc@on  ready?   Over  600  Test  Cases   Musica  Migrans  II   Maiana   …  when  will  you  start  to  benefit?       hjp://rtm.topicmapslab.de