Class AssetCatalogRESTServices

java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.assetcatalog.server.AssetCatalogRESTServices

public class AssetCatalogRESTServices extends TokenController
The AssetCatalogRESTServices provides the implementation of the Asset Catalog Open Metadata View Service (OMVS). This interface provides view interfaces for glossary UIs.
  • Constructor Details

    • AssetCatalogRESTServices

      public AssetCatalogRESTServices()
      Default constructor
  • Method Details

    • getAssetGraph

      public AssetGraphResponse getAssetGraph(String serverName, String assetGUID, int startFrom, int pageSize)
      Return all the elements that are anchored to an asset plus relationships between these elements and to other elements.
      Parameters:
      serverName - name of the server instances for this request
      assetGUID - unique name for the connection.
      startFrom - starting element (used in paging through large result sets)
      pageSize - maximum number of results to return
      Returns:
      graph of elements or InvalidParameterException - one of the parameters is null or invalid or PropertyServerException - there is a problem retrieving the connected asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getAssetLineageGraph

      public AssetLineageGraphResponse getAssetLineageGraph(String serverName, String assetGUID, List<String> relationshipTypes, int startFrom, int pageSize)
      Return all the elements that are linked to an asset using lineage relationships. The relationships are retrieved both from the asset, and the anchored schema elements
      Parameters:
      serverName - name of the server instances for this request
      assetGUID - unique identifier for the asset
      relationshipTypes - list of relationship type names to use in the search
      startFrom - starting element (used in paging through large result sets)
      pageSize - maximum number of results to return
      Returns:
      graph of elements or InvalidParameterException - one of the parameters is null or invalid or PropertyServerException - there is a problem retrieving the connected asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • findInAssetDomain

      public AssetSearchMatchesListResponse findInAssetDomain(String serverName, FilterRequestBody requestBody, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize)
      Return a list of assets with the requested search string in their name, qualified name or description. The search string is interpreted as a regular expression (RegEx).
      Parameters:
      serverName - name of the server instances for this request
      requestBody - string to search for in text
      startsWith - does the value start with the supplied string?
      endsWith - does the value end with the supplied string?
      ignoreCase - should the search ignore case?
      startFrom - starting element (used in paging through large result sets)
      pageSize - maximum number of results to return
      Returns:
      list of results for assets that match the search string or InvalidParameterException the searchString is invalid or PropertyServerException there is a problem access in the property server or UserNotAuthorizedException the user does not have access to the properties
    • getAssetsByMetadataCollectionId

      public AssetsResponse getAssetsByMetadataCollectionId(String serverName, String metadataCollectionId, int startFrom, int pageSize, FilterRequestBody requestBody)
      Return a list of assets that come from the requested metadata collection.
      Parameters:
      serverName - name of the server instances for this request
      metadataCollectionId - guid to search for
      startFrom - starting element (used in paging through large result sets)
      pageSize - maximum number of results to return
      requestBody - optional type name to restrict search by
      Returns:
      list of unique identifiers for Assets with the requested name or InvalidParameterException the name is invalid or PropertyServerException there is a problem access in the property server or UserNotAuthorizedException the user does not have access to the properties
    • getSupportedTypes

      public AssetCatalogSupportedTypes getSupportedTypes(String serverName)
      Returns the list with supported types for search, including the subtypes supported. The list is deduplicated.
      Parameters:
      serverName - name of the server to route the request to
      Returns:
      the supported types from Asset Consumer OMAS or PropertyServerException if a configuration on the backend InvalidParameterException if parameter validation fails UserNotAuthorizedException security access problem
    • searchAssets

      public AssetListResponse searchAssets(String serverName, String searchCriteria, List<String> typeNames, String sequencingProperty, SequencingOrder sequencingOrder, boolean caseSensitive, boolean exactMatch, Integer startFrom, Integer pageSize)
      Return a list of assets matching the search criteria without the full context
      Parameters:
      serverName - name of the server to route the request to
      searchCriteria - the query parameter with the search phrase
      typeNames - OM types list to search for
      sequencingProperty - name of the property based on which to sort the result
      sequencingOrder - PROPERTY_ASCENDING or PROPERTY_DESCENDING
      caseSensitive - set case sensitive flag
      exactMatch - set exact match flag
      startFrom - the offset for the results
      pageSize - the number of results per page
      Returns:
      list of assets or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
    • searchAssetsByTypeName

      public AssetListResponse searchAssetsByTypeName(String serverName, String typeName)
      Return a list of assets matching the type name without the full context The list includes also subtypes
      Parameters:
      serverName - name of the server to route the request to
      typeName - the assets type name to search for
      Returns:
      list of assets by type name or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
    • searchAssetsByTypeGUID

      public AssetListResponse searchAssetsByTypeGUID(String serverName, String typeGUID)
      Return a list of assets matching the type GUID without the full context The list includes also subtypes
      Parameters:
      serverName - name of the server to route the request to
      typeGUID - the assets type GUID to search for
      Returns:
      list of assets by type GUID or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
    • getAsset

      public AssetCatalogResponse getAsset(String serverName, String guid)
      Fetch asset's header, classification and properties.
      Parameters:
      serverName - name of the server to route the request to
      guid - of the Entity to be retrieved
      Returns:
      the entity details or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
    • getAssetContext

      public AssetResponse getAssetContext(String serverName, String guid)
      Return the full context of an asset/glossary term based on its identifier. The response contains the list of the connections assigned to the asset.
      Parameters:
      serverName - name of the server to route the request to
      guid - of the Entity to be retrieved
      Returns:
      the entity context or PropertyServerException if a configuration on the backend UserNotAuthorizedException security access problem InvalidParameterException if parameter validation fails
    • getUltimateSource

      public LineageResponse getUltimateSource(String serverName, String guid, boolean includeProcesses)
      Return the nodes and relationships that describe the know ultimate sources of the starting element.
      Parameters:
      serverName - name of the server to route the request to
      guid - unique identifier of the starting element
      includeProcesses - if true Process nodes will be included
      Returns:
      graph of nodes and edges describing the ultimate sources of the asset or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • getEndToEndLineage

      public LineageResponse getEndToEndLineage(String serverName, String guid, boolean includeProcesses)
      Return the graph of nodes that describe the end-to-end lineage for the starting element.
      Parameters:
      serverName - name of the server to route the request to
      guid - unique identifier of the starting element
      includeProcesses - if true Process nodes will be included
      Returns:
      graph of nodes and edges describing the end to end flow or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • getUltimateDestination

      public LineageResponse getUltimateDestination(String serverName, String guid, boolean includeProcesses)
      Return the nodes and relationships that describe the know ultimate destinations of the starting element.
      Parameters:
      serverName - name of the server to route the request to
      guid - unique identifier of the starting element
      includeProcesses - if true Process nodes will be included
      Returns:
      graph of nodes and edges describing the ultimate destination of the asset or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • getSemanticLineage

      public LineageResponse getSemanticLineage(String serverName, String guid, boolean includeProcesses)
      Retrieve details of the asset related elements linked to a glossary term via the semantic assignment relationship.
      Parameters:
      serverName - name of the server to route the request to
      guid - unique identifier of the starting glossary term element
      includeProcesses - if true Process nodes will be included
      Returns:
      graph of nodes and edges describing the assets linked to the glossary term or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • getLineageVertex

      public LineageVertexResponse getLineageVertex(String serverName, String guid)
      Retrieves the details of a specific node in the lineage graph.
      Parameters:
      serverName - name of the server to route the request to
      guid - of the Entity to be retrieved
      Returns:
      the entity details or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • getTypes

      public LineageTypesResponse getTypes(String serverName)
      Gets available entities types from lineage repository.
      Parameters:
      serverName - name of the server to route the request to
      Returns:
      the available entities types or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • getNodes

      public LineageNodeNamesResponse getNodes(String serverName, String type, String searchValue, int limit)
      Gets nodes names of certain type with display name containing a certain value.
      Parameters:
      serverName - name of the server to route the request to
      type - the type of the nodes name to search for
      searchValue - the string to be contained in the qualified name of the node - case-insensitive
      limit - the maximum number of node names to retrieve
      Returns:
      the list of node names or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • searchForVertices

      public LineageSearchResponse searchForVertices(String serverName, LineageSearchRequest searchRequest)
      Returns the list of vertices that the user will initially see when querying lineage. In the future, this method will be extended to condense large paths to prevent cluttering of the users screen. The user will be able to extend the condensed path by querying a different method.
      Parameters:
      serverName - name of the server to route the request to
      searchRequest - filtering details for the search
      Returns:
      list of graph nodes or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service
    • getElementHierarchy

      public LineageResponse getElementHierarchy(String serverName, ElementHierarchyRequest elementHierarchyRequest)
      Returns a subgraph representing the hierarchy of a certain node, based on the request.
      Parameters:
      serverName - name of the server to route the request to
      elementHierarchyRequest - contains the guid of the queried node and the hierarchyType of the display name of the nodes
      Returns:
      a subgraph containing all relevant paths or InvalidParameterException from the underlying service, PropertyServerException from the underlying service or UserNotAuthorizedException from the underlying service