API relationship - RapturePlatform/Rapture GitHub Wiki

Relationship API

The Relationship API contains low-level methods for making connections between data and metadata. It can be used to track provenance, model association, or to impose a secondary organization of data.

createRelationshipRepo

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
void retVal = relationshipApi.createRelationshipRepo(relationshipRepoURI, config);
retVal = baseAPI.doRelationship_CreateRelationshipRepo(relationshipRepoURI, config);

Entitlement: /relationship/admin

Creates a repository in which to store relationship information.

Function Parameters

Parameter Type Description
relationshipRepoURI String
config String

Return value

Type Description
void

getRelationshipRepoConfig

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
RelationshipRepoConfig retVal = relationshipApi.getRelationshipRepoConfig(blobRepoURI);
retVal = baseAPI.doRelationship_GetRelationshipRepoConfig(blobRepoURI);

Entitlement: /repo/read

Retrieves blob repository information

Function Parameters

Parameter Type Description
blobRepoURI String

Return value

Type Description
RelationshipRepoConfig
Types used in this function

RelationshipRepoConfig

Config information for a repository for relationships.

Field Type
description String
config String
authority String

getAllRelationshipRepoConfigs

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
List<RelationshipRepoConfig> retVal = relationshipApi.getAllRelationshipRepoConfigs();
retVal = baseAPI.doRelationship_GetAllRelationshipRepoConfigs();

Entitlement: /repo/read

Retrieves relationship repository configurations.

Function Parameters

This function takes no parameters.

Return value

Type Description
List

deleteRelationshipRepo

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
void retVal = relationshipApi.deleteRelationshipRepo(repoURI);
retVal = baseAPI.doRelationship_DeleteRelationshipRepo(repoURI);

Entitlement: /repo/write

This method removes a Relationship Repository and its data from the Rapture system. There is no undo.

Function Parameters

Parameter Type Description
repoURI String

Return value

Type Description
void

doesRelationshipRepoExist

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
boolean retVal = relationshipApi.doesRelationshipRepoExist(repoURI);
retVal = baseAPI.doRelationship_DoesRelationshipRepoExist(repoURI);

Entitlement: /repo/list

This api call can be used to determine whether a given repo exists.

Function Parameters

Parameter Type Description
repoURI String

Return value

Type Description
boolean

doesRelationshipExist

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
boolean retVal = relationshipApi.doesRelationshipExist(relationshipURI);
retVal = baseAPI.doRelationship_DoesRelationshipExist(relationshipURI);

Entitlement: /repo/list

This API call can be used to determine whether a given relationship type exists in a given authority.

Function Parameters

Parameter Type Description
relationshipURI String

Return value

Type Description
boolean

createRelationship

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
String retVal = relationshipApi.createRelationship(relationshipAuthorityURI, fromURI, toURI, label, properties);
retVal = baseAPI.doRelationship_CreateRelationship(relationshipAuthorityURI, fromURI, toURI, label, properties);

Entitlement: /relationship/admin

Stores a relationship link and returns its URI.

Function Parameters

Parameter Type Description
relationshipAuthorityURI String
fromURI String
toURI String
label String
properties Map<String,String>

Return value

Type Description
String

getRelationship

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
RaptureRelationship retVal = relationshipApi.getRelationship(relationshipURI);
retVal = baseAPI.doRelationship_GetRelationship(relationshipURI);

Entitlement: /relationship/admin

Retrieves a relationship link.

Function Parameters

Parameter Type Description
relationshipURI String

Return value

Type Description
RaptureRelationship
Types used in this function

RaptureRelationship

The main object in the Relationship API.

Field Type
fromURI RaptureURI
toURI RaptureURI
label String
createDateUTC Long
user String
properties Map(String,String)
uri RaptureURI
uuid UUID

deleteRelationship

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
void retVal = relationshipApi.deleteRelationship(relationshipURI);
retVal = baseAPI.doRelationship_DeleteRelationship(relationshipURI);

Entitlement: /relationship/admin

Deletes a relationship link.

Function Parameters

Parameter Type Description
relationshipURI String

Return value

Type Description
void

getOutboundRelationships

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
List<RaptureRelationship> retVal = relationshipApi.getOutboundRelationships(relationshipRepoURI, fromURI);
retVal = baseAPI.doRelationship_GetOutboundRelationships(relationshipRepoURI, fromURI);

Entitlement: /relationship/admin

Gets all the relationship links with the specified Rapture resource as the "from" half of the link.

Function Parameters

Parameter Type Description
relationshipRepoURI String
fromURI String

Return value

Type Description
List

getInboundRelationships

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
List<RaptureRelationship> retVal = relationshipApi.getInboundRelationships(relationshipRepoURI, toURI);
retVal = baseAPI.doRelationship_GetInboundRelationships(relationshipRepoURI, toURI);

Entitlement: /relationship/admin

Gets all the relationship links with the specified Rapture resource as the "to" half of the link.

Function Parameters

Parameter Type Description
relationshipRepoURI String
toURI String

Return value

Type Description
List

getLabledRelationships

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
List<RaptureRelationship> retVal = relationshipApi.getLabledRelationships(relationshipRepoURI, relationshipLabel);
retVal = baseAPI.doRelationship_GetLabledRelationships(relationshipRepoURI, relationshipLabel);

Entitlement: /relationship/admin

Gets all the relationship links with the specified label.

Function Parameters

Parameter Type Description
relationshipRepoURI String
relationshipLabel String

Return value

Type Description
List

getChildren

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
List<RaptureFolderInfo> retVal = relationshipApi.getChildren(prefix);
retVal = baseAPI.doRelationship_GetChildren(prefix);

Entitlement: /relationship/admin

Get children (nodes) in a relationship store. Relationship stores are only one level deep, so this API exists only to provide a consistent API as other repository types. This method is not useful except when making generic repository browsers.

Function Parameters

Parameter Type Description
prefix String

Return value

Type Description
List

getAllChildrenMap

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
Map<String,RaptureFolderInfo> retVal = relationshipApi.getAllChildrenMap(prefix);
retVal = baseAPI.doRelationship_GetAllChildrenMap(prefix);

Entitlement: /relationship/admin

Return full pathnames for an entire subtree as a map of path to RFI

Function Parameters

Parameter Type Description
prefix String

Return value

Type Description
Map<String,RaptureFolderInfo>

getRelationshipCenteredOn

HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
RaptureRelationshipRegion retVal = relationshipApi.getRelationshipCenteredOn(relationshipNodeURI, options);
retVal = baseAPI.doRelationship_GetRelationshipCenteredOn(relationshipNodeURI, options);

Entitlement: /relationship/admin

Gets relationships from a given node.

Function Parameters

Parameter Type Description
relationshipNodeURI String
options Map<String,String>

Return value

Type Description
RaptureRelationshipRegion
Types used in this function

RaptureRelationshipRegion

Describes a cluster of relationship nodes with an arbitrary central node.

Field Type
centerNode RaptureURI
depth Long
nodes List
relationships List
⚠️ **GitHub.com Fallback** ⚠️