@Override public void performAction( Annotation aAnnot, Annotation bAnnot ) { if ( iv_selector == SELECT_A ) { aAnnot.removeFromIndexes(); } else if (iv_selector == SELECT_B) { bAnnot.removeFromIndexes(); } else { aAnnot.removeFromIndexes(); bAnnot.removeFromIndexes(); } } }
public static int[] getAnnotationsExtent(List<? extends Annotation> annotations) { int start = Integer.MAX_VALUE; int end = 0; for (Annotation annotation : annotations) { if (annotation.getBegin() < start) start = annotation.getBegin(); if (annotation.getEnd() > end) end = annotation.getEnd(); } return new int[] { start, end }; } }
/** * Internal - constructor used by generator * * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public DocumentAnnotation(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** Equality expressions to aid in converting between DepNodes and CAS objects */ public static boolean equalCoverage(Annotation annot1,Annotation annot2) { return annot1.getBegin()==annot2.getBegin() && annot1.getEnd()==annot2.getEnd() && annot1.getCoveredText()==annot2.getCoveredText(); } // public static boolean equalCoverage(Annotation annot,UimaDepNode udNode) {
/** * {@inheritDoc} */ @Override public int getEndOffset() { return _jcasAnnotation.getEnd(); }
/** * {@inheritDoc} */ @Override public String getText() { return _jcasAnnotation.getCoveredText(); } }
@Override public Type getType() { return new Annotation(jCas).getType(); } }
/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public DocumentAnnotation(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public DocumentAnnotation(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** * Internal - constructor used by generator * * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public DocumentAnnotation(int addr, TOP_Type type) { super(addr, type); readObject(); }
public static boolean contains(Annotation bigAnnotation, Annotation smallAnnotation) { if (bigAnnotation == null || smallAnnotation == null) return false; if (bigAnnotation.getBegin() <= smallAnnotation.getBegin() && bigAnnotation.getEnd() >= smallAnnotation.getEnd()) return true; else return false; }
public static boolean contains(Annotation bigAnnotation, Annotation smallAnnotation) { if (bigAnnotation == null || smallAnnotation == null) return false; if (bigAnnotation.getBegin() <= smallAnnotation.getBegin() && bigAnnotation.getEnd() >= smallAnnotation.getEnd()) return true; else return false; }