Book a Demo

Author Topic: Java API call to get raw text from notes  (Read 5368 times)

tanja

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Java API call to get raw text from notes
« on: November 05, 2009, 01:12:30 am »
Hi,
It's cool to have markup possibility in notes, which I largely used since it became available.
However, I'm now in trouble when retrieving notes (documentation) of elements etc., because I get the markup in that text.
Is there an API call, e.g. getRawNote(), to obtain just the text without any markup?
If not, is there a list of all the markup used, so that one can program and do custom parsing, at least?
Thanks in advance.

Using EA 7.1 dlls and jar, build 834
ps: Similar happens with rtf documentation, i.e., there is textual markup, not its result.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Java API call to get raw text from notes
« Reply #1 on: November 05, 2009, 01:59:37 am »
The repository has some operations that do that.
I think it's called getFormatfromField() and getFieldFromFormat() or something like that.

Geert

tanja

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: Java API call to get raw text from notes
« Reply #2 on: November 05, 2009, 09:42:07 am »
I found them - thanx.

It's a bit pitty to not provide the delegating method (that does the same) on items that do have notes... But the underlying implementation is an RDB, so I understand the API design.

I'm wondering whether one day EA will get rid of RDB - it so terribly slow to access it through API...

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Java API call to get raw text from notes
« Reply #3 on: November 05, 2009, 10:01:12 am »
Hi tanja,

Quote
I'm wondering whether one day EA will get rid of RDB - it so terribly slow to access it through API...
Using SQL-queries may help to leverage access performance for the needed information from the model.

Geert seems to be pretty experienced with this ...

WBR
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Java API call to get raw text from notes
« Reply #4 on: November 05, 2009, 01:13:42 pm »
Quote
I'm wondering whether one day EA will get rid of RDB - it so terribly slow to access it through API...
No tanja - they must not... It's what allows EA to scale well...  And saves us users from EAUI8-)  8-)

What they need to do is ensure that the API access to the DB is as frictionless as possible.  The API is slow (sometimes) not primarily because of the DB - but other reasons, I suspect.

(They also need to redesign the DB to bring it into the 21st century - but that's apparently a lost cause)  ;)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Java API call to get raw text from notes
« Reply #5 on: November 05, 2009, 05:55:12 pm »
I think the slowlyness of the API is primarily cause by the the excessive amount of seperate database calls that are made to retrieve a set of elements.
I've seen logs from our sql server that show 100's of calls within seconds.
I believe every single item is retrieved with a seperate database call, which is of course a big problem for the performance.
So if you have an element with 10 attributes then I believe there will be at least 10 seperate database request when you try to access the element.Attributes collection.

Geert