Given two entities individually identified by entity ID or by the external ID and data source code of a composite identity, this service requests and returns the details of the best relationship between the two entities, if they relate at all. If the two entities are the same then the return value indicates this with the number of degrees of the relationship being equal to zero. The UMF API equivalent of the getRelationshipBetweenEntities method are the SOA_RELATIONSHIP_BETWEEN_ENTITIES_REQUEST input document and the SOA_RELATIONSHIP_BETWEEN_ENTITIES_RESPONSE output document.
getRelationshipBetweenEntities ( fromEntityIdentifier, toEntityIdentifier, depth );
EntityID entityID1 = new EntityID(); entityID1.setEntityID(123456789); EntityID entityID2 = new EntityID(); entityID2.setEntityID(111222333); RelationshipPath relPath = provider.getRelationshipBetweenEntities(entityID1, entityID2, DepthSetting.STANDARD, null); if (relPath == null) { throw new Exception(“No relationship exists.”); } float strength = relPath.getPathStrength(); int degrees = relPath.getDegreesOfSeparation(); System.out.println(“Related at “ + degrees + “ degrees with “ + strength + “ strength.”); Relationship[] relationships = relPath.getRelationships(); if (relationships != null) { for (int index = 0; index < relationship.length; index++) { Relationship rel = relationships[index]; System.out.println(“FROM ” + rel.getFromEntityID() + ” – TO ” + rel.getToEntityID()); } } ExternalID extID1 = new ExternalID(); extID1.setExternalID(”1223334444”); extID1.setDataSourceCode(”EMPLOYEE_DB”); ExternalID extID2 = new ExternalID(); extID2.setExternalID(”5667778888”); extID2.setDataSourceCode(”EMPLOYEE_DB”); RelationshipPath relPath = provider.getRelationshipBetweenEntities(extID1, extID2, DepthSetting.STANDARD, null); if (relPath == null) { throw new Exception(“No relationship exists.”); } float strength = relPath.getPathStrength(); int degrees = relPath.getDegreesOfSeparation(); System.out.println(“Entity 1: “ + relPath.getFromEntityID()); System.out.println(“Entity 2: “ + relPath.getToEntityID()); System.out.println(“Related at “ + degrees + “ degrees with “ + strength + “ strength.”); Relationship[] relationships = relPath.getRelationships(); if (relationships != null) { for (int index = 0; index < relationship.length; index++) { Relationship rel = relationships[index]; System.out.println(“FROM ” + rel.getFromEntityID() + ” – TO ” + rel.getToEntityID()); } }
Field (SOAP & JSON) | UMF tags | Availability |
---|---|---|
fromEntityID | <REL_PATH> <FROM_ENTITY_ID> |
Provided |
toEntityID | <REL_PATH> <TO_ENTITY_ID> |
Provided |
pathStrength | <REL_PATH> <PATH_STRENGTH> |
Provided |
degreesOfSeparation | <REL_PATH> <SEP_DEGREES> |
Provided |
relationships | <REL_PATH> <RELATIONSHIP> |
Not provided |
Field (SOAP & JSON) | UMF tags | Availability |
---|---|---|
relationships | <REL_PATH> <RELATIONSHIP> |
Provided |
relationships[n] |
<REL_PATH> <RELATIONSHIP> <FROM_ENTITY_ID> |
Provided |
relationshipPath. |
<REL_PATH> <RELATIONSHIP> <TO_ENTITY_ID> |
Provided |
relationships[n]. |
<REL_PATH> <SEP_DEGREES><REL_PATH> <RELATIONSHIP> <ER> |
Not Provided |
Field (SOAP & JSON) | UMF tags | Availability |
---|---|---|
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> |
Provided |
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> <REL_CONF> |
Provided |
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> <LIKE_CONF> |
Provided |
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> <ER_ID> |
Provided |
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> <ER_RULE_ID> |
Provided |
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> <ER_RULE_DESC> |
Provided |
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> <DISCLOSED_REL/> <NAME/> <ADDRESS/> <NUMBER/> <ATTRIBUTE/> <EMAIL/> |
Not provided |
Field (SOAP & JSON) | UMF tags | Availability |
---|---|---|
relationships[n]. |
<REL_PATH> <RELATIONSHIP> <ER> <DISCLOSED_REL/> <NAME/> <ADDRESS/> <NUMBER/> <ATTRIBUTE/> <EMAIL/> |
Fully provided (including children) |