class DataModelHelper {

    public Boolean isAssignableFrom(String offspringCandidate, String parentCandidate) {
        if (offspringCandidate == null || offspringCandidate.length() == 0 ||
            parentCandidate == null || parentCandidate.length() == 0 ||
            offspringCandidate.equals(parentCandidate)) return false;

        Set<String> candidatesOffspring = offspringMap.get(offspringCandidate);
        boolean candidateHasOffspring = candidatesOffspring != null && candidatesOffspring.size() > 0;

        if (candidateHasOffspring) {
            if (candidatesOffspring.contains(parentCandidate)) return false;
            for (String newOffspringCandidate : candidatesOffspring) {
                if (!isAssignableFrom(newOffspringCandidate, parentCandidate)) return false;
            }
        }

        return true;
    }

    public  DataModelHelper( String contextId );

}