Archi Forum

Archi => Archi Development => Topic started by: kdwykleingeld on September 04, 2014, 10:14:05 AM

Title: Data import - edit of archimate xml file
Post by: kdwykleingeld on September 04, 2014, 10:14:05 AM
Hi, thx for this great tool !!!  I have a question related to editing the archimate xml file itself.

I sometimes use notepad++ to edit the archi xml file to do mass updates (for example replace text etc). Sofar this works out fine without issues.

Now i want to create a whole bunch of "Data Object"s which i have i a spreadsheet.

An  easy way (to prevent me typing them in in archi itself) would be to

1) create 1 sample Data Object in some folder through archi
2) edit the xml file , find this data object , and duplicate it based on the data i want to import..
3) each data object i will give a unique id .. for example    bla1 .. bla2  etc

I have tested this and it seems to work fine

If i open archi i see the new data objects in the correct folder .. and i can create relations through archi where archi just uses my  own created ids (bla1 bla2 etc) as identifier..

So .. my question ... would there be any "technical" drawback (indexing etc) of this method that i do not  see yet ?   (assuming i make sure that the IDs are unique..)

thx Koen

btw..    neo4j is really great too !! . i saw the other thread !



Title: Re: Data import - edit of archimate xml file
Post by: Phil Beauvoir on September 04, 2014, 10:16:55 AM
Hi, thanks for the thanks, and welcome to the Archi forum!

Your system should be fine as long as all IDs are unique.

Did you try the CSV import feature in Archi 3 Early Access?

If you format it in the correct way you can do batch imports. It's in the Archi User Guide for version 3 on page 79.
Title: Re: Data import - edit of archimate xml file
Post by: kdwykleingeld on September 04, 2014, 10:18:21 AM
Hi . i will look at it !..

But my question ... is it ok to generate my own unique id ?


thx koen
Title: Re: Data import - edit of archimate xml file
Post by: Phil Beauvoir on September 04, 2014, 10:19:13 AM
Your system should be fine as long as all IDs are unique and properly formed, eg "id1234".
Title: Re: Data import - edit of archimate xml file
Post by: kdwykleingeld on September 04, 2014, 10:22:58 AM
hi thx, it even does not have to be a  "hex" identifier it seems

thx again
Title: Re: Data import - edit of archimate xml file
Post by: Phil Beauvoir on September 04, 2014, 10:25:43 AM
No, the "hex" comes internally from when Archi generates an id:

String id = UUID.randomUUID().toString().split("-")[0];

So, alphanumeric is fine, but not chars like "<" that would mess with the XML.

Title: Re: Data import - edit of archimate xml file
Post by: kdwykleingeld on September 04, 2014, 10:28:53 AM
ok great to know

thx
Title: Re: Data import - edit of archimate xml file
Post by: arnedh on September 04, 2014, 20:29:00 PM
When I only import the elements (and I don't care what ids are assigned), I have left out the id attribute - there are no problems during import, and when I save the model, Archi assigns new ids

I made a spreadsheet with columns "Type", "Name", "Documentation" and some others, and made the rightmost column a big concatenation function that produces the whole xml element. If I copy only the rightmost column, I can paste in a huge xml expression containing elements.

(Caveat: you need to separate these by architectural layer to put them into folders)

You can also hand edit in your folder structure...

Best regards
Arne D H
Title: Re: Data import - edit of archimate xml file
Post by: kdwykleingeld on September 04, 2014, 20:42:15 PM
hi, i do almost the same. I generate the xml string through concatenation and past the results in the correct location .. I can try to leave out the ID iso generating my own.. good idea!

reg koen