git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1725 parse atomSpec with submodel; debug output removed
[jalview.git]
/
src
/
jalview
/
analysis
/
Finder.java
diff --git
a/src/jalview/analysis/Finder.java
b/src/jalview/analysis/Finder.java
index
96151d7
..
875322b
100644
(file)
--- a/
src/jalview/analysis/Finder.java
+++ b/
src/jalview/analysis/Finder.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-20,9
+20,12
@@
*/
package jalview.analysis;
*/
package jalview.analysis;
-import java.util.*;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.*;
+import java.util.Vector;
public class Finder
{
public class Finder
{
@@
-39,6
+42,8
@@
public class Finder
boolean caseSensitive = false;
boolean caseSensitive = false;
+ private boolean includeDescription = false;
+
boolean findAll = false;
com.stevesoft.pat.Regex regex = null;
boolean findAll = false;
com.stevesoft.pat.Regex regex = null;
@@
-146,6
+151,19
@@
public class Finder
break;
}
}
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;
+ }
+ }
}
item = seq.getSequenceAsString();
}
item = seq.getSequenceAsString();
@@
-188,7
+206,7
@@
public class Finder
{
continue;
}
{
continue;
}
-
+// if invalid string used, then regex has no matched to/from
int sres = seq
.findPosition(resIndex
+ Integer.parseInt(spaces.elementAt(resIndex)
int sres = seq
.findPosition(resIndex
+ Integer.parseInt(spaces.elementAt(resIndex)
@@
-358,4
+376,14
@@
public class Finder
{
this.seqIndex = seqIndex;
}
{
this.seqIndex = seqIndex;
}
+
+ public boolean isIncludeDescription()
+ {
+ return includeDescription;
+ }
+
+ public void setIncludeDescription(boolean includeDescription)
+ {
+ this.includeDescription = includeDescription;
+ }
}
}