Class DiscoveryContext

java.lang.Object
org.odpi.openmetadata.frameworks.discovery.DiscoveryContext

public class DiscoveryContext extends Object
DiscoveryContext provides the discovery service with access to information about the discovery request along with the open metadata repository interfaces.
  • Constructor Details

    • DiscoveryContext

      public DiscoveryContext(String userId, String assetGUID, Map<String,String> analysisParameters, List<String> requestedAnnotationTypes, DiscoveryAssetStore assetStore, DiscoveryAnnotationStore annotationStore, DiscoveryAssetCatalogStore assetCatalogStore, DiscoveryOpenMetadataStore openMetadataStore)
      Constructor sets up the key parameters for accessing the annotations store.
      Parameters:
      userId - calling user
      assetGUID - unique identifier of the asset that the annotations should be attached to
      analysisParameters - name-value properties to control the discovery service
      requestedAnnotationTypes - annotation types to create
      assetStore - discovery asset store for the discovery service
      annotationStore - annotation store for the discovery service
      assetCatalogStore - the asset catalog store that provides the ability to query assets.
      openMetadataStore - generic metadata API from the Governance Action Framework (GAF)
    • DiscoveryContext

      public DiscoveryContext(DiscoveryContext template)
      Copy/clone Constructor
      Parameters:
      template - object being copied
  • Method Details

    • getAssetGUID

      public String getAssetGUID()
      Return the unique identifier of the asset being discovered.
      Returns:
      string guid
    • getAnalysisParameters

      public Map<String,String> getAnalysisParameters()
      Return the properties that hold the parameters used to drive the discovery service's analysis.
      Returns:
      AdditionalProperties object storing the analysis parameters
    • getRequestedAnnotationTypes

      public List<String> getRequestedAnnotationTypes()
      Return the list of annotation types required by the requester (null means all types available)
      Returns:
      list of type names
    • getAssetCatalogStore

      public DiscoveryAssetCatalogStore getAssetCatalogStore()
      Return the asset catalog store that provides the ability to query assets.
      Returns:
      assetCatalogStore object
    • getAssetStore

      public DiscoveryAssetStore getAssetStore()
      Return the asset store for the discovery engine. This is able to provide a connector to the asset configured with the properties of the asset from a property server.
      Returns:
      asset store
    • getAnnotationStore

      public DiscoveryAnnotationStore getAnnotationStore()
      Return the annotation store for the discovery engine. This is where the annotations are stored and retrieved from.
      Returns:
      annotation store
    • getOpenMetadataStore

      public DiscoveryOpenMetadataStore getOpenMetadataStore()
      Return a generic interface for accessing and updating open metadata elements, classifications and relationships.
      Returns:
      open metadata store
    • 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()
      Create a hash code for this element type.
      Overrides:
      hashCode in class Object
      Returns:
      int hash code