public class InstanceGraph extends InstanceElementHeader
| Constructor and Description |
|---|
InstanceGraph()
Default constructor
|
InstanceGraph(InstanceGraph templateGraph)
Copy/clone constructor.
|
InstanceGraph(List<EntityDetail> entities,
List<Relationship> relationships)
Typical Constructor creates a graph with the supplied list of elements.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object objectToCompare)
Validate that an object is equal depending on their stored values.
|
List<EntityDetail> |
getEntities()
Return the list of all of the entities (vertices/nodes) in the instance graph.
|
List<Relationship> |
getRelationships()
Return the list of all relationships (edges/links) in the instance graph.
|
int |
hashCode()
Return a hash code based on the values of this object.
|
int |
returnEntityElementCount()
Return the number of entities in the graph.
|
EntityDetail |
returnLinkedEntity(String anchorEntityGUID,
String linkingRelationshipGUID)
Return the entity connected at the far end of an entity's relationship.
|
int |
returnRelationshipElementCount()
Return the number of relationships in the graph.
|
List<Relationship> |
returnRelationshipsForEntity(String anchorEntityGUID)
Return a list of relationships that are connected to a specific entity.
|
void |
setEntities(List<EntityDetail> entityElementList)
Set up the list of entities for this instance graph.
|
void |
setRelationships(List<Relationship> relationshipElementList)
Set up the list of relationships in this instance graph.
|
String |
toString()
Standard toString method.
|
public InstanceGraph()
public InstanceGraph(List<EntityDetail> entities, List<Relationship> relationships)
entities - list of entity elements to add to the listrelationships - list of relationship elements to add to the listpublic InstanceGraph(InstanceGraph templateGraph)
templateGraph - graph to copy; null to create an empty graphpublic List<EntityDetail> getEntities()
public void setEntities(List<EntityDetail> entityElementList)
entityElementList - list of entitiespublic List<Relationship> getRelationships()
public void setRelationships(List<Relationship> relationshipElementList)
relationshipElementList - list of relationshipspublic List<Relationship> returnRelationshipsForEntity(String anchorEntityGUID)
anchorEntityGUID - unique identifier for an entitypublic EntityDetail returnLinkedEntity(String anchorEntityGUID, String linkingRelationshipGUID)
anchorEntityGUID - unique id for the known entity.linkingRelationshipGUID - the relationship to traverse.public int returnEntityElementCount()
public int returnRelationshipElementCount()
public String toString()
public boolean equals(Object objectToCompare)
Copyright © 2018–2020 ODPi. All rights reserved.