Relationships in WSO2 Governance Registry defines a uni-directional association between two resources or collections, which is classified by a label. A dependency is a special type of association with a label "depends". Relationships defined in WSO2 Governance Registry have semantics similar to that of RDF Triples. By default, there are no rules on what types of associations are created and what resources can be associated with each other. However, if required you can setup validations to ensure that associations are meaningful. This can be achieved by introducing Handlers and Lifecycle Validators.
Creating a Relationship Between Two Resources
A relationship (for example, dependency) can be created between two resources using the following line of code:
Removing a Relationship Between Two Resources
A relationship can be removed between two resources using the following line of code:
Retrieving Relationships From a Resource
Relationships of a resource between two resources can be retrieved using the following line of code:
See also Dependencies and Associations to learn how to manage relationships of a resource in the Governance Registry Management Console.