// create the event object
Event event = new Event(jCas);
event.setConfidence(1.0f);
// create the event mention
EventMention eventMention = new EventMention(jCas, neMention.getBegin(), neMention.getEnd());
eventMention.setConfidence(1.0f);
// add the links between event, mention and properties
// event.setProperties(eventProperties);
// event.setMentions(neMention.getOntologyConceptArr());
eventMention.setEvent(event);
eventMention.setOntologyConceptArr(neMention.getOntologyConceptArr());
// add the annotations to the indexes
// eventProperties.addToIndexes();
event.addToIndexes();
eventMention.addToIndexes();
}
//add predicates
for (Predicate predicate : JCasUtil.select(jCas, Predicate.class)) {
// create the event object
Event event = new Event(jCas);
event.setConfidence(1.0f);
// create the event mention
EventMention eventMention = new EventMention(jCas, predicate.getBegin(), predicate.getEnd());
eventMention.setConfidence(1.0f);
// add the links between event, mention and properties
// event.setProperties(eventProperties);
// event.setMentions(neMention.getOntologyConceptArr());
eventMention.setEvent(event);
// add the annotations to the indexes
// eventProperties.addToIndexes();
event.addToIndexes();
eventMention.addToIndexes();
}
}