[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Fri Dec 7 20:32:29 UTC 2007
gordonp
Fri Dec 7 15:32:29 EST 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv2510/src/main/ca/ucalgary/seahawk/gui
Modified Files:
MobyContentPane.java
Log Message:
Made MOBY data loading registry-aware
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobyContentPane.java,1.14,1.15
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java 2007/12/06 17:24:13 1.14
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java 2007/12/07 20:32:29 1.15
@@ -215,7 +215,14 @@
contentGUI.getTransformer().transform(new StreamSource(url.openStream()),
new StreamResult(stringWriter));
htmlContents = stringWriter.toString();
- htmlContents = HTMLUtils.encapsulateBinaryData(url, htmlContents);
+ // NOTE: If you switch the registry in the middle of using Seahawk,
+ // the following might fail on documents in the history, as they were
+ // encoded according to a different registry than the current value of
+ // SeahawkOptions.getRegistry(). If we really want to support multiple concurrent
+ // registries, there has to be a way to note the source registry for the data in the
+ // document (preferred), or we must maintain a hash of the document:registry mappings
+ // for the session.
+ htmlContents = HTMLUtils.encapsulateBinaryData(url, htmlContents, SeahawkOptions.getRegistry());
}
catch(TransformerException te){
status.setText("Sorry! Could not transform the MOBY data into presentation form");
@@ -935,7 +942,7 @@
// Create the Java MOBY API object based on the linked document DOM fragment
try{
- MobyDataInstance mdi = MobyDataObject.createInstanceFromDOM(mobyObject);
+ MobyDataInstance mdi = MobyDataObject.createInstanceFromDOM(mobyObject, SeahawkOptions.getRegistry());
if(mdi instanceof MobyDataObject){
mobyData = mdi;
}
More information about the MOBY-guts
mailing list