[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Thu Oct 30 02:33:25 UTC 2008
gordonp
Wed Oct 29 22:33:25 EDT 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory dev.open-bio.org:/tmp/cvs-serv10500/src/main/org/biomoby/client
Modified Files:
CentralCachedCallsImpl.java CentralDigestCachedSimpleImpl.java
CentralDigestImpl.java CentralImpl.java MobyRequest.java
Log Message:
Updates related to SAWSDL wrapping Web Service implementation
moby-live/Java/src/main/org/biomoby/client CentralCachedCallsImpl.java,1.5,1.6 CentralDigestCachedSimpleImpl.java,1.3,1.4 CentralDigestImpl.java,1.13,1.14 CentralImpl.java,1.56,1.57 MobyRequest.java,1.38,1.39
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralCachedCallsImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralCachedCallsImpl.java 2007/12/06 16:39:02 1.5
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralCachedCallsImpl.java 2008/10/30 02:33:25 1.6
@@ -16,7 +16,7 @@
* concurrent calls to the central registry.
*/
-public class CentralCachedCallsImpl extends CentralImpl{
+public class CentralCachedCallsImpl extends CentralDigestCachedImpl{
protected static String CHAR_ENCODING = "UTF-8";
protected static final String SYNTAX_TYPE = "xml";
protected static final long THE_EPOCH = 0; // don't care when the call is made, it shouldn't affect the onto mapping of calls to IDs
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedSimpleImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedSimpleImpl.java 2008/03/03 11:34:17 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedSimpleImpl.java 2008/10/30 02:33:25 1.4
@@ -87,6 +87,9 @@
throws MobyException {
super (endpoint, namespace);
+ if(cacheDir == null){
+ cacheDir = System.getProperty("java.io.tmpdir");
+ }
this.cacheDir = cacheDir;
initCache();
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2007/05/29 03:51:46 1.13
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2008/10/30 02:33:25 1.14
@@ -389,6 +389,8 @@
*
********************************************************************/
public void fireEvent (int type, Object message, Object details) {
+ if (listeners == null)
+ return;
NotificationEvent event = null;
if (details == null)
event = new NotificationEvent (this, type, message);
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2008/07/16 20:33:32 1.56
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2008/10/30 02:33:25 1.57
@@ -115,7 +115,7 @@
protected boolean debug = false;
/** Common central used to if getDefaultCentral() is called */
- protected static Map<String,Central> defaultCentrals = new HashMap<String,Central>();
+ protected static Map<String,CentralImpl> defaultCentrals = new HashMap<String,CentralImpl>();
/** Default location (endpoint) of a Moby registry. */
public static final String DEFAULT_ENDPOINT = "http://moby.ucalgary.ca/moby/MOBY-Central.pl";
@@ -1079,6 +1079,17 @@
return createDataTypeFromXML (result, dataTypeName);
}
+ public MobyDataType[] getDataTypes()
+ throws MobyException, NoSuccessException {
+ Map<String,String> datatypeMap = getDataTypeNames();
+ MobyDataType[] datatypes = new MobyDataType[datatypeMap.size()];
+ int i = 0;
+ for(String dataTypeName: datatypeMap.keySet()){
+ datatypes[i++] = getDataType(dataTypeName);
+ }
+ return datatypes;
+ }
+
protected String getDataTypeAsXML (String dataTypeName)
throws MobyException, NoSuccessException {
@@ -1860,11 +1871,11 @@
*
* @return a CentralImpl using the default Central URI, and currently a class implementing a caching mechanism
*/
- public static Central getDefaultCentral() throws MobyException{
+ public static CentralImpl getDefaultCentral() throws MobyException{
return getDefaultCentral(null);
}
- public static Central getDefaultCentral(Registry reg) throws MobyException{
+ public static CentralImpl getDefaultCentral(Registry reg) throws MobyException{
if(reg == null && defaultCentrals.containsKey("")){
return defaultCentrals.get("");
}
@@ -1876,6 +1887,7 @@
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL resURL = classLoader.getResource("META-INF/"+CENTRAL_IMPL_RESOURCE_NAME);
if(resURL != null){
+ System.err.println("Loading "+resURL);
try{
LineNumberReader reader = new LineNumberReader(new InputStreamReader(resURL.openStream()));
for(String line = reader.readLine(); line != null; line = reader.readLine()){
@@ -1891,9 +1903,10 @@
}
}
try{
+ System.err.println("Central class is "+className);
Class clazz = Class.forName(className);
if(reg == null){ // should use default nullary c-tor
- defaultCentrals.put("", (Central) clazz.newInstance());
+ defaultCentrals.put("", (CentralImpl) clazz.newInstance());
}
else{ // should have (String endpoint, String namespace) c-tor
for(Constructor ctor: clazz.getDeclaredConstructors()){
@@ -1901,7 +1914,7 @@
if(params.length == 2 && params[0].getName().equals("java.lang.String") &&
params[1].getName().equals("java.lang.String") ){
defaultCentrals.put(reg.getEndpoint(),
- (Central) ctor.newInstance(reg.getEndpoint(), reg.getNamespace()));
+ (CentralImpl) ctor.newInstance(reg.getEndpoint(), reg.getNamespace()));
break;
}
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java 2008/09/10 20:04:02 1.38
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java 2008/10/30 02:33:25 1.39
@@ -607,7 +607,8 @@
}
if(node_list == null || node_list.getLength() == 0){
- throw new SOAPException("Could not find a response element in SOAP payload");
+ throw new SOAPException("Could not find a response element in SOAP payload (service " +
+ mobyService.getName() + ")");
}
if(node_list.getLength() > 1){
@@ -930,6 +931,9 @@
if(secondaries.length != 0){
for(MobySecondaryData secondary: secondaries){
if(!secondaryParams.containsKey(secondary.getName())){
+ if(debug){
+ System.err.println("Setting default secondary param value for missing param " + secondary);
+ }
query.put(secondary.getName(), new MobyDataSecondaryInstance(secondary));
}
}
More information about the MOBY-guts
mailing list