if (uimaObject.getType().toString().equals("uima.tcas.DocumentAnnotation")) {
continue;
}
// Get persistent URI for region in document
Annotation annot = (Annotation) uimaObject;
log.info("annotation index " + annotCnt);
annotIndex.put(annot, annotCnt);
annotCnt++;
}
}
UriRef annotationSetUri = new UriRef(
new StringBuilder(AO.AnnotationSet.getUnicodeString()).toString());
log.info("AO: Annotation set uri " + annotationSetUri);
GraphNode annotationSet = new GraphNode(annotationSetUri, node.getGraph());
log.info(new StringBuilder("AO: Set created ").toString());
annotationSet.addProperty(new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
AO.AnnotationSet);
for (FeatureStructure uimaObject : UIMAUtils.getAllFSofType(TOP.type, cas.getJCas())) {
// set Annotation specific properties for the node
if (uimaObject instanceof Annotation) {
// If type is DocumentAnnotation I skip it
if (uimaObject.getType().toString().equals("uima.tcas.DocumentAnnotation")) {
continue;
}
// Get persistent URI for region in document
Annotation annot = (Annotation) uimaObject;
UriRef selectorUri = selectorRegistry.get(annot.getBegin(), annot.getEnd());
// Annotation URI
int annotId = annotIndex.get((Annotation) uimaObject);
UriRef annotationUri = new UriRef(new StringBuilder(AO.Annotation.getUnicodeString())
.append("/").append(annotId).toString());