private Collection<IndexedInstance> getInstancesForVertex(Map<String, AttributeValueMap> map, AtlasVertex foundVertex) {

        //loop through the unique attributes.  For each attribute, check to see if the vertex property that
        //corresponds to that attribute has a value from one or more of the instances that were passed in.

        for(Map.Entry<String, AttributeValueMap> entry : map.entrySet()) {

            String propertyName = entry.getKey();
            AttributeValueMap valueMap = entry.getValue();

            Object vertexValue = foundVertex.getProperty(propertyName, Object.class);

            Collection<IndexedInstance> instances = valueMap.get(vertexValue);
            if(instances != null && instances.size() > 0) {
                //return first match.  Let the underling graph determine if this is a problem
                //(i.e. if the other unique attributes change be changed safely to match what
                //the user requested).
                return instances;
            }
            //try another attribute
        }
        return Collections.emptyList();
    }
private Collection < IndexedInstance > getInstancesForVertex ( Map < String , AttributeValueMap > map , AtlasVertex foundVertex ) { for ( Map . Entry < String , AttributeValueMap > entry : map . entrySet ( ) ) { String propertyName = entry . getKey ( ) ; AttributeValueMap valueMap = entry . getValue ( ) ; Object vertexValue = foundVertex . getProperty ( propertyName , Object . class ) ; Collection < IndexedInstance > instances = valueMap . get ( vertexValue ) ; if ( instances != null && instances . size ( ) > 0 ) { return instances ; } } return Collections . emptyList ( ) ; }
finds the instance(s) that correspond to the given vertex