annotationsByType.put(AnnotationType.CONCEPT, i2b2ConceptList);
}
for (ApiConcept currentApiConcept : apiConceptList)
{
ConceptAnnotation c = new ConceptAnnotation();
int beginCharacter = currentApiConcept.getBegin();
int endCharacter = currentApiConcept.getEnd();
// TODO FIX THIS!! Converter won't work with uima code!!!
LineAndTokenPosition beginPosition = convertCharacterOffsetToLineToken(beginCharacter);
LineAndTokenPosition endPosition = convertCharacterOffsetToLineToken(endCharacter);
Location beginLocation = new Location();
beginLocation.setLine(beginPosition.getLine());
beginLocation.setTokenOffset(beginPosition.getTokenOffset());
Location endLocation = new Location();
endLocation.setLine(endPosition.getLine());
endLocation.setTokenOffset(endPosition.getTokenOffset());
c.setAnnotationFileLineNumber(beginPosition.getLine());
c.setBegin(beginLocation);
c.setEnd(endLocation);
c.setConceptText(currentApiConcept.getText());
String conceptType = currentApiConcept.getType();
if (conceptType != null && !conceptType.isEmpty())
{
c.setConceptType(ConceptType.valueOf(conceptType));
} else
{
c.setConceptType(null);
}
c.setEnclosingScopes(null);
allAnnotationList.add(c);
annotationsByType.get(AnnotationType.CONCEPT).add(c);
}
}