jruby topic maps
TRANSCRIPT
JRuby Topic Maps Arnim Bleier, Benjamin Bock,
Uta Schulze and Lutz Maicher
{bleier, bock, uta.schulze, maicher}
@informa:k.uni-‐leipzig.de
topicmapslab.de
Fi>h Interna@onal Conference on Topic Maps Research and Applica@ons Talks@TMRA Leipzig, 2009-‐13-‐11
Agenda:
• Java, Ruby and Topic Maps
• (Re)using Exis@ng Code • Scalability and Performance
topicmapslab.de
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
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
…and What is Ruby for?
crea@ng Domain Specific Languages
rapid Prototyping
rapid Web Development
rapid Applica@on Development
topicmapslab.de
Bringing booth together
So>ware and its development needs to be integrated, too.
topicmapslab.de
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
So … let’s connect
tms = RTM.connect! :implementation => :TINYTIM "
topicmapslab.de
So … let’s connect
tms = RTM.connect (:implementation => :ONTOPIA, "
! ! ! ! ! ! :backend! => :RDBMS,"
! ! ! ! ! ! :properties => “path/to/jdbc.props”) "
topicmapslab.de
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
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
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
Hash Access
topic[“-nickname @office”] = “Lutz” "
topic[“email”] = “[email protected]” "
university_of_leipzig = association[“employer”]
Topics[“type @scope1, scope2”]
-Names are prefixed with “-” Occurrences are not prefixed
Associa9ons[“type @scope1”]
Roles
topicmapslab.de
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
JRTM::IO
tm.from_jtm “path/to/file.jtm” "
tm.to_jtm “path/to/file.jtm”, “http://ex.com/baseIRI” "
Thanks to Lars Heuer’s
XTM1
XTM20
JTM RDF/N3
RDF/XML
TMXML
LTM
topicmapslab.de
Under the hood … and in the perspec@ve
RTM
Your Application
RTMAPI
topicmapslab.de
Under the hood … and in the perspec@ve
RTM
ONTOPIA @nyTiM … ?
Your Application
RTMAPI TMAPI
tmapiX
topicmapslab.de
Under the hood … and in the perspec@ve
TMAPI ONTOPIA @nyTiM … ?
RTM::CoreExtensions tmapiX
RTM::Sugar RTM::TMQL RTM::IO RTMAPI
Your Application
topicmapslab.de
Under the hood … and in the perspec@ve
TMAPI
RTM::AR ONTOPIA @nyTiM … ?
RTM::CoreExtensions tmapiX
RTM::Sugar RTM::TMQL RTM::IO
Your Application
Majana�Musica Migrans�
RTMAPI
But is it produc@on ready?
Over 600 Test Cases
Musica Migrans II
Maiana
… when will you start to benefit?
hjp://rtm.topicmapslab.de