Search in sources :

Example 1 with GraphInventorySingleResourceUri

use of org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri in project so by onap.

the class GraphInventoryTransactionClient method connect.

/**
 * Adds a relationship between two objects in A&AI
 *
 * @param uriA
 * @param uriB
 * @return
 */
public Self connect(SingleUri uriA, SingleUri uriB) {
    GraphInventorySingleResourceUri uriAClone = uriA.clone();
    this.put(uriAClone.relationshipAPI().build().toString(), this.buildRelationship(uriB));
    incrementActionAmount();
    return (Self) this;
}
Also used : GraphInventorySingleResourceUri(org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri)

Example 2 with GraphInventorySingleResourceUri

use of org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri in project so by onap.

the class GraphInventoryTransactionClient method connect.

/**
 * relationship between multiple objects in A&AI - connects A to all objects specified in list
 *
 * @param uriA
 * @param uris
 * @return
 */
public Self connect(SingleUri uriA, SingleUri uriB, EdgeLabel label) {
    GraphInventorySingleResourceUri uriAClone = uriA.clone();
    this.put(uriAClone.relationshipAPI().build().toString(), this.buildRelationship(uriB, label));
    return (Self) this;
}
Also used : GraphInventorySingleResourceUri(org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri)

Example 3 with GraphInventorySingleResourceUri

use of org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri in project so by onap.

the class GraphInventoryTransactionClient method disconnect.

/**
 * Removes relationship from two objects in A&AI
 *
 * @param uriA
 * @param uriB
 * @return
 */
public Self disconnect(SingleUri uriA, SingleUri uriB) {
    GraphInventorySingleResourceUri uriAClone = uriA.clone();
    this.delete(uriAClone.relationshipAPI().build().toString(), this.buildRelationship(uriB));
    incrementActionAmount();
    return (Self) this;
}
Also used : GraphInventorySingleResourceUri(org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri)

Aggregations

GraphInventorySingleResourceUri (org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri)3