Class AssetCatalogRESTService
java.lang.Object
org.odpi.openmetadata.accessservices.assetcatalog.service.AssetCatalogRESTService
The AssetCatalogService provides the server-side implementation of the Asset Catalog Open Metadata
Assess Service (OMAS).
This service provide the functionality to fetch asset's header, classification and properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildContext
(String serverName, String userId, String assetGUID, String assetType) Return the full context of an asset/glossary term based on its identifier.getAssetDetailsByGUID
(String serverName, String userId, String assetGUID, String assetTypeName) Fetch asset's header, classification and propertiesgetAssetRelationships
(String serverName, String userId, String assetGUID, String assetTypeName, String relationshipTypeName, Integer startFrom, Integer limit) Returns the asset relationships.getAssetUniverseByGUID
(String serverName, String userId, String assetGUID, String assetTypeName) Fetch asset's header, classification, properties and relationshipsgetClassificationByAssetGUID
(String serverName, String userId, String assetGUID, String assetTypeName, String classificationName) Fetch the classification for a specific assetgetOutTopicConnection
(String serverName, String userId, String callerId) Return the connection object for the Asset Catalog OMAS's out topic.getSupportedTypes
(String serverName, String userId, String type) Returns supported types for search with all sub-types.searchByType
(String serverName, String userId, String searchCriteria, SearchParameters searchParameters) Return a list of assets/glossary terms/schema elements matching the search criteria without the full context.searchByTypeGUID
(String serverName, String userId, String typeGUID) Return a list of assets/glossary terms/schema elements matching the type GUID without the full context.searchByTypeName
(String serverName, String userId, String typeName) Return a list of assets/glossary terms/schema elements matching the type name without the full context.
-
Constructor Details
-
AssetCatalogRESTService
public AssetCatalogRESTService()
-
-
Method Details
-
getAssetDetailsByGUID
public AssetCatalogResponse getAssetDetailsByGUID(String serverName, String userId, String assetGUID, String assetTypeName) Fetch asset's header, classification and properties- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the userassetGUID
- the unique identifier for the assetassetTypeName
- the type of the asset- Returns:
- the asset with its header and the list of associated classifications and specific properties
-
getAssetUniverseByGUID
public AssetCatalogResponse getAssetUniverseByGUID(String serverName, String userId, String assetGUID, String assetTypeName) Fetch asset's header, classification, properties and relationships- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the userassetGUID
- the unique identifier for the assetassetTypeName
- the asset type- Returns:
- the asset with its header and the list of associated classifications and relationship
-
getClassificationByAssetGUID
public ClassificationListResponse getClassificationByAssetGUID(String serverName, String userId, String assetGUID, String assetTypeName, String classificationName) Fetch the classification for a specific asset- Parameters:
serverName
- unique identifier for requested server.userId
- the unique identifier for the userassetGUID
- the unique identifier for the assetassetTypeName
- the type of the assetclassificationName
- the name of the classification- Returns:
- ClassificationsResponse the classification for the asset
-
getAssetRelationships
public RelationshipListResponse getAssetRelationships(String serverName, String userId, String assetGUID, String assetTypeName, String relationshipTypeName, Integer startFrom, Integer limit) Returns the asset relationships.- Parameters:
serverName
- unique identifier for requested serveruserId
- the unique identifier for the userassetGUID
- the asset GUIDassetTypeName
- the asset type namerelationshipTypeName
- the relationship type namestartFrom
- the offsetlimit
- page size to limit the number of the assets returned- Returns:
- the asset relationships
-
searchByType
public AssetListResponse searchByType(String serverName, String userId, String searchCriteria, SearchParameters searchParameters) Return a list of assets/glossary terms/schema elements matching the search criteria without the full context. If the searchParameters have an empty list of entity types, the response contains Glossary Terms, Schema Elements, Assets- Parameters:
serverName
- unique identifier for requested serveruserId
- the unique identifier for the usersearchCriteria
- a string expression of the characteristics of the required assetssearchParameters
- constraints to make the assets' search results more precise- Returns:
- list of properties used to narrow the search
-
searchByTypeName
Return a list of assets/glossary terms/schema elements matching the type name without the full context. If the typeName is null or doesn't exist, the response contains an empty list. The list includes also subtypes.- Parameters:
serverName
- unique identifier for requested serveruserId
- the unique identifier for the usertypeName
- the assets type name to search for- Returns:
- list of assets by type name or GUID
-
searchByTypeGUID
Return a list of assets/glossary terms/schema elements matching the type GUID without the full context. If the typeGUID is null or doesn't exist, the response contains an empty list. The list includes also subtypes.- Parameters:
serverName
- unique identifier for requested serveruserId
- the unique identifier for the usertypeGUID
- the assets type GUID to search for- Returns:
- list of assets by type name or GUID
-
buildContext
public AssetResponse buildContext(String serverName, String userId, String assetGUID, String assetType) 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
- unique identifier for requested server.userId
- the unique identifier for the userassetGUID
- the global unique identifier of the assetassetType
- the type of the asset- Returns:
- the context of the given asset/glossary term/schema element
-
getSupportedTypes
Returns supported types for search with all sub-types. If type name is provided, it returns the type itself and the list of sub-types for it- Parameters:
serverName
- unique identifier for requested server.userId
- user identifier that issues the calltype
- optional type name- Returns:
- supported types
-
getOutTopicConnection
Return the connection object for the Asset Catalog OMAS's out topic.- Parameters:
serverName
- name of the service to route the request to.userId
- identifier of calling user.callerId
- unique identifier of the caller- Returns:
- connection object for the out topic or InvalidParameterException one of the parameters is null or invalid or UserNotAuthorizedException user not authorized to issue this request or PropertyServerException problem retrieving the discovery engine definition.
-