Author Topic: EA Baseline data in t_document table & Format  (Read 8872 times)

Tahir Nazir

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
EA Baseline data in t_document table & Format
« on: September 25, 2012, 10:25:39 am »
Hello everyone,
        I am currently developing an add-in of EA. I am managing baselines through SVN.

For example when I have managed a SVN Repository in EA then with every checkout SVN create an .XMI file which is actually a baseline.

So when I have read the material about .eap file baseline, I get to know that .eap save baseline data as str.dat file and in zip format.

Now I have tried to get data from this baseline and it give us a zip file which have str.dat file which contain the information of baseline. This file is in xml format.
which is like this EA-->baseline-->zip-->str.dat
I get in this sequence data from .eap repository


Now I have tried the following, I have get xml file from svn repository using export. Now I have changed its name to str.dat
I have zipped it and put it back to t_document table as ole object.
it mean I have reverse the process
e.g. Model.xml --> zip --> insert into baseline through jet connection

It has created the baseline in .eap repositroy and now when I tried to compare it , it say something XMI 1.1 comparision problem.
I have checked with notepad++ and when I have changed the filename to str.dat then it change its encoding some ANSI format.


When I have took zipped file from EA repositry which is a baseline and stored also in t_document table. This baseline I had created though mangage baseline--> new baseline.

I have unzip the file which I have got from t_document table named str.dat. When I take this file and zip it again and insert back into database as new row in t_document table then it work fine.

Even I have copied in this file my content from SVN model.xml file, it also work fine and dont change the encoding. I have done it through notepad++.

So can anyone guide me that when I get a file from svn repository then how to use the format of that file so that it work in t_document table perfectly as baseline.

any help will be highly appreciated. there is no documentation that what encoding of this file type which is used by EA to store baseline.

thanks a lot.

 :-[

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA Baseline data in t_document table & For
« Reply #1 on: September 27, 2012, 08:52:57 pm »
From what I read you're doing it the right way. But this is something deep in EA's stomach and you will likely be on your own to find the cause of the issue. The only thing I can recommend is to try it with a very simple model. So I only can wish you good luck :-/

q.
« Last Edit: September 27, 2012, 08:53:37 pm by qwerty »

Tahir Nazir

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #2 on: September 27, 2012, 10:17:26 pm »
What do you mean by small model?
Or can you guide me that how to build baseline using an xml file which i have got from svn checkout with the help of C#. :o

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #3 on: September 28, 2012, 12:42:44 am »
I mean that you should create a local EAP repository with just a few sample classes inside. Then create a baseline and see what you can figure out. It's probably easier than working with a large model. Sorry, but I can't help here very much.

q.

Michael Proske

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #4 on: September 28, 2012, 10:46:28 pm »
The zip is base64 encoded. Notepad opens it automatically. Try to use a different editor with the ability to see the hex code and try in your application an encoding with the wright code page.

Tahir Nazir

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #5 on: September 29, 2012, 06:15:50 am »
I have tried with creating simple model and there I am creating this problem.

Quote
I mean that you should create a local EAP repository with just a few sample classes inside. Then create a baseline and see what you can figure out. It's probably easier than working with a large model. Sorry, but I can't help here very much.

q.

Tahir Nazir

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #6 on: September 29, 2012, 06:21:06 am »
thanks a lot for your kind reply. As you have mentioned that base64 encoded should I use.  What do you mean that notepad open the zip automatically?

I get one from my svn repository an xml file. Can you guide me that how should I encode that file which I have insert in the DB. I have problem with the encoding of that .xml file. Because when I change its name then its encoding get changed.

I will be highly thankful , if you guide me in this regard.

Quote
The zip is base64 encoded. Notepad opens it automatically. Try to use a different editor with the ability to see the hex code and try in your application an encoding with the wright code page.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA Baseline data in t_document table & Format
« Reply #7 on: October 01, 2012, 05:03:54 pm »
I too think that the base64 encoding is the part you are missing.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #8 on: October 01, 2012, 07:36:37 pm »
Quote
Various columns contain binary data which are additionaly zipped. If you want to access the contents you have to follow these steps:
• Decode the column using base64.
• Unzip the resulting binary blob.
• Extract the file str.dat from the unzipped data.
This file finally contains the data.
An exception is Image which yields the raw image data right after decoding it via base64.

From my book Inside EA.

q.

Tahir Nazir

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #9 on: October 04, 2012, 08:13:32 am »
Thanks for your kind reply. but as you are saying the ZIP file should be base64 encoded. But why then the file str.dat which I take from EA repository and ZIP that and put inside the database as new tuple then work that fine.

But when I take through SVN repository an xml file and rename it to str.dat and zip and insert back to database as new tuple then it gives some XMI 1.1 error.

I am interested in the structure of that svn.dat file that which kind of file is that. That is also might not be mentioned in your book.

if it is then I can buy that book also. Or if you have any suggestion then I am thankful to you.

Quote
Quote
Various columns contain binary data which are additionaly zipped. If you want to access the contents you have to follow these steps:
• Decode the column using base64.
• Unzip the resulting binary blob.
• Extract the file str.dat from the unzipped data.
This file finally contains the data.
An exception is Image which yields the raw image data right after decoding it via base64.

From my book Inside EA.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA Baseline data in t_document table & For
« Reply #10 on: October 04, 2012, 11:28:12 pm »
Quote
But when I take through SVN repository an xml file and rename it to str.dat and zip and insert back to database as new tuple then it gives some XMI 1.1 error.
I'm lost with that? What do you want to achieve here? To me this looks like complete nonsense.

The XML taken from SVN is an XMI dump of a certain package in the repository and does not (directly) reflect the contents of any table used to represent the repository. These are two completely different pairs of shoes.

q.
« Last Edit: October 04, 2012, 11:28:52 pm by qwerty »

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: EA Baseline data in t_document table & Format
« Reply #11 on: November 01, 2012, 02:07:26 am »
Oh, I think I'm interested in extracting the data from, but I have no idea how to:
1.Decode the column using base64 (sql query)?
2.unzip the result ...
3.extact str.dat from unzip data

Some hints or answers?