Class GlossaryAuthorViewGraphClient
- java.lang.Object
-
- org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.graph.GlossaryAuthorViewGraphClient
-
- All Implemented Interfaces:
ResponseParameterization<Graph>,GlossaryAuthorViewGraph
public class GlossaryAuthorViewGraphClient extends Object implements GlossaryAuthorViewGraph, ResponseParameterization<Graph>
The class acts as a wrapper class for calling the REST services for Glossary Author Graph related services.
-
-
Field Summary
Fields Modifier and Type Field Description protected GlossaryAuthorViewRestClientclient
-
Constructor Summary
Constructors Constructor Description GlossaryAuthorViewGraphClient(GlossaryAuthorViewRestClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Graphcreate(String userId, Graph graph)Create a Graph.QueryBuildercreateGraphQuery(NeighborhoodHistoricalFindRequest request)voiddelete(String userId, String guid)Delete a Graph.List<Graph>find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase)Find graphsList<Graph>findAll(String userId)Find CategoryGraphgetByGUID(String userId, String guid)Get a Graph.List<Category>getCategories(String userId, String graphGuid, FindRequest findRequest)Find Category for a graphList<Category>getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase)Extract children within a CategoryOMAGServerConfiggetConfig(String userId)Get config for serverViewServiceConfiggetGlossaryAuthViewServiceConfig(String userId)Get service config for a particular view ServiceGraphgetGraph(String userId, String guid, Date asOfTime, Set<NodeType> nodeFilter, Set<RelationshipType> relationshipFilter, StatusFilter statusFilter)Get graph for a particular node guidGraphStatisticsgetGraphStatistics(String userId, String guid, Date asOfTime, Set<NodeType> nodeFilter, Set<RelationshipType> relationshipFilter, StatusFilter statusFilter)Get graphStats for a particular guidprotected StringgetMethodInfo(String methodName)List<ViewServiceConfig>getViewServiceConfigs(String userId)Get list of view service config on the serverClass<? extends GenericResponse>responseType()Graphrestore(String userId, String guid)Restore a soft-deleted Graph.Graphupdate(String userId, String guid, Graph graph, boolean isReplace)Update a Graph.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization
getParameterizedType, resultType
-
-
-
-
Field Detail
-
client
protected final GlossaryAuthorViewRestClient client
-
-
Constructor Detail
-
GlossaryAuthorViewGraphClient
public GlossaryAuthorViewGraphClient(GlossaryAuthorViewRestClient client)
-
-
Method Detail
-
create
public Graph create(String userId, Graph graph) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphCreate a Graph.The result is the Graph object
- Specified by:
createin interfaceGlossaryAuthorViewGraph- Parameters:
userId- userId under which the request is performedgraph- Graph object to be created- Returns:
- The Graph
- Throws:
PropertyServerException- something went wrong with the REST call stack.InvalidParameterException- one of the parameters is null or invalidUserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
update
public Graph update(String userId, String guid, Graph graph, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphUpdate a Graph.The result is the updated Glossary object
- Specified by:
updatein interfaceGlossaryAuthorViewGraph- Parameters:
userId- userId under which the request is performedguid- guid of Glossary object to be updatedgraph- Glossary object with updated valuesisReplace- If the object is to be replaced- Returns:
- The updated Graph
- Throws:
PropertyServerException- something went wrong with the REST call stack.InvalidParameterException- one of the parameters is null or invalidUserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
delete
public void delete(String userId, String guid) throws PropertyServerException
Description copied from interface:GlossaryAuthorViewGraphDelete a Graph.The result Void object
- Specified by:
deletein interfaceGlossaryAuthorViewGraph- Parameters:
userId- userId under which the request is performedguid- guid of Graph object to be retrieved- Throws:
PropertyServerException- something went wrong with the REST call stack.
-
restore
public Graph restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphRestore a soft-deleted Graph.The result is the restored Graph object
- Specified by:
restorein interfaceGlossaryAuthorViewGraph- Parameters:
userId- userId under which the request is performedguid- guid of Graph object to be restored- Returns:
- The restored Graph
- Throws:
PropertyServerException- something went wrong with the REST call stack.InvalidParameterException- one of the parameters is null or invalidUserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getCategoryChildren
public List<Category> getCategoryChildren(String userId, String parentGuid, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphExtract children within a Category- Specified by:
getCategoryChildrenin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling userparentGuid- Category GUIDfindRequest- information object for find calls. This include pageSize to limit the number of elements returned.exactValue- exactValue - when false values with trailing characters will match.ignoreCase- ignore the case when matching.- Returns:
- list of Categories
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
findAll
public List<Graph> findAll(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphFind Category- Specified by:
findAllin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling user- Returns:
- Categories belonging to Userid
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getByGUID
public Graph getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphGet a Graph.The result is the requested Graph object
- Specified by:
getByGUIDin interfaceGlossaryAuthorViewGraph- Parameters:
userId- userId under which the request is performedguid- guid of Graph object to be retrieved- Returns:
- The requested Graph
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
find
public List<Graph> find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphFind graphs- Specified by:
findin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling userfindRequest- information object for find calls. This include pageSize to limit the number of elements returned.exactValue- exactValue - when false values with trailing characters will match.ignoreCase- ignore the case when matching.- Returns:
- list of Categories
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getCategories
public List<Category> getCategories(String userId, String graphGuid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphFind Category for a graph- Specified by:
getCategoriesin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling usergraphGuid- graph idfindRequest- nformation object for find calls. This include pageSize to limit the number of elements returned.- Returns:
- Categories belonging to graph
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getConfig
public OMAGServerConfig getConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphGet config for server- Specified by:
getConfigin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling user- Returns:
- Config for view server
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getGlossaryAuthViewServiceConfig
public ViewServiceConfig getGlossaryAuthViewServiceConfig(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphGet service config for a particular view Service- Specified by:
getGlossaryAuthViewServiceConfigin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling user- Returns:
- Config for view server
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getGraphStatistics
public GraphStatistics getGraphStatistics(String userId, String guid, Date asOfTime, Set<NodeType> nodeFilter, Set<RelationshipType> relationshipFilter, StatusFilter statusFilter) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphGet graphStats for a particular guid- Specified by:
getGraphStatisticsin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling userguid- Guid for a node.asOfTime- Requests a historical query of the relationships for the entity. Null means return the present values.nodeFilter- Set of node names to include in the query results. Null means include all entities found, irrespective of their type.relationshipFilter- Set of relationship names to include in the query results. Null means include all relationships found, irrespective of their type.statusFilter- By default only active instances are returned. Specify ALL to see all instance in any status.- Returns:
- A graph statistics of nodeTypes.
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getGraph
public Graph getGraph(String userId, String guid, Date asOfTime, Set<NodeType> nodeFilter, Set<RelationshipType> relationshipFilter, StatusFilter statusFilter) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphGet graph for a particular node guid- Specified by:
getGraphin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling userguid- the starting point of the query.asOfTime- Requests a historical query of the relationships for the entity. Null means return the present values.nodeFilter- Set of node names to include in the query results. Null means include all entities found, irrespective of their type.relationshipFilter- Set of relationship names to include in the query results. Null means include all relationships found, irrespective of their type.statusFilter- By default only active instances are returned. Specify ALL to see all instance in any status.- Returns:
- A graph of nodeTypes.
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
createGraphQuery
public QueryBuilder createGraphQuery(NeighborhoodHistoricalFindRequest request)
-
getViewServiceConfigs
public List<ViewServiceConfig> getViewServiceConfigs(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGraphGet list of view service config on the server- Specified by:
getViewServiceConfigsin interfaceGlossaryAuthorViewGraph- Parameters:
userId- calling user- Returns:
- Config for view server
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
responseType
public Class<? extends GenericResponse> responseType()
- Specified by:
responseTypein interfaceResponseParameterization<Graph>
-
-