Author Topic: Extracting attribute details to JSON with EA Schema Composer  (Read 69 times)

MrSnow

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Extracting attribute details to JSON with EA Schema Composer
« on: January 15, 2019, 12:40:29 am »
Hi,

I'm pretty new to EA and I may pose this question with lack of relevant information without knowing it - if so, please do tell me.

I am trying to extract an entire class diagram to JSON with Schema Composer. Some of the classes contains various attributes and within those attributes there are two things I would love to get into my JSON-file.

 - Firstly the name (which comes automatically with Schema Composer)
 - And secondly, to my problem, a description of that specific attribute.

Does anybody know how or if this can be done? I've tried putting the description into the "Attribute Notes", and there are two issues here as I firstly don't know where I should put the description, and secondly how to get Schema Composer to understand that I would like to have it in the JSON-file.

Arshad

  • EA User
  • **
  • Posts: 162
  • Karma: +8/-1
    • View Profile
Re: Extracting attribute details to JSON with EA Schema Composer
« Reply #1 on: January 15, 2019, 07:36:22 pm »
Hi

Yes ts possible to extract attribute name and notes n JSON created by schema composer.
for more details refer https://sparxsystems.com/downloads/whitepapers/the-schema-composer.pdf


  - And secondly, to my problem, a description of that specific attribute.
 

it is also generated automatically when generating JSON .

If you need more customized JSON then you can add your predefined JSON  templates  too in schema composer wth add-ins.
https://sparxsystems.com/enterprise_architect_user_guide/14.0/automation/schema_composer_broadcasts.html

BR
Arshad

Sparx Systems India - Services
Profile | Training PlansConsulting

MrSnow

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Extracting attribute details to JSON with EA Schema Composer
« Reply #2 on: January 15, 2019, 11:05:15 pm »
Thank you, I realized I was using the wrong Schema Set.

Though I have not been quite able to understand how I am able to add JSON templates to the Schema Composer with Add-ins. Still reading the pdf on Schema Composer. What I would also like is to add all required objects and attributes as "required" in the JSON-file, do you know if this has to be done by using a JSON template with Add-in to the Schema Composer?

Thanks again for the operational response, I really appreciate it! :-)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8677
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Extracting attribute details to JSON with EA Schema Composer
« Reply #3 on: January 16, 2019, 03:27:46 am »
Required or not should depend on the multiplicity of the attribute/associationEnd. I would expect this to be already implemented in the standard JSON export feature.

If you want to know more about Schema Composer Add-ins, I wrote one that is open source: https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/tree/master/ECDMMessageComposer
This add-in uses the schema composer to create a subset of a data model.

Geert