public void addExistingAnnotation(Annotation ann, Layer layer, AnnotationType type) { if (isIdentifiableAnnotationType(type)) { String newId = idManager.getNextId(type); ((IdentifiableAnnotation) ann).setId(newId); } annotationContainer.add(ann, layer, type); }