[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Thu Feb 3 21:58:48 UTC 2011
gordonp
Thu Feb 3 16:58:47 EST 2011
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util
In directory dev.open-bio.org:/tmp/cvs-serv20870/src/main/ca/ucalgary/seahawk/util
Modified Files:
DataUtils.java
Log Message:
Trim element contents so user filters with leading and trailing regex anchors work nicely
moby-live/Java/src/main/ca/ucalgary/seahawk/util DataUtils.java,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util/DataUtils.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util/DataUtils.java 2010/05/04 16:14:59 1.8
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util/DataUtils.java 2011/02/03 21:58:47 1.9
@@ -947,14 +947,14 @@
Pattern.MULTILINE | Pattern.DOTALL |
(filter.getCaseSensitivity() ? 0 : Pattern.CASE_INSENSITIVE));
for(int i = 0; i < currentSelectedData.getLength(); i++){
- Node node = currentSelectedData.item(i);
+ Node node = currentSelectedData.item(i);
if(node instanceof Element){
String elementXPtr = getXPtr(node);
if(matchingXPtrs.containsKey(elementXPtr) &&
matchingXPtrs.get(elementXPtr).booleanValue()){
continue; // already true, no
}
- else if(regex.matcher(((Element) node).getTextContent()).find()){
+ else if(regex.matcher(((Element) node).getTextContent().trim()).find()){
matchingXPtrs.put(elementXPtr, Boolean.TRUE);
//System.err.println("Adding " + elementXPtr + " as " + matchingXPtrs.get(elementXPtr));
}
@@ -1027,7 +1027,7 @@
* Create a temp file that populates the MobyContentInstance from the sample data
* for all missing fields in peerJobs. This is used to populate a bunch of jobs
* at once, iterating over some list of values popped into the peerJobs payload.
- * Used after service wrapping demo to call new service fopr all demo input peers.
+ * Used after service wrapping demo to call new service for all demo input peers.
*/
public static URL createServiceInputFileForPeers(MobyContentInstance peerJobs, MobyDataJob sampleJob) throws Exception{
for(MobyDataJob peerJob: peerJobs.values()){
More information about the MOBY-guts
mailing list