- int res = Integer.parseInt(searchString);
- // possibly a residue number - check if valid for seq
- if (seq.getEnd() >= res)
- {
- searchResults.addResult(seq, res, res);
- hasResults = true;
- // resIndex=seq.getLength();
- // seqIndex++;
- if (!findAll)
- {
- found = true;
- break;
- }
- }
- } catch (NumberFormatException ex)
- {
- }
-
- if (regex.search(seq.getName()))
- {
- idMatch.addElement(seq);
- hasResults = true;
- if (!findAll)
- {
- // stop and return the match
- found = true;
- break;
- }
- }
-
- if (isIncludeDescription() && seq.getDescription() != null
- && regex.search(seq.getDescription()))
- {
- idMatch.addElement(seq);
- hasResults = true;
- if (!findAll)
- {
- // stop and return the match
- found = true;
- break;
- }