API relationship - RapturePlatform/Rapture GitHub Wiki
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.
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.
| Parameter | Type | Description |
|---|---|---|
| relationshipRepoURI | String | |
| config | String |
| Type | Description |
|---|---|
| void |
HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
RelationshipRepoConfig retVal = relationshipApi.getRelationshipRepoConfig(blobRepoURI);retVal = baseAPI.doRelationship_GetRelationshipRepoConfig(blobRepoURI);Entitlement: /repo/read
Retrieves blob repository information
| Parameter | Type | Description |
|---|---|---|
| blobRepoURI | String |
| Type | Description |
|---|---|
| RelationshipRepoConfig |
Config information for a repository for relationships.
| Field | Type |
|---|---|
| description | String |
| config | String |
| authority | String |
HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
List<RelationshipRepoConfig> retVal = relationshipApi.getAllRelationshipRepoConfigs();retVal = baseAPI.doRelationship_GetAllRelationshipRepoConfigs();Entitlement: /repo/read
Retrieves relationship repository configurations.
This function takes no parameters.
| Type | Description |
|---|---|
| List |
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.
| Parameter | Type | Description |
|---|---|---|
| repoURI | String |
| Type | Description |
|---|---|
| void |
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.
| Parameter | Type | Description |
|---|---|---|
| repoURI | String |
| Type | Description |
|---|---|
| boolean |
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.
| Parameter | Type | Description |
|---|---|---|
| relationshipURI | String |
| Type | Description |
|---|---|
| boolean |
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.
| Parameter | Type | Description |
|---|---|---|
| relationshipAuthorityURI | String | |
| fromURI | String | |
| toURI | String | |
| label | String | |
| properties | Map<String,String> |
| Type | Description |
|---|---|
| String |
HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
RaptureRelationship retVal = relationshipApi.getRelationship(relationshipURI);retVal = baseAPI.doRelationship_GetRelationship(relationshipURI);Entitlement: /relationship/admin
Retrieves a relationship link.
| Parameter | Type | Description |
|---|---|---|
| relationshipURI | String |
| Type | Description |
|---|---|
| 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 |
HttpRelationshipApi relationshipApi = new HttpRelationshipApi(loginApi);
void retVal = relationshipApi.deleteRelationship(relationshipURI);retVal = baseAPI.doRelationship_DeleteRelationship(relationshipURI);Entitlement: /relationship/admin
Deletes a relationship link.
| Parameter | Type | Description |
|---|---|---|
| relationshipURI | String |
| Type | Description |
|---|---|
| void |
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.
| Parameter | Type | Description |
|---|---|---|
| relationshipRepoURI | String | |
| fromURI | String |
| Type | Description |
|---|---|
| List |
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.
| Parameter | Type | Description |
|---|---|---|
| relationshipRepoURI | String | |
| toURI | String |
| Type | Description |
|---|---|
| List |
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.
| Parameter | Type | Description |
|---|---|---|
| relationshipRepoURI | String | |
| relationshipLabel | String |
| Type | Description |
|---|---|
| List |
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.
| Parameter | Type | Description |
|---|---|---|
| prefix | String |
| Type | Description |
|---|---|
| List |
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
| Parameter | Type | Description |
|---|---|---|
| prefix | String |
| Type | Description |
|---|---|
| Map<String,RaptureFolderInfo> |
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.
| Parameter | Type | Description |
|---|---|---|
| relationshipNodeURI | String | |
| options | Map<String,String> |
| Type | Description |
|---|---|
| RaptureRelationshipRegion |
Describes a cluster of relationship nodes with an arbitrary central node.
| Field | Type |
|---|---|
| centerNode | RaptureURI |
| depth | Long |
| nodes | List |
| relationships | List |