class InMemoryEntityNeighbourhood {

    InstanceGraph createInstanceGraph() throws TypeErrorException
    {
        Set<String> entities = new HashSet<>();
        Set<String> visitedEntities = new HashSet<>();
        Set<String> visitedRelationships = new HashSet<>();
        entities.add(rootEntityGUID);
        this.createGraph(entities, visitedEntities, visitedRelationships, 0);
        List<EntityDetail> entityList = new ArrayList<>();
        /*
         * add the root entity so the returned graph is consistent.
         */
        List<Relationship> relationshipList = new ArrayList<>();
        EntityDetail rootEntity = (entityStore.get(rootEntityGUID));
        entityList.add(rootEntity);
        for (String entityGuid : this.graphEntities)
        {
            if (!entityGuid.equals(rootEntityGUID))
            {
                entityList.add(this.entityStore.get(entityGuid));
            }
        }
        for (String relationshipGuid : this.graphRelationships)
        {
            relationshipList.add(this.relationshipStore.get(relationshipGuid));
        }
        return new InstanceGraph(entityList, relationshipList);
    }

      InMemoryEntityNeighbourhood(OMRSRepositoryHelper      repositoryHelper,
                                String                    repositoryName,
                                OMRSRepositoryValidator   repositoryValidator,
                                Map<String, EntityDetail> entityStore,
                                Map<String, Relationship> relationshipStore,
                                String                    rootEntityGUID,
                                List<String>              entityTypeGUIDs,
                                List<String>              relationshipTypeGUIDs,
                                List<InstanceStatus>      limitResultsByStatus,
                                List<String>              limitResultsByClassification,
                                int                       level);

}