Class DataContract
java.lang.Object
org.odpi.openmetadata.frameworks.integration.bitol.common.BitolDocument
org.odpi.openmetadata.frameworks.integration.bitol.odcs.DataContract
This class represents an Open Data Contract Standard (ODCS) data contract as defined by the Bitol project
(https://bitol-io.github.io/open-data-contract-standard/). It is used internally in Egeria to pass this
information to the integration connectors and view services. A data contract describes a dataset: its schema,
data quality checks, service level agreement, support channels, pricing, team, access roles and the servers
where it resides. The fundamentals shared with the Open Data Product Standard are inherited from
BitolDocument.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe version of the Open Data Contract Standard that this bean is aligned with.The prefixes of the apiVersion values that this bean is able to represent.Fields inherited from class org.odpi.openmetadata.frameworks.integration.bitol.common.BitolDocument
DATA_CONTRACT_KIND, DATA_PRODUCT_KIND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare the values of the supplied object with those stored in the current object.Return the timestamp (UTC, ISO 8601) when the data contract was created.Return the name of the data product that this contract belongs to (deprecated since v3.1.0 in favour of the ODPS document).getPrice()Return the pricing information.getRoles()Return the list of access roles that provide access to the data.Return the list of schema objects (tables, topics, files, ...) described by the contract.Return the list of servers where the data resides.Return the default schema element that SLA properties refer to (deprecated since v3.1.0).Return the list of service level agreement properties.Return the list of support and communication channels.getTeam()Return the team responsible for the data contract.inthashCode()Return hash code based on properties.booleanReturn whether the apiVersion of this document is one that this bean is able to represent.voidsetContractCreatedTs(String contractCreatedTs) Set up the timestamp (UTC, ISO 8601) when the data contract was created.voidsetDataProduct(String dataProduct) Set up the name of the data product that this contract belongs to (deprecated since v3.1.0 in favour of the ODPS document).voidsetPrice(DataContractPricing price) Set up the pricing information.voidsetRoles(List<DataContractRole> roles) Set up the list of access roles that provide access to the data.voidsetSchema(List<DataContractSchemaObject> schema) Set up the list of schema objects (tables, topics, files, ...) described by the contract.voidsetServers(List<DataContractServer> servers) Set up the list of servers where the data resides.voidsetSlaDefaultElement(String slaDefaultElement) Set up the default schema element that SLA properties refer to (deprecated since v3.1.0).voidsetSlaProperties(List<DataContractSLAProperty> slaProperties) Set up the list of service level agreement properties.voidsetSupport(List<BitolSupportChannel> support) Set up the list of support and communication channels.voidSet up the team responsible for the data contract.toString()Standard toString method.Methods inherited from class org.odpi.openmetadata.frameworks.integration.bitol.common.BitolDocument
getApiVersion, getAuthoritativeDefinitions, getContext, getCustomProperties, getDescription, getDomain, getId, getKind, getName, getStatus, getTags, getTenant, getVersion, setApiVersion, setAuthoritativeDefinitions, setContext, setCustomProperties, setDescription, setDomain, setId, setKind, setName, setStatus, setTags, setTenant, setVersion
-
Field Details
-
CURRENT_API_VERSION
The version of the Open Data Contract Standard that this bean is aligned with. It is the default apiVersion for new documents.- See Also:
-
SUPPORTED_API_VERSION_PREFIXES
The prefixes of the apiVersion values that this bean is able to represent. Older (v2.x) documents have a different top-level structure and are not supported.
-
-
Constructor Details
-
DataContract
public DataContract()Default constructor
-
-
Method Details
-
getDataProduct
Return the name of the data product that this contract belongs to (deprecated since v3.1.0 in favour of the ODPS document).- Returns:
- string name
-
setDataProduct
Set up the name of the data product that this contract belongs to (deprecated since v3.1.0 in favour of the ODPS document).- Parameters:
dataProduct- string name
-
getServers
Return the list of servers where the data resides.- Returns:
- list of servers
-
setServers
Set up the list of servers where the data resides.- Parameters:
servers- list of servers
-
getSchema
Return the list of schema objects (tables, topics, files, ...) described by the contract.- Returns:
- list of schema objects
-
setSchema
Set up the list of schema objects (tables, topics, files, ...) described by the contract.- Parameters:
schema- list of schema objects
-
getSupport
Return the list of support and communication channels.- Returns:
- list of support channels
-
setSupport
Set up the list of support and communication channels.- Parameters:
support- list of support channels
-
getPrice
Return the pricing information.- Returns:
- pricing structure
-
setPrice
Set up the pricing information.- Parameters:
price- pricing structure
-
getTeam
Return the team responsible for the data contract. Older documents supply a bare list of members; BitolModule (used by BitolDocumentFormatter) accepts this form and wraps it into a team.- Returns:
- team structure
-
setTeam
Set up the team responsible for the data contract. Older documents supply a bare list of members; BitolModule (used by BitolDocumentFormatter) accepts this form and wraps it into a team.- Parameters:
team- team structure
-
getRoles
Return the list of access roles that provide access to the data.- Returns:
- list of roles
-
setRoles
Set up the list of access roles that provide access to the data.- Parameters:
roles- list of roles
-
getSlaDefaultElement
Return the default schema element that SLA properties refer to (deprecated since v3.1.0).- Returns:
- string element reference
-
setSlaDefaultElement
Set up the default schema element that SLA properties refer to (deprecated since v3.1.0).- Parameters:
slaDefaultElement- string element reference
-
getSlaProperties
Return the list of service level agreement properties.- Returns:
- list of SLA properties
-
setSlaProperties
Set up the list of service level agreement properties.- Parameters:
slaProperties- list of SLA properties
-
getContractCreatedTs
Return the timestamp (UTC, ISO 8601) when the data contract was created.- Returns:
- string timestamp
-
setContractCreatedTs
Set up the timestamp (UTC, ISO 8601) when the data contract was created.- Parameters:
contractCreatedTs- string timestamp
-
hasSupportedApiVersion
public boolean hasSupportedApiVersion()Return whether the apiVersion of this document is one that this bean is able to represent.- Specified by:
hasSupportedApiVersionin classBitolDocument- Returns:
- boolean flag
-
toString
Standard toString method.- Overrides:
toStringin classBitolDocument- Returns:
- print out of variables in a JSON-style
-
equals
Compare the values of the supplied object with those stored in the current object.- Overrides:
equalsin classBitolDocument- Parameters:
objectToCompare- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()Return hash code based on properties.- Overrides:
hashCodein classBitolDocument- Returns:
- int
-