From 1ad346538427152b43a4c331b30b87a72efb56ef Mon Sep 17 00:00:00 2001 From: Mandy Chessell Date: Sat, 1 Oct 2022 11:02:18 +0100 Subject: [PATCH] Add data product types (#6526) Signed-off-by: Mandy Chessell --- .../opentypes/OpenMetadataTypesArchive.java | 1029 +++++++++++++++-- .../OpenMetadataTypesArchive3_1.java | 2 +- .../OpenMetadataTypesArchive3_12.java | 413 +++++++ 3 files changed, 1353 insertions(+), 91 deletions(-) create mode 100644 open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_12.java diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java index 58bbd4036d4..6c6781544fa 100644 --- a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java @@ -8,7 +8,11 @@ import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive; import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationPropagationRule; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch; import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; @@ -40,7 +44,7 @@ public class OpenMetadataTypesArchive private static final String archiveName = "Open Metadata Types"; private static final String archiveDescription = "Standard types for open metadata repositories."; private static final OpenMetadataArchiveType archiveType = OpenMetadataArchiveType.CONTENT_PACK; - private static final String archiveVersion = "3.12"; + private static final String archiveVersion = "3.13"; private static final String originatorName = "Egeria"; private static final String originatorLicense = "Apache 2.0"; private static final Date creationDate = new Date(1588261366992L); @@ -148,7 +152,7 @@ public OpenMetadataArchive getOpenMetadataArchive() */ public void getOriginalTypes() { - OpenMetadataTypesArchive3_11 previousTypes = new OpenMetadataTypesArchive3_11(archiveBuilder); + OpenMetadataTypesArchive3_12 previousTypes = new OpenMetadataTypesArchive3_12(archiveBuilder); /* * Pull the types from previous releases. @@ -158,10 +162,15 @@ public void getOriginalTypes() /* * Calls for new and changed types go here */ - add0053XRootSchemaType(); - add0042ProcessingStateClassification(); - - + update0022Translations(); + addArea1Actors(); + add0430ServiceLevelObjectives(); + update0481Licenses(); + add0483TermsAndConditions(); + add0484Agreements(); + add00710DigitalProduct(); + add00711DigitalSubscription(); + update0715DigitalServiceOwnership(); } @@ -169,75 +178,72 @@ public void getOriginalTypes() * ------------------------------------------------------------------------------------------------------- */ - /** - * 0042 Add the Processing State Classification - */ - private void add0042ProcessingStateClassification() + private void update0022Translations() { - this.archiveBuilder.addClassificationDef(addProcessingStateClassification()); + this.archiveBuilder.addTypeDefPatch(updateTranslation()); } - private ClassificationDef addProcessingStateClassification() { - final String guid = "261fb0aa-b884-4ee8-87ea-a60510e9751d"; - final String name = "ProcessingState"; - final String description = "Stores processing state information used by various SoftwareCapabilities."; - final String descriptionGUID = null; - final String linkedToEntity = "SoftwareCapability"; + private TypeDefPatch updateTranslation() + { + /* + * Create the Patch + */ + final String typeName = "TranslationDetail"; - ClassificationDef classificationDef = archiveHelper.getClassificationDef(guid, - name, - null, - description, - descriptionGUID, - this.archiveBuilder.getEntityDef(linkedToEntity), - true); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); /* * Build the attributes */ List properties = new ArrayList<>(); - TypeDefAttribute property; + TypeDefAttribute property; - final String attribute1Name = "syncDatesByKey"; - final String attribute1Description = "Collection of synchronization dates identified by a key"; + final String attribute1Name = "languageCode"; + final String attribute1Description = "Code for identifying the language - for example from ISO-639."; final String attribute1DescriptionGUID = null; - property = archiveHelper.getMapStringLongTypeDefAttribute(attribute1Name, - attribute1Description, - attribute1DescriptionGUID); - + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); properties.add(property); - classificationDef.setPropertiesDefinition(properties); + typeDefPatch.setPropertyDefinitions(properties); - return classificationDef; + return typeDefPatch; } - private void add0053XRootSchemaType() - { - this.archiveBuilder.addEntityDef(getRootSchemaTypeEntity()); - this.archiveBuilder.addTypeDefPatch(updateTabularSchemaType()); - this.archiveBuilder.addTypeDefPatch(updateDocumentSchemaType()); - this.archiveBuilder.addTypeDefPatch(updateObjectSchemaType()); - this.archiveBuilder.addTypeDefPatch(updateEventType()); - this.archiveBuilder.addTypeDefPatch(updateRelationalDBSchemaType()); - this.archiveBuilder.addTypeDefPatch(updateAPISchemaType()); - this.archiveBuilder.addTypeDefPatch(updateDisplayDataSchemaType()); - this.archiveBuilder.addTypeDefPatch(updateQuerySchemaType()); - } + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void addArea1Actors() + { + this.archiveBuilder.addEntityDef(getActorEntity()); + + this.archiveBuilder.addTypeDefPatch(updateActorProfile()); + this.archiveBuilder.addTypeDefPatch(updateUserIdentity()); + this.archiveBuilder.addTypeDefPatch(updatePersonRole()); + this.archiveBuilder.addTypeDefPatch(updateProjectTeam()); + this.archiveBuilder.addTypeDefPatch(updateToDo()); + this.archiveBuilder.addTypeDefPatch(updateActionAssignment()); + this.archiveBuilder.addTypeDefPatch(updateCrowdSourcingContribution()); + } - private EntityDef getRootSchemaTypeEntity() + private EntityDef getActorEntity() { - final String guid = "126962bf-dd26-4fcf-97d8-d0ad1fdd2d50"; - final String name = "RootSchemaType"; - final String description = "The root of a complex schema - normally attaches to an asset or port."; + final String guid = "16d2c34a-43db-476b-93ae-6a2996f514ec"; + final String name = "Actor"; + final String description = "The representation of a person or group of people that are identified to perform an action or take on a responsibility."; final String descriptionGUID = null; - final String superTypeName = "ComplexSchemaType"; + final String superTypeName = "Referenceable"; return archiveHelper.getDefaultEntityDef(guid, name, @@ -247,14 +253,14 @@ private EntityDef getRootSchemaTypeEntity() } - private TypeDefPatch updateTabularSchemaType() + private TypeDefPatch updateActorProfile() { /* * Create the Patch */ - final String typeName = "TabularSchemaType"; + final String typeName = "ActorProfile"; - final String superTypeName = "RootSchemaType"; + final String superTypeName = "Actor"; TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); @@ -266,14 +272,14 @@ private TypeDefPatch updateTabularSchemaType() } - private TypeDefPatch updateDocumentSchemaType() + private TypeDefPatch updateUserIdentity() { /* * Create the Patch */ - final String typeName = "DocumentSchemaType"; + final String typeName = "UserIdentity"; - final String superTypeName = "RootSchemaType"; + final String superTypeName = "Actor"; TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); @@ -285,14 +291,14 @@ private TypeDefPatch updateDocumentSchemaType() } - private TypeDefPatch updateObjectSchemaType() + private TypeDefPatch updatePersonRole() { /* * Create the Patch */ - final String typeName = "ObjectSchemaType"; + final String typeName = "PersonRole"; - final String superTypeName = "RootSchemaType"; + final String superTypeName = "Actor"; TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); @@ -304,102 +310,945 @@ private TypeDefPatch updateObjectSchemaType() } - - private TypeDefPatch updateEventType() + private TypeDefPatch updateProjectTeam() { /* * Create the Patch */ - final String typeName = "EventType"; - - final String superTypeName = "RootSchemaType"; + final String typeName = "ProjectTeam"; - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); typeDefPatch.setUpdatedBy(originatorName); typeDefPatch.setUpdateTime(creationDate); - typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + + /* + * Set up end 2. + */ + final String end2EntityType = "Actor"; + final String end2AttributeName = "supportingActors"; + final String end2AttributeDescription = "People and teams supporting this project."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + + + typeDefPatch.setEndDef2(relationshipEndDef); return typeDefPatch; } - private TypeDefPatch updateRelationalDBSchemaType() + private TypeDefPatch updateToDo() { /* * Create the Patch */ - final String typeName = "RelationalDBSchemaType"; + final String typeName = "ToDo"; - final String superTypeName = "RootSchemaType"; - - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); typeDefPatch.setUpdatedBy(originatorName); typeDefPatch.setUpdateTime(creationDate); - typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "toDoType"; + final String attribute1Description = "Type of to do - typically managed in a valid value set and used in stewardship automation."; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); return typeDefPatch; } - private TypeDefPatch updateAPISchemaType() + private TypeDefPatch updateActionAssignment() { /* * Create the Patch */ - final String typeName = "APISchemaType"; + final String typeName = "ActionAssignment"; - final String superTypeName = "RootSchemaType"; - - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); typeDefPatch.setUpdatedBy(originatorName); typeDefPatch.setUpdateTime(creationDate); - typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + /* + * Set up end 2. + */ + final String end2EntityType = "Actor"; + final String end2AttributeName = "assignedActor"; + final String end2AttributeDescription = "The person/people assigned to perform the action(s) requested in the to do."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + + + typeDefPatch.setEndDef2(relationshipEndDef); return typeDefPatch; } - private TypeDefPatch updateDisplayDataSchemaType() + private TypeDefPatch updateCrowdSourcingContribution() { /* * Create the Patch */ - final String typeName = "DisplayDataSchemaType"; + final String typeName = "CrowdSourcingContribution"; - final String superTypeName = "RootSchemaType"; - - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); typeDefPatch.setUpdatedBy(originatorName); typeDefPatch.setUpdateTime(creationDate); - typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + /* + * Set up end 2. + */ + final String end2EntityType = "Actor"; + final String end2AttributeName = "contributors"; + final String end2AttributeDescription = "The person/people making the contribution."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + + + typeDefPatch.setEndDef2(relationshipEndDef); return typeDefPatch; } - private TypeDefPatch updateQuerySchemaType() + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void add0430ServiceLevelObjectives() + { + this.archiveBuilder.addEntityDef(getServiceLevelObjectivesEntity()); + } + + + private EntityDef getServiceLevelObjectivesEntity() + { + final String guid = "22c4e433-1b87-4446-840a-03f83d2dc113"; + final String name = "ServiceLevelObjective"; + final String description = "The set of behavior related objectives that an asset or capability seeks to achieve."; + final String descriptionGUID = null; + + final String superTypeName = "TechnicalControl"; + + return archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); + } + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + + private void update0481Licenses() + { + this.archiveBuilder.addTypeDefPatch(updateLicenseRelationship()); + } + + private TypeDefPatch updateLicenseRelationship() { /* * Create the Patch */ - final String typeName = "QuerySchemaType"; - - final String superTypeName = "RootSchemaType"; + final String typeName = "License"; - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); typeDefPatch.setUpdatedBy(originatorName); typeDefPatch.setUpdateTime(creationDate); - typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "entitlements"; + final String attribute1Description = "The list of rights and permissions granted."; + final String attribute1DescriptionGUID = null; + final String attribute2Name = "restrictions"; + final String attribute2Description = "The list of limiting conditions or measures imposed."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "obligations"; + final String attribute3Description = "The list of actions, duties or commitments required."; + final String attribute3DescriptionGUID = null; + + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); return typeDefPatch; } + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void add0483TermsAndConditions() + { + this.archiveBuilder.addEntityDef(getTermsAndConditionsEntity()); + this.archiveBuilder.addRelationshipDef(getAttachedTermsAndConditionsRelationship()); + } + + + private EntityDef getTermsAndConditionsEntity() + { + final String guid = "2ddc42d3-7791-4b4e-a064-91df9300290a"; + final String name = "TermsAndConditions"; + final String description = "The set of entitlements, restrictions and obligations associated with an agreement, license etc."; + final String descriptionGUID = null; + + final String superTypeName = "Referenceable"; + + EntityDef entityDef = archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "entitlements"; + final String attribute1Description = "The list of rights and permissions granted."; + final String attribute1DescriptionGUID = null; + final String attribute2Name = "restrictions"; + final String attribute2Description = "The list of limiting conditions or measures imposed."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "obligations"; + final String attribute3Description = "The list of actions, duties or commitments required."; + final String attribute3DescriptionGUID = null; + final String attribute4Name = "displayName"; + final String attribute4Description = "Short name for the terms and conditions."; + final String attribute4DescriptionGUID = null; + final String attribute5Name = "description"; + final String attribute5Description = "An overview of the terms and conditions."; + final String attribute5DescriptionGUID = null; + + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute5Name, + attribute5Description, + attribute5DescriptionGUID); + properties.add(property); + + entityDef.setPropertiesDefinition(properties); + return entityDef; + } + + + private RelationshipDef getAttachedTermsAndConditionsRelationship() + { + final String guid = "8292343f-6a96-4ca8-a447-38f734c75634"; + final String name = "AttachedTermsAndConditions"; + final String description = "The terms and conditions associated with an agreement, license etc."; + final String descriptionGUID = null; + + final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; + + RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(guid, + name, + null, + description, + descriptionGUID, + classificationPropagationRule); + + RelationshipEndDef relationshipEndDef; + + /* + * Set up end 1. + */ + final String end1EntityType = "Referenceable"; + final String end1AttributeName = "subjectOfTermsAndConditions"; + final String end1AttributeDescription = "Entity that the terms and condition applied."; + final String end1AttributeDescriptionGUID = null; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), + end1AttributeName, + end1AttributeDescription, + end1AttributeDescriptionGUID, + end1Cardinality); + relationshipDef.setEndDef1(relationshipEndDef); + + /* + * Set up end 2. + */ + final String end2EntityType = "TermsAndConditions"; + final String end2AttributeName = "termsAndConditions"; + final String end2AttributeDescription = "Entitlements, restrictions and obligations."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + relationshipDef.setEndDef2(relationshipEndDef); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "displayName"; + final String attribute1Description = "Short name for the related terms and conditions."; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + + relationshipDef.setPropertiesDefinition(properties); + + return relationshipDef; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void add0484Agreements() + { + this.archiveBuilder.addEntityDef(getAgreementEntity()); + this.archiveBuilder.addRelationshipDef(getAgreementActorRelationship()); + this.archiveBuilder.addRelationshipDef(getAgreementItemRelationship()); + this.archiveBuilder.addRelationshipDef(getContractLinkRelationship()); + } + + + private EntityDef getAgreementEntity() + { + final String guid = "88886b53-c839-48fa-bcfa-83ebcf8abbb5"; + final String name = "Agreement"; + final String description = "An agreement between parties."; + final String descriptionGUID = null; + + final String superTypeName = "Referenceable"; + + EntityDef entityDef = archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "agreementType"; + final String attribute1Description = "The type of agreement - values typically defined in a valid value set."; + final String attribute1DescriptionGUID = null; + final String attribute4Name = "displayName"; + final String attribute4Description = "Short name for the terms and conditions."; + final String attribute4DescriptionGUID = null; + final String attribute5Name = "description"; + final String attribute5Description = "An overview of the terms and conditions."; + final String attribute5DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute5Name, + attribute5Description, + attribute5DescriptionGUID); + properties.add(property); + + entityDef.setPropertiesDefinition(properties); + return entityDef; + } + + + private RelationshipDef getAgreementActorRelationship() + { + final String guid = "1c811d0b-e9ce-44af-b6ed-133e73322e32"; + final String name = "AgreementActor"; + final String description = "An actor identified in an agreement."; + final String descriptionGUID = null; + + final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; + + RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(guid, + name, + null, + description, + descriptionGUID, + classificationPropagationRule); + + RelationshipEndDef relationshipEndDef; + + /* + * Set up end 1. + */ + final String end1EntityType = "Agreement"; + final String end1AttributeName = "relatedAgreements"; + final String end1AttributeDescription = "The agreements that include the actor."; + final String end1AttributeDescriptionGUID = null; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), + end1AttributeName, + end1AttributeDescription, + end1AttributeDescriptionGUID, + end1Cardinality); + relationshipDef.setEndDef1(relationshipEndDef); + + /* + * Set up end 2. + */ + final String end2EntityType = "Actor"; + final String end2AttributeName = "agreementActors"; + final String end2AttributeDescription = "The actors that are named in the agreement."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + relationshipDef.setEndDef2(relationshipEndDef); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "actorName"; + final String attribute1Description = "Name used to identify a specific actor in the agreement."; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + + relationshipDef.setPropertiesDefinition(properties); + + return relationshipDef; + } + + + private RelationshipDef getAgreementItemRelationship() + { + final String guid = "a540c361-0ed1-45d6-b525-007592ae806d"; + final String name = "AgreementItem"; + final String description = "An identified item in an agreement."; + final String descriptionGUID = null; + + final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; + + RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(guid, + name, + null, + description, + descriptionGUID, + classificationPropagationRule); + + relationshipDef.setMultiLink(true); + + RelationshipEndDef relationshipEndDef; + + /* + * Set up end 1. + */ + final String end1EntityType = "Agreement"; + final String end1AttributeName = "agreementContents"; + final String end1AttributeDescription = "The agreement that the item relates to."; + final String end1AttributeDescriptionGUID = null; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), + end1AttributeName, + end1AttributeDescription, + end1AttributeDescriptionGUID, + end1Cardinality); + relationshipDef.setEndDef1(relationshipEndDef); + + /* + * Set up end 2. + */ + final String end2EntityType = "Referenceable"; + final String end2AttributeName = "agreementItems"; + final String end2AttributeDescription = "Specific items in the agreement."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + relationshipDef.setEndDef2(relationshipEndDef); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + + final String attribute0Name = "agreementItemId"; + final String attribute0Description = "unique identifier for the item within the agreement."; + final String attribute0DescriptionGUID = null; + final String attribute1Name = "entitlements"; + final String attribute1Description = "The list of rights and permissions granted."; + final String attribute1DescriptionGUID = null; + final String attribute2Name = "restrictions"; + final String attribute2Description = "The list of limiting conditions or measures imposed."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "obligations"; + final String attribute3Description = "The list of actions, duties or commitments required."; + final String attribute3DescriptionGUID = null; + final String attribute4Name = "agreementStart"; + final String attribute4Description = "Date/time when this item becomes active in the agreement."; + final String attribute4DescriptionGUID = null; + final String attribute5Name = "agreementEnd"; + final String attribute5Description = "Date/time when this item becomes inactive in the agreement."; + final String attribute5DescriptionGUID = null; + final String attribute6Name = "usageMeasurements"; + final String attribute6Description = "Measurements of the actual use of this item under the agreement."; + final String attribute6DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute0Name, + attribute0Description, + attribute0DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute5Name, + attribute5Description, + attribute5DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute6Name, + attribute6Description, + attribute6DescriptionGUID); + properties.add(property); + + relationshipDef.setPropertiesDefinition(properties); + + return relationshipDef; + } + + + private RelationshipDef getContractLinkRelationship() + { + final String guid = "33937ece-5ab6-4cd3-a348-b8196ffc3b4e"; + final String name = "ContractLink"; + final String description = "Link to the contract document."; + final String descriptionGUID = null; + + final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; + + RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(guid, + name, + null, + description, + descriptionGUID, + classificationPropagationRule); + + RelationshipEndDef relationshipEndDef; + + /* + * Set up end 1. + */ + final String end1EntityType = "Agreement"; + final String end1AttributeName = "agreements"; + final String end1AttributeDescription = "Agreements related to the contract."; + final String end1AttributeDescriptionGUID = null; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), + end1AttributeName, + end1AttributeDescription, + end1AttributeDescriptionGUID, + end1Cardinality); + relationshipDef.setEndDef1(relationshipEndDef); + + /* + * Set up end 2. + */ + final String end2EntityType = "ExternalReference"; + final String end2AttributeName = "contracts"; + final String end2AttributeDescription = "Details of the contract documents."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + relationshipDef.setEndDef2(relationshipEndDef); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "contractId"; + final String attribute1Description = "Identifier for the contract used in the agreement."; + final String attribute1DescriptionGUID = null; + final String attribute2Name = "contractLiaison"; + final String attribute2Description = "Identifier of actor to contact with queries relating to the contract."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "contractLiaisonTypeName"; + final String attribute3Description = "Type name of actor element."; + final String attribute3DescriptionGUID = null; + final String attribute4Name = "contractLiaisonPropertyName"; + final String attribute4Description = "The property from the actor element used as the identifier."; + final String attribute4DescriptionGUID = null; + + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + + relationshipDef.setPropertiesDefinition(properties); + + return relationshipDef; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void add00710DigitalProduct() + { + this.archiveBuilder.addClassificationDef(addDigitalProductClassification()); + } + + + private ClassificationDef addDigitalProductClassification() + { + final String guid = "4aaaa7ca-6b4b-4c4b-997f-d5dfd42917b0"; + final String name = "DigitalProduct"; + final String description = "Identifies an element that represents a digital product."; + final String descriptionGUID = null; + + final String linkedToEntity = "Referenceable"; + + ClassificationDef classificationDef = archiveHelper.getClassificationDef(guid, + name, + null, + description, + descriptionGUID, + this.archiveBuilder.getEntityDef(linkedToEntity), + true); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "syncDatesByKey"; + final String attribute1Description = "Collection of synchronization dates identified by a key"; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getMapStringLongTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + + properties.add(property); + + classificationDef.setPropertiesDefinition(properties); + + return classificationDef; + } + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void add00711DigitalSubscription() + { + this.archiveBuilder.addEntityDef(getDigitalSubscriptionEntity()); + this.archiveBuilder.addRelationshipDef(getDigitalSubscriberRelationship()); + } + + + private EntityDef getDigitalSubscriptionEntity() + { + final String guid = "ad6ed361-af14-458f-8fb7-d4c11baa45d2"; + final String name = "DigitalSubscription"; + final String description = "A specialized agreement that represents a subscription to a digital service or digital product."; + final String descriptionGUID = null; + + final String superTypeName = "Agreement"; + + EntityDef entityDef = archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "supportLevel"; + final String attribute1Description = "Level of support agreed for the subscriber."; + final String attribute1DescriptionGUID = null; + final String attribute2Name = "serviceLevels"; + final String attribute2Description = "Levels of service agreed with the subscriber."; + final String attribute2DescriptionGUID = null; + + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + + entityDef.setPropertiesDefinition(properties); + return entityDef; + } + + + private RelationshipDef getDigitalSubscriberRelationship() + { + final String guid = "567cc4e7-ef89-4d36-af0d-3cb4fe9b8cf4"; + final String name = "DigitalSubscriber"; + final String description = "The link between a digital subscriber and the subscription details."; + final String descriptionGUID = null; + + final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; + + RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(guid, + name, + null, + description, + descriptionGUID, + classificationPropagationRule); + + RelationshipEndDef relationshipEndDef; + + /* + * Set up end 1. + */ + final String end1EntityType = "Referenceable"; + final String end1AttributeName = "digitalSubscribers"; + final String end1AttributeDescription = "The digital subscribers registered under a subscription."; + final String end1AttributeDescriptionGUID = null; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), + end1AttributeName, + end1AttributeDescription, + end1AttributeDescriptionGUID, + end1Cardinality); + relationshipDef.setEndDef1(relationshipEndDef); + + /* + * Set up end 2. + */ + final String end2EntityType = "DigitalSubscription"; + final String end2AttributeName = "digitalSubscriptions"; + final String end2AttributeDescription = "The digital subscriptions in use by the subscriber."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + relationshipDef.setEndDef2(relationshipEndDef); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "subscriberId"; + final String attribute1Description = "Unique identifier for the subscriber."; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + + relationshipDef.setPropertiesDefinition(properties); + + return relationshipDef; + } + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + + private void update0715DigitalServiceOwnership() + { + this.archiveBuilder.addTypeDefPatch(updateDigitalServiceOperator()); + } + + private TypeDefPatch updateDigitalServiceOperator() + { + /* + * Create the Patch + */ + final String typeName = "DigitalServiceOperator"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Set up end 1. + */ + final String end1EntityType = "DigitalService"; + final String end1AttributeName = "operatesDigitalServices"; + final String end1AttributeDescription = "The digital services that this team/organization operates."; + final String end1AttributeDescriptionGUID = null; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), + end1AttributeName, + end1AttributeDescription, + end1AttributeDescriptionGUID, + end1Cardinality); + typeDefPatch.setEndDef1(relationshipEndDef); + + + /* + * Set up end 2. + */ + final String end2EntityType = "Team"; + final String end2AttributeName = "digitalServiceOperators"; + final String end2AttributeDescription = "The teams/organizations responsible for operating the digital service."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + + + typeDefPatch.setEndDef2(relationshipEndDef); + + return typeDefPatch; + } + /* * ------------------------------------------------------------------------------------------------------- */ diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_1.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_1.java index 8d81496c4e4..65ad83dd098 100644 --- a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_1.java +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_1.java @@ -1001,7 +1001,7 @@ private EntityDef addKafkaTopicEntity() /** - * These types were originally coded in release 1.7 - however the top-level method was not called ans so these types did not make the archive. + * These types were originally coded in release 1.7 - however the top-level method was not called and so these types did not make the archive. */ private void add0485DataProcessingPurposes() diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_12.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_12.java new file mode 100644 index 00000000000..ad8ccb09778 --- /dev/null +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_12.java @@ -0,0 +1,413 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.opentypes; + + +import org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveBuilder; +import org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveHelper; +import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive; +import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch; +import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; +import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSLogicErrorException; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * OpenMetadataTypesArchive builds an open metadata archive containing all the standard open metadata types. + * These types have hardcoded dates and guids so that however many times this archive is rebuilt, it will + * produce the same content. + *

+ * Details of the open metadata types are documented on the wiki: + * The Open Metadata Type System + *

+ *

+ * There are 8 areas, each covering a different topic area of metadata. The module breaks down the process of creating + * the models into the areas and then the individual models to simplify the maintenance of this class + *

+ */ +public class OpenMetadataTypesArchive3_12 +{ + /* + * This is the header information for the archive. + */ + private static final String archiveGUID = "bce3b0a0-662a-4f87-b8dc-844078a11a6e"; + private static final String archiveName = "Open Metadata Types"; + private static final String archiveDescription = "Standard types for open metadata repositories."; + private static final OpenMetadataArchiveType archiveType = OpenMetadataArchiveType.CONTENT_PACK; + private static final String archiveVersion = "3.12"; + private static final String originatorName = "Egeria"; + private static final String originatorLicense = "Apache 2.0"; + private static final Date creationDate = new Date(1588261366992L); + + /* + * Specific values for initializing TypeDefs + */ + private static final long versionNumber = 1L; + private static final String versionName = "1.0"; + + + private final OMRSArchiveBuilder archiveBuilder; + private final OMRSArchiveHelper archiveHelper; + + /** + * Default constructor sets up the archive builder. This in turn sets up the header for the archive. + */ + public OpenMetadataTypesArchive3_12() + { + this.archiveBuilder = new OMRSArchiveBuilder(archiveGUID, + archiveName, + archiveDescription, + archiveType, + archiveVersion, + originatorName, + originatorLicense, + creationDate, + null); + + this.archiveHelper = new OMRSArchiveHelper(archiveBuilder, + archiveGUID, + originatorName, + creationDate, + versionNumber, + versionName); + } + + + /** + * Chained constructor sets up the archive builder. This in turn sets up the header for the archive. + * + * @param archiveBuilder accumulator for types + */ + public OpenMetadataTypesArchive3_12(OMRSArchiveBuilder archiveBuilder) + { + this.archiveBuilder = archiveBuilder; + + this.archiveHelper = new OMRSArchiveHelper(archiveBuilder, + archiveGUID, + originatorName, + creationDate, + versionNumber, + versionName); + } + + + /** + * Return the unique identifier for this archive. + * + * @return String guid + */ + public String getArchiveGUID() + { + return archiveGUID; + } + + + /** + * Returns the open metadata type archive containing all the standard open metadata types. + * + * @return populated open metadata archive object + */ + public OpenMetadataArchive getOpenMetadataArchive() + { + final String methodName = "getOpenMetadataArchive"; + + if (this.archiveBuilder != null) + { + /* + * Build the type archive. + */ + this.getOriginalTypes(); + + /* + * The completed archive is ready to be packaged up and returned + */ + return this.archiveBuilder.getOpenMetadataArchive(); + } + else + { + /* + * This is a logic error since it means the creation of the archive builder threw an exception + * in the constructor and so this object should not be used. + */ + throw new OMRSLogicErrorException(OMRSErrorCode.ARCHIVE_UNAVAILABLE.getMessageDefinition(), + this.getClass().getName(), + methodName); + } + } + + + /** + * Add the types from this archive to the archive builder supplied in the + * constructor. + */ + public void getOriginalTypes() + { + OpenMetadataTypesArchive3_11 previousTypes = new OpenMetadataTypesArchive3_11(archiveBuilder); + + /* + * Pull the types from previous releases. + */ + previousTypes.getOriginalTypes(); + + /* + * Calls for new and changed types go here + */ + add0053XRootSchemaType(); + add0042ProcessingStateClassification(); + + + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + /** + * 0042 Add the Processing State Classification + */ + private void add0042ProcessingStateClassification() + { + this.archiveBuilder.addClassificationDef(addProcessingStateClassification()); + } + + private ClassificationDef addProcessingStateClassification() + { + final String guid = "261fb0aa-b884-4ee8-87ea-a60510e9751d"; + final String name = "ProcessingState"; + final String description = "Stores processing state information used by various SoftwareCapabilities."; + final String descriptionGUID = null; + + final String linkedToEntity = "SoftwareCapability"; + + ClassificationDef classificationDef = archiveHelper.getClassificationDef(guid, + name, + null, + description, + descriptionGUID, + this.archiveBuilder.getEntityDef(linkedToEntity), + true); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "syncDatesByKey"; + final String attribute1Description = "Collection of synchronization dates identified by a key"; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getMapStringLongTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + + properties.add(property); + + classificationDef.setPropertiesDefinition(properties); + + return classificationDef; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + + private void add0053XRootSchemaType() + { + this.archiveBuilder.addEntityDef(getRootSchemaTypeEntity()); + + this.archiveBuilder.addTypeDefPatch(updateTabularSchemaType()); + this.archiveBuilder.addTypeDefPatch(updateDocumentSchemaType()); + this.archiveBuilder.addTypeDefPatch(updateObjectSchemaType()); + this.archiveBuilder.addTypeDefPatch(updateEventType()); + this.archiveBuilder.addTypeDefPatch(updateRelationalDBSchemaType()); + this.archiveBuilder.addTypeDefPatch(updateAPISchemaType()); + this.archiveBuilder.addTypeDefPatch(updateDisplayDataSchemaType()); + this.archiveBuilder.addTypeDefPatch(updateQuerySchemaType()); + } + + + private EntityDef getRootSchemaTypeEntity() + { + final String guid = "126962bf-dd26-4fcf-97d8-d0ad1fdd2d50"; + final String name = "RootSchemaType"; + final String description = "The root of a complex schema - normally attaches to an asset or port."; + final String descriptionGUID = null; + + final String superTypeName = "ComplexSchemaType"; + + return archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); + } + + + private TypeDefPatch updateTabularSchemaType() + { + /* + * Create the Patch + */ + final String typeName = "TabularSchemaType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + private TypeDefPatch updateDocumentSchemaType() + { + /* + * Create the Patch + */ + final String typeName = "DocumentSchemaType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + private TypeDefPatch updateObjectSchemaType() + { + /* + * Create the Patch + */ + final String typeName = "ObjectSchemaType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + + private TypeDefPatch updateEventType() + { + /* + * Create the Patch + */ + final String typeName = "EventType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + private TypeDefPatch updateRelationalDBSchemaType() + { + /* + * Create the Patch + */ + final String typeName = "RelationalDBSchemaType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + private TypeDefPatch updateAPISchemaType() + { + /* + * Create the Patch + */ + final String typeName = "APISchemaType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + private TypeDefPatch updateDisplayDataSchemaType() + { + /* + * Create the Patch + */ + final String typeName = "DisplayDataSchemaType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + private TypeDefPatch updateQuerySchemaType() + { + /* + * Create the Patch + */ + final String typeName = "QuerySchemaType"; + + final String superTypeName = "RootSchemaType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(superTypeName)); + + return typeDefPatch; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ +} +