Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloud information model archive builder #8503

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

mandy-chessell
Copy link
Contributor

@mandy-chessell mandy-chessell commented Nov 22, 2024

Description

This PR adds the archive build that converts the Cloud Information Model JSON LD format into a gloassary. There are multiple errors in the JSONLD file and so this is a temporary measure until we can create a way to maintain the content.

This addition allowed us to rebuild the CloudInformationModel.omarchive to correct errors in the way Enums are stored - and to add the RootCategery classification to the top-level category.

Related Issue(s)

PostgreSQL Repository Connector
I noticed a problem in the saving of new versions of an entity in that it was adding the classifications as if they were new. This meant that the classification/classification attributes tables were accumulating multiple active versions of the same classification. This only occurred when the entity was updated.

Testing

Loading multiple versions of the core content pack into the repository. This showed the classification loading problem that was fixed above.

Loading the regenrated CloudInformationModel archive to check that it loaded without error.

Release Notes & Documentation

The CloudInformaitonModel archive is already documented - this PR just adds the capability to maintain it.

Additional notes

none

@mandy-chessell mandy-chessell merged commit 7d66508 into odpi:main Nov 22, 2024
4 checks passed
Comment on lines +188 to +192
String propertyTermId = archiveHelper.addTerm(glossaryId,
categoryList,
propertyGroup. getGUID() + propertyGroup.getTechnicalName() + ":" + propertyDescription.getTechnicalName(),
propertyDescription.getDisplayName(),
propertyDescription.getDescription());

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'String propertyTermId' is never read.
Comment on lines +269 to +273
String conceptTermId = archiveHelper.addTerm(glossaryId,
categoryList,
"SubjectArea:" + subjectArea.getTechnicalName() + ":" + ":" + conceptGroup.getGUID() + concept.getTechnicalName(),
concept.getDisplayName(),
concept.getDescription());

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'String conceptTermId' is never read.
{
System.out.println("\nRetrieving model contents from: " + cimContentFile.getName());

Map<String, Object> modelJsonLD = (LinkedHashMap<String, Object>) JsonUtils.fromInputStream(new FileInputStream(cimContentFile));

Check warning

Code scanning / CodeQL

Potential input resource leak Warning

This FileInputStream is not always closed on method exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant