Class AssetCatalogRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.assetcatalog.server.AssetCatalogRESTServices
The AssetCatalogRESTServices provides the implementation of the Asset Catalog Open Metadata View Service (OMVS).
This interface provides view interfaces for glossary UIs.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindInAssetDomain
(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.Fetch asset's header, classification and properties.getAssetContext
(String serverName, String guid) Return the full context of an asset/glossary term based on its identifier.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.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.getAssetsByMetadataCollectionId
(String serverName, String metadataCollectionId, int startFrom, int pageSize, FilterRequestBody requestBody) Return a list of assets that come from the requested metadata collection.getElementHierarchy
(String serverName, ElementHierarchyRequest elementHierarchyRequest) Returns a subgraph representing the hierarchy of a certain node, based on the request.getEndToEndLineage
(String serverName, String guid, boolean includeProcesses) Return the graph of nodes that describe the end-to-end lineage for the starting element.getLineageVertex
(String serverName, String guid) Retrieves the details of a specific node in the lineage graph.Gets nodes names of certain type with display name containing a certain value.getSemanticLineage
(String serverName, String guid, boolean includeProcesses) Retrieve details of the asset related elements linked to a glossary term via the semantic assignment relationship.getSupportedTypes
(String serverName) Returns the list with supported types for search, including the subtypes supported.Gets available entities types from lineage repository.getUltimateDestination
(String serverName, String guid, boolean includeProcesses) Return the nodes and relationships that describe the know ultimate destinations of the starting element.getUltimateSource
(String serverName, String guid, boolean includeProcesses) Return the nodes and relationships that describe the know ultimate sources of the starting element.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 contextsearchAssetsByTypeGUID
(String serverName, String typeGUID) Return a list of assets matching the type GUID without the full context The list includes also subtypessearchAssetsByTypeName
(String serverName, String typeName) Return a list of assets matching the type name without the full context The list includes also subtypessearchForVertices
(String serverName, LineageSearchRequest searchRequest) Returns the list of vertices that the user will initially see when querying lineage.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
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 requestassetGUID
- 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 requestassetGUID
- unique identifier for the assetrelationshipTypes
- list of relationship type names to use in the searchstartFrom
- 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 requestrequestBody
- string to search for in textstartsWith
- 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 requestmetadataCollectionId
- guid to search forstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to returnrequestBody
- 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
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 tosearchCriteria
- the query parameter with the search phrasetypeNames
- OM types list to search forsequencingProperty
- name of the property based on which to sort the resultsequencingOrder
- PROPERTY_ASCENDING or PROPERTY_DESCENDINGcaseSensitive
- set case sensitive flagexactMatch
- set exact match flagstartFrom
- the offset for the resultspageSize
- 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
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 totypeName
- 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
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 totypeGUID
- 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
Fetch asset's header, classification and properties.- Parameters:
serverName
- name of the server to route the request toguid
- 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
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 toguid
- 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
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 toguid
- unique identifier of the starting elementincludeProcesses
- 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
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 toguid
- unique identifier of the starting elementincludeProcesses
- 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 toguid
- unique identifier of the starting elementincludeProcesses
- 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
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 toguid
- unique identifier of the starting glossary term elementincludeProcesses
- 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
Retrieves the details of a specific node in the lineage graph.- Parameters:
serverName
- name of the server to route the request toguid
- 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
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 totype
- the type of the nodes name to search forsearchValue
- the string to be contained in the qualified name of the node - case-insensitivelimit
- 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 tosearchRequest
- 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 toelementHierarchyRequest
- 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
-