Class DataContractMapper
java.lang.Object
org.odpi.openmetadata.frameworks.integration.bitol.mapping.BitolMapperBase
org.odpi.openmetadata.frameworks.integration.bitol.mapping.DataContractMapper
DataContractMapper catalogues an Open Data Contract Standard (ODCS) document as an Agreement in open metadata.
- The document becomes an Agreement classified as a DataSharingAgreement (one element per version, qualifiedName DataContract::{id}::{version}) whose identifier is also recorded as an ExternalId shared by all versions.
- Each schema object becomes a DataStructure that is an item of the agreement; each property becomes a DataField member of the structure, with nested properties and array items as nested data fields. Primary key, classification and critical data element markers become the PrimaryKey, Confidentiality and Criticality classifications; relationships between properties become LinkedDataField relationships.
- Each data quality check becomes a DataQualityRule governance control that governs the structure or field.
- The SLA properties become a ServiceLevelObjective that governs the agreement; the description's limitations and usage become its restrictions and entitlements.
- Servers become Endpoints listed as resources of the agreement. A SecurityAccessControl governs the agreement and each access role becomes a SecurityRole associated with it, with the access type as the operation name.
- The tenant, tags, team, support channels and authoritative definitions are mapped as for data products (see BitolMapperBase).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAdditional property on the service level objective holding the SLA properties as JSON.Fields inherited from class org.odpi.openmetadata.frameworks.integration.bitol.mapping.BitolMapperBase
ADDITIONAL_PROPERTY_PREFIX, context, CONTEXT_JSON, CUSTOM_PROPERTIES_JSON, DATA_LINEAGE_TYPE_NAMES, DEPRECATED, DRAFT_CONTRACT_VERSION, EGERIA_ASSEMBLES, EGERIA_CATEGORY, EGERIA_DEPLOYMENT_STATUS, EGERIA_INTRODUCTION_DATE, EGERIA_LICENSE_TYPES, EGERIA_MATURITY, EGERIA_NEXT_VERSION_DATE, EGERIA_PROCESS_QUALIFIED_NAME, EGERIA_PROCESS_TYPE, EGERIA_PRODUCT_FAMILIES, EGERIA_QUESTIONS, EGERIA_SERVICE_LEVELS, EGERIA_SERVICE_LIFE, EGERIA_USER_DEPLOYMENT_STATUS, EGERIA_VENDOR, EGERIA_WITHDRAW_DATE, INPUT_CONTRACT_SUFFIX, SEPARATOR, SYNONYMS_JSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncatalogueDataContract(DataContract dataContract, String source) Catalogue a data contract.ensureInputContract(String processGUID, String productName) Make sure that a process that assembles a digital product's data has a data contract describing the data it reads, so that the input port named after it in the product's ODPS document has a contract identifier.Methods inherited from class org.odpi.openmetadata.frameworks.integration.bitol.mapping.BitolMapperBase
addCustomProperties, addDescriptionDetails, addSearchKeywords, canonical, fillFundamentals, findElementGUID, findElementsByDocumentId, getContactMethodType, getDocumentQualifiedName, getEgeriaDate, getEgeriaString, getEgeriaValues, getExternalIdQualifiedName, getLatestVersion, getLinkedElementGUIDs, getSearchKeywords, isEgeriaProperty, isRetired, linkAuthoritativeDefinitions, linkExternalId, linkSupportChannels, linkTeam, linkTenantOrganization, parseDate, putIfPresent, setContentStatus, toJSON, toStringValue
-
Field Details
-
SLA_PROPERTIES_JSON
Additional property on the service level objective holding the SLA properties as JSON.- See Also:
-
-
Constructor Details
-
DataContractMapper
Constructor.- Parameters:
context- connector context providing access to the open metadata clients
-
-
Method Details
-
catalogueDataContract
public BitolMappingResult catalogueDataContract(DataContract dataContract, String source) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Catalogue a data contract. Republishing the same version updates the existing elements; a new version creates new elements linked to the same ExternalId.- Parameters:
dataContract- document to cataloguesource- description of where the document came from (recorded on the ExternalId link)- Returns:
- result describing what was done and anything that could not be fully represented
- Throws:
InvalidParameterException- invalid parameterPropertyServerException- problem with the metadata storeUserNotAuthorizedException- security problem
-
ensureInputContract
public List<String> ensureInputContract(String processGUID, String productName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Make sure that a process that assembles a digital product's data has a data contract describing the data it reads, so that the input port named after it in the product's ODPS document has a contract identifier. If the process is not already an item of an agreement, and has no bitol.contractId additional property, a sparsely populated draft contract is catalogued for it - an identifier ({process qualified name}::input), a name, a description listing the elements the process reads, and a status of draft - with the process and its sources as the agreement's items. The draft is published with the product, so it can be filled out in the Bitol store and catalogued again; a new version of it shares the draft's ExternalId.- Parameters:
processGUID- unique identifier of the processproductName- name of the product it assembles, for the description- Returns:
- unique identifiers of the agreements the process is an item of, including any draft created here
- Throws:
InvalidParameterException- invalid parameterPropertyServerException- problem with the metadata storeUserNotAuthorizedException- security problem
-