Data import - edit of archimate xml file

Started by kdwykleingeld, September 04, 2014, 11:14:05 AM

Previous topic - Next topic

kdwykleingeld

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 !




Phil Beauvoir

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.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

kdwykleingeld

Hi . i will look at it !..

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


thx koen

Phil Beauvoir

Your system should be fine as long as all IDs are unique and properly formed, eg "id1234".
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

kdwykleingeld

hi thx, it even does not have to be a  "hex" identifier it seems

thx again

Phil Beauvoir

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.

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.


arnedh

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

kdwykleingeld

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