Finds all direct (one-degree) relationships for an entity regardless of path strength. The entity is identified by its entity ID or by the external ID of one of its constituent identity records. The UMF API equivalent of the getDirectEntityRelationships method are the SOA_DIRECT_ENTITY_RELATIONSHIPS_REQUEST input document and the SOA_DIRECT_ENTITY_RELATIONSHIPS_RESPONSE output document.
getDirectEntityRelationships ( entityIdentifier, 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.”); }
Example request 2
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) |