int neBegin = -1;
int neEnd = -1;
Collection validCodeCol = new HashSet();
while (lhAtOffsetItr.hasNext())
{
LookupHit lh = (LookupHit) lhAtOffsetItr.next();
neBegin = lh.getStartOffset();
neEnd = lh.getEndOffset();
String text = jcas.getDocumentText().substring(
lh.getStartOffset(),
lh.getEndOffset());
text = text.trim().toLowerCase();
MetaDataHit mdh = lh.getDictMetaDataHit();
String code = mdh.getMetaFieldValue(iv_props.getProperty(CODE_MF_PRP_KEY));
if (isValid("trade_name", text) || isValid("ingredient", text))
{
validCodeCol.add(code);