You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Sebastian Schaaf <se...@scai.fraunhofer.de> on 2016/09/12 08:11:25 UTC

RUTA in Java: access object contents AKA Re: Entwurf der Mail an Peter Klügl

Dear all,

Although my initial message still contained the wrong heading,
everybody else is invited to answer :).

Best,
Sebastian


----- Initial email -----
From: "Sebastian Schaaf" <se...@scai.fraunhofer.de>
To: "user" <us...@uima.apache.org>
Sent: Montag, 12. September 2016 09:42:10
Topic: Re: Entwurf der Mail an Peter Klügl

Dear all,

As we needed to integrate a rule-based analysis engine into our UIMA 
framework, we ended up using RUTA. The package was encouraging, we 
proceeded well with projecting our ideas into RUTA (thanks to the 
comprehensive documentation).

We also saw that there are efforts to offer RUTA in plain Java code 
for developers, ignoring the delivered workbench. We could integrate 
it well with our modified type system, it is finally running. But, 
and that's the reason for this email, currently we are stuck with 
extracting some information from our objects, which is not 
represented as simple feature. Leaving out the option to introduce 
major changes to our codes and not liking the idea of permanent 
workarounds, we were wondering if (and if not maybe when) there is 
the possibility to generically call methods on given Java objects.
Precisely, we have objects with attributes being (linked from other) 
objects, plus respective getter methods. So, the information we need 
from our objects is retrievable by calling a getter X.getA, resulting 
in (background) object A which in turn knows a method .getB, 
resulting in the desired B (or more precisely: its string Z):

### Example ###
Type X (extends Annotation, has offsets)
Type A (extends TOP, has no offsets)
Type B (extends TOP, has no offsets)
String Z

How to call "X.getA().getB().getZ()"?
##############

It appeared that RUTA is capable by some whatever (UIMA-?)magic to 
get e.g. the covered text of a text annotation by "X.coveredText", 
although the object only knows a "getCoveredText" method. Let's call 
it a 'pseudo-feature'. No idea how generic this is, but: if just 
querying "X.A" RUTA seems to do well, ultimately receiving A. While A 
is an object (simple data type expected, like integer and string?) 
everything stops. So no obvious chance to receive our B.

Is there an easy, somewhat 'native' way to deal with object-derived 
data like in the case described above?

Thanks in advance!

Sebastian


---
Sebastian Schaaf, M.Sc. Bioinformatics

Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Department of Bioinformatics
Schloss Birlinghoven
D-53754 Sankt Augustin

Room: C3-233
Tel.: +49 2241 14 2280
Email: sebastian.schaaf@scai.fraunhofer.de
Internet: http://www.scai.fraunhofer.de/