Author Topic: Data import - edit of archimate xml file  (Read 6105 times)

kdwykleingeld

  • Active Member
  • ***
  • Posts: 35
Data import - edit of archimate xml file
« on: September 04, 2014, 11: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 !




Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Data import - edit of archimate xml file
« Reply #1 on: September 04, 2014, 11: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.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

kdwykleingeld

  • Active Member
  • ***
  • Posts: 35
Re: Data import - edit of archimate xml file
« Reply #2 on: September 04, 2014, 11:18:21 AM »
Hi . i will look at it !..

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


thx koen

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Data import - edit of archimate xml file
« Reply #3 on: September 04, 2014, 11:19:13 AM »
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! https://www.archimatetool.com/donate

kdwykleingeld

  • Active Member
  • ***
  • Posts: 35
Re: Data import - edit of archimate xml file
« Reply #4 on: September 04, 2014, 11:22:58 AM »
hi thx, it even does not have to be a  "hex" identifier it seems

thx again

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Data import - edit of archimate xml file
« Reply #5 on: September 04, 2014, 11:25:43 AM »
No, the "hex" comes internally from when Archi generates an id:

Code: [Select]
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! https://www.archimatetool.com/donate

kdwykleingeld

  • Active Member
  • ***
  • Posts: 35
Re: Data import - edit of archimate xml file
« Reply #6 on: September 04, 2014, 11:28:53 AM »
ok great to know

thx

arnedh

  • Member
  • **
  • Posts: 10
Re: Data import - edit of archimate xml file
« Reply #7 on: September 04, 2014, 21: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

kdwykleingeld

  • Active Member
  • ***
  • Posts: 35
Re: Data import - edit of archimate xml file
« Reply #8 on: September 04, 2014, 21: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