java.lang.Object
org.odpi.openmetadata.frameworks.integration.bitol.common.BitolDocument
Direct Known Subclasses:
DataContract, DataProduct

public abstract class BitolDocument extends Object
BitolDocument is the abstract root of the documents defined by the Bitol standards: the Open Data Contract Standard (ODCS) DataContract and the Open Data Product Standard (ODPS) DataProduct. It holds the fundamentals that the two standards share. The "kind" property identifies which type of document this is and is used by Jackson to select the subclass when a document is parsed through this class. The Bitol documents are typically encoded in YAML although JSON is also valid.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The value of the kind property for an Open Data Contract Standard (ODCS) document.
    static final String
    The value of the kind property for an Open Data Product Standard (ODPS) document.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Default constructor
    protected
    BitolDocument(String kind, String apiVersion)
    Constructor used by the subclasses to set the kind and the default apiVersion.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object objectToCompare)
    Compare the values of the supplied object with those stored in the current object.
    Return the version of the Bitol standard that this document conforms to (for example v3.1.0 for ODCS or v1.0.0 for ODPS).
    Return the list of links to sources that provide more details about this element.
    Return the AI and semantic context block for the document (instructions, verified statements and constraints).
    Return the list of custom (key/value) properties attached to this element.
    Return the high level description of the document (purpose, limitations, usage).
    Return the name of the logical data (business) domain.
    Return the unique identifier of the document, typically a UUID.
    Return the kind of document: either DataContract or DataProduct.
    Return the name of the data contract or data product.
    Return the current status of the data contract or data product.
    Return the list of tags attached to this element.
    Return the organization (tenant) that the data is primarily associated with.
    Return the version of the data contract or data product (typically semantic versioning).
    int
    Return hash code based on properties.
    abstract boolean
    Return whether the apiVersion of this document is one that Egeria's beans are able to represent.
    void
    setApiVersion(String apiVersion)
    Set up the version of the Bitol standard that this document conforms to (for example v3.1.0 for ODCS or v1.0.0 for ODPS).
    void
    Set up the list of links to sources that provide more details about this element.
    void
    Set up the AI and semantic context block for the document (instructions, verified statements and constraints).
    void
    Set up the list of custom (key/value) properties attached to this element.
    void
    Set up the high level description of the document (purpose, limitations, usage).
    void
    setDomain(String domain)
    Set up the name of the logical data (business) domain.
    void
    Set up the unique identifier of the document, typically a UUID.
    void
    Set up the kind of document: either DataContract or DataProduct.
    void
    Set up the name of the data contract or data product.
    void
    setStatus(String status)
    Set up the current status of the data contract or data product.
    void
    Set up the list of tags attached to this element.
    void
    setTenant(String tenant)
    Set up the organization (tenant) that the data is primarily associated with.
    void
    setVersion(String version)
    Set up the version of the data contract or data product (typically semantic versioning).
    Standard toString method.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DATA_CONTRACT_KIND

      public static final String DATA_CONTRACT_KIND
      The value of the kind property for an Open Data Contract Standard (ODCS) document.
      See Also:
    • DATA_PRODUCT_KIND

      public static final String DATA_PRODUCT_KIND
      The value of the kind property for an Open Data Product Standard (ODPS) document.
      See Also:
  • Constructor Details

    • BitolDocument

      public BitolDocument()
      Default constructor
    • BitolDocument

      protected BitolDocument(String kind, String apiVersion)
      Constructor used by the subclasses to set the kind and the default apiVersion.
      Parameters:
      kind - kind of document
      apiVersion - default version of the standard
  • Method Details

    • getApiVersion

      public String getApiVersion()
      Return the version of the Bitol standard that this document conforms to (for example v3.1.0 for ODCS or v1.0.0 for ODPS).
      Returns:
      string version
    • setApiVersion

      public void setApiVersion(String apiVersion)
      Set up the version of the Bitol standard that this document conforms to (for example v3.1.0 for ODCS or v1.0.0 for ODPS).
      Parameters:
      apiVersion - string version
    • getKind

      public String getKind()
      Return the kind of document: either DataContract or DataProduct.
      Returns:
      string kind
    • setKind

      public void setKind(String kind)
      Set up the kind of document: either DataContract or DataProduct.
      Parameters:
      kind - string kind
    • getId

      public String getId()
      Return the unique identifier of the document, typically a UUID. It is stable across versions of the document.
      Returns:
      string identifier
    • setId

      public void setId(String id)
      Set up the unique identifier of the document, typically a UUID. It is stable across versions of the document.
      Parameters:
      id - string identifier
    • getName

      public String getName()
      Return the name of the data contract or data product.
      Returns:
      string name
    • setName

      public void setName(String name)
      Set up the name of the data contract or data product.
      Parameters:
      name - string name
    • getVersion

      public String getVersion()
      Return the version of the data contract or data product (typically semantic versioning).
      Returns:
      string version
    • setVersion

      public void setVersion(String version)
      Set up the version of the data contract or data product (typically semantic versioning).
      Parameters:
      version - string version
    • getStatus

      public String getStatus()
      Return the current status of the data contract or data product. Standard values are defined in BitolStatus.
      Returns:
      string status
    • setStatus

      public void setStatus(String status)
      Set up the current status of the data contract or data product. Standard values are defined in BitolStatus.
      Parameters:
      status - string status
    • getDomain

      public String getDomain()
      Return the name of the logical data (business) domain.
      Returns:
      string domain name
    • setDomain

      public void setDomain(String domain)
      Set up the name of the logical data (business) domain.
      Parameters:
      domain - string domain name
    • getTenant

      public String getTenant()
      Return the organization (tenant) that the data is primarily associated with.
      Returns:
      string tenant name
    • setTenant

      public void setTenant(String tenant)
      Set up the organization (tenant) that the data is primarily associated with.
      Parameters:
      tenant - string tenant name
    • getDescription

      public BitolDescription getDescription()
      Return the high level description of the document (purpose, limitations, usage).
      Returns:
      description structure
    • setDescription

      public void setDescription(BitolDescription description)
      Set up the high level description of the document (purpose, limitations, usage).
      Parameters:
      description - description structure
    • getTags

      public List<String> getTags()
      Return the list of tags attached to this element.
      Returns:
      list of tag strings
    • setTags

      public void setTags(List<String> tags)
      Set up the list of tags attached to this element.
      Parameters:
      tags - list of tag strings
    • getCustomProperties

      public List<BitolCustomProperty> getCustomProperties()
      Return the list of custom (key/value) properties attached to this element.
      Returns:
      list of custom properties
    • setCustomProperties

      public void setCustomProperties(List<BitolCustomProperty> customProperties)
      Set up the list of custom (key/value) properties attached to this element.
      Parameters:
      customProperties - list of custom properties
    • getAuthoritativeDefinitions

      public List<BitolAuthoritativeDefinition> getAuthoritativeDefinitions()
      Return the list of links to sources that provide more details about this element.
      Returns:
      list of authoritative definitions
    • setAuthoritativeDefinitions

      public void setAuthoritativeDefinitions(List<BitolAuthoritativeDefinition> authoritativeDefinitions)
      Set up the list of links to sources that provide more details about this element.
      Parameters:
      authoritativeDefinitions - list of authoritative definitions
    • hasSupportedApiVersion

      public abstract boolean hasSupportedApiVersion()
      Return whether the apiVersion of this document is one that Egeria's beans are able to represent.
      Returns:
      boolean flag
    • getContext

      public BitolContext getContext()
      Return the AI and semantic context block for the document (instructions, verified statements and constraints).
      Returns:
      BitolContext
    • setContext

      public void setContext(BitolContext context)
      Set up the AI and semantic context block for the document (instructions, verified statements and constraints).
      Parameters:
      context - BitolContext
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Object
      Returns:
      print out of variables in a JSON-style
    • equals

      public boolean equals(Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      Overrides:
      equals in class Object
      Parameters:
      objectToCompare - supplied object
      Returns:
      boolean result of comparison
    • hashCode

      public int hashCode()
      Return hash code based on properties.
      Overrides:
      hashCode in class Object
      Returns:
      int