[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Mon Apr 26 16:25:36 UTC 2010
gordonp
Mon Apr 26 12:25:36 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util
In directory dev.open-bio.org:/tmp/cvs-serv25523/src/main/ca/ucalgary/seahawk/util
Modified Files:
DataUtils.java
Log Message:
Ensured that moby namepsace is defined for xpath
moby-live/Java/src/main/ca/ucalgary/seahawk/util DataUtils.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util/DataUtils.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util/DataUtils.java 2010/04/16 17:33:26 1.6
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util/DataUtils.java 2010/04/26 16:25:36 1.7
@@ -1044,7 +1044,7 @@
// first arg is url#nameBasedXPath
peerGroupXPath = userData[0].split("#", 2)[1];
contextNode = XPointerResolver.getNodeFromXPointer(doc, userData[1]);
- //System.err.println("Loaded context node " + userData[1] + " as " + contextNode);
+ System.err.println("Loaded context node " + userData[1] + " as " + contextNode);
}
else{
// Fallback is to get all nodes with the same name...
@@ -1082,13 +1082,16 @@
try{
XPath xpath = xPathFactory.newXPath();
if(contextNode != null){
- xpath.setNamespaceContext(new NamespaceContextImpl(contextNode, "d"));
+ NamespaceContextImpl nsContext = new NamespaceContextImpl(contextNode, "d");
+ nsContext.setPrefix(MobyPrefixResolver.MOBY_XML_NAMESPACE, "d");
+ xpath.setNamespaceContext(nsContext);
}
peerElements = (NodeList) xpath.evaluate(peerGroupXPath,
doc,
XPathConstants.NODESET);
} catch(Exception e){
logger.log(Level.SEVERE, "Could not evaluate UserData XPath "+peerGroupXPath, e);
+ return null;
}
//System.err.println("Got " + peerElements.getLength() + " peers for " + peerGroupXPath);
More information about the MOBY-guts
mailing list