Skip to content

Commit

Permalink
Merge pull request #8526 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Fix type hierarchy around DataManager
  • Loading branch information
mandy-chessell authored Dec 13, 2024
2 parents 955878b + 03ea25a commit d2bd623
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public void updateCommentVisibility(String userId,
0,
0);

if (relationships != null)
if ((relationships != null) && (relationships.getElementList() != null))
{
for (OpenMetadataRelationship relationship : relationships.getElementList())
{
Expand Down Expand Up @@ -809,7 +809,7 @@ public void clearAcceptedAnswer(String userId,
0,
0);

if (relationships != null)
if ((relationships != null) && (relationships.getElementList() != null))
{
for (OpenMetadataRelationship relationship : relationships.getElementList())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void update0050ApplicationsAndProcesses()
private EntityDef addDataAccessManagerEntity()
{
return archiveHelper.getDefaultEntityDef(OpenMetadataType.DATA_ACCESS_MANAGER,
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName));
this.archiveBuilder.getEntityDef(OpenMetadataType.DATA_MANAGER.typeName));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,18 +372,8 @@ private void update0224Databases()

private EntityDef addDatabaseManagerEntity()
{
final String guid = OpenMetadataType.DATABASE_MANAGER.typeGUID;
final String name = OpenMetadataType.DATABASE_MANAGER.typeName;
final String description = OpenMetadataType.DATABASE_MANAGER.description;
final String descriptionGUID = OpenMetadataType.DATABASE_MANAGER.descriptionGUID;
final String descriptionWiki = OpenMetadataType.DATABASE_MANAGER.wikiURL;

return archiveHelper.getDefaultEntityDef(guid,
name,
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName),
description,
descriptionGUID,
descriptionWiki);
return archiveHelper.getDefaultEntityDef(OpenMetadataType.DATABASE_MANAGER,
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,8 @@ private ClassificationDef getUserAccessDirectoryClassification()

private ClassificationDef getMasterDataManagerClassification()
{
return archiveHelper.getClassificationDef(OpenMetadataType.MASTER_DATA_MANAGER.typeGUID,
OpenMetadataType.MASTER_DATA_MANAGER.typeName,
return archiveHelper.getClassificationDef(OpenMetadataType.MASTER_DATA_MANAGER,
null,
OpenMetadataType.MASTER_DATA_MANAGER.description,
OpenMetadataType.MASTER_DATA_MANAGER.descriptionGUID,
OpenMetadataType.MASTER_DATA_MANAGER.wikiURL,
this.archiveBuilder.getEntityDef(OpenMetadataType.REFERENCEABLE.typeName),
false);
}
Expand All @@ -234,12 +230,8 @@ private void update0137ToDos()

private RelationshipDef getActionTargetRelationship()
{
RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(OpenMetadataType.ACTION_TARGET_RELATIONSHIP.typeGUID,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.typeName,
RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(OpenMetadataType.ACTION_TARGET_RELATIONSHIP,
null,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.description,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.descriptionGUID,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.wikiURL,
ClassificationPropagationRule.NONE);

RelationshipEndDef relationshipEndDef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ private void update0050ApplicationsAndProcesses()
{
this.archiveBuilder.addEntityDef(addCatalogEntity());
this.archiveBuilder.addEntityDef(addDataManagerEntity());
this.archiveBuilder.addTypeDefPatch(updateDatabaseManager());
}


Expand All @@ -630,6 +631,20 @@ private EntityDef addDataManagerEntity()
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName));
}

private TypeDefPatch updateDatabaseManager()
{
/*
* Create the Patch
*/
TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(OpenMetadataType.DATABASE_MANAGER.typeName);

typeDefPatch.setUpdatedBy(originatorName);
typeDefPatch.setUpdateTime(creationDate);
typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(OpenMetadataType.DATA_MANAGER.typeName));

return typeDefPatch;
}


/*
* -------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit d2bd623

Please sign in to comment.