if (!result.isEmpty())
filteredEntityCandidates.put(entry.getKey(), result);
}
for(SurfaceFormOccurrence sfOcc : filteredEntityCandidates.keySet()) {
Spot spot = Spot.getInstance(sfOcc);
List<Resource> resources = new LinkedList<Resource>();
for(DBpediaResourceOccurrence occ : filteredEntityCandidates.get(sfOcc)) {
Resource resource = Resource.getInstance(occ);
resources.add(resource);
}
spot.setResources(resources);
spots.add(spot);
}
annotation.setSpots(spots);
return annotation;
}