}
}
else if (elementType == DrugChangeStatusAnnotation.type) {
while (neItr.hasNext()) {
DrugChangeStatusAnnotation nea = (DrugChangeStatusAnnotation) neItr.next();
lastLocation[0] = nea.getBegin();
lastLocation[1] = nea.getEnd();
if (nea.getBegin()>=begin && nea.getEnd() <= end && (counter == 0 || (counter> 0 && lastLocation[0] != location[counter - 1][0]))) {
location[counter][0]= lastLocation[0];
location[counter][1]= lastLocation[1];
counter++;
}
}
} else if (elementType == MedicationEventMention.type) {
while (neItr.hasNext()) {
MedicationEventMention nea = (MedicationEventMention) neItr.next();
if(nea.getTypeID()==1 || nea.getTypeID()==0) {
lastLocation[0]= nea.getBegin();
lastLocation[1] = nea.getEnd();
if ((counter == 0 || lastLocation[0] != location[counter-1][0]) && (nea.getBegin()>=begin && nea.getEnd() <= end)) {
location[counter][0]= lastLocation[0];
location[counter][1]= lastLocation[1];
counter++;
}
}
}
} else if (elementType == PunctuationToken.type) {
while (neItr.hasNext()) {
boolean foundPair = false;
PunctuationToken nea = (PunctuationToken) neItr.next();
if (nea.getCoveredText().compareTo("(")==0)
lastLocation[0] = nea.getBegin();
else if (nea.getCoveredText().compareTo(")")==0) {
lastLocation[1] = nea.getEnd();
foundPair = true;
}
if (nea.getBegin()>=begin && nea.getEnd() <= end && foundPair && (counter == 0 || (counter> 0 && lastLocation[0] != location[counter - 1][0]))) {
location[counter][0]= lastLocation[0];
location[counter][1]= lastLocation[1];
counter++;
}
}