Class AssetCatalog
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
-
- org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog
-
- All Implemented Interfaces:
AssetCatalogInterface
public class AssetCatalog extends FFDCRESTClient implements AssetCatalogInterface
The Asset Catalog Open Metadata Access Service (OMAS) provides an interface to search for assets including data stores, event feeds, APIs and data sets, related assets and relationships. Also, it can return the connection details for the asset metadata. The Asset Catalog OMAS includes:- Client-side provides language-specific client packages to make it easier for data tools and applications to call the interface.
- OMAS Server calls to retrieve assets and information related to the assets.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
auditLog, exceptionHandler, serverName, serverPlatformURLRoot
-
-
Constructor Summary
Constructors Constructor Description AssetCatalog(String serverName, String serverPlatformURLRoot)Create a new AssetCatalog client.AssetCatalog(String serverName, String serverPlatformURLRoot, String userId, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetResponsegetAssetContext(String userId, String assetGUID, String assetType)Return the full context of an asset/glossary term based on its identifier.AssetCatalogResponsegetAssetDetails(String userId, String assetGUID, String assetType)Fetch asset's header, classification and propertiesRelationshipListResponsegetAssetRelationships(String userId, String assetGUID, String assetType, String relationshipType, Integer from, Integer pageSize)Fetch the relationships for a specific assetAssetCatalogListResponsegetAssetsFromNeighborhood(String userId, String assetGUID, SearchParameters searchParameters)Returns the sub-graph that represents the list of assets that in neighborhood of the given assetAssetCatalogResponsegetAssetUniverse(String userId, String assetGUID, String assetType)Fetch asset's header, classification, properties and relationshipsClassificationListResponsegetClassificationsForAsset(String userId, String assetGUID, String assetType, String classificationName)Fetch the classification for a specific assetAssetCatalogListResponsegetLinkingAssets(String userId, String startAssetGUID, String endAssetGUID)Returns a sub-graph of intermediate assets that connected two assetsRelationshipListResponsegetLinkingRelationships(String userId, String startAssetGUID, String endAssetGUID)Return a sub-graph of relationships that connect two assetsRelationshipResponsegetRelationshipBetweenEntities(String userId, String entity1GUID, String entity2GUID, String relationshipType)Fetch relationship between entities details based on its unique identifier of the ends Filtering based on the relationship type is supportedAssetCatalogSupportedTypesgetSupportedTypes(String userId, String type)Returns the list with supported types for search, including the sub-types supportedAssetListResponsesearchByType(String userId, String searchCriteria, SearchParameters searchParameters)Return a list of assets matching the search criteria without the full context-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callConnectorTypeGetRESTCall, callCountGetRESTCall, callGUIDGetRESTCall, callGUIDListGetRESTCall, callGUIDListPostRESTCall, callGUIDPostRESTCall, callNameListGetRESTCall, callStringMapGetRESTCall, callVoidGetRESTCall, callVoidPostRESTCall
-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
callDeleteRESTCall, callDeleteRESTCall, callGetRESTCall, callGetRESTCall, callGetRESTCallNoParams, callPostRESTCall, callPostRESTCall, callPostRESTCallNoParams, callPutRESTCall, callPutRESTCall
-
-
-
-
Constructor Detail
-
AssetCatalog
public AssetCatalog(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Create a new AssetCatalog client.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servers- Throws:
InvalidParameterException- if parameter validation fails
-
AssetCatalog
public AssetCatalog(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
- Throws:
InvalidParameterException
-
-
Method Detail
-
getAssetDetails
public AssetCatalogResponse getAssetDetails(String userId, String assetGUID, String assetType) throws InvalidParameterException, PropertyServerException
Fetch asset's header, classification and properties- Specified by:
getAssetDetailsin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userassetGUID- the unique identifier for the assetassetType- the type of the asset- Returns:
- the asset with its header and the list of associated classifications and specific properties
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getAssetUniverse
public AssetCatalogResponse getAssetUniverse(String userId, String assetGUID, String assetType) throws InvalidParameterException, PropertyServerException
Fetch asset's header, classification, properties and relationships- Specified by:
getAssetUniversein interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userassetGUID- the unique identifier for the assetassetType- the asset type- Returns:
- the asset with its header and the list of associated classifications and relationship
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getAssetRelationships
public RelationshipListResponse getAssetRelationships(String userId, String assetGUID, String assetType, String relationshipType, Integer from, Integer pageSize) throws InvalidParameterException, PropertyServerException
Fetch the relationships for a specific asset- Specified by:
getAssetRelationshipsin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userassetGUID- the unique identifier for the assetassetType- the type of the assetrelationshipType- the type of the relationshipfrom- offsetpageSize- limit the number of the assets returned- Returns:
- list of relationships for the given asset
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getClassificationsForAsset
public ClassificationListResponse getClassificationsForAsset(String userId, String assetGUID, String assetType, String classificationName) throws InvalidParameterException, PropertyServerException
Fetch the classification for a specific asset- Specified by:
getClassificationsForAssetin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userassetGUID- the unique identifier for the assetassetType- the type of the assetclassificationName- the name of the classification- Returns:
- ClassificationsResponse the classification for the asset
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getLinkingAssets
public AssetCatalogListResponse getLinkingAssets(String userId, String startAssetGUID, String endAssetGUID) throws InvalidParameterException, PropertyServerException
Returns a sub-graph of intermediate assets that connected two assets- Specified by:
getLinkingAssetsin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userstartAssetGUID- the starting asset identifier of the queryendAssetGUID- the ending asset identifier of the query- Returns:
- a list of assets between the given assets
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getLinkingRelationships
public RelationshipListResponse getLinkingRelationships(String userId, String startAssetGUID, String endAssetGUID) throws InvalidParameterException, PropertyServerException
Return a sub-graph of relationships that connect two assets- Specified by:
getLinkingRelationshipsin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userstartAssetGUID- the starting asset identifier of the queryendAssetGUID- the ending asset identifier of the query- Returns:
- a list of relationships that connects the assets
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getAssetsFromNeighborhood
public AssetCatalogListResponse getAssetsFromNeighborhood(String userId, String assetGUID, SearchParameters searchParameters) throws InvalidParameterException, PropertyServerException
Returns the sub-graph that represents the list of assets that in neighborhood of the given asset- Specified by:
getAssetsFromNeighborhoodin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userassetGUID- the starting asset identifier of the querysearchParameters- constrains to make the assets's search results more precise- Returns:
- a list of assets that in neighborhood of the given asset
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
searchByType
public AssetListResponse searchByType(String userId, String searchCriteria, SearchParameters searchParameters) throws InvalidParameterException, PropertyServerException
Return a list of assets matching the search criteria without the full context- Specified by:
searchByTypein interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the usersearchCriteria- a string expression of the characteristics of the required assetssearchParameters- constrains to make the assets's search results more precise- Returns:
- list of properties used to narrow the search
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getAssetContext
public AssetResponse getAssetContext(String userId, String assetGUID, String assetType) throws InvalidParameterException, PropertyServerException
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.- Specified by:
getAssetContextin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userassetGUID- the global unique identifier of the assetassetType- the type of the asset- Returns:
- list of properties used to narrow the search
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getRelationshipBetweenEntities
public RelationshipResponse getRelationshipBetweenEntities(String userId, String entity1GUID, String entity2GUID, String relationshipType) throws InvalidParameterException, PropertyServerException
Fetch relationship between entities details based on its unique identifier of the ends Filtering based on the relationship type is supported- Specified by:
getRelationshipBetweenEntitiesin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the userentity1GUID- Entity guid of the first end of the relationshipentity2GUID- Entity guid of the second end of the relationshiprelationshipType- Type of the relationship- Returns:
- relationships between entities
- Throws:
InvalidParameterException- if parameter validation failsPropertyServerException- if a problem occurs while serving the request
-
getSupportedTypes
public AssetCatalogSupportedTypes getSupportedTypes(String userId, String type) throws PropertyServerException, InvalidParameterException
Description copied from interface:AssetCatalogInterfaceReturns the list with supported types for search, including the sub-types supported- Specified by:
getSupportedTypesin interfaceAssetCatalogInterface- Parameters:
userId- the unique identifier for the usertype- the type- Returns:
- list of types and sub-types supported for search
- Throws:
PropertyServerException- if a problem occurs while serving the requestInvalidParameterException- if parameter validation fails
-
-