From groscurt at dev.open-bio.org Mon Jan 5 03:42:18 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:42:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050842.n058gIl1023735@dev.open-bio.org> groscurt Mon Jan 5 03:42:18 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory dev.open-bio.org:/tmp/cvs-serv23700/src/main/org/biomoby/service/generator Modified Files: DataTypesGenerator.java Log Message: templates for HAS(A) float and integer children of data types. moby-live/Java/src/main/org/biomoby/service/generator DataTypesGenerator.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java 2008/03/03 11:34:17 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java 2009/01/05 08:42:18 1.8 @@ -64,9 +64,13 @@ protected static final String TN_METHODS_HAS = "tn04"; protected static final String TN_METHODS_STRING_HAS = "tn041"; protected static final String TN_METHODS_BOOLEAN_HAS = "tn042"; + protected static final String TN_METHODS_INTEGER_HAS = "tn043"; + protected static final String TN_METHODS_FLOAT_HAS = "tn044"; protected static final String TN_METHODS_HASA = "tn05"; protected static final String TN_METHODS_STRING_HASA = "tn051"; protected static final String TN_METHODS_BOOLEAN_HASA = "tn052"; + protected static final String TN_METHODS_INTEGER_HASA = "tn053"; + protected static final String TN_METHODS_FLOAT_HASA = "tn054"; protected static final String TN_TOSTRING_HAS = "tn06"; protected static final String TN_TOSTRING_HASA = "tn07"; protected static final String TN_TOXML_HAS = "tn08"; @@ -117,9 +121,13 @@ tNames.put (TN_METHODS_HAS, new File (dir, "MethodsHASTemplate.java")); tNames.put (TN_METHODS_STRING_HAS, new File (dir, "MethodsHAS_string_Template.java")); tNames.put (TN_METHODS_BOOLEAN_HAS, new File (dir, "MethodsHAS_boolean_Template.java")); + tNames.put( TN_METHODS_INTEGER_HAS, new File(dir, "MethodsHAS_integer_Template.java") ); + tNames.put( TN_METHODS_FLOAT_HAS, new File(dir, "MethodsHAS_float_Template.java") ); tNames.put (TN_METHODS_HASA, new File (dir, "MethodsHASATemplate.java")); tNames.put (TN_METHODS_STRING_HASA, new File (dir, "MethodsHASA_string_Template.java")); tNames.put (TN_METHODS_BOOLEAN_HASA, new File (dir, "MethodsHASA_boolean_Template.java")); + tNames.put (TN_METHODS_INTEGER_HASA, new File (dir, "MethodsHASA_integer_Template.java")); + tNames.put( TN_METHODS_FLOAT_HASA, new File(dir, "MethodsHASA_float_Template.java") ); tNames.put (TN_TOSTRING_HAS, new File (dir, "ToStringHASTemplate.java")); tNames.put (TN_TOSTRING_HASA, new File (dir, "ToStringHASATemplate.java")); tNames.put (TN_TOXML_HAS, new File (dir, "ToXMLHASTemplate.java")); @@ -138,9 +146,13 @@ String methodsHASTemplate; String methodsHASStringTemplate; String methodsHASBooleanTemplate; + String methodsHASIntegerTemplate; + String methodsHASFloatTemplate; String methodsHASATemplate; String methodsHASAStringTemplate; String methodsHASABooleanTemplate; + String methodsHASAIntegerTemplate; + String methodsHASAFloatTemplate; String toStringHASTemplate; String toStringHASATemplate; String toXMLHASTemplate; @@ -188,9 +200,13 @@ methodsHASTemplate = loadTemplate (templates.get (TN_METHODS_HAS)); methodsHASStringTemplate = loadTemplate (templates.get (TN_METHODS_STRING_HAS)); methodsHASBooleanTemplate = loadTemplate (templates.get (TN_METHODS_BOOLEAN_HAS)); + methodsHASIntegerTemplate = loadTemplate( templates.get( TN_METHODS_INTEGER_HAS ) ); + methodsHASFloatTemplate = loadTemplate( templates.get( TN_METHODS_FLOAT_HAS ) ); methodsHASATemplate = loadTemplate (templates.get (TN_METHODS_HASA)); methodsHASAStringTemplate = loadTemplate (templates.get (TN_METHODS_STRING_HASA)); methodsHASABooleanTemplate = loadTemplate (templates.get (TN_METHODS_BOOLEAN_HASA)); + methodsHASAIntegerTemplate = loadTemplate( templates.get(TN_METHODS_INTEGER_HASA) ); + methodsHASAFloatTemplate = loadTemplate( templates.get(TN_METHODS_FLOAT_HASA) ); toStringHASTemplate = loadTemplate (templates.get (TN_TOSTRING_HAS)); toStringHASATemplate = loadTemplate (templates.get (TN_TOSTRING_HASA)); toXMLHASTemplate = loadTemplate (templates.get (TN_TOXML_HAS)); @@ -373,8 +389,12 @@ return methodsHASAStringTemplate; else if (MobyTags.MOBYBOOLEAN.equals (dataTypeName)) return methodsHASABooleanTemplate; - else - return null; + else if(MobyTags.MOBYINTEGER.equals( dataTypeName )) + return methodsHASAIntegerTemplate; + else if(MobyTags.MOBYFLOAT.equals( dataTypeName )) + return methodsHASAFloatTemplate; + else + return null; } protected String selectHASTemplateForPrimitiveType (String dataTypeName) { @@ -382,6 +402,10 @@ return methodsHASStringTemplate; else if (MobyTags.MOBYBOOLEAN.equals (dataTypeName)) return methodsHASBooleanTemplate; + else if(MobyTags.MOBYINTEGER.equals( dataTypeName )) + return methodsHASIntegerTemplate; + else if(MobyTags.MOBYFLOAT.equals( dataTypeName )) + return methodsHASFloatTemplate; else return null; } From groscurt at dev.open-bio.org Mon Jan 5 03:42:18 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:42:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050842.n058gIef023749@dev.open-bio.org> groscurt Mon Jan 5 03:42:18 EST 2009 Update of /home/repository/moby/moby-live/Java/src/config/templates In directory dev.open-bio.org:/tmp/cvs-serv23700/src/config/templates Added Files: MethodsHASA_integer_Template.java MethodsHAS_integer_Template.java MethodsHASA_float_Template.java MethodsHAS_float_Template.java Log Message: templates for HAS(A) float and integer children of data types. moby-live/Java/src/config/templates MethodsHASA_integer_Template.java,NONE,1.1 MethodsHAS_integer_Template.java,NONE,1.1 MethodsHASA_float_Template.java,NONE,1.1 MethodsHAS_float_Template.java,NONE,1.1 From groscurt at dev.open-bio.org Mon Jan 5 03:43:41 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:43:41 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050843.n058hflG023829@dev.open-bio.org> groscurt Mon Jan 5 03:43:40 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes In directory dev.open-bio.org:/tmp/cvs-serv23794/src/main/org/biomoby/shared/datatypes Modified Files: MobyBoolean.java Log Message: changed new Boolean (getValue()).booleanValue(); to Boolean.parseBoolean(getValue()) as this is the recommended way. moby-live/Java/src/main/org/biomoby/shared/datatypes MobyBoolean.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyBoolean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyBoolean.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyBoolean.java 2009/01/05 08:43:40 1.2 @@ -87,7 +87,7 @@ * @see #getValue *************************************************************************/ public boolean getBooleanValue() { - return new Boolean (getValue()).booleanValue(); + return Boolean.parseBoolean( getValue()); } } From groscurt at dev.open-bio.org Mon Jan 5 03:44:29 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:44:29 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050844.n058iTkX023869@dev.open-bio.org> groscurt Mon Jan 5 03:44:29 EST 2009 Update of /home/repository/moby/moby-live/Java/src/config/templates In directory dev.open-bio.org:/tmp/cvs-serv23834/src/config/templates Modified Files: ServicePOSetTemplate.java Log Message: template for service output changed so that it also accepts a collection of data types and not only an array. moby-live/Java/src/config/templates ServicePOSetTemplate.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/templates/ServicePOSetTemplate.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/templates/ServicePOSetTemplate.java 2005/09/19 08:08:32 1.2 +++ /home/repository/moby/moby-live/Java/src/config/templates/ServicePOSetTemplate.java 2009/01/05 08:44:29 1.3 @@ -9,4 +9,15 @@ throws org.biomoby.shared.MobyException { response.setDataSet (values, "@ARTICLE_NAME@"); } - + + /************************************************************************** + * Set a primary output set (a Collection) into the 'response'.

+ * + * @param response represents output data that will go to a client + * @param values is to be stored in the 'response' + * @throws org.biomoby.shared.MobyException if something goes wrong + *************************************************************************/ + public void set_ at ESC_ARTICLE_NAME@Set (MobyJob response, java.util.Collection<@DATATYPE@> values) + throws org.biomoby.shared.MobyException { + response.setDataSet (values.toArray(new @DATATYPE@[values.size()]), "@ARTICLE_NAME@"); + } From groscurt at dev.open-bio.org Mon Jan 5 03:46:07 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:46:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050846.n058k7JZ023945@dev.open-bio.org> groscurt Mon Jan 5 03:46:07 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv23910/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/src/main/org/biomoby/service/dashboard GeneratorPanel.java,1.18,1.19 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2008/03/02 16:59:54 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2009/01/05 08:46:07 1.19 @@ -442,8 +442,8 @@ SwingUtils.addComponent (pDeploy, glue, 1, 0, 1, 1, HORI, NWEST, 1.0, 0.0); SwingUtils.addComponent (pDeploy, remotely, 2, 0, 1, 1, NONE, NEAST, 0.0, 0.0); - // Tomcat/Axis locations - JPanel pServer = createTitledPanel ("Tomcat/Axis locations"); + // Server/Axis locations + JPanel pServer = createTitledPanel ("Server/Axis locations"); String initValue = null; String os = System.getProperty ("os.name"); @@ -455,17 +455,18 @@ else initValue = "/usr/local/"; - JLabel lTomcatHome = new JLabel ("Tomcat home directory"); + JLabel lTomcatHome = new JLabel ("Server home directory"); JFileChooserWithHistory tomcatHome = - createFileSelector ("Select Tomcat home directory", + createFileSelector ("Select server home directory", "Select", initValue, DP_TOMCAT_HOME, DP_TOMCAT_HOME); tomcatHome.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - JLabel lAxisInT = new JLabel ("Axis relative path in Tomcat"); - JTextFieldWithHistory axisInT = createText ("axis", DP_AXIS_IN_TOMCAT, DP_AXIS_IN_TOMCAT); + JLabel lAxisInT = new JLabel ("Axis relative path"); + JTextFieldWithHistory axisInT = createText (null, DP_AXIS_IN_TOMCAT, DP_AXIS_IN_TOMCAT); + axisInT.setToolTipText( "The path to Axis - e.g. webapps/axis for Tomcat or server/default/deploy/axis.war for JBoss" ); JLabel lHost = new JLabel ("Hostname"); JTextFieldWithHistory host = createText ("localhost", DP_HOSTNAME, DP_HOSTNAME); JLabel lPort = new JLabel ("Port"); From groscurt at dev.open-bio.org Mon Jan 5 03:46:07 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:46:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050846.n058k7rr023973@dev.open-bio.org> groscurt Mon Jan 5 03:46:07 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv23910/xmls Modified Files: deployBuild.xml tomcat.xml servletsBuild.xml Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/xmls deployBuild.xml,1.6,1.7 tomcat.xml,1.2,1.3 servletsBuild.xml,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/deployBuild.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2008/03/03 14:11:08 1.6 +++ /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 08:46:07 1.7 @@ -11,13 +11,13 @@ - @@ -55,7 +55,7 @@ - @@ -83,11 +83,11 @@ - + - + - + - + @@ -104,7 +104,7 @@ - + @@ -129,14 +129,14 @@ - + - + @@ -152,7 +152,7 @@ - + @@ -236,7 +236,7 @@ - + @@ -247,9 +247,9 @@ fork="true" failonerror="true"> - + - + @@ -290,7 +290,7 @@ - @@ -328,18 +328,18 @@ - - - + + + - + - - - + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/tomcat.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2008/03/03 14:11:08 1.2 +++ /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 08:46:07 1.3 @@ -4,20 +4,19 @@ - + - - - + + + - + - - - + + @@ -30,37 +29,37 @@ + location="${real.catalina.home}/${axis.relative.path}/WEB-INF"/> - + ' - ERROR: Tomcat server not found. + ERROR: Server not found. ------------------------------- Please set environment variable CATALINA_HOME to point to it, or create a file 'build.properties' and put there the line: - catalina.home = <location of your Tomcat> + catalina.home = <location of your server> (do not include '<' and '>' there), or start your Ant with this property on the command-line: - ant -Dcatalina.home=<location of your Tomcat> + ant -Dcatalina.home=<location of your server> - - - + + + - + ' - ERROR: Tomcat does not seem to be running. + ERROR: Server does not seem to be running. ------------------------------------------ - I have just checked ${tomcat.host}:${tomcat.port}... + I have just checked ${server.host}:${server.port}... You may perhaps consider to start it. Or to set differently the following properties: - "tomcat.host" (current value: ${tomcat.host}), and - "tomcat.port" (current value: ${tomcat.port}) + "server.host" (current value: ${server.host}), and + "server.port" (current value: ${server.port}) =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml 2008/03/02 12:45:27 1.2 +++ /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml 2009/01/05 08:46:07 1.3 @@ -10,7 +10,7 @@ - From groscurt at dev.open-bio.org Mon Jan 5 03:46:08 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:46:08 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050846.n058k8uJ023995@dev.open-bio.org> groscurt Mon Jan 5 03:46:07 EST 2009 Update of /home/repository/moby/moby-live/Java/src/webapps In directory dev.open-bio.org:/tmp/cvs-serv23910/src/webapps Modified Files: remote.deploy.build.xml.template Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/src/webapps remote.deploy.build.xml.template,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/webapps/remote.deploy.build.xml.template,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/webapps/remote.deploy.build.xml.template 2008/03/03 14:11:08 1.5 +++ /home/repository/moby/moby-live/Java/src/webapps/remote.deploy.build.xml.template 2009/01/05 08:46:07 1.6 @@ -20,15 +20,13 @@ - - - - + + + + - - @@ -39,22 +37,22 @@ The following properties define where and how the services will be deployed. You can still define new values for them. -tomcat.home = ${tomcat.home} +server.home = ${server.home} All libraries (.jar files) will be moved here. -tomcat.host = ${tomcat.host} - Where is your Tomcat installed. If this is not localhost +server.host = ${server.host} + Where is your server installed. If this is not localhost you may need to allow remote control in server-config.wsdd before deploying services. -tomcat.port = ${tomcat.port} - Where is your Tomcat listening. +server.port = ${server.port} + Where is your server listening. axis.relative.path = ${axis.relative.path} - Where is Axis installed within Tomcat's 'webapps' dir. + Where is Axis installed within Tomcat's 'webapps' dir or JBoss 'server/default/deploy' dir axis.admin.url = ${axis.admin.url} - How to access your Tomcat/Axis. + How to access your server/Axis. For the list of services that will be deployed when you call 'ant deploy' (or undeploy when you call 'ant undeploy') @@ -67,15 +65,11 @@ - - - - - + + location="${real.catalina.home}/${axis.relative.path}/WEB-INF"/> @@ -94,7 +88,7 @@ - - - + - - - + + + - - + - ' - ERROR: Tomcat does not seem to be running. + ERROR: Server does not seem to be running. ------------------------------------------ - I have just checked ${tomcat.host}:${tomcat.port}... + I have just checked ${server.host}:${server.port}... You may perhaps consider to start it. Or to set differently the following properties: - "tomcat.host" (current value: ${tomcat.host}), and - "tomcat.port" (current value: ${tomcat.port}) + "server.host" (current value: ${server.host}), and + "server.port" (current value: ${server.port}) - + - + - + - + - + @@ -194,7 +188,7 @@ - + @@ -202,9 +196,9 @@ - + - + From groscurt at dev.open-bio.org Mon Jan 5 03:47:04 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:47:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050847.n058l4IH024045@dev.open-bio.org> groscurt Mon Jan 5 03:47:04 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv24002/src/main/org/biomoby/service/dashboard Modified Files: RegistrationServiceTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationDataTypeSubPanel.java Log Message: Added an unregistration button at the bar with the other buttons. moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationServiceTypeSubPanel.java,1.9,1.10 RegistrationNamespaceSubPanel.java,1.8,1.9 RegistrationDataTypeSubPanel.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/12/20 20:00:41 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2009/01/05 08:47:04 1.10 @@ -15,6 +15,7 @@ import org.tulsoft.tools.gui.SwingUtils; import org.tulsoft.tools.gui.JTextFieldWithHistory; +import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JSplitPane; @@ -24,6 +25,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import java.awt.GridBagLayout; +import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; @@ -49,6 +51,8 @@ JTextFieldWithHistory stName, stAuth, stEmail; JTextArea stDescArea; JLabel stISA; + CustomServiceTypesTree serviceTypeTree; + JButton unregisButton; /********************************************************************* * Default constructor. @@ -97,7 +101,7 @@ new ServiceTypesBoard (registryModel, console, propertyChannel, - new CustomServiceTypesTree (registryModel, console)); + serviceTypeTree = new CustomServiceTypesTree (registryModel, console)); serviceTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); // allow to copy selected service types to the new one @@ -131,12 +135,25 @@ KeyEvent.VK_F, REG_ST_FROM_XML, createXMLChooser (REG_ST_FROM_XML)); + unregisButton = + createButton (" Unregister Service Type ", + "Remove an existing service type from a Biomoby registry", + KeyEvent.VK_U, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + serviceTypeTree.onUnregisterServiceType(); + } + }); + unregisButton.setIcon (unregisterIcon); + unregisButton.setDisabledIcon (unregisterIconDis); + // put it together - SwingUtils.addComponent (p, split, 0, 0, 3, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); + SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/12/20 20:00:41 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2009/01/05 08:47:04 1.9 @@ -15,6 +15,8 @@ import org.tulsoft.tools.gui.SwingUtils; import org.tulsoft.tools.gui.JTextFieldWithHistory; +import javax.swing.Box; +import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JSplitPane; @@ -23,7 +25,9 @@ import javax.swing.JComponent; import javax.swing.tree.DefaultMutableTreeNode; +import java.awt.Component; import java.awt.GridBagLayout; +import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; @@ -46,6 +50,8 @@ // components that are used from more methods JTextFieldWithHistory nsName, nsAuth, nsEmail; JTextArea nsDescArea; + JButton unregisButton; + CustomNamespacesTree namespacesTree; /********************************************************************* * Default constructor. @@ -90,7 +96,7 @@ new NamespacesBoard (registryModel, console, propertyChannel, - new CustomNamespacesTree (registryModel, console)); + namespacesTree = new CustomNamespacesTree (registryModel, console)); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); // allow to copy selected namespace to the new one @@ -124,12 +130,24 @@ KeyEvent.VK_F, REG_NS_FROM_XML, createXMLChooser (REG_NS_FROM_XML)); + unregisButton = + createButton (" Unregister Namespace ", + "Remove an existing namespace from a Biomoby registry", + KeyEvent.VK_U, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + namespacesTree.onUnregisterNamespace(); + } + }); + unregisButton.setIcon (unregisterIcon); + unregisButton.setDisabledIcon (unregisterIconDis); // put it together - SwingUtils.addComponent (p, split, 0, 0, 3, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); + SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } @@ -306,6 +324,7 @@ MobyException exception = null; public Object construct() { try { + unregisButton.setEnabled( false ); MobyNamespace namespace = new MobyNamespace (name); console.setText ("Namespace to be unregistered: " + name + "\n"); registryModel.unRegisterNamespace (namespace); @@ -320,6 +339,7 @@ // runs on the event-dispatching thread. public void finished() { + unregisButton.setEnabled( true ); if (exception != null) error ("An error occured when trying to unregister a namespace.\n\n", exception); @@ -328,5 +348,4 @@ worker.start(); } } - } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2008/05/22 17:09:40 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2009/01/05 08:47:04 1.12 @@ -19,6 +19,7 @@ import org.tulsoft.tools.gui.SwingUtils; import org.tulsoft.tools.gui.JTextFieldWithHistory; +import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JSplitPane; @@ -28,6 +29,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import java.awt.GridBagLayout; +import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; @@ -52,6 +54,9 @@ JTextFieldWithHistory dtName, dtAuth, dtEmail; JTextArea dtDescArea; MobyException dtUnregException; + CustomDataTypesTree datatypeTree; + JButton unregisButton; + // some texts final static String DATA_TYPE_UNREG_PROLOGUE = @@ -100,7 +105,7 @@ new DataTypesBoard (registryModel, console, propertyChannel, - new CustomDataTypesTree (registryModel, console)); + datatypeTree = new CustomDataTypesTree (registryModel, console)); dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); // allow to copy selected namespace to the new one @@ -134,16 +139,28 @@ KeyEvent.VK_F, REG_DT_FROM_XML, createXMLChooser (REG_DT_FROM_XML)); + unregisButton = + createButton (" Unregister Data Type ", + "Remove an existing datatype from a Biomoby registry", + KeyEvent.VK_U, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + datatypeTree.onUnregisterDataType(); + } + }); + unregisButton.setIcon (unregisterIcon); + unregisButton.setDisabledIcon (unregisterIconDis); // make splits JSplitPane split = hSplit (hSplit (buildTree.scrollable(), defs, 0.5), board, 0.6); // put it together - SwingUtils.addComponent (p, split, 0, 0, 3, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); + SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } @@ -406,6 +423,7 @@ final SwingWorker worker = new SwingWorker() { public Object construct() { try { + unregisButton.setEnabled( false ); MobyDataType dataType = new MobyDataType (dataTypeName); console.setText ("Data type to be unregistered: " + dataTypeName + "\n"); registryModel.unRegisterDataType (dataType); @@ -420,6 +438,7 @@ // runs on the event-dispatching thread. public void finished() { + unregisButton.setEnabled( true ); if (dtUnregException != null) error (DATA_TYPE_UNREG_PROLOGUE, dtUnregException); } From groscurt at dev.open-bio.org Mon Jan 5 04:37:47 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:37:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050937.n059blKO024631@dev.open-bio.org> groscurt Mon Jan 5 04:37:47 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv24596/src/main/org/biomoby/service/dashboard Modified Files: AntModel.java Log Message: deployment for jboss available moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2008/03/02 12:45:26 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2009/01/05 09:37:46 1.9 @@ -386,10 +386,10 @@ * Add properties shared by deployment and undeployment... ********************************************************************/ protected void addDeploymentProps (Properties props) { - add (props, "catalina.home", DP_TOMCAT_HOME); + add (props, "server.home", DP_TOMCAT_HOME); add (props, "axis.relative.path", DP_AXIS_IN_TOMCAT); - add (props, "tomcat.host", DP_HOSTNAME); - add (props, "tomcat.port", DP_PORT); + add (props, "server.host", DP_HOSTNAME); + add (props, "server.port", DP_PORT); add (props, "axis.admin.url", DP_AXIS_ADMIN); Map services = (Map)propertyChannel.get (DP_DEPL_SERVICES); From groscurt at dev.open-bio.org Mon Jan 5 04:38:13 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:38:13 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050938.n059cDKi024691@dev.open-bio.org> groscurt Mon Jan 5 04:38:13 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv24636/xmls Modified Files: tomcat.xml Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/xmls tomcat.xml,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/tomcat.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 08:46:07 1.3 +++ /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 09:38:13 1.4 @@ -20,11 +20,8 @@ - - - - - + + From groscurt at dev.open-bio.org Mon Jan 5 04:38:13 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:38:13 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050938.n059cDnV024671@dev.open-bio.org> groscurt Mon Jan 5 04:38:13 EST 2009 Update of /home/repository/moby/moby-live/Java In directory dev.open-bio.org:/tmp/cvs-serv24636 Modified Files: build.properties.template Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java build.properties.template,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.properties.template,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/build.properties.template 2008/02/22 09:37:38 1.7 +++ /home/repository/moby/moby-live/Java/build.properties.template 2009/01/05 09:38:13 1.8 @@ -15,11 +15,11 @@ #http.proxyPort = your proxy port # all other properties are used only if you wish to deploy jMoby -# servlets into your Tomcat - the more verbose description of these +# servlets into your server - the more verbose description of these # properties is in the deployment descriptor in # 'src/webapps/web.xml.template -#catalina.home = /home/senger/Software/jakarta-catalina +#server.home = /home/senger/Software/jakarta-catalina #provider.name = your-name #provider.email = your-email-address #refresh.interval = 3 From groscurt at dev.open-bio.org Mon Jan 5 04:40:36 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:40:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050940.n059eafX024738@dev.open-bio.org> groscurt Mon Jan 5 04:40:36 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv24699/xmls Modified Files: deployBuild.xml tomcat.xml Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/xmls deployBuild.xml,1.7,1.8 tomcat.xml,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/deployBuild.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 08:46:07 1.7 +++ /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 09:40:36 1.8 @@ -328,7 +328,7 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/tomcat.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 09:38:13 1.4 +++ /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 09:40:36 1.5 @@ -17,29 +17,29 @@ - + - + + location="${real.server.home}/${axis.relative.path}/WEB-INF"/> - + ' ERROR: Server not found. ------------------------------- Please set environment variable CATALINA_HOME to point to it, or create a file 'build.properties' and put there the line: - catalina.home = <location of your server> + server.home = <location of your server> (do not include '<' and '>' there), or start your Ant with this property on the command-line: - ant -Dcatalina.home=<location of your server> + ant -Dserver.home=<location of your server> @@ -65,6 +65,6 @@ From groscurt at dev.open-bio.org Tue Jan 6 04:40:13 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Tue, 6 Jan 2009 04:40:13 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901060940.n069eDwU030095@dev.open-bio.org> groscurt Tue Jan 6 04:40:12 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv30060/xmls Modified Files: deployBuild.xml Log Message: moby-live/Java/xmls deployBuild.xml,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/deployBuild.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 09:40:36 1.8 +++ /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/06 09:40:12 1.9 @@ -172,7 +172,7 @@ - + From groscurt at dev.open-bio.org Tue Jan 6 04:41:48 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Tue, 6 Jan 2009 04:41:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901060941.n069fmo5030179@dev.open-bio.org> groscurt Tue Jan 6 04:41:48 EST 2009 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv30144/docs Modified Files: index.html Log Message: moby-live/Java/docs index.html,1.38,1.39 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/index.html,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- /home/repository/moby/moby-live/Java/docs/index.html 2008/11/28 12:05:02 1.38 +++ /home/repository/moby/moby-live/Java/docs/index.html 2009/01/06 09:41:48 1.39 @@ -176,7 +176,8 @@ Services Support

  • Biomoby Dashboard
  • An Alternative jMoby Step-by-Step Guide +border=0/>An Alternative jMoby Step-by-Step Guide +(with video guides how to set up JMoby with Eclipse and how to develop moby web services !)
  • Code Examples

    @@ -188,7 +189,7 @@

  • A note on using secondary articles with MobyServlet
  • How to wrap an EMBOSS/ACD program as a Moby service
  • How to wrap an exisitng Web Service as a Moby service (using SAWSDL) +border=0/>How to wrap an existing Web Service as a Moby service (using SAWSDL)
  • The org.biomoby.shared.data package "In Anger": creating data instances
  • From groscurt at dev.open-bio.org Tue Jan 6 04:41:12 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Tue, 6 Jan 2009 04:41:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901060941.n069fBfn030139@dev.open-bio.org> groscurt Tue Jan 6 04:41:11 EST 2009 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv30100/docs Modified Files: Moses-deploy.html EclipseAndJMoby.html Log Message: moby-live/Java/docs Moses-deploy.html,1.4,1.5 EclipseAndJMoby.html,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/Moses-deploy.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2008/02/14 06:13:35 1.4 +++ /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2009/01/06 09:41:11 1.5 @@ -20,12 +20,12 @@ @@ -33,10 +33,10 @@ @@ -181,48 +181,48 @@

    Local deployment

    -Local deployment means to move files to local Tomcat, and to call a +Local deployment means to move files to local server, and to call a program provided by Axis toolkit to configure Axis in order to know about new services. Properties for that, therefore, define where is -your Tomcat, and where is Axis installed within this Tomcat.

    +your server, and where is Axis installed within this server.

    -catalina.home = <your-tomcat-directory>
    +server.home = <your-server-directory>
     
    -Where is installed your Tomcat. Note that moving things there will -require a write access to some directories in the Tomcat directory, +Where your server is installed (e.g. /usr/local/tomcat or /usr/local/jboss). +Note that moving things there will require a write access to some directories in the server directory, especially to directory where Axis has its libraries (which is, by -default, <tomcat-home>/webapps/axis/WEB-INF/lib).

    +default, <server-home>/<axis-home>/WEB-INF/lib).

    -If you have installed Axis in Tomcat in a standard place, and if your -Tomcat listens on a standard port, this is the only property you need +If you have installed Axis in the server in a standard place, and if your +server listens on a standard port, this is the only property you need to specify.

    -axis.relative.path = <directory-with-Axis-in-Tomcat>
    +axis.relative.path = <directory-with-Axis-in-server>
     
    -Where is installed Axis in Tomcat. Put here a path starting in -<tomcat-home>/webapps/ (but excluding this -beginning). Default value is axis. +Where is Axis installed in the server. Put here a path starting in +<server-home>/ (but excluding this +beginning). Default value is webapps/axis as for Tomcat (for JBoss the default value is server/default/deploy/axis.war).
    -tomcat.host = <tomcat-computer-name>
    +server.host = <server-computer-name>
     
    -A machine name where is Tomcat installed. Default is +A machine name where the server is installed. Default is localhost. This is used by the Axis program when deploying new services. If it is not a localhost then it is called remote administration and Axis User's Guide tells about it: @@ -250,12 +250,12 @@
    -tomcat.port = <tomcat-port-number>
    +server.port = <server-port-number>
     
    -A port where Tomcat is listening. Default value is 8080. +A port where the server is listening. Default value is 8080.
    @@ -269,7 +269,8 @@ Used to find a correct piece of Axis when deploying services. Very rarely needed to be changed. Default value (which depends on a property defined above) is -<axis.relative.path>/servlet/AxisServlet. +axis/servlet/AxisServlet. You can check this by typing in http://<server.home>:<server.port>/<axis.admin.url> +in your browser.
    @@ -300,7 +301,7 @@ -After that, restart your Tomcat (because new classes where added there). +After that, restart your server (because new classes where added there).

    How to un-deploy local services

    @@ -311,29 +312,29 @@ It removes Axis configuration of your services but it does not clean -up Tomcat/Axis lib directory. That would be a more complex +up server/Axis lib directory. That would be a more complex task...

    Remote deployment

    -A remote deployment does not need any Tomcat running on your +A remote deployment does not need any server running on your machine. It creates a local file (slightly fat, because it includes both Axis and Ant libraries) which you will then move (by ftp, for -example) to a real machine where you have Tomcat running and where you +example) to a real machine where you have a server running and where you want to have your services deployed.

    In order to make easy to use the resulting file on a target machine, -you still need to set Tomcat and Axis properties before creating this +you still need to set server and Axis properties before creating this file here. By default, the same properties are used as for local -Tomcat: +server:

    -catalina.home = <your-tomcat-directory>
    -axis.relative.path = <directory-with-Axis-in-Tomcat>
    -tomcat.host = <tomcat-computer-name>
    +server.home = <your-server-directory>
    +axis.relative.path = <directory-with-Axis-in-server>
    +server.host = <server-computer-name>
     wsdd.template = <filename-with-wsdd-template>
    -tomcat.port = <tomcat-port-number>
    +server.port = <server-port-number>
     axis.admin.url = <URL-path>
     
    @@ -343,10 +344,10 @@ cross:
    -cross.tomcat.home = <your-tomcat-directory>
    -cross.axis.relative.path = <directory-with-Axis-in-Tomcat>
    -cross.tomcat.host = <tomcat-computer-name>
    -cross.tomcat.port = <tomcat-port-number>
    +cross.server.home = <your-server-directory>
    +cross.axis.relative.path = <directory-with-Axis-in-server>
    +cross.server.host = <server-computer-name>
    +cross.server.port = <server-port-number>
     cross.axis.admin.url = <URL-path>
     
    @@ -374,7 +375,7 @@ -And again, restarting Tomcat is often a good idea.

    +And again, restarting the server is often a good idea.

    If you want first to see if your properties were specified correctly, try first: =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2008/03/14 14:01:01 1.9 +++ /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2009/01/06 09:41:11 1.10 @@ -18,13 +18,6 @@

    Introduction

    - -
    In February 2008, few changes were made in the -jMoby building process. The major change is getting 3rd-party -libraries using Maven. This document was not yet updated to reflect -it. -
    - I am both: a newbie to Eclipse, and a dinosaurs doing everything in Emacs, but times are changing, and no Emacs extension can beat Eclipse on its From kawas at dev.open-bio.org Mon Jan 12 17:21:22 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 12 Jan 2009 17:21:22 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901122221.n0CMLMZR014349@dev.open-bio.org> kawas Mon Jan 12 17:21:22 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv14313/Perl/MOSES-MOBY Modified Files: Makefile.PL Log Message: update wsrf lite version required. moby-live/Perl/MOSES-MOBY Makefile.PL,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2008/11/19 14:24:13 1.11 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/01/12 22:21:22 1.12 @@ -37,7 +37,7 @@ # for async services requires 'MOBY::Client::Central' => 1.06; - requires 'WSRF::Lite' => '0.8.2.3'; + requires 'WSRF::Lite' => '0.8.2.6'; build_requires 'Test::More' => '0.42'; no_index 'directory' => 'bin/scripts'; From kawas at dev.open-bio.org Tue Jan 13 14:41:02 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 13 Jan 2009 14:41:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901131941.n0DJf2rj021322@dev.open-bio.org> kawas Tue Jan 13 14:41:01 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES In directory dev.open-bio.org:/tmp/cvs-serv21286/Perl/MOSES-MOBY/lib/MOSES Modified Files: MOBY.pm Log Message: added a link to the async moby tutorial moby-live/Perl/MOSES-MOBY/lib/MOSES MOBY.pm,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2008/08/25 16:27:28 1.6 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2009/01/13 19:41:01 1.7 @@ -2054,6 +2054,7 @@ Tutorial for creating SOAP based Biomoby Services
    Tutorial for creating CGI based Biomoby Services + Tutorial for creating Asynchronous SOAP based Biomoby Services =end html From kawas at dev.open-bio.org Mon Jan 19 14:13:30 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 19 Jan 2009 14:13:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901191913.n0JJDUo2020851@dev.open-bio.org> kawas Mon Jan 19 14:13:29 EST 2009 Update of /home/repository/moby/moby-live/Docs/ProjectDocs In directory dev.open-bio.org:/tmp/cvs-serv20816/Docs/ProjectDocs Modified Files: index.html Log Message: added links to the CPAN releases of MOBY, MOBY-Client, and MOSES-MOBY. moby-live/Docs/ProjectDocs index.html,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/ProjectDocs/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Docs/ProjectDocs/index.html 2008/03/06 17:02:55 1.9 +++ /home/repository/moby/moby-live/Docs/ProjectDocs/index.html 2009/01/19 19:13:29 1.10 @@ -9,6 +9,31 @@

    +

    +
    MOBY on CPAN (client/registry code) + +
    MOBY contains libraries for PERL developers, libraries for hosting a registry and it +also contains ready-to-use clients for any Biomoby users, allowing +access to Biomoby registries and to Biomoby services). + +
    +

    +

    +
    MOBY on CPAN (client code only) + +
    MOBY-Client contains libraries for Perl developers, and it +also contains ready-to-use clients for any Biomoby users, allowing +access to Biomoby registries and to Biomoby services). + +
    +

    +

    +
    MoSeS (Moby Services Support) for PERL + +
    MOSES-MOBY Perl extension for the automatic generation of BioMOBY web services. +
    +

    +

    Language Specific Documents

    From groscurt at dev.open-bio.org Mon Jan 26 03:29:59 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 26 Jan 2009 03:29:59 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901260829.n0Q8TxOn001526@dev.open-bio.org> groscurt Mon Jan 26 03:29:58 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv1482/src/main/org/biomoby/service/dashboard Modified Files: RegistrationServiceTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationDataTypeSubPanel.java Log Message: unregister button exists, but it is commented, so basically same as before... moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationServiceTypeSubPanel.java,1.10,1.11 RegistrationNamespaceSubPanel.java,1.9,1.10 RegistrationDataTypeSubPanel.java,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2009/01/05 08:47:04 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2009/01/26 08:29:58 1.11 @@ -135,17 +135,17 @@ KeyEvent.VK_F, REG_ST_FROM_XML, createXMLChooser (REG_ST_FROM_XML)); - unregisButton = - createButton (" Unregister Service Type ", - "Remove an existing service type from a Biomoby registry", - KeyEvent.VK_U, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - serviceTypeTree.onUnregisterServiceType(); - } - }); - unregisButton.setIcon (unregisterIcon); - unregisButton.setDisabledIcon (unregisterIconDis); +// unregisButton = +// createButton (" Unregister Service Type ", +// "Remove an existing service type from a Biomoby registry", +// KeyEvent.VK_U, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// serviceTypeTree.onUnregisterServiceType(); +// } +// }); +// unregisButton.setIcon (unregisterIcon); +// unregisButton.setDisabledIcon (unregisterIconDis); // put it together @@ -153,7 +153,7 @@ SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); - SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); +// SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2009/01/05 08:47:04 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2009/01/26 08:29:58 1.10 @@ -130,24 +130,24 @@ KeyEvent.VK_F, REG_NS_FROM_XML, createXMLChooser (REG_NS_FROM_XML)); - unregisButton = - createButton (" Unregister Namespace ", - "Remove an existing namespace from a Biomoby registry", - KeyEvent.VK_U, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - namespacesTree.onUnregisterNamespace(); - } - }); - unregisButton.setIcon (unregisterIcon); - unregisButton.setDisabledIcon (unregisterIconDis); +// unregisButton = +// createButton (" Unregister Namespace ", +// "Remove an existing namespace from a Biomoby registry", +// KeyEvent.VK_U, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// namespacesTree.onUnregisterNamespace(); +// } +// }); +// unregisButton.setIcon (unregisterIcon); +// unregisButton.setDisabledIcon (unregisterIconDis); // put it together SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); - SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); +// SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2009/01/05 08:47:04 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2009/01/26 08:29:58 1.13 @@ -139,17 +139,17 @@ KeyEvent.VK_F, REG_DT_FROM_XML, createXMLChooser (REG_DT_FROM_XML)); - unregisButton = - createButton (" Unregister Data Type ", - "Remove an existing datatype from a Biomoby registry", - KeyEvent.VK_U, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - datatypeTree.onUnregisterDataType(); - } - }); - unregisButton.setIcon (unregisterIcon); - unregisButton.setDisabledIcon (unregisterIconDis); +// unregisButton = +// createButton (" Unregister Data Type ", +// "Remove an existing datatype from a Biomoby registry", +// KeyEvent.VK_U, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// datatypeTree.onUnregisterDataType(); +// } +// }); +// unregisButton.setIcon (unregisterIcon); +// unregisButton.setDisabledIcon (unregisterIconDis); // make splits JSplitPane split = hSplit (hSplit (buildTree.scrollable(), @@ -160,7 +160,7 @@ SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); - SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); +// SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } From jmrc at dev.open-bio.org Mon Jan 26 10:24:39 2009 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Mon, 26 Jan 2009 10:24:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901261524.n0QFOd3p004990@dev.open-bio.org> jmrc Mon Jan 26 10:24:38 EST 2009 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl In directory dev.open-bio.org:/tmp/cvs-serv4955 Modified Files: ExecuteSyncService.html Added Files: ExecuteAsyncService.html Log Message: users: jmrodriguez at cnio.es, jmfernandez at cnio.es date: 26-Jan-2009 - Fixed some documentation typos. - Add documentation that describes how to execute asynchronous services. moby-live/Docs/MOBY-S_API/Perl ExecuteAsyncService.html,NONE,1.1 ExecuteSyncService.html,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteSyncService.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteSyncService.html 2008/02/14 02:09:32 1.6 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteSyncService.html 2009/01/26 15:24:38 1.7 @@ -58,8 +58,8 @@

    Executing a service in Synchronous mode

    -The "getGoTerm" service that we have been discussing in this tutorial is a Sychronous Moby Service, meaning that if you execute it, the response from the -server will immeidately contain the result data. This is distinct from Asynchronous Moby Services where the service provider gives you a "ticket" with which +The "getGoTerm" service that we have been discussing in this tutorial is a Synchronous Moby Service, meaning that if you execute it, the response from the +server will immediately contain the result data. This is distinct from Asynchronous Moby Services where the service provider gives you a "ticket" with which you can retrieve the result data at a later time (e.g. for long-executing services). The way to know if a discovered service is Synchronous or Asynchronous is by the "category" method of the MOBY::Client::ServiceInstance object. Synchronous services use the category "moby", while Asynchronous services use the category "moby-async". From kawas at dev.open-bio.org Mon Jan 26 11:34:12 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 26 Jan 2009 11:34:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901261634.n0QGYCio005728@dev.open-bio.org> kawas Mon Jan 26 11:34:12 EST 2009 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl In directory dev.open-bio.org:/tmp/cvs-serv5693/Docs/MOBY-S_API/Perl Modified Files: ExecuteAsyncService.html Log Message: a tag was missing a closing brace moby-live/Docs/MOBY-S_API/Perl ExecuteAsyncService.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteAsyncService.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteAsyncService.html 2009/01/26 15:24:38 1.1 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteAsyncService.html 2009/01/26 16:34:12 1.2 @@ -196,7 +196,7 @@ 44:]); 45:print "Output----------\n$response\n"; 46: - From kawas at dev.open-bio.org Wed Jan 28 09:25:30 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:25:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281425.n0SEPUKB015676@dev.open-bio.org> kawas Wed Jan 28 09:25:29 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv15636/Perl/MOBY-Server Modified Files: Makefile.PL META.yml Log Message: updated the changes to reflect recent changes in the source. moby-live/Perl/MOBY-Server Makefile.PL,1.13,1.14 META.yml,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/12/02 19:15:02 1.13 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2009/01/28 14:25:29 1.14 @@ -3,7 +3,7 @@ # Define metadata name 'MOBY'; - version '1.06'; + version '1.07'; license 'perl'; abstract 'This distribution is for communicating with or creating your own MOBY Central registry'; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml 2008/12/02 19:15:31 1.5 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml 2009/01/28 14:25:29 1.6 @@ -44,4 +44,4 @@ XML::SemanticCompare: 0 XML::Simple: 2.18 WSRF::Lite: 0.8.2.5 -version: 1.06 +version: 1.07 From kawas at dev.open-bio.org Wed Jan 28 09:35:41 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:35:41 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281435.n0SEZfnP015928@dev.open-bio.org> kawas Wed Jan 28 09:35:41 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client In directory dev.open-bio.org:/tmp/cvs-serv15881/Perl/MOBY-Server/lib/MOBY/Client Modified Files: SimpleArticle.pm SimpleInput.pm SecondaryArticle.pm CollectionArticle.pm Log Message: encapsulated class data had memory for attributes that defaulted to []. Made them 'undef' to remove this memory. moby-live/Perl/MOBY-Server/lib/MOBY/Client SimpleArticle.pm,1.3,1.4 SimpleInput.pm,1.4,1.5 SecondaryArticle.pm,1.4,1.5 CollectionArticle.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleArticle.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleArticle.pm 2008/09/02 13:11:40 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleArticle.pm 2009/01/28 14:35:41 1.4 @@ -195,10 +195,10 @@ #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - articleName => [ undef, 'read/write' ], - objectType => [ undef, 'read/write' ], - objectLSID => [ undef, 'read/write' ], - namespaces => [ [], 'read/write' ], + articleName => [ undef, 'read/write' ], + objectType => [ undef, 'read/write' ], + objectLSID => [ undef, 'read/write' ], + namespaces => [ undef, 'read/write' ], id => [ undef, 'read/write' ], XML_DOM => [ undef, 'read/write' ], XML => [ undef, 'read/write' ], =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleInput.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleInput.pm 2008/09/02 13:11:40 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleInput.pm 2009/01/28 14:35:41 1.5 @@ -86,7 +86,7 @@ ( articleName => [ undef, 'read/write' ], objectType => [ undef, 'read/write' ], - namespaces => [ [], 'read/write' ], + namespaces => [ undef, 'read/write' ], ); #_____________________________________________________________ =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SecondaryArticle.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SecondaryArticle.pm 2008/09/02 13:11:40 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SecondaryArticle.pm 2009/01/28 14:35:41 1.5 @@ -175,7 +175,7 @@ ( articleName => [ undef, 'read/write' ], objectType => [ undef, 'read/write' ], - namespaces => [ [], 'read/write' ], + namespaces => [ undef, 'read/write' ], XML_DOM => [ undef, 'read/write' ], XML => [ undef, 'read/write' ], isSecondary => [ 1, 'read' ], =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/CollectionArticle.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/CollectionArticle.pm 2008/11/19 21:29:14 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/CollectionArticle.pm 2009/01/28 14:35:41 1.5 @@ -188,7 +188,7 @@ my %_attr_data = # DEFAULT ACCESSIBILITY ( articleName => [ undef, 'read/write' ], - Simples => [ [], 'read/write' ], + Simples => [ undef, 'read/write' ], isSimple => [ 0, 'read' ], isSecondary => [ 0, 'read' ], isCollection => [ 1, 'read' ], From kawas at dev.open-bio.org Wed Jan 28 09:37:02 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:37:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281437.n0SEb2rE016022@dev.open-bio.org> kawas Wed Jan 28 09:37:02 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client In directory dev.open-bio.org:/tmp/cvs-serv15987/Perl/MOBY-Server/lib/MOBY/Client Modified Files: ServiceInstance.pm Log Message: updated unit tests to reflect that there can be 0 or more of them per service instance. moby-live/Perl/MOBY-Server/lib/MOBY/Client ServiceInstance.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/ServiceInstance.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/ServiceInstance.pm 2008/11/20 17:01:05 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/ServiceInstance.pm 2009/01/28 14:37:02 1.4 @@ -249,7 +249,7 @@ URL => [ undef, 'read/write' ], contactEmail => [ undef, 'read/write' ], LSID => [ undef, 'read/write'], - unitTest => [ undef, 'read/write'], # a reference to a MobyUnitTest object + unitTests => [ undef, 'read/write'], # listref to a MobyUnitTest objects ); #_____________________________________________________________ @@ -291,7 +291,7 @@ $self->input( [] ) unless $self->input; $self->output( [] ) unless $self->output; $self->secondary( [] ) unless $self->secondary; - $self->unitTest( new MOBY::Client::MobyUnitTest ) unless $self->unitTest; + $self->unitTests ( [] ) unless $self->unitTests; return $self; } From kawas at dev.open-bio.org Wed Jan 28 09:38:41 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:38:41 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281438.n0SEcfjk016188@dev.open-bio.org> kawas Wed Jan 28 09:38:41 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF In directory dev.open-bio.org:/tmp/cvs-serv16153/Perl/MOBY-Server/lib/MOBY/RDF Modified Files: Utils.pm Log Message: fixed typo in the ref ($self) =~ m// statement moby-live/Perl/MOBY-Server/lib/MOBY/RDF Utils.pm,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2008/11/25 18:05:59 1.8 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2009/01/28 14:38:41 1.9 @@ -180,7 +180,9 @@ sub trim { my ($self, $text) = @_; $text = $self - unless (ref($self) eq 'Moby::RDF::Utils') and defined($text); + unless ref($self) =~ m/^MOBY::RDF::Utils/; + # return empty string if $text is not defined + return "" unless $text; $text =~ s/^\s+//; $text =~ s/\s+$//; return $text; From kawas at dev.open-bio.org Wed Jan 28 09:42:21 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:42:21 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281442.n0SEgL4e016247@dev.open-bio.org> kawas Wed Jan 28 09:42:21 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies In directory dev.open-bio.org:/tmp/cvs-serv16212/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Modified Files: Services.pm Log Message: added a loop to go over the array of unit tests moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/11/24 14:38:32 1.9 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2009/01/28 14:42:21 1.10 @@ -20,6 +20,8 @@ use XML::LibXML; +use LS::ID; + use MOBY::Client::Central; use MOBY::Config; @@ -29,7 +31,6 @@ use MOBY::RDF::Predicates::OMG_LSID; use MOBY::RDF::Predicates::RDF; use MOBY::RDF::Predicates::RDFS; - use MOBY::RDF::Utils; use Data::Dumper; @@ -486,29 +487,44 @@ ) ) ); + # add the service type $model->addStmt( new RDF::Core::Statement( $bnode, $resource->new( MOBY::RDF::Predicates::RDF->type ), - new RDF::Core::Resource( $self->{service_uri} . $SI->type ) + new RDF::Core::Resource($self->{service_uri} . $SI->type ) ) ); # add unit test data here ... - if ( $SI->unitTest ) { - my $unit_test = $SI->unitTest; - $bnode = - new RDF::Core::Resource( - $self->{instance_uri}, - md5_hex( - "$service_authority/$service_name/" - . MOBY::RDF::Predicates::FETA - ->unitTest - ) - ); + if ( $SI->unitTests ) { + my $unitTests = $SI->unitTests; + my $utils = new MOBY::RDF::Utils; + foreach my $unit_test (@$unitTests) { + $bnode = + new RDF::Core::Resource( + $self->{instance_uri}, + md5_hex( + "$service_authority/$service_name/" + . ( + $unit_test->example_input + ? $utils->trim($unit_test->example_input) + : "" + ) + . ( + $unit_test->expected_output + ? $utils->trim($unit_test->expected_output) + : "" + ) + . ( $unit_test->regex ? $utils->trim($unit_test->regex) : "" ) + . ( $unit_test->xpath ? $utils->trim($unit_test->xpath) : "" ) + ."/" + . MOBY::RDF::Predicates::FETA->unitTest + ) + ); - # add the type - $model->addStmt( + # add the type + $model->addStmt( new RDF::Core::Statement( $bnode, $resource->new( MOBY::RDF::Predicates::RDF->type ), @@ -516,21 +532,23 @@ MOBY::RDF::Predicates::FETA->unitTest ) ) - ); + ); - # add the example input if defined - $model->addStmt( - new RDF::Core::Statement( - $bnode, - $resource->new( MOBY::RDF::Predicates::FETA->exampleInput ), - new RDF::Core::Literal( $unit_test->example_input ) - ) - ) - if $unit_test->example_input - and $unit_test->example_input ne ''; + # add the example input if defined + $model->addStmt( + new RDF::Core::Statement( + $bnode, + $resource->new( + MOBY::RDF::Predicates::FETA->exampleInput + ), + new RDF::Core::Literal( $unit_test->example_input ) + ) + ) + if $unit_test->example_input + and $unit_test->example_input ne ''; - # add the valid output xml if defined - $model->addStmt( + # add the valid output xml if defined + $model->addStmt( new RDF::Core::Statement( $bnode, $resource->new( @@ -538,39 +556,46 @@ ), new RDF::Core::Literal( $unit_test->expected_output ) ) - ) - if $unit_test->expected_output - and $unit_test->expected_output ne ''; + ) + if $unit_test->expected_output + and $unit_test->expected_output ne ''; - # add the valid regex if defined - $model->addStmt( - new RDF::Core::Statement( - $bnode, - $resource->new( MOBY::RDF::Predicates::FETA->validREGEX ), - new RDF::Core::Literal( $unit_test->regex ) + # add the valid regex if defined + $model->addStmt( + new RDF::Core::Statement( + $bnode, + $resource->new( + MOBY::RDF::Predicates::FETA->validREGEX + ), + new RDF::Core::Literal( $unit_test->regex ) + ) ) - ) - if $unit_test->regex - and $unit_test->regex ne ''; + if $unit_test->regex + and $unit_test->regex ne ''; - # add the valid xpath expression if defined - $model->addStmt( - new RDF::Core::Statement( - $bnode, - $resource->new( MOBY::RDF::Predicates::FETA->validXPath ), - new RDF::Core::Literal( $unit_test->xpath ) + # add the valid xpath expression if defined + $model->addStmt( + new RDF::Core::Statement( + $bnode, + $resource->new( + MOBY::RDF::Predicates::FETA->validXPath + ), + new RDF::Core::Literal( $unit_test->xpath ) + ) ) - ) - if $unit_test->xpath - and $unit_test->xpath ne ''; + if $unit_test->xpath + and $unit_test->xpath ne ''; - $model->addStmt( - new RDF::Core::Statement( - $operation, - $resource->new( MOBY::RDF::Predicates::FETA->hasUnitTest ), - $bnode - ) - ); + $model->addStmt( + new RDF::Core::Statement( + $operation, + $resource->new( + MOBY::RDF::Predicates::FETA->hasUnitTest + ), + $bnode + ) + ); + } } my $inputs = $SI->input; @@ -616,7 +641,7 @@ ) ) ); - + my $oType = new RDF::Core::Resource( $self->{instance_uri}, @@ -637,13 +662,14 @@ $oType ) ); + $model->addStmt( new RDF::Core::Statement( $oType, $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( - $self->{datatype_uri} . $_->objectType - ) #TODO check for lsid + $self->{datatype_uri} . $_->objectType + )#TODO check for lsids ) ); @@ -713,7 +739,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + ) #TODO check for lsids ) ); } @@ -797,7 +823,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{datatype_uri} . $simp->objectType - ) #TODO check for lsid + )#TODO check for lsids ) ); my $namespaces = $simp->namespaces; @@ -845,7 +871,7 @@ ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + )#TODO check for lsids ) ); } @@ -1050,7 +1076,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{datatype_uri} . $_->objectType - ) #TODO check for lsid + )#TODO check for lsids ) ); @@ -1120,7 +1146,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + )#TODO check for lsids ) ); } @@ -1204,7 +1230,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{datatype_uri} . $simp->objectType - ) #TODO check for lsid + )#TODO check for lsids ) ); my $namespaces = $simp->namespaces; @@ -1252,7 +1278,7 @@ ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + )#TODO check for lsids ) ); } From kawas at dev.open-bio.org Wed Jan 28 09:45:18 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:45:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281445.n0SEjIcF016323@dev.open-bio.org> kawas Wed Jan 28 09:45:18 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers In directory dev.open-bio.org:/tmp/cvs-serv16288/Perl/MOBY-Server/lib/MOBY/RDF/Parsers Modified Files: ServiceParser.pm Log Message: added a loop to parse out unit tests in those instances that more than one is defined added code to parse out the datatype/namespace/servicetype term from a uri/lsid moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers ServiceParser.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2008/11/25 18:05:44 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2009/01/28 14:45:18 1.4 @@ -346,7 +346,7 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } @@ -386,11 +386,12 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } # add the param to the service push @{ $instance->input }, $param; + $param = undef; } elsif ( $val eq MOBY::RDF::Predicates::FETA->collectionParameter ) { my $param = MOBY::Client::SimpleArticle->new(); @@ -416,7 +417,7 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } @@ -456,12 +457,13 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } $collection->addSimple($param); # add the param to the service push @{ $instance->input }, $collection; + $param = undef; } elsif ( $val eq MOBY::RDF::Predicates::FETA->secondaryParameter ) { my $param = MOBY::Client::SecondaryArticle->new; @@ -556,6 +558,7 @@ # add the secondary to the service push @{ $instance->secondary }, $param; + $param = undef; } } @@ -616,7 +619,7 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } @@ -656,11 +659,12 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } # add the param to the service push @{ $instance->output }, $param; + $param = undef; } elsif ( $val eq MOBY::RDF::Predicates::FETA->collectionParameter ) { my $param = MOBY::Client::SimpleArticle->new(); @@ -686,12 +690,11 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } } - } # get the articlename @@ -726,12 +729,13 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } $collection->addSimple($param); # add the param to the service push @{ $instance->output }, $collection; + $param = undef; } } @@ -767,6 +771,24 @@ } } $val = "" if ref($val) eq 'ARRAY'; + + # check if $SI->type is an lsid or uri + if ( $val =~ m/RESOURCES\/MOBY\-S\/Services(\/[A-Za-z0-9_\-]*)?$/ ) { + + # uri is /Services/ + $val = substr $1, 1 if $1; + } + elsif ( $val =~ m/RESOURCES\/MOBY\-S\/Services(\#[A-Za-z0-9_\-]*)?$/ ) { + + # uri is /Services# + $val = substr $1, 1 if $1; + } + elsif ( $val =~ m/^urn\:lsid/i ) { + + # uri is an lsid + my $lsid = LS::ID->new($val); + $val = $lsid->object if $lsid; + } $instance->type( MOBY::RDF::Utils::trim($val) ); # dont need the performsTask node anymore @@ -834,10 +856,9 @@ $unit->xpath( MOBY::RDF::Utils::trim($val) ); # set the unit test in the service - $instance->unitTest($unit); + push @{ $instance->unitTests }, $unit; - # should only be one ... so last; - last; + #$instance->unitTest($unit); } # this service is done ... @@ -853,5 +874,35 @@ } +sub _unwrap_datatype { + my ($self, $uri) = @_; + + # process the objectType, i.e. check to see if it is an LSID, or uri, etc + if ( $uri =~ m/RESOURCES\/MOBY\-S\/Objects(\/[A-Za-z0-9_\-]*)?$/ ) { + $uri = substr $1, 1 if $1; + } elsif ( + $uri =~ m/RESOURCES\/MOBY\-S\/Objects(\#[A-Za-z0-9_\-]*)?$/ ) { + $uri = substr $1, 1 if $1; + } elsif ( $uri =~ m/^urn\:lsid/i ) { + my $lsid = LS::ID->new( $uri ); + $uri = $lsid->object if $lsid; + } + return $uri; +} + +sub _unwrap_namespace { + my ($self, $n) = @_; + # get only the namespace name (strip from lsid or URI) + if ($n =~ m/RESOURCES\/MOBY\-S\/Namespaces(\/[A-Za-z0-9_\-]*)?$/) { + $n = substr $1, 1 if $1; + } elsif ($n =~ m/RESOURCES\/MOBY\-S\/Namespaces(\#[A-Za-z0-9_\-]*)?$/ ){ + $n = substr $1, 1 if $1; + } elsif( $n =~ m/^urn\:lsid/i) { + my $lsid = LS::ID->new($n); + $n = $lsid->object if $lsid; + } + return $n; +} + 1; __END__ From kawas at dev.open-bio.org Wed Jan 28 09:46:57 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:46:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281446.n0SEkvGI016363@dev.open-bio.org> kawas Wed Jan 28 09:46:56 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv16328/Perl/MOBY-Server Modified Files: Changes Log Message: updated changes to reflect recent code activity moby-live/Perl/MOBY-Server Changes,1.18,1.19 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/11/25 19:49:38 1.18 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2009/01/28 14:46:56 1.19 @@ -1,5 +1,19 @@ Revision history for Perl extension MOBY. +1.07 + - Fix bug in CollectionArticle, SimpleInput, SecondaryArticle, and + SimpleArticle that caused objects created to have 'memory'. + - Updated the MOBY::Client::ServiceInstance module to reflect + the fact that services can have >= 0 MobyUnitTests. + - In MOBY::RDF::Utils, fixed typo in the + ref ($self) =~ m// statement + - In MOBY::RDF::Ontologies::Services, added a loop to go over + the array of unit tests + - MOBY::RDF::Parsers::ServiceParser, added a loop to parse out + unit tests in those instances that more than one is defined, + and added code to parse out the datatype/namespace/servicetype + term from a uri/lsid. + 1.06 - Changes to makefile reflecting the cpan addition of wsrf. - Added Boolean to the data sql dump file for initializing From kawas at dev.open-bio.org Wed Jan 28 09:51:36 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:51:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281451.n0SEpaXu016403@dev.open-bio.org> kawas Wed Jan 28 09:51:36 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers In directory dev.open-bio.org:/tmp/cvs-serv16368/Perl/MOBY-Server/lib/MOBY/RDF/Parsers Modified Files: ServiceParser.pm Log Message: forgot a use statement moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers ServiceParser.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2009/01/28 14:45:18 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2009/01/28 14:51:36 1.5 @@ -28,6 +28,8 @@ use MOBY::RDF::Predicates::FETA; use MOBY::RDF::Predicates::RDFS; +use LS::ID; + use vars qw /$VERSION/; $VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; From kawas at dev.open-bio.org Wed Jan 28 12:29:20 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 12:29:20 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281729.n0SHTKmX017088@dev.open-bio.org> kawas Wed Jan 28 12:29:20 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Client In directory dev.open-bio.org:/tmp/cvs-serv17045/Perl/MOBY-Client Modified Files: META.yml Makefile.PL Changes Log Message: updated to reflect recent changes in the source code moby-live/Perl/MOBY-Client META.yml,1.3,1.4 Makefile.PL,1.11,1.12 Changes,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/META.yml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Client/META.yml 2008/12/02 19:16:19 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/META.yml 2009/01/28 17:29:19 1.4 @@ -27,4 +27,4 @@ RDF::Core: 0.51 XML::Simple: 2.18 XML::SemanticCompare: 0.91 -version: 1.03 +version: 1.04 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2008/12/02 19:18:31 1.11 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2009/01/28 17:29:19 1.12 @@ -4,7 +4,7 @@ # all_from 'lib/MOBY/Client/Central.pm'; author 'Mark Wilkinson '; -version '1.03'; +version '1.04'; license 'perl'; abstract 'This distribution is for communicating with a MOBY Central registry'; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/Changes,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/MOBY-Client/Changes 2008/11/25 19:51:18 1.5 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/Changes 2009/01/28 17:29:19 1.6 @@ -1,5 +1,16 @@ Revision history for MOBY-Client +1.04 + * Fix bug in CollectionArticle, SimpleInput, SecondaryArticle, and + SimpleArticle that caused objects created to have 'memory'. + * Updated the MOBY::Client::ServiceInstance module to reflect + the fact that services can have >= 0 MobyUnitTests. + * In MOBY::RDF::Utils, fixed typo in the + ref ($self) =~ m// statement + * MOBY::RDF::Parsers::ServiceParser, added a loop to parse out + unit tests in those instances that more than one is defined, + and added code to parse out the datatype/namespace/servicetype + term from a uri/lsid. 1.03 * changes to makefile reflecting the cpan addition of wsrf * added MOBY/Async.pm to the module From kawas at dev.open-bio.org Thu Jan 29 13:42:36 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 13:42:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291842.n0TIgaON012155@dev.open-bio.org> kawas Thu Jan 29 13:42:35 EST 2009 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv12119/Java/docs Modified Files: ConfigureRDFAgent.html Log Message: added another FAQ question and answer moby-live/Java/docs ConfigureRDFAgent.html,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ConfigureRDFAgent.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/docs/ConfigureRDFAgent.html 2008/03/06 16:58:42 1.7 +++ /home/repository/moby/moby-live/Java/docs/ConfigureRDFAgent.html 2009/01/29 18:42:35 1.8 @@ -479,6 +479,19 @@
        agent.output.flatfile = yes 

    Once you have added that value to the config file, try testing the agent again.

    +
  • I am getting the following error:
    +
    +
    +    org.xml.sax.SAXException: Bad types (class java.lang.String -> int)
    +

    What's going on?

    +

    A.
    This happens whenever you provide the wrong value for admin.registry.removal.endpoint. + Make sure that this url points to MOBY-Admin.pl. + Also, make sure that admin.registry.removal.uri looks something like +

    +    http://your.domain/MOBY/Admin
    +

    +

    Once you have fixed that value, try testing the agent again.

    +

  • From kawas at dev.open-bio.org Thu Jan 29 14:06:10 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:06:10 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291906.n0TJ6AuW012285@dev.open-bio.org> kawas Thu Jan 29 14:06:10 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv12250/xmls Modified Files: project.pom Log Message: added XMLUnit to the dependencies. moby-live/Java/xmls project.pom,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/project.pom,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/xmls/project.pom 2008/10/30 02:33:25 1.13 +++ /home/repository/moby/moby-live/Java/xmls/project.pom 2009/01/29 19:06:10 1.14 @@ -124,6 +124,13 @@ 1.4 + + + xmlunit + xmlunit + 1.2 + + javax.activation activation From kawas at dev.open-bio.org Thu Jan 29 14:12:01 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJC1u1012545@dev.open-bio.org> kawas Thu Jan 29 14:12:01 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory dev.open-bio.org:/tmp/cvs-serv12510/src/main/org/biomoby/shared Modified Files: MobyUnitTest.java Log Message: added methods to MobyUnitTest that allow you to perform compare the service output to regular expressions, xpath and to semantically compare the expected DOM with the one obtained by calling the service. moby-live/Java/src/main/org/biomoby/shared MobyUnitTest.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyUnitTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyUnitTest.java 2008/10/21 16:34:29 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyUnitTest.java 2009/01/29 19:12:01 1.2 @@ -1,11 +1,37 @@ package org.biomoby.shared; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.custommonkey.xmlunit.DetailedDiff; +import org.custommonkey.xmlunit.Diff; +import org.custommonkey.xmlunit.Difference; +import org.custommonkey.xmlunit.ElementNameAndTextQualifier; +import org.custommonkey.xmlunit.ElementNameQualifier; +import org.custommonkey.xmlunit.NamespaceContext; +import org.custommonkey.xmlunit.SimpleNamespaceContext; +import org.custommonkey.xmlunit.XMLUnit; +import org.custommonkey.xmlunit.XpathEngine; +import org.custommonkey.xmlunit.exceptions.XpathException; +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.xml.sax.SAXException; + /** - * A class representing a moby unit test + * A class representing a moby unit test. In addition, this class has methods to + * perform the various tests required for unit testing moby services. * * @author Wendy Alexander * @author Eddie Kawas * + * @version $Id$ */ public class MobyUnitTest { @@ -29,6 +55,15 @@ setValidOutputXML(""); setValidREGEX(""); setValidXPath(""); + init(); + } + + private void init() { + // for comparing dom trees + XMLUnit.setIgnoreAttributeOrder(true); + XMLUnit.setIgnoreComments(true); + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); } /** @@ -115,11 +150,335 @@ public String toString() { StringBuffer buf = new StringBuffer(); buf.append("Unit Test:\n"); - buf.append(" Input " + getExampleInput() + "\n"); - buf.append(" Output " + getValidOutputXML() + "\n"); - buf.append(" XPath " + getValidXPath() + "\n"); - buf.append(" REGEX " + getValidREGEX() + "\n"); - return buf.toString(); + buf.append(" Input \n" + Utils.format (getExampleInput(), 2) + "\n"); + buf.append(" Output \n" + Utils.format(getValidOutputXML(),2) + "\n"); + buf.append(" XPath \n" + Utils.format(getValidXPath(),2) + "\n"); + buf.append(" REGEX \n" + Utils.format(getValidREGEX(),2) + "\n"); + //return buf.toString(); + return Utils.format (buf.toString(), 1); + } + + /** + * XML is assumed to be wellformed and valid. Comparing 'XML' that is not + * wellformed may be identical but this method will return false! + * + * @param testXML + * the XML that you would like to compare to XML obtained + * from getValidOutputXML() + * @return true if the documents are semantically similar, false otherwise + */ + public boolean compareOutputXML(String testXML) throws MobyException { + if (!getValidOutputXML().trim().equals("")) + try { + Diff diff; + diff = new Diff(getValidOutputXML(), testXML); + // diff.overrideElementQualifier(new + // RecursiveElementNameAndTextQualifier()); + diff.overrideElementQualifier(new MobyQualifier()); + return diff.similar(); + } catch (SAXException e) { + throw new MobyException(e.getMessage()); + } catch (IOException e) { + throw new MobyException(e.getMessage()); + } + return false; + } + + /** + * + * @param testXML + * the XML that you would like to test the XPATH, from + * getValidXPath(), expression against + * @return true if the XPath expression matches at least one node in the + * testXML + */ + public boolean compareXmlWithXpath(String testXML) throws MobyException { + if (!getValidXPath().trim().equals("")) + try { + Document d = XMLUnit.buildControlDocument(testXML); + HashMap m = new HashMap(); + if (d.getDocumentElement() != null) { + if (d.getDocumentElement().getPrefix() != null) + m.put(d.getDocumentElement().getPrefix(), d + .getDocumentElement().getNamespaceURI()); + } + NamespaceContext ctx = new SimpleNamespaceContext(m); + XpathEngine engine = XMLUnit.newXpathEngine(); + engine.setNamespaceContext(ctx); + return engine.getMatchingNodes(getValidXPath(), d).getLength() > 0; + } catch (IOException ioe) { + throw new MobyException("IOException:\n", ioe); + } catch (SAXException se) { + throw new MobyException("Invalid XML:\n", se); + } catch (XpathException xe) { + throw new MobyException("Invalid XPATH:\n" + xe); + } + return false; + } + + /** + * + * @param testXML + * the XML that you would like to test the REGEX, from + * getValidREGEX(), expression against + * @return true if the regular expression matches the testXML, false + * otherwise. + */ + public boolean compareXmlWithREGEX(String testXML, boolean multiline) { + if (!getValidREGEX().trim().equals("")) { + Pattern p = multiline ? Pattern.compile(getValidREGEX(), + Pattern.MULTILINE) : Pattern.compile(getValidREGEX()); + Matcher m = p.matcher(testXML); + return m.find(); + } + return false; + } + + /** + * + * @param testXML + * the XML that you would like to 'diff' to XML obtained from + * getValidOutputXML() + * @return a String of text outlining all of the differences + */ + @SuppressWarnings("unchecked") + public String getXMLDifferences(String testXML) { + if (!getValidOutputXML().trim().equals("")) + try { + StringBuilder sb = new StringBuilder(); + DetailedDiff myDiff = new DetailedDiff(new Diff( + getValidOutputXML(), testXML)); + // myDiff.overrideElementQualifier(new + // RecursiveElementNameAndTextQualifier()); + myDiff.overrideElementQualifier(new MobyQualifier()); + List differences = myDiff.getAllDifferences(); + for (Difference d : differences) + sb.append(d.toString() + "\n"); + return sb.toString(); + } catch (SAXException e) { + return e.getMessage(); + } catch (IOException e) { + return e.getMessage(); + } + return "No XML to validate against!"; } + private static final String[] ALL_ATTRIBUTES = { "*" }; + + /** + * This inner class implements a 'Qualifier' used to compare XML documents + * using the XMLUnit engine. It used both RecursiveElementNameAndTextQualifier and + * MultiLevelElementNameAndTextQualifier as a template. + * + * @author Eddie Kawas + * + */ + protected class MobyQualifier extends ElementNameQualifier { + /* + ****************************************************************** + Copyright (c) 2008, Jeff Martin, Tim Bacon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + ****************************************************************** + */ + private final String[] qualifyingAttrNames; + + private final ElementNameQualifier NAME_QUALIFIER = new ElementNameQualifier(); + + private final ElementNameAndTextQualifier NAME_AND_TEXT_QUALIFIER = new ElementNameAndTextQualifier(); + + /** + * No-args constructor: use all attributes from all elements to + * determine whether elements qualify for comparability + */ + public MobyQualifier() { + this(ALL_ATTRIBUTES); + } + + /** + * Simple constructor for a single qualifying attribute name + * + * @param attrName + * the value to use to qualify whether two elements can + * be compared further for differences + */ + public MobyQualifier(String attrName) { + this(new String[] { attrName }); + } + + /** + * Extended constructor for multiple qualifying attribute names + * + * @param attrNames + * the array of values to use to qualify whether two + * elements can be compared further for differences + */ + public MobyQualifier(String[] attrNames) { + this.qualifyingAttrNames = new String[attrNames.length]; + System.arraycopy(attrNames, 0, qualifyingAttrNames, 0, + attrNames.length); + } + + /** + * Determine whether two elements qualify for further Difference + * comparison. + * + * @param differenceEngine + * the DifferenceEngine instance wanting to determine if + * the elements are comparable + * @param control + * @param test + * @return true if the two elements qualify for further comparison based + * on both the superclass qualification (namespace URI and non- + * namespaced tag name), and the presence of qualifying + * attributes with the same values; false otherwise + */ + public boolean qualifyForComparison_old(Element control, Element test) { + if (super.qualifyForComparison(control, test)) { + return areAttributesComparable(control, test); + } + return false; + } + + public boolean qualifyForComparison(Element control, Element test) { + boolean stillSimilar = true; + Element currentControl = control; + Element currentTest = test; + + // we dont try to compare the Collection node because they have unordered children + if (!control.getLocalName().equals("Collection")) { + // not a collection, match name and attributes + stillSimilar = NAME_QUALIFIER.qualifyForComparison( + currentControl, currentTest); + + if (stillSimilar) { + if (currentControl.hasChildNodes() + && currentTest.hasChildNodes()) { + Node n1 = getFirstEligibleChild(currentControl); + Node n2 = getFirstEligibleChild(currentTest); + if (n1.getNodeType() == Node.ELEMENT_NODE + && n2.getNodeType() == Node.ELEMENT_NODE) { + currentControl = (Element) n1; + currentTest = (Element) n2; + } else { + stillSimilar = false; + } + } else { + stillSimilar = false; + } + } + + // finally compare the level containing the text child node + if (stillSimilar) { + stillSimilar = NAME_AND_TEXT_QUALIFIER + .qualifyForComparison(currentControl, currentTest); + } + } + return stillSimilar + + && areAttributesComparable(currentControl, currentTest); + + } + + private Node getFirstEligibleChild(Node parent) { + Node n1 = parent.getFirstChild(); + while (n1.getNodeType() == Node.TEXT_NODE + && n1.getNodeValue().trim().length() == 0) { + Node n2 = n1.getNextSibling(); + if (n2 == null) + break; + n1 = n2; + } + return n1; + } + + /** + * Determine whether the qualifying attributes are present in both + * elements and if so whether their values are the same + * + * @param control + * @param test + * @return true if all qualifying attributes are present with the same + * values, false otherwise + */ + protected boolean areAttributesComparable(Element control, Element test) { + String controlValue, testValue; + Attr[] qualifyingAttributes; + NamedNodeMap namedNodeMap = control.getAttributes(); + if (matchesAllAttributes(qualifyingAttrNames)) { + qualifyingAttributes = new Attr[namedNodeMap.getLength()]; + for (int n = 0; n < qualifyingAttributes.length; ++n) { + qualifyingAttributes[n] = (Attr) namedNodeMap.item(n); + } + } else { + qualifyingAttributes = new Attr[qualifyingAttrNames.length]; + for (int n = 0; n < qualifyingAttrNames.length; ++n) { + qualifyingAttributes[n] = (Attr) namedNodeMap + .getNamedItem(qualifyingAttrNames[n]); + } + } + + String nsURI, name; + for (int i = 0; i < qualifyingAttributes.length; ++i) { + if (qualifyingAttributes[i] != null) { + nsURI = qualifyingAttributes[i].getNamespaceURI(); + controlValue = qualifyingAttributes[i].getNodeValue(); + name = qualifyingAttributes[i].getName(); + } else { + // cannot be "*" case + nsURI = controlValue = ""; + name = qualifyingAttrNames[i]; + } + if (nsURI == null || nsURI.length() == 0) { + testValue = test.getAttribute(name); + } else { + testValue = test.getAttributeNS(nsURI, + qualifyingAttributes[i].getLocalName()); + } + if (controlValue == null) { + if (testValue != null) { + return false; + } + } else { + if (!controlValue.equals(testValue)) { + return false; + } + } + } + return true; + } + + private boolean matchesAllAttributes(String[] attributes) { + return Arrays.equals(attributes, ALL_ATTRIBUTES); + } + + } } From kawas at dev.open-bio.org Thu Jan 29 14:12:39 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJCdOV012585@dev.open-bio.org> kawas Thu Jan 29 14:12:39 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory dev.open-bio.org:/tmp/cvs-serv12550/src/main/org/biomoby/shared Modified Files: MobyService.java Log Message: updated MobyService to reflect the fact that >= 0 test cases are available and not 0 or 1. moby-live/Java/src/main/org/biomoby/shared MobyService.java,1.26,1.27 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2008/12/17 14:07:16 1.26 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2009/01/29 19:12:39 1.27 @@ -53,7 +53,7 @@ protected String lsid = null; protected MobyServiceType serviceType; // moby unit test object - protected MobyUnitTest unitTest = null; + protected Vector unitTests = new Vector(); public static final int UNCHECKED = 0; public static final int DEAD= 1; @@ -150,7 +150,7 @@ clone.setSignatureURL(getSignatureURL()); clone.setPathToRDF(getPathToRDF()); clone.setRDF(getRDF()); - clone.setUnitTest(getUnitTest()); + clone.setUnitTests(getUnitTests()); clone.serviceStatus = serviceStatus; clone.statusChecks = statusChecks; @@ -274,20 +274,59 @@ /** * - * @return the MobyUnitTest object associated with this service + * @return an array of MobyUnitTest objects set for this service */ - public MobyUnitTest getUnitTest() { - return unitTest; + public MobyUnitTest[] getUnitTests() { + synchronized (unitTests) { + MobyUnitTest[] tests = new MobyUnitTest[unitTests.size()]; + unitTests.copyInto(tests); + return tests; + } } /** * - * @param unitTest - * the MobyUnitTest object to associate with this service + * @param unitTests + * the tests to set for the service + */ + public void setUnitTests(MobyUnitTest[] unitTests) { + if (unitTests == null) { + this.unitTests.clear(); + } else { + for (MobyUnitTest mut : unitTests) { + addUnitTest(mut); + } + } + } + + /** + * + * @param unitTest the MobyUnitTest to add to our service + */ + public void addUnitTest(MobyUnitTest unitTest) { + if (unitTest != null) { + for (MobyUnitTest t : unitTests) { + // dont add duplicate tests + if (t.toString().equals(unitTest.toString())) + return; + } + unitTests.add(unitTest); + } + } + + /** + * + * @param unitTest the test to remove from the set of tests for the service */ - public void setUnitTest(MobyUnitTest unitTest) { - if (unitTest != null) - this.unitTest = unitTest; + public void removeUnitTest(MobyUnitTest unitTest) { + if (unitTest != null) { + for (int x = 0; x < unitTests.size(); x++) { + if (unitTest.toString().equals(unitTests.elementAt(x).toString())) { + unitTests.removeElementAt(x); + return; + } + } + } } /** @@ -510,24 +549,26 @@ if (id != null) buf.append ("ID: " + id + "\n"); // print unitTest information for this service - if (unitTest != null) { - buf.append(unitTest.toString()); + if (unitTests != null && unitTests.size() > 0) { + buf.append("Unit Tests:\n"); + for (MobyUnitTest unitTest : unitTests) + buf.append(unitTest.toString()+"\n"); } else { - buf.append("Unit Test: None available\n"); + buf.append("Unit Tests: None available\n"); } buf.append ("Primary inputs:\n"); - for (Enumeration en = primaryInputs.elements(); en.hasMoreElements(); ) + for (Enumeration en = primaryInputs.elements(); en.hasMoreElements(); ) buf.append (((MobyData)en.nextElement()).format (1)); if (secondaryInputs.size() > 0) { buf.append ("Secondary inputs:\n"); - for (Enumeration en = secondaryInputs.elements(); en.hasMoreElements(); ) + for (Enumeration en = secondaryInputs.elements(); en.hasMoreElements(); ) buf.append (((MobyData)en.nextElement()).format (1)); } buf.append ("Outputs:\n"); - for (Enumeration en = primaryOutputs.elements(); en.hasMoreElements(); ) + for (Enumeration en = primaryOutputs.elements(); en.hasMoreElements(); ) buf.append (((MobyData)en.nextElement()).format (1)); return new String (buf); From kawas at dev.open-bio.org Thu Jan 29 14:12:58 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJCwIw012625@dev.open-bio.org> kawas Thu Jan 29 14:12:58 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder In directory dev.open-bio.org:/tmp/cvs-serv12590/src/main/org/biomoby/client/rdf/builder Modified Files: ServiceInstanceRDF.java Log Message: updated to reflect the fact that >= 0 test cases are available and not 0 or 1. moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.38,1.39 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.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/rdf/builder/ServiceInstanceRDF.java 2008/11/07 17:26:34 1.38 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2009/01/29 19:12:58 1.39 @@ -347,33 +347,39 @@ hasOperation.addProperty(FetaVocabulary.performsTask, performs); // add any unit test information now - if (services[i].getUnitTest() != null) { - MobyUnitTest mobyUnitTest = services[i].getUnitTest(); - Resource unitTest = model.createResource(SI - + MD5Checksum.md5(services[i].getAuthority() - + "/" - + services[i].getName() - + "/" - + FetaVocabulary.unitTest.getURI())); - unitTest.addProperty(RDF.type, FetaVocabulary.unitTest); - // add the example input if defined - if (!mobyUnitTest.getExampleInput().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.exampleInput, mobyUnitTest.getExampleInput()); - } - // add the valid output xml if defined - if (!mobyUnitTest.getValidOutputXML().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.validOutputXML, mobyUnitTest.getValidOutputXML()); - } - // add the valid regex if defined - if (!mobyUnitTest.getValidREGEX().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.validREGEX, mobyUnitTest.getValidREGEX()); - } - // add the xpath expression if defined - if (!mobyUnitTest.getValidXPath().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.validXPath, mobyUnitTest.getValidXPath()); - } - // add node to the graph - hasOperation.addProperty(FetaVocabulary.hasUnitTest, unitTest); + if (services[i].getUnitTests() != null) { + for (MobyUnitTest mobyUnitTest : services[i].getUnitTests()) { + Resource unitTest = model.createResource(SI + + MD5Checksum.md5(services[i].getAuthority() + + "/" + + services[i].getName() + + "/" + + mobyUnitTest.getExampleInput() .trim() + + mobyUnitTest.getValidOutputXML() .trim() + + mobyUnitTest.getValidREGEX() .trim() + + mobyUnitTest.getValidXPath() .trim() + + "/" + + FetaVocabulary.unitTest.getURI())); + unitTest.addProperty(RDF.type, FetaVocabulary.unitTest); + // add the example input if defined + if (!mobyUnitTest.getExampleInput().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.exampleInput, mobyUnitTest.getExampleInput()); + } + // add the valid output xml if defined + if (!mobyUnitTest.getValidOutputXML().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.validOutputXML, mobyUnitTest.getValidOutputXML()); + } + // add the valid regex if defined + if (!mobyUnitTest.getValidREGEX().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.validREGEX, mobyUnitTest.getValidREGEX()); + } + // add the xpath expression if defined + if (!mobyUnitTest.getValidXPath().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.validXPath, mobyUnitTest.getValidXPath()); + } + // add node to the graph + hasOperation.addProperty(FetaVocabulary.hasUnitTest, unitTest); + } } From kawas at dev.open-bio.org Thu Jan 29 14:12:58 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJCwsN012645@dev.open-bio.org> kawas Thu Jan 29 14:12:58 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended In directory dev.open-bio.org:/tmp/cvs-serv12590/src/main/org/biomoby/shared/extended Modified Files: ServiceInstanceParser.java Log Message: updated to reflect the fact that >= 0 test cases are available and not 0 or 1. moby-live/Java/src/main/org/biomoby/shared/extended ServiceInstanceParser.java,1.25,1.26 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java 2008/10/21 16:41:22 1.25 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java 2009/01/29 19:12:58 1.26 @@ -23,6 +23,7 @@ import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; +import com.hp.hpl.jena.rdf.model.NodeIterator; import com.hp.hpl.jena.rdf.model.RDFNode; import com.hp.hpl.jena.rdf.model.RDFReader; import com.hp.hpl.jena.rdf.model.ResIterator; @@ -254,17 +255,23 @@ // get/set the unit test information for the service if (hoResource.hasProperty(FetaVocabulary.hasUnitTest)) { - Resource utResource = hoResource.getProperty(FetaVocabulary.hasUnitTest).getResource(); + NodeIterator ni = model.listObjectsOfProperty(hoResource, FetaVocabulary.hasUnitTest); + while (ni.hasNext()) { + RDFNode rdfNode = ni.nextNode(); + if (!rdfNode.isResource()) + continue; + Resource node = (Resource)rdfNode; MobyUnitTest mut = new MobyUnitTest(); - if (utResource.hasProperty(FetaVocabulary.exampleInput)) - mut.setExampleInput(utResource.getProperty(FetaVocabulary.exampleInput).getObject().toString()); - if (utResource.hasProperty(FetaVocabulary.validOutputXML)) - mut.setValidOutputXML(utResource.getProperty(FetaVocabulary.validOutputXML).getObject().toString()); - if (utResource.hasProperty(FetaVocabulary.validXPath)) - mut.setValidXPath(utResource.getProperty(FetaVocabulary.validXPath).getObject().toString()); - if (utResource.hasProperty(FetaVocabulary.validREGEX)) - mut.setValidREGEX(utResource.getProperty(FetaVocabulary.validREGEX).getObject().toString()); - service.setUnitTest(mut); + if (node.hasProperty(FetaVocabulary.exampleInput)) + mut.setExampleInput(node.getProperty(FetaVocabulary.exampleInput).getObject().toString()); + if (node.hasProperty(FetaVocabulary.validOutputXML)) + mut.setValidOutputXML(node.getProperty(FetaVocabulary.validOutputXML).getObject().toString()); + if (node.hasProperty(FetaVocabulary.validXPath)) + mut.setValidXPath(node.getProperty(FetaVocabulary.validXPath).getObject().toString()); + if (node.hasProperty(FetaVocabulary.validREGEX)) + mut.setValidREGEX(node.getProperty(FetaVocabulary.validREGEX).getObject().toString()); + service.addUnitTest(mut); + } } } @@ -969,7 +976,8 @@ public static void main(String[] args) throws MobyException, MalformedURLException, IOException { // show how to use this class - ServiceInstanceParser p = new ServiceInstanceParser("http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances"); + ServiceInstanceParser p = new ServiceInstanceParser("http://dev.biordf.net/~kawas/signatures/unittests/BIND_IdSearchGetFastaByCdd"); + p.setUrl("file:///C:/Users/Eddie/Desktop/BIND_IdSearchGetFastaByCdd.txt"); MobyService[] services = p.getMobyServicesFromRDF(); System.out.println(services.length); if (!p.isRDFValid()) { @@ -982,6 +990,5 @@ for (int i = 0; i < services.length; i++) { System.out.println((services[i].toString())); } - } } From kawas at dev.open-bio.org Thu Jan 29 14:15:34 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:15:34 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291915.n0TJFYUk012701@dev.open-bio.org> kawas Thu Jan 29 14:15:33 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory dev.open-bio.org:/tmp/cvs-serv12670/src/main/org/biomoby/service/dashboard/help Added Files: MobyUnitTestingPanel.html Log Message: added documenation for the MobyUnitTestingPanel moby-live/Java/src/main/org/biomoby/service/dashboard/help MobyUnitTestingPanel.html,NONE,1.1 From kawas at dev.open-bio.org Thu Jan 29 14:18:20 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:18:20 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291918.n0TJIK8Q012755@dev.open-bio.org> kawas Thu Jan 29 14:18:20 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory dev.open-bio.org:/tmp/cvs-serv12724/src/main/org/biomoby/service/dashboard/images Added Files: unitTest.gif Log Message: the unit testing panels image moby-live/Java/src/main/org/biomoby/service/dashboard/images unitTest.gif,NONE,1.1 From kawas at dev.open-bio.org Thu Jan 29 14:39:45 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:39:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291939.n0TJdj5N013142@dev.open-bio.org> kawas Thu Jan 29 14:39:45 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv13107/xmls Modified Files: rdfagentBuild.xml Log Message: added a new task for building a downloadable distribution. moby-live/Java/xmls rdfagentBuild.xml,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2008/02/22 15:11:52 1.5 +++ /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2009/01/29 19:39:45 1.6 @@ -105,3 +105,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From kawas at dev.open-bio.org Fri Jan 30 09:44:19 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:44:19 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301444.n0UEiJpY016574@dev.open-bio.org> kawas Fri Jan 30 09:44:18 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data In directory dev.open-bio.org:/tmp/cvs-serv16535/src/main/org/biomoby/service/dashboard/data Modified Files: ServiceInputPanel.java DataTypeTreeTable.java Log Message: added 2 methods that populate the table when given a moby XML message moby-live/Java/src/main/org/biomoby/service/dashboard/data ServiceInputPanel.java,1.3,1.4 DataTypeTreeTable.java,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/ServiceInputPanel.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/service/dashboard/data/ServiceInputPanel.java 2006/02/20 05:51:10 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/ServiceInputPanel.java 2009/01/30 14:44:18 1.4 @@ -9,12 +9,15 @@ package org.biomoby.service.dashboard.data; import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.MobyException; import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyData; import org.biomoby.shared.MobyPrimaryData; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; import org.biomoby.shared.MobySecondaryData; +import org.biomoby.shared.datatypes.MobyObject; +import org.biomoby.shared.parser.MobyParameter; import org.biomoby.shared.parser.MobySimple; import org.biomoby.shared.parser.MobyCollection; import org.biomoby.shared.parser.MobyJob; @@ -23,6 +26,7 @@ import org.biomoby.service.dashboard.data.ParametersTable; import org.biomoby.service.dashboard.Dashboard; +import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JPanel; @@ -166,7 +170,6 @@ * service given in the constructor of this class. *************************************************************************/ public Document getXMLDocument() { - Vector v = new Vector(); for (int i = 0; i < inputTables.size(); i = i+2) { MobyData data = (MobyData)inputTables.elementAt (i); @@ -198,6 +201,50 @@ (new Element[] { MobyJob.toXML ("sip_1_", allData) }); return doc; } + + /** + * + * @param xml + * an XML file containing a full biomoby message that we + * would like to parse and display as input to our service + * @throws MobyException if there is a problem parsing the XML or populating our table + */ + public void setValues(String xml) throws MobyException { + // create the MobyPackage + MobyPackage pack = MobyPackage.createFromXML(xml); + // get our job + MobyJob job = null; + if (pack != null && pack.getJobs().length > 0) + job = pack.getJob(0); + if (job == null) + return; + for (int i = 0; i < inputTables.size(); i = i+2) { + MobyData data = (MobyData)inputTables.elementAt (i); + DataTypeTreeTable table = (DataTypeTreeTable)inputTables.elementAt (i+1); + String articleName = data.getName(); + Object object = job.getData(articleName); + // datatype not existent in this message + if (object == null) + continue; + table.populateData((MobyObject)object); + } + + // update secondary params + if (paramsTable != null) { + Object[] values = paramsTable.tableModel.getData(); + for (int i = 0; i < values.length; i++) { + if (!"".equals(values[i])) { + String name = paramsTable.paramDefs[i].getName(); + String secondary = job.getParameter(name); + // set the secondary param + if (secondary != null) + values[i] = (UUtils.isEmpty (secondary) ? "" : secondary); + } + } + } + // update graphics + updateUI(); + } /************************************************************************* * Return an XML string representing complete input for a service =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/DataTypeTreeTable.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/DataTypeTreeTable.java 2006/04/28 00:13:41 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/DataTypeTreeTable.java 2009/01/30 14:44:18 1.13 @@ -8,33 +8,35 @@ package org.biomoby.service.dashboard.data; -import org.biomoby.shared.MobyDataType; -import org.biomoby.service.dashboard.Dashboard; -import org.biomoby.service.dashboard.treetable.JTreeTable; -import org.biomoby.service.dashboard.treetable.TreeTableModelAdapter; - -import org.tulsoft.tools.gui.SwingUtils; - -import org.jdom.Document; -import org.jdom.Element; +import java.awt.Component; +import java.awt.event.MouseEvent; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.EventObject; -import javax.swing.JTable; -import javax.swing.JComponent; -import javax.swing.JButton; -import javax.swing.Icon; import javax.swing.AbstractCellEditor; +import javax.swing.Icon; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JTable; +import javax.swing.event.CellEditorListener; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.JTableHeader; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; -import javax.swing.table.DefaultTableCellRenderer; -import javax.swing.table.TableModel; import javax.swing.table.TableColumn; -import javax.swing.table.JTableHeader; -import javax.swing.event.CellEditorListener; - -import java.awt.Component; +import javax.swing.table.TableModel; -import java.util.EventObject; -import java.awt.event.MouseEvent; +import org.biomoby.service.dashboard.Dashboard; +import org.biomoby.service.dashboard.treetable.JTreeTable; +import org.biomoby.service.dashboard.treetable.TreeTableModelAdapter; +import org.biomoby.shared.Central; +import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.Utils; +import org.biomoby.shared.datatypes.MobyObject; +import org.jdom.Document; +import org.jdom.Element; +import org.tulsoft.tools.gui.SwingUtils; /** * A tree-table representing one BioMoby data type (with all its @@ -155,6 +157,104 @@ public Element toXML() { return ((DataTypeNode)getInnerModel().getRoot()).toXML(); } + + /** + * + * @param mobyObject + * a MobyObject that we would like to use as a template to + * populate ourselves with actual data + */ + public void populateData(MobyObject mobyObject) { + // TODO clear old data + DataTypeNode node = ((DataTypeNode)getInnerModel().getRoot()); + // clear out 'extra' nodes + node.children = null; + node.loadChildren(); + // set id/ns for this node + node.setId(mobyObject.getId()); + node.setNamespace(mobyObject.getNamespace()); + // set a value if applicable + if (node.isPrimitive) { + node.setValue(mobyObject.getValue()); + } + // fill any children present + if (!node.isPrimitive()) + populate_children(mobyObject, node); + // show our changes + updateUI(); + } + + /* + * @param mobyObject the object with children + * @param node the DataTypeNode to populate + */ + private void populate_children(MobyObject mobyObject, DataTypeNode node) { + // no children + if (node.children == null) + return; + // iterate over the children + for (DataTypeNode n : node.children) { + // stolen from MobyParser maybe this should be made 'public' + String methodName = "getMoby_" + + Utils.mobyEscape(Utils.javaEscape(Utils + .checkOrCreateArticleName(n.getMemberName(), + mobyObject.getClass().getName()))); + // use reflection to get the datatype from this object + Method method; + try { + method = mobyObject.getClass().getMethod (methodName, new Class[] { }); + Object o = method.invoke(mobyObject, new Object[] {}); + if (o == null) + continue; + if (o.getClass().isArray()) { + // probably a has relationship + if (n.isHAS()) { + Object[] os = (Object[])o; + // here we iterate over all of the nodes but the first one + // we do this because i need to populate the actual node 'n' as well + for (int x =1; x < os.length; x++) { + DataTypeNode newNode = DataTypeNode.createNode(n.getDataType(), n.getMemberName(), Central.iHAS, n.getParentNode(), n.dtTable, n.model); + newNode.loadChildren(); + newNode.setId(((MobyObject) os[x]).getId()); + newNode.setNamespace(((MobyObject) os[x]).getNamespace()); + if (newNode.isPrimitive) + newNode.setValue(((MobyObject) os[x]).getValue()); + n.getParentNode().addChild(newNode, n.getParentNode().getChildCount()); + if (!newNode.isPrimitive()) + populate_children((MobyObject) os[x], newNode); + } + // now we populate the first one + if (os.length > 0) { + n.setId(((MobyObject) os[0]).getId()); + n.setNamespace(((MobyObject) os[0]).getNamespace()); + if (n.isPrimitive) + n.setValue(((MobyObject) os[0]).getValue()); + if (!n.isPrimitive()) + populate_children((MobyObject) os[0], n); + } + } + } else { + // not a has relationship, so populate it + n.setId(((MobyObject) o).getId()); + n.setNamespace(((MobyObject) o).getNamespace()); + if (n.isPrimitive) + n.setValue(((MobyObject) o).getValue()); + if (!n.isPrimitive()) + populate_children((MobyObject) o, n); + } + } catch (SecurityException e) { + + } catch (NoSuchMethodException e) { + + } catch (IllegalAccessException e) { + + } catch (IllegalArgumentException e) { + + } catch (InvocationTargetException e) { + + } + } + } /********************************************************************* * Load shared icons. From kawas at dev.open-bio.org Fri Jan 30 09:48:02 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:48:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301448.n0UEm2nZ016668@dev.open-bio.org> kawas Fri Jan 30 09:48:01 EST 2009 Update of /home/repository/moby/moby-live/Java/src/Clients In directory dev.open-bio.org:/tmp/cvs-serv16633/src/Clients Modified Files: CreateMobyInput.java Log Message: updated client. when invoked with a -service and data is loaded, the panel populates it members. moby-live/Java/src/Clients CreateMobyInput.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2008/04/19 19:11:18 1.10 +++ /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2009/01/30 14:48:01 1.11 @@ -6,34 +6,35 @@ // Copyright Martin Senger (martin.senger at gmail.com). // -import org.biomoby.shared.CentralCached; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyService; -import org.biomoby.shared.event.LogListener; -import org.biomoby.shared.event.Notifier; -import org.biomoby.service.dashboard.data.DataTypeTreeTable; -import org.biomoby.service.dashboard.data.ServiceInputPanel; -import org.biomoby.client.CentralDigestCachedImpl; -import org.biomoby.client.CmdLineHelper; - -import org.tulsoft.tools.BaseCmdLine; -import org.tulsoft.shared.FileUtils; -import org.tulsoft.shared.GException; -import org.tulsoft.tools.gui.SwingUtils; - -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JPanel; - -import java.awt.BorderLayout; -import java.awt.GridBagLayout; import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JPanel; + +import org.biomoby.client.CmdLineHelper; +import org.biomoby.service.dashboard.data.DataTypeTreeTable; +import org.biomoby.service.dashboard.data.ServiceInputPanel; +import org.biomoby.shared.CentralCached; +import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.MobyException; +import org.biomoby.shared.MobyService; +import org.biomoby.shared.event.LogListener; import org.jdom.Document; -import org.jdom.output.XMLOutputter; import org.jdom.output.Format; +import org.jdom.output.XMLOutputter; +import org.tulsoft.tools.BaseCmdLine; +import org.tulsoft.tools.gui.JFileChooserWithHistory; +import org.tulsoft.tools.gui.SwingUtils; /** * A small command-line application showing how to use @@ -62,10 +63,13 @@ } }); - JPanel panel = new JPanel(new BorderLayout()); - panel.add (printButton, BorderLayout.SOUTH); - panel.add (treeTable.scrollable(), BorderLayout.CENTER); - + JPanel panel = new JPanel(new GridBagLayout()); + SwingUtils.addComponent + (panel, treeTable, + 0, 0, 2, 1, GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, 1.0, 1.0); + SwingUtils.addComponent + (panel, printButton, + 0, 1, 1, 1, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHWEST, 1.0, 0.0); showIt ("Data type: " + rootType.getName(), panel); } @@ -86,12 +90,39 @@ onPrint (tables); } }); + JButton loadButton = new JButton ("Load Input"); + loadButton.addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + JFileChooserWithHistory chooser = new JFileChooserWithHistory(System.getProperty("tmp.dir"), "load-file"); + chooser.getFileChooser().setMultiSelectionEnabled(false); + if (chooser.getFileChooser().showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { + File chosen = chooser.getFileChooser().getSelectedFile(); + StringBuilder sb = new StringBuilder(); + String line = null; + try { + BufferedReader br = new BufferedReader(new FileReader(chosen)); + while ((line = br.readLine()) != null) + sb.append(line + "\n"); + onLoad(tables, sb.toString()); + } catch (FileNotFoundException fnfe) { + + } catch (IOException ioe) { + + } + + } + + } + }); SwingUtils.addComponent (panel, tables, - 0, 0, 1, 1, GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, 1.0, 1.0); + 0, 0, 2, 1, GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, 1.0, 1.0); SwingUtils.addComponent (panel, printButton, 0, 1, 1, 1, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHWEST, 1.0, 0.0); + SwingUtils.addComponent + (panel, loadButton, + 1, 1, 1, 1, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHWEST, 1.0, 0.0); showIt ("Service: " + service.getName(), panel); } @@ -124,6 +155,14 @@ protected void onPrint (ServiceInputPanel inputs) { msgln (inputs.toXML()); } + + protected void onLoad (ServiceInputPanel inputs, String xml) { + try { + inputs.setValues(xml); + } catch (MobyException me) { + me.printStackTrace(); + } + } /************************************************************************* * From kawas at dev.open-bio.org Fri Jan 30 09:51:11 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:51:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301451.n0UEpBf4016722@dev.open-bio.org> kawas Fri Jan 30 09:51:11 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv16691/src/main/org/biomoby/service/dashboard Added Files: UnitTestingResultPanel.java UnitTestingServiceCallermodel.java MobyUnitTestingPanel.java Log Message: Initial commit of the MobyUnitTesting panel for dashboard. moby-live/Java/src/main/org/biomoby/service/dashboard UnitTestingResultPanel.java,NONE,1.1 UnitTestingServiceCallermodel.java,NONE,1.1 MobyUnitTestingPanel.java,NONE,1.1 From kawas at dev.open-bio.org Fri Jan 30 09:55:19 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:55:19 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301455.n0UEtJTw016780@dev.open-bio.org> kawas Fri Jan 30 09:55:19 EST 2009 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory dev.open-bio.org:/tmp/cvs-serv16745/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: added the unit testing panel to the list of available panels moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2008/05/15 18:59:25 1.9 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2009/01/30 14:55:19 1.10 @@ -5,4 +5,5 @@ org.biomoby.service.dashboard.StatisticsPanel org.biomoby.service.dashboard.DebuggingPanel org.biomoby.service.dashboard.ExamplePanel -org.biomoby.service.dashboard.PerlMoSeSPanel \ No newline at end of file +org.biomoby.service.dashboard.PerlMoSeSPanel +org.biomoby.service.dashboard.MobyUnitTestingPanel \ No newline at end of file From senger at dev.open-bio.org Fri Jan 30 21:23:09 2009 From: senger at dev.open-bio.org (Martin Senger) Date: Fri, 30 Jan 2009 21:23:09 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901310223.n0V2N9RZ018496@dev.open-bio.org> senger Fri Jan 30 21:23:09 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv18477/xmls Modified Files: rdfagentBuild.xml Log Message: new target for rdfagent build moby-live/Java/xmls rdfagentBuild.xml,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2009/01/29 19:39:45 1.6 +++ /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2009/01/31 02:23:09 1.7 @@ -109,7 +109,7 @@ - From groscurt at dev.open-bio.org Mon Jan 5 08:42:18 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:42:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050842.n058gIl1023735@dev.open-bio.org> groscurt Mon Jan 5 03:42:18 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory dev.open-bio.org:/tmp/cvs-serv23700/src/main/org/biomoby/service/generator Modified Files: DataTypesGenerator.java Log Message: templates for HAS(A) float and integer children of data types. moby-live/Java/src/main/org/biomoby/service/generator DataTypesGenerator.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java 2008/03/03 11:34:17 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java 2009/01/05 08:42:18 1.8 @@ -64,9 +64,13 @@ protected static final String TN_METHODS_HAS = "tn04"; protected static final String TN_METHODS_STRING_HAS = "tn041"; protected static final String TN_METHODS_BOOLEAN_HAS = "tn042"; + protected static final String TN_METHODS_INTEGER_HAS = "tn043"; + protected static final String TN_METHODS_FLOAT_HAS = "tn044"; protected static final String TN_METHODS_HASA = "tn05"; protected static final String TN_METHODS_STRING_HASA = "tn051"; protected static final String TN_METHODS_BOOLEAN_HASA = "tn052"; + protected static final String TN_METHODS_INTEGER_HASA = "tn053"; + protected static final String TN_METHODS_FLOAT_HASA = "tn054"; protected static final String TN_TOSTRING_HAS = "tn06"; protected static final String TN_TOSTRING_HASA = "tn07"; protected static final String TN_TOXML_HAS = "tn08"; @@ -117,9 +121,13 @@ tNames.put (TN_METHODS_HAS, new File (dir, "MethodsHASTemplate.java")); tNames.put (TN_METHODS_STRING_HAS, new File (dir, "MethodsHAS_string_Template.java")); tNames.put (TN_METHODS_BOOLEAN_HAS, new File (dir, "MethodsHAS_boolean_Template.java")); + tNames.put( TN_METHODS_INTEGER_HAS, new File(dir, "MethodsHAS_integer_Template.java") ); + tNames.put( TN_METHODS_FLOAT_HAS, new File(dir, "MethodsHAS_float_Template.java") ); tNames.put (TN_METHODS_HASA, new File (dir, "MethodsHASATemplate.java")); tNames.put (TN_METHODS_STRING_HASA, new File (dir, "MethodsHASA_string_Template.java")); tNames.put (TN_METHODS_BOOLEAN_HASA, new File (dir, "MethodsHASA_boolean_Template.java")); + tNames.put (TN_METHODS_INTEGER_HASA, new File (dir, "MethodsHASA_integer_Template.java")); + tNames.put( TN_METHODS_FLOAT_HASA, new File(dir, "MethodsHASA_float_Template.java") ); tNames.put (TN_TOSTRING_HAS, new File (dir, "ToStringHASTemplate.java")); tNames.put (TN_TOSTRING_HASA, new File (dir, "ToStringHASATemplate.java")); tNames.put (TN_TOXML_HAS, new File (dir, "ToXMLHASTemplate.java")); @@ -138,9 +146,13 @@ String methodsHASTemplate; String methodsHASStringTemplate; String methodsHASBooleanTemplate; + String methodsHASIntegerTemplate; + String methodsHASFloatTemplate; String methodsHASATemplate; String methodsHASAStringTemplate; String methodsHASABooleanTemplate; + String methodsHASAIntegerTemplate; + String methodsHASAFloatTemplate; String toStringHASTemplate; String toStringHASATemplate; String toXMLHASTemplate; @@ -188,9 +200,13 @@ methodsHASTemplate = loadTemplate (templates.get (TN_METHODS_HAS)); methodsHASStringTemplate = loadTemplate (templates.get (TN_METHODS_STRING_HAS)); methodsHASBooleanTemplate = loadTemplate (templates.get (TN_METHODS_BOOLEAN_HAS)); + methodsHASIntegerTemplate = loadTemplate( templates.get( TN_METHODS_INTEGER_HAS ) ); + methodsHASFloatTemplate = loadTemplate( templates.get( TN_METHODS_FLOAT_HAS ) ); methodsHASATemplate = loadTemplate (templates.get (TN_METHODS_HASA)); methodsHASAStringTemplate = loadTemplate (templates.get (TN_METHODS_STRING_HASA)); methodsHASABooleanTemplate = loadTemplate (templates.get (TN_METHODS_BOOLEAN_HASA)); + methodsHASAIntegerTemplate = loadTemplate( templates.get(TN_METHODS_INTEGER_HASA) ); + methodsHASAFloatTemplate = loadTemplate( templates.get(TN_METHODS_FLOAT_HASA) ); toStringHASTemplate = loadTemplate (templates.get (TN_TOSTRING_HAS)); toStringHASATemplate = loadTemplate (templates.get (TN_TOSTRING_HASA)); toXMLHASTemplate = loadTemplate (templates.get (TN_TOXML_HAS)); @@ -373,8 +389,12 @@ return methodsHASAStringTemplate; else if (MobyTags.MOBYBOOLEAN.equals (dataTypeName)) return methodsHASABooleanTemplate; - else - return null; + else if(MobyTags.MOBYINTEGER.equals( dataTypeName )) + return methodsHASAIntegerTemplate; + else if(MobyTags.MOBYFLOAT.equals( dataTypeName )) + return methodsHASAFloatTemplate; + else + return null; } protected String selectHASTemplateForPrimitiveType (String dataTypeName) { @@ -382,6 +402,10 @@ return methodsHASStringTemplate; else if (MobyTags.MOBYBOOLEAN.equals (dataTypeName)) return methodsHASBooleanTemplate; + else if(MobyTags.MOBYINTEGER.equals( dataTypeName )) + return methodsHASIntegerTemplate; + else if(MobyTags.MOBYFLOAT.equals( dataTypeName )) + return methodsHASFloatTemplate; else return null; } From groscurt at dev.open-bio.org Mon Jan 5 08:42:18 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:42:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050842.n058gIef023749@dev.open-bio.org> groscurt Mon Jan 5 03:42:18 EST 2009 Update of /home/repository/moby/moby-live/Java/src/config/templates In directory dev.open-bio.org:/tmp/cvs-serv23700/src/config/templates Added Files: MethodsHASA_integer_Template.java MethodsHAS_integer_Template.java MethodsHASA_float_Template.java MethodsHAS_float_Template.java Log Message: templates for HAS(A) float and integer children of data types. moby-live/Java/src/config/templates MethodsHASA_integer_Template.java,NONE,1.1 MethodsHAS_integer_Template.java,NONE,1.1 MethodsHASA_float_Template.java,NONE,1.1 MethodsHAS_float_Template.java,NONE,1.1 From groscurt at dev.open-bio.org Mon Jan 5 08:43:41 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:43:41 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050843.n058hflG023829@dev.open-bio.org> groscurt Mon Jan 5 03:43:40 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes In directory dev.open-bio.org:/tmp/cvs-serv23794/src/main/org/biomoby/shared/datatypes Modified Files: MobyBoolean.java Log Message: changed new Boolean (getValue()).booleanValue(); to Boolean.parseBoolean(getValue()) as this is the recommended way. moby-live/Java/src/main/org/biomoby/shared/datatypes MobyBoolean.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyBoolean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyBoolean.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyBoolean.java 2009/01/05 08:43:40 1.2 @@ -87,7 +87,7 @@ * @see #getValue *************************************************************************/ public boolean getBooleanValue() { - return new Boolean (getValue()).booleanValue(); + return Boolean.parseBoolean( getValue()); } } From groscurt at dev.open-bio.org Mon Jan 5 08:44:29 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:44:29 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050844.n058iTkX023869@dev.open-bio.org> groscurt Mon Jan 5 03:44:29 EST 2009 Update of /home/repository/moby/moby-live/Java/src/config/templates In directory dev.open-bio.org:/tmp/cvs-serv23834/src/config/templates Modified Files: ServicePOSetTemplate.java Log Message: template for service output changed so that it also accepts a collection of data types and not only an array. moby-live/Java/src/config/templates ServicePOSetTemplate.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/templates/ServicePOSetTemplate.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/templates/ServicePOSetTemplate.java 2005/09/19 08:08:32 1.2 +++ /home/repository/moby/moby-live/Java/src/config/templates/ServicePOSetTemplate.java 2009/01/05 08:44:29 1.3 @@ -9,4 +9,15 @@ throws org.biomoby.shared.MobyException { response.setDataSet (values, "@ARTICLE_NAME@"); } - + + /************************************************************************** + * Set a primary output set (a Collection) into the 'response'.

    + * + * @param response represents output data that will go to a client + * @param values is to be stored in the 'response' + * @throws org.biomoby.shared.MobyException if something goes wrong + *************************************************************************/ + public void set_ at ESC_ARTICLE_NAME@Set (MobyJob response, java.util.Collection<@DATATYPE@> values) + throws org.biomoby.shared.MobyException { + response.setDataSet (values.toArray(new @DATATYPE@[values.size()]), "@ARTICLE_NAME@"); + } From groscurt at dev.open-bio.org Mon Jan 5 08:46:07 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:46:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050846.n058k7JZ023945@dev.open-bio.org> groscurt Mon Jan 5 03:46:07 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv23910/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/src/main/org/biomoby/service/dashboard GeneratorPanel.java,1.18,1.19 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2008/03/02 16:59:54 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2009/01/05 08:46:07 1.19 @@ -442,8 +442,8 @@ SwingUtils.addComponent (pDeploy, glue, 1, 0, 1, 1, HORI, NWEST, 1.0, 0.0); SwingUtils.addComponent (pDeploy, remotely, 2, 0, 1, 1, NONE, NEAST, 0.0, 0.0); - // Tomcat/Axis locations - JPanel pServer = createTitledPanel ("Tomcat/Axis locations"); + // Server/Axis locations + JPanel pServer = createTitledPanel ("Server/Axis locations"); String initValue = null; String os = System.getProperty ("os.name"); @@ -455,17 +455,18 @@ else initValue = "/usr/local/"; - JLabel lTomcatHome = new JLabel ("Tomcat home directory"); + JLabel lTomcatHome = new JLabel ("Server home directory"); JFileChooserWithHistory tomcatHome = - createFileSelector ("Select Tomcat home directory", + createFileSelector ("Select server home directory", "Select", initValue, DP_TOMCAT_HOME, DP_TOMCAT_HOME); tomcatHome.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - JLabel lAxisInT = new JLabel ("Axis relative path in Tomcat"); - JTextFieldWithHistory axisInT = createText ("axis", DP_AXIS_IN_TOMCAT, DP_AXIS_IN_TOMCAT); + JLabel lAxisInT = new JLabel ("Axis relative path"); + JTextFieldWithHistory axisInT = createText (null, DP_AXIS_IN_TOMCAT, DP_AXIS_IN_TOMCAT); + axisInT.setToolTipText( "The path to Axis - e.g. webapps/axis for Tomcat or server/default/deploy/axis.war for JBoss" ); JLabel lHost = new JLabel ("Hostname"); JTextFieldWithHistory host = createText ("localhost", DP_HOSTNAME, DP_HOSTNAME); JLabel lPort = new JLabel ("Port"); From groscurt at dev.open-bio.org Mon Jan 5 08:46:07 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:46:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050846.n058k7rr023973@dev.open-bio.org> groscurt Mon Jan 5 03:46:07 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv23910/xmls Modified Files: deployBuild.xml tomcat.xml servletsBuild.xml Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/xmls deployBuild.xml,1.6,1.7 tomcat.xml,1.2,1.3 servletsBuild.xml,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/deployBuild.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2008/03/03 14:11:08 1.6 +++ /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 08:46:07 1.7 @@ -11,13 +11,13 @@ - @@ -55,7 +55,7 @@ - @@ -83,11 +83,11 @@ - + - + - + - + @@ -104,7 +104,7 @@ - + @@ -129,14 +129,14 @@ - + - + @@ -152,7 +152,7 @@ - + @@ -236,7 +236,7 @@ - + @@ -247,9 +247,9 @@ fork="true" failonerror="true"> - + - + @@ -290,7 +290,7 @@ - @@ -328,18 +328,18 @@ - - - + + + - + - - - + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/tomcat.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2008/03/03 14:11:08 1.2 +++ /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 08:46:07 1.3 @@ -4,20 +4,19 @@ - + - - - + + + - + - - - + + @@ -30,37 +29,37 @@ + location="${real.catalina.home}/${axis.relative.path}/WEB-INF"/> - + ' - ERROR: Tomcat server not found. + ERROR: Server not found. ------------------------------- Please set environment variable CATALINA_HOME to point to it, or create a file 'build.properties' and put there the line: - catalina.home = <location of your Tomcat> + catalina.home = <location of your server> (do not include '<' and '>' there), or start your Ant with this property on the command-line: - ant -Dcatalina.home=<location of your Tomcat> + ant -Dcatalina.home=<location of your server> - - - + + + - + ' - ERROR: Tomcat does not seem to be running. + ERROR: Server does not seem to be running. ------------------------------------------ - I have just checked ${tomcat.host}:${tomcat.port}... + I have just checked ${server.host}:${server.port}... You may perhaps consider to start it. Or to set differently the following properties: - "tomcat.host" (current value: ${tomcat.host}), and - "tomcat.port" (current value: ${tomcat.port}) + "server.host" (current value: ${server.host}), and + "server.port" (current value: ${server.port}) =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml 2008/03/02 12:45:27 1.2 +++ /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml 2009/01/05 08:46:07 1.3 @@ -10,7 +10,7 @@ - From groscurt at dev.open-bio.org Mon Jan 5 08:46:08 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:46:08 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050846.n058k8uJ023995@dev.open-bio.org> groscurt Mon Jan 5 03:46:07 EST 2009 Update of /home/repository/moby/moby-live/Java/src/webapps In directory dev.open-bio.org:/tmp/cvs-serv23910/src/webapps Modified Files: remote.deploy.build.xml.template Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/src/webapps remote.deploy.build.xml.template,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/webapps/remote.deploy.build.xml.template,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/webapps/remote.deploy.build.xml.template 2008/03/03 14:11:08 1.5 +++ /home/repository/moby/moby-live/Java/src/webapps/remote.deploy.build.xml.template 2009/01/05 08:46:07 1.6 @@ -20,15 +20,13 @@ - - - - + + + + - - @@ -39,22 +37,22 @@ The following properties define where and how the services will be deployed. You can still define new values for them. -tomcat.home = ${tomcat.home} +server.home = ${server.home} All libraries (.jar files) will be moved here. -tomcat.host = ${tomcat.host} - Where is your Tomcat installed. If this is not localhost +server.host = ${server.host} + Where is your server installed. If this is not localhost you may need to allow remote control in server-config.wsdd before deploying services. -tomcat.port = ${tomcat.port} - Where is your Tomcat listening. +server.port = ${server.port} + Where is your server listening. axis.relative.path = ${axis.relative.path} - Where is Axis installed within Tomcat's 'webapps' dir. + Where is Axis installed within Tomcat's 'webapps' dir or JBoss 'server/default/deploy' dir axis.admin.url = ${axis.admin.url} - How to access your Tomcat/Axis. + How to access your server/Axis. For the list of services that will be deployed when you call 'ant deploy' (or undeploy when you call 'ant undeploy') @@ -67,15 +65,11 @@ - - - - - + + location="${real.catalina.home}/${axis.relative.path}/WEB-INF"/> @@ -94,7 +88,7 @@ - - - + - - - + + + - - + - ' - ERROR: Tomcat does not seem to be running. + ERROR: Server does not seem to be running. ------------------------------------------ - I have just checked ${tomcat.host}:${tomcat.port}... + I have just checked ${server.host}:${server.port}... You may perhaps consider to start it. Or to set differently the following properties: - "tomcat.host" (current value: ${tomcat.host}), and - "tomcat.port" (current value: ${tomcat.port}) + "server.host" (current value: ${server.host}), and + "server.port" (current value: ${server.port}) - + - + - + - + - + @@ -194,7 +188,7 @@ - + @@ -202,9 +196,9 @@ - + - + From groscurt at dev.open-bio.org Mon Jan 5 08:47:04 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 03:47:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050847.n058l4IH024045@dev.open-bio.org> groscurt Mon Jan 5 03:47:04 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv24002/src/main/org/biomoby/service/dashboard Modified Files: RegistrationServiceTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationDataTypeSubPanel.java Log Message: Added an unregistration button at the bar with the other buttons. moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationServiceTypeSubPanel.java,1.9,1.10 RegistrationNamespaceSubPanel.java,1.8,1.9 RegistrationDataTypeSubPanel.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/12/20 20:00:41 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2009/01/05 08:47:04 1.10 @@ -15,6 +15,7 @@ import org.tulsoft.tools.gui.SwingUtils; import org.tulsoft.tools.gui.JTextFieldWithHistory; +import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JSplitPane; @@ -24,6 +25,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import java.awt.GridBagLayout; +import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; @@ -49,6 +51,8 @@ JTextFieldWithHistory stName, stAuth, stEmail; JTextArea stDescArea; JLabel stISA; + CustomServiceTypesTree serviceTypeTree; + JButton unregisButton; /********************************************************************* * Default constructor. @@ -97,7 +101,7 @@ new ServiceTypesBoard (registryModel, console, propertyChannel, - new CustomServiceTypesTree (registryModel, console)); + serviceTypeTree = new CustomServiceTypesTree (registryModel, console)); serviceTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); // allow to copy selected service types to the new one @@ -131,12 +135,25 @@ KeyEvent.VK_F, REG_ST_FROM_XML, createXMLChooser (REG_ST_FROM_XML)); + unregisButton = + createButton (" Unregister Service Type ", + "Remove an existing service type from a Biomoby registry", + KeyEvent.VK_U, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + serviceTypeTree.onUnregisterServiceType(); + } + }); + unregisButton.setIcon (unregisterIcon); + unregisButton.setDisabledIcon (unregisterIconDis); + // put it together - SwingUtils.addComponent (p, split, 0, 0, 3, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); + SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/12/20 20:00:41 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2009/01/05 08:47:04 1.9 @@ -15,6 +15,8 @@ import org.tulsoft.tools.gui.SwingUtils; import org.tulsoft.tools.gui.JTextFieldWithHistory; +import javax.swing.Box; +import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JSplitPane; @@ -23,7 +25,9 @@ import javax.swing.JComponent; import javax.swing.tree.DefaultMutableTreeNode; +import java.awt.Component; import java.awt.GridBagLayout; +import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; @@ -46,6 +50,8 @@ // components that are used from more methods JTextFieldWithHistory nsName, nsAuth, nsEmail; JTextArea nsDescArea; + JButton unregisButton; + CustomNamespacesTree namespacesTree; /********************************************************************* * Default constructor. @@ -90,7 +96,7 @@ new NamespacesBoard (registryModel, console, propertyChannel, - new CustomNamespacesTree (registryModel, console)); + namespacesTree = new CustomNamespacesTree (registryModel, console)); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); // allow to copy selected namespace to the new one @@ -124,12 +130,24 @@ KeyEvent.VK_F, REG_NS_FROM_XML, createXMLChooser (REG_NS_FROM_XML)); + unregisButton = + createButton (" Unregister Namespace ", + "Remove an existing namespace from a Biomoby registry", + KeyEvent.VK_U, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + namespacesTree.onUnregisterNamespace(); + } + }); + unregisButton.setIcon (unregisterIcon); + unregisButton.setDisabledIcon (unregisterIconDis); // put it together - SwingUtils.addComponent (p, split, 0, 0, 3, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); + SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } @@ -306,6 +324,7 @@ MobyException exception = null; public Object construct() { try { + unregisButton.setEnabled( false ); MobyNamespace namespace = new MobyNamespace (name); console.setText ("Namespace to be unregistered: " + name + "\n"); registryModel.unRegisterNamespace (namespace); @@ -320,6 +339,7 @@ // runs on the event-dispatching thread. public void finished() { + unregisButton.setEnabled( true ); if (exception != null) error ("An error occured when trying to unregister a namespace.\n\n", exception); @@ -328,5 +348,4 @@ worker.start(); } } - } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2008/05/22 17:09:40 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2009/01/05 08:47:04 1.12 @@ -19,6 +19,7 @@ import org.tulsoft.tools.gui.SwingUtils; import org.tulsoft.tools.gui.JTextFieldWithHistory; +import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JSplitPane; @@ -28,6 +29,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import java.awt.GridBagLayout; +import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; @@ -52,6 +54,9 @@ JTextFieldWithHistory dtName, dtAuth, dtEmail; JTextArea dtDescArea; MobyException dtUnregException; + CustomDataTypesTree datatypeTree; + JButton unregisButton; + // some texts final static String DATA_TYPE_UNREG_PROLOGUE = @@ -100,7 +105,7 @@ new DataTypesBoard (registryModel, console, propertyChannel, - new CustomDataTypesTree (registryModel, console)); + datatypeTree = new CustomDataTypesTree (registryModel, console)); dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); // allow to copy selected namespace to the new one @@ -134,16 +139,28 @@ KeyEvent.VK_F, REG_DT_FROM_XML, createXMLChooser (REG_DT_FROM_XML)); + unregisButton = + createButton (" Unregister Data Type ", + "Remove an existing datatype from a Biomoby registry", + KeyEvent.VK_U, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + datatypeTree.onUnregisterDataType(); + } + }); + unregisButton.setIcon (unregisterIcon); + unregisButton.setDisabledIcon (unregisterIconDis); // make splits JSplitPane split = hSplit (hSplit (buildTree.scrollable(), defs, 0.5), board, 0.6); // put it together - SwingUtils.addComponent (p, split, 0, 0, 3, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); + SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } @@ -406,6 +423,7 @@ final SwingWorker worker = new SwingWorker() { public Object construct() { try { + unregisButton.setEnabled( false ); MobyDataType dataType = new MobyDataType (dataTypeName); console.setText ("Data type to be unregistered: " + dataTypeName + "\n"); registryModel.unRegisterDataType (dataType); @@ -420,6 +438,7 @@ // runs on the event-dispatching thread. public void finished() { + unregisButton.setEnabled( true ); if (dtUnregException != null) error (DATA_TYPE_UNREG_PROLOGUE, dtUnregException); } From groscurt at dev.open-bio.org Mon Jan 5 09:37:47 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:37:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050937.n059blKO024631@dev.open-bio.org> groscurt Mon Jan 5 04:37:47 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv24596/src/main/org/biomoby/service/dashboard Modified Files: AntModel.java Log Message: deployment for jboss available moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2008/03/02 12:45:26 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2009/01/05 09:37:46 1.9 @@ -386,10 +386,10 @@ * Add properties shared by deployment and undeployment... ********************************************************************/ protected void addDeploymentProps (Properties props) { - add (props, "catalina.home", DP_TOMCAT_HOME); + add (props, "server.home", DP_TOMCAT_HOME); add (props, "axis.relative.path", DP_AXIS_IN_TOMCAT); - add (props, "tomcat.host", DP_HOSTNAME); - add (props, "tomcat.port", DP_PORT); + add (props, "server.host", DP_HOSTNAME); + add (props, "server.port", DP_PORT); add (props, "axis.admin.url", DP_AXIS_ADMIN); Map services = (Map)propertyChannel.get (DP_DEPL_SERVICES); From groscurt at dev.open-bio.org Mon Jan 5 09:38:13 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:38:13 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050938.n059cDKi024691@dev.open-bio.org> groscurt Mon Jan 5 04:38:13 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv24636/xmls Modified Files: tomcat.xml Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/xmls tomcat.xml,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/tomcat.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 08:46:07 1.3 +++ /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 09:38:13 1.4 @@ -20,11 +20,8 @@ - - - - - + + From groscurt at dev.open-bio.org Mon Jan 5 09:38:13 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:38:13 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050938.n059cDnV024671@dev.open-bio.org> groscurt Mon Jan 5 04:38:13 EST 2009 Update of /home/repository/moby/moby-live/Java In directory dev.open-bio.org:/tmp/cvs-serv24636 Modified Files: build.properties.template Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java build.properties.template,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.properties.template,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/build.properties.template 2008/02/22 09:37:38 1.7 +++ /home/repository/moby/moby-live/Java/build.properties.template 2009/01/05 09:38:13 1.8 @@ -15,11 +15,11 @@ #http.proxyPort = your proxy port # all other properties are used only if you wish to deploy jMoby -# servlets into your Tomcat - the more verbose description of these +# servlets into your server - the more verbose description of these # properties is in the deployment descriptor in # 'src/webapps/web.xml.template -#catalina.home = /home/senger/Software/jakarta-catalina +#server.home = /home/senger/Software/jakarta-catalina #provider.name = your-name #provider.email = your-email-address #refresh.interval = 3 From groscurt at dev.open-bio.org Mon Jan 5 09:40:36 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 5 Jan 2009 04:40:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901050940.n059eafX024738@dev.open-bio.org> groscurt Mon Jan 5 04:40:36 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv24699/xmls Modified Files: deployBuild.xml tomcat.xml Log Message: changed to allow deployment on tomcat AND jboss moby-live/Java/xmls deployBuild.xml,1.7,1.8 tomcat.xml,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/deployBuild.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 08:46:07 1.7 +++ /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 09:40:36 1.8 @@ -328,7 +328,7 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/tomcat.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 09:38:13 1.4 +++ /home/repository/moby/moby-live/Java/xmls/tomcat.xml 2009/01/05 09:40:36 1.5 @@ -17,29 +17,29 @@ - + - + + location="${real.server.home}/${axis.relative.path}/WEB-INF"/> - + ' ERROR: Server not found. ------------------------------- Please set environment variable CATALINA_HOME to point to it, or create a file 'build.properties' and put there the line: - catalina.home = <location of your server> + server.home = <location of your server> (do not include '<' and '>' there), or start your Ant with this property on the command-line: - ant -Dcatalina.home=<location of your server> + ant -Dserver.home=<location of your server> @@ -65,6 +65,6 @@ From groscurt at dev.open-bio.org Tue Jan 6 09:40:13 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Tue, 6 Jan 2009 04:40:13 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901060940.n069eDwU030095@dev.open-bio.org> groscurt Tue Jan 6 04:40:12 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv30060/xmls Modified Files: deployBuild.xml Log Message: moby-live/Java/xmls deployBuild.xml,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/deployBuild.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/05 09:40:36 1.8 +++ /home/repository/moby/moby-live/Java/xmls/deployBuild.xml 2009/01/06 09:40:12 1.9 @@ -172,7 +172,7 @@ - + From groscurt at dev.open-bio.org Tue Jan 6 09:41:48 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Tue, 6 Jan 2009 04:41:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901060941.n069fmo5030179@dev.open-bio.org> groscurt Tue Jan 6 04:41:48 EST 2009 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv30144/docs Modified Files: index.html Log Message: moby-live/Java/docs index.html,1.38,1.39 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/index.html,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- /home/repository/moby/moby-live/Java/docs/index.html 2008/11/28 12:05:02 1.38 +++ /home/repository/moby/moby-live/Java/docs/index.html 2009/01/06 09:41:48 1.39 @@ -176,7 +176,8 @@ Services Support

  • Biomoby Dashboard
  • An Alternative jMoby Step-by-Step Guide +border=0/>An Alternative jMoby Step-by-Step Guide +(with video guides how to set up JMoby with Eclipse and how to develop moby web services !)
  • Code Examples

    @@ -188,7 +189,7 @@

  • A note on using secondary articles with MobyServlet
  • How to wrap an EMBOSS/ACD program as a Moby service
  • How to wrap an exisitng Web Service as a Moby service (using SAWSDL) +border=0/>How to wrap an existing Web Service as a Moby service (using SAWSDL)
  • The org.biomoby.shared.data package "In Anger": creating data instances
  • From groscurt at dev.open-bio.org Tue Jan 6 09:41:12 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Tue, 6 Jan 2009 04:41:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901060941.n069fBfn030139@dev.open-bio.org> groscurt Tue Jan 6 04:41:11 EST 2009 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv30100/docs Modified Files: Moses-deploy.html EclipseAndJMoby.html Log Message: moby-live/Java/docs Moses-deploy.html,1.4,1.5 EclipseAndJMoby.html,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/Moses-deploy.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2008/02/14 06:13:35 1.4 +++ /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2009/01/06 09:41:11 1.5 @@ -20,12 +20,12 @@
      -
    • Copying necessary classes to Tomcat, and +
    • Copying necessary classes to the server (e.g Tomcat or JBoss), and
    • Creating a deployment descriptor (an XML file, usually with an extension .wsdd) and calling Axis's AdminClient (a Java program which is included in the Axis package) to install this deployment descriptor into Axis's configuration file (usually -<tomcat-home>/webapps/axis/WEB-INF/server-config.wsdd). +<server-home>/<axis-home>/WEB-INF/server-config.wsdd).
    @@ -33,10 +33,10 @@ @@ -181,48 +181,48 @@

    Local deployment

    -Local deployment means to move files to local Tomcat, and to call a +Local deployment means to move files to local server, and to call a program provided by Axis toolkit to configure Axis in order to know about new services. Properties for that, therefore, define where is -your Tomcat, and where is Axis installed within this Tomcat.

    +your server, and where is Axis installed within this server.

    -catalina.home = <your-tomcat-directory>
    +server.home = <your-server-directory>
     
    -Where is installed your Tomcat. Note that moving things there will -require a write access to some directories in the Tomcat directory, +Where your server is installed (e.g. /usr/local/tomcat or /usr/local/jboss). +Note that moving things there will require a write access to some directories in the server directory, especially to directory where Axis has its libraries (which is, by -default, <tomcat-home>/webapps/axis/WEB-INF/lib).

    +default, <server-home>/<axis-home>/WEB-INF/lib).

    -If you have installed Axis in Tomcat in a standard place, and if your -Tomcat listens on a standard port, this is the only property you need +If you have installed Axis in the server in a standard place, and if your +server listens on a standard port, this is the only property you need to specify.

    -axis.relative.path = <directory-with-Axis-in-Tomcat>
    +axis.relative.path = <directory-with-Axis-in-server>
     
    -Where is installed Axis in Tomcat. Put here a path starting in -<tomcat-home>/webapps/ (but excluding this -beginning). Default value is axis. +Where is Axis installed in the server. Put here a path starting in +<server-home>/ (but excluding this +beginning). Default value is webapps/axis as for Tomcat (for JBoss the default value is server/default/deploy/axis.war).
    -tomcat.host = <tomcat-computer-name>
    +server.host = <server-computer-name>
     
    -A machine name where is Tomcat installed. Default is +A machine name where the server is installed. Default is localhost. This is used by the Axis program when deploying new services. If it is not a localhost then it is called remote administration and Axis User's Guide tells about it: @@ -250,12 +250,12 @@
    -tomcat.port = <tomcat-port-number>
    +server.port = <server-port-number>
     
    -A port where Tomcat is listening. Default value is 8080. +A port where the server is listening. Default value is 8080.
    @@ -269,7 +269,8 @@ Used to find a correct piece of Axis when deploying services. Very rarely needed to be changed. Default value (which depends on a property defined above) is -<axis.relative.path>/servlet/AxisServlet. +axis/servlet/AxisServlet. You can check this by typing in http://<server.home>:<server.port>/<axis.admin.url> +in your browser.
    @@ -300,7 +301,7 @@ -After that, restart your Tomcat (because new classes where added there). +After that, restart your server (because new classes where added there).

    How to un-deploy local services

    @@ -311,29 +312,29 @@ It removes Axis configuration of your services but it does not clean -up Tomcat/Axis lib directory. That would be a more complex +up server/Axis lib directory. That would be a more complex task...

    Remote deployment

    -A remote deployment does not need any Tomcat running on your +A remote deployment does not need any server running on your machine. It creates a local file (slightly fat, because it includes both Axis and Ant libraries) which you will then move (by ftp, for -example) to a real machine where you have Tomcat running and where you +example) to a real machine where you have a server running and where you want to have your services deployed.

    In order to make easy to use the resulting file on a target machine, -you still need to set Tomcat and Axis properties before creating this +you still need to set server and Axis properties before creating this file here. By default, the same properties are used as for local -Tomcat: +server:

    -catalina.home = <your-tomcat-directory>
    -axis.relative.path = <directory-with-Axis-in-Tomcat>
    -tomcat.host = <tomcat-computer-name>
    +server.home = <your-server-directory>
    +axis.relative.path = <directory-with-Axis-in-server>
    +server.host = <server-computer-name>
     wsdd.template = <filename-with-wsdd-template>
    -tomcat.port = <tomcat-port-number>
    +server.port = <server-port-number>
     axis.admin.url = <URL-path>
     
    @@ -343,10 +344,10 @@ cross:
    -cross.tomcat.home = <your-tomcat-directory>
    -cross.axis.relative.path = <directory-with-Axis-in-Tomcat>
    -cross.tomcat.host = <tomcat-computer-name>
    -cross.tomcat.port = <tomcat-port-number>
    +cross.server.home = <your-server-directory>
    +cross.axis.relative.path = <directory-with-Axis-in-server>
    +cross.server.host = <server-computer-name>
    +cross.server.port = <server-port-number>
     cross.axis.admin.url = <URL-path>
     
    @@ -374,7 +375,7 @@ -And again, restarting Tomcat is often a good idea.

    +And again, restarting the server is often a good idea.

    If you want first to see if your properties were specified correctly, try first: =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2008/03/14 14:01:01 1.9 +++ /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2009/01/06 09:41:11 1.10 @@ -18,13 +18,6 @@

    Introduction

    - -
    In February 2008, few changes were made in the -jMoby building process. The major change is getting 3rd-party -libraries using Maven. This document was not yet updated to reflect -it. -
    - I am both: a newbie to Eclipse, and a dinosaurs doing everything in Emacs, but times are changing, and no Emacs extension can beat Eclipse on its From kawas at dev.open-bio.org Mon Jan 12 22:21:22 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 12 Jan 2009 17:21:22 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901122221.n0CMLMZR014349@dev.open-bio.org> kawas Mon Jan 12 17:21:22 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv14313/Perl/MOSES-MOBY Modified Files: Makefile.PL Log Message: update wsrf lite version required. moby-live/Perl/MOSES-MOBY Makefile.PL,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2008/11/19 14:24:13 1.11 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/01/12 22:21:22 1.12 @@ -37,7 +37,7 @@ # for async services requires 'MOBY::Client::Central' => 1.06; - requires 'WSRF::Lite' => '0.8.2.3'; + requires 'WSRF::Lite' => '0.8.2.6'; build_requires 'Test::More' => '0.42'; no_index 'directory' => 'bin/scripts'; From kawas at dev.open-bio.org Tue Jan 13 19:41:02 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 13 Jan 2009 14:41:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901131941.n0DJf2rj021322@dev.open-bio.org> kawas Tue Jan 13 14:41:01 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES In directory dev.open-bio.org:/tmp/cvs-serv21286/Perl/MOSES-MOBY/lib/MOSES Modified Files: MOBY.pm Log Message: added a link to the async moby tutorial moby-live/Perl/MOSES-MOBY/lib/MOSES MOBY.pm,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2008/08/25 16:27:28 1.6 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2009/01/13 19:41:01 1.7 @@ -2054,6 +2054,7 @@ Tutorial for creating SOAP based Biomoby Services
    Tutorial for creating CGI based Biomoby Services + Tutorial for creating Asynchronous SOAP based Biomoby Services =end html From kawas at dev.open-bio.org Mon Jan 19 19:13:30 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 19 Jan 2009 14:13:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901191913.n0JJDUo2020851@dev.open-bio.org> kawas Mon Jan 19 14:13:29 EST 2009 Update of /home/repository/moby/moby-live/Docs/ProjectDocs In directory dev.open-bio.org:/tmp/cvs-serv20816/Docs/ProjectDocs Modified Files: index.html Log Message: added links to the CPAN releases of MOBY, MOBY-Client, and MOSES-MOBY. moby-live/Docs/ProjectDocs index.html,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/ProjectDocs/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Docs/ProjectDocs/index.html 2008/03/06 17:02:55 1.9 +++ /home/repository/moby/moby-live/Docs/ProjectDocs/index.html 2009/01/19 19:13:29 1.10 @@ -9,6 +9,31 @@

    +

    +
    MOBY on CPAN (client/registry code) + +
    MOBY contains libraries for PERL developers, libraries for hosting a registry and it +also contains ready-to-use clients for any Biomoby users, allowing +access to Biomoby registries and to Biomoby services). + +
    +

    +

    +
    MOBY on CPAN (client code only) + +
    MOBY-Client contains libraries for Perl developers, and it +also contains ready-to-use clients for any Biomoby users, allowing +access to Biomoby registries and to Biomoby services). + +
    +

    +

    +
    MoSeS (Moby Services Support) for PERL + +
    MOSES-MOBY Perl extension for the automatic generation of BioMOBY web services. +
    +

    +

    Language Specific Documents

    From groscurt at dev.open-bio.org Mon Jan 26 08:29:59 2009 From: groscurt at dev.open-bio.org (Andreas Groscurth) Date: Mon, 26 Jan 2009 03:29:59 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901260829.n0Q8TxOn001526@dev.open-bio.org> groscurt Mon Jan 26 03:29:58 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv1482/src/main/org/biomoby/service/dashboard Modified Files: RegistrationServiceTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationDataTypeSubPanel.java Log Message: unregister button exists, but it is commented, so basically same as before... moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationServiceTypeSubPanel.java,1.10,1.11 RegistrationNamespaceSubPanel.java,1.9,1.10 RegistrationDataTypeSubPanel.java,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2009/01/05 08:47:04 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2009/01/26 08:29:58 1.11 @@ -135,17 +135,17 @@ KeyEvent.VK_F, REG_ST_FROM_XML, createXMLChooser (REG_ST_FROM_XML)); - unregisButton = - createButton (" Unregister Service Type ", - "Remove an existing service type from a Biomoby registry", - KeyEvent.VK_U, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - serviceTypeTree.onUnregisterServiceType(); - } - }); - unregisButton.setIcon (unregisterIcon); - unregisButton.setDisabledIcon (unregisterIconDis); +// unregisButton = +// createButton (" Unregister Service Type ", +// "Remove an existing service type from a Biomoby registry", +// KeyEvent.VK_U, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// serviceTypeTree.onUnregisterServiceType(); +// } +// }); +// unregisButton.setIcon (unregisterIcon); +// unregisButton.setDisabledIcon (unregisterIconDis); // put it together @@ -153,7 +153,7 @@ SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); - SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); +// SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2009/01/05 08:47:04 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2009/01/26 08:29:58 1.10 @@ -130,24 +130,24 @@ KeyEvent.VK_F, REG_NS_FROM_XML, createXMLChooser (REG_NS_FROM_XML)); - unregisButton = - createButton (" Unregister Namespace ", - "Remove an existing namespace from a Biomoby registry", - KeyEvent.VK_U, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - namespacesTree.onUnregisterNamespace(); - } - }); - unregisButton.setIcon (unregisterIcon); - unregisButton.setDisabledIcon (unregisterIconDis); +// unregisButton = +// createButton (" Unregister Namespace ", +// "Remove an existing namespace from a Biomoby registry", +// KeyEvent.VK_U, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// namespacesTree.onUnregisterNamespace(); +// } +// }); +// unregisButton.setIcon (unregisterIcon); +// unregisButton.setDisabledIcon (unregisterIconDis); // put it together SwingUtils.addComponent (p, split, 0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); - SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); +// SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2009/01/05 08:47:04 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2009/01/26 08:29:58 1.13 @@ -139,17 +139,17 @@ KeyEvent.VK_F, REG_DT_FROM_XML, createXMLChooser (REG_DT_FROM_XML)); - unregisButton = - createButton (" Unregister Data Type ", - "Remove an existing datatype from a Biomoby registry", - KeyEvent.VK_U, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - datatypeTree.onUnregisterDataType(); - } - }); - unregisButton.setIcon (unregisterIcon); - unregisButton.setDisabledIcon (unregisterIconDis); +// unregisButton = +// createButton (" Unregister Data Type ", +// "Remove an existing datatype from a Biomoby registry", +// KeyEvent.VK_U, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// datatypeTree.onUnregisterDataType(); +// } +// }); +// unregisButton.setIcon (unregisterIcon); +// unregisButton.setDisabledIcon (unregisterIconDis); // make splits JSplitPane split = hSplit (hSplit (buildTree.scrollable(), @@ -160,7 +160,7 @@ SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, showXMLButton, 1, 1, 1, 1, NONE, WEST, 0.0, 0.0); SwingUtils.addComponent (p, fromXMLButton, 2, 1, 1, 1, NONE, WEST, 0.0, 0.0); - SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); +// SwingUtils.addComponent (p, unregisButton, 3, 1, 1, 1, NONE, NEAST, 0.0, 0.0); return p; } From jmrc at dev.open-bio.org Mon Jan 26 15:24:39 2009 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Mon, 26 Jan 2009 10:24:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901261524.n0QFOd3p004990@dev.open-bio.org> jmrc Mon Jan 26 10:24:38 EST 2009 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl In directory dev.open-bio.org:/tmp/cvs-serv4955 Modified Files: ExecuteSyncService.html Added Files: ExecuteAsyncService.html Log Message: users: jmrodriguez at cnio.es, jmfernandez at cnio.es date: 26-Jan-2009 - Fixed some documentation typos. - Add documentation that describes how to execute asynchronous services. moby-live/Docs/MOBY-S_API/Perl ExecuteAsyncService.html,NONE,1.1 ExecuteSyncService.html,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteSyncService.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteSyncService.html 2008/02/14 02:09:32 1.6 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteSyncService.html 2009/01/26 15:24:38 1.7 @@ -58,8 +58,8 @@

    Executing a service in Synchronous mode

    -The "getGoTerm" service that we have been discussing in this tutorial is a Sychronous Moby Service, meaning that if you execute it, the response from the -server will immeidately contain the result data. This is distinct from Asynchronous Moby Services where the service provider gives you a "ticket" with which +The "getGoTerm" service that we have been discussing in this tutorial is a Synchronous Moby Service, meaning that if you execute it, the response from the +server will immediately contain the result data. This is distinct from Asynchronous Moby Services where the service provider gives you a "ticket" with which you can retrieve the result data at a later time (e.g. for long-executing services). The way to know if a discovered service is Synchronous or Asynchronous is by the "category" method of the MOBY::Client::ServiceInstance object. Synchronous services use the category "moby", while Asynchronous services use the category "moby-async". From kawas at dev.open-bio.org Mon Jan 26 16:34:12 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 26 Jan 2009 11:34:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901261634.n0QGYCio005728@dev.open-bio.org> kawas Mon Jan 26 11:34:12 EST 2009 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl In directory dev.open-bio.org:/tmp/cvs-serv5693/Docs/MOBY-S_API/Perl Modified Files: ExecuteAsyncService.html Log Message: a tag was missing a closing brace moby-live/Docs/MOBY-S_API/Perl ExecuteAsyncService.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteAsyncService.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteAsyncService.html 2009/01/26 15:24:38 1.1 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ExecuteAsyncService.html 2009/01/26 16:34:12 1.2 @@ -196,7 +196,7 @@ 44:]); 45:print "Output----------\n$response\n"; 46: - From kawas at dev.open-bio.org Wed Jan 28 14:25:30 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:25:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281425.n0SEPUKB015676@dev.open-bio.org> kawas Wed Jan 28 09:25:29 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv15636/Perl/MOBY-Server Modified Files: Makefile.PL META.yml Log Message: updated the changes to reflect recent changes in the source. moby-live/Perl/MOBY-Server Makefile.PL,1.13,1.14 META.yml,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/12/02 19:15:02 1.13 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2009/01/28 14:25:29 1.14 @@ -3,7 +3,7 @@ # Define metadata name 'MOBY'; - version '1.06'; + version '1.07'; license 'perl'; abstract 'This distribution is for communicating with or creating your own MOBY Central registry'; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml 2008/12/02 19:15:31 1.5 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml 2009/01/28 14:25:29 1.6 @@ -44,4 +44,4 @@ XML::SemanticCompare: 0 XML::Simple: 2.18 WSRF::Lite: 0.8.2.5 -version: 1.06 +version: 1.07 From kawas at dev.open-bio.org Wed Jan 28 14:35:41 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:35:41 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281435.n0SEZfnP015928@dev.open-bio.org> kawas Wed Jan 28 09:35:41 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client In directory dev.open-bio.org:/tmp/cvs-serv15881/Perl/MOBY-Server/lib/MOBY/Client Modified Files: SimpleArticle.pm SimpleInput.pm SecondaryArticle.pm CollectionArticle.pm Log Message: encapsulated class data had memory for attributes that defaulted to []. Made them 'undef' to remove this memory. moby-live/Perl/MOBY-Server/lib/MOBY/Client SimpleArticle.pm,1.3,1.4 SimpleInput.pm,1.4,1.5 SecondaryArticle.pm,1.4,1.5 CollectionArticle.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleArticle.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleArticle.pm 2008/09/02 13:11:40 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleArticle.pm 2009/01/28 14:35:41 1.4 @@ -195,10 +195,10 @@ #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - articleName => [ undef, 'read/write' ], - objectType => [ undef, 'read/write' ], - objectLSID => [ undef, 'read/write' ], - namespaces => [ [], 'read/write' ], + articleName => [ undef, 'read/write' ], + objectType => [ undef, 'read/write' ], + objectLSID => [ undef, 'read/write' ], + namespaces => [ undef, 'read/write' ], id => [ undef, 'read/write' ], XML_DOM => [ undef, 'read/write' ], XML => [ undef, 'read/write' ], =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleInput.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleInput.pm 2008/09/02 13:11:40 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SimpleInput.pm 2009/01/28 14:35:41 1.5 @@ -86,7 +86,7 @@ ( articleName => [ undef, 'read/write' ], objectType => [ undef, 'read/write' ], - namespaces => [ [], 'read/write' ], + namespaces => [ undef, 'read/write' ], ); #_____________________________________________________________ =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SecondaryArticle.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SecondaryArticle.pm 2008/09/02 13:11:40 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/SecondaryArticle.pm 2009/01/28 14:35:41 1.5 @@ -175,7 +175,7 @@ ( articleName => [ undef, 'read/write' ], objectType => [ undef, 'read/write' ], - namespaces => [ [], 'read/write' ], + namespaces => [ undef, 'read/write' ], XML_DOM => [ undef, 'read/write' ], XML => [ undef, 'read/write' ], isSecondary => [ 1, 'read' ], =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/CollectionArticle.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/CollectionArticle.pm 2008/11/19 21:29:14 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/CollectionArticle.pm 2009/01/28 14:35:41 1.5 @@ -188,7 +188,7 @@ my %_attr_data = # DEFAULT ACCESSIBILITY ( articleName => [ undef, 'read/write' ], - Simples => [ [], 'read/write' ], + Simples => [ undef, 'read/write' ], isSimple => [ 0, 'read' ], isSecondary => [ 0, 'read' ], isCollection => [ 1, 'read' ], From kawas at dev.open-bio.org Wed Jan 28 14:37:02 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:37:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281437.n0SEb2rE016022@dev.open-bio.org> kawas Wed Jan 28 09:37:02 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client In directory dev.open-bio.org:/tmp/cvs-serv15987/Perl/MOBY-Server/lib/MOBY/Client Modified Files: ServiceInstance.pm Log Message: updated unit tests to reflect that there can be 0 or more of them per service instance. moby-live/Perl/MOBY-Server/lib/MOBY/Client ServiceInstance.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/ServiceInstance.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/ServiceInstance.pm 2008/11/20 17:01:05 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/ServiceInstance.pm 2009/01/28 14:37:02 1.4 @@ -249,7 +249,7 @@ URL => [ undef, 'read/write' ], contactEmail => [ undef, 'read/write' ], LSID => [ undef, 'read/write'], - unitTest => [ undef, 'read/write'], # a reference to a MobyUnitTest object + unitTests => [ undef, 'read/write'], # listref to a MobyUnitTest objects ); #_____________________________________________________________ @@ -291,7 +291,7 @@ $self->input( [] ) unless $self->input; $self->output( [] ) unless $self->output; $self->secondary( [] ) unless $self->secondary; - $self->unitTest( new MOBY::Client::MobyUnitTest ) unless $self->unitTest; + $self->unitTests ( [] ) unless $self->unitTests; return $self; } From kawas at dev.open-bio.org Wed Jan 28 14:38:41 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:38:41 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281438.n0SEcfjk016188@dev.open-bio.org> kawas Wed Jan 28 09:38:41 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF In directory dev.open-bio.org:/tmp/cvs-serv16153/Perl/MOBY-Server/lib/MOBY/RDF Modified Files: Utils.pm Log Message: fixed typo in the ref ($self) =~ m// statement moby-live/Perl/MOBY-Server/lib/MOBY/RDF Utils.pm,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2008/11/25 18:05:59 1.8 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2009/01/28 14:38:41 1.9 @@ -180,7 +180,9 @@ sub trim { my ($self, $text) = @_; $text = $self - unless (ref($self) eq 'Moby::RDF::Utils') and defined($text); + unless ref($self) =~ m/^MOBY::RDF::Utils/; + # return empty string if $text is not defined + return "" unless $text; $text =~ s/^\s+//; $text =~ s/\s+$//; return $text; From kawas at dev.open-bio.org Wed Jan 28 14:42:21 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:42:21 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281442.n0SEgL4e016247@dev.open-bio.org> kawas Wed Jan 28 09:42:21 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies In directory dev.open-bio.org:/tmp/cvs-serv16212/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Modified Files: Services.pm Log Message: added a loop to go over the array of unit tests moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/11/24 14:38:32 1.9 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2009/01/28 14:42:21 1.10 @@ -20,6 +20,8 @@ use XML::LibXML; +use LS::ID; + use MOBY::Client::Central; use MOBY::Config; @@ -29,7 +31,6 @@ use MOBY::RDF::Predicates::OMG_LSID; use MOBY::RDF::Predicates::RDF; use MOBY::RDF::Predicates::RDFS; - use MOBY::RDF::Utils; use Data::Dumper; @@ -486,29 +487,44 @@ ) ) ); + # add the service type $model->addStmt( new RDF::Core::Statement( $bnode, $resource->new( MOBY::RDF::Predicates::RDF->type ), - new RDF::Core::Resource( $self->{service_uri} . $SI->type ) + new RDF::Core::Resource($self->{service_uri} . $SI->type ) ) ); # add unit test data here ... - if ( $SI->unitTest ) { - my $unit_test = $SI->unitTest; - $bnode = - new RDF::Core::Resource( - $self->{instance_uri}, - md5_hex( - "$service_authority/$service_name/" - . MOBY::RDF::Predicates::FETA - ->unitTest - ) - ); + if ( $SI->unitTests ) { + my $unitTests = $SI->unitTests; + my $utils = new MOBY::RDF::Utils; + foreach my $unit_test (@$unitTests) { + $bnode = + new RDF::Core::Resource( + $self->{instance_uri}, + md5_hex( + "$service_authority/$service_name/" + . ( + $unit_test->example_input + ? $utils->trim($unit_test->example_input) + : "" + ) + . ( + $unit_test->expected_output + ? $utils->trim($unit_test->expected_output) + : "" + ) + . ( $unit_test->regex ? $utils->trim($unit_test->regex) : "" ) + . ( $unit_test->xpath ? $utils->trim($unit_test->xpath) : "" ) + ."/" + . MOBY::RDF::Predicates::FETA->unitTest + ) + ); - # add the type - $model->addStmt( + # add the type + $model->addStmt( new RDF::Core::Statement( $bnode, $resource->new( MOBY::RDF::Predicates::RDF->type ), @@ -516,21 +532,23 @@ MOBY::RDF::Predicates::FETA->unitTest ) ) - ); + ); - # add the example input if defined - $model->addStmt( - new RDF::Core::Statement( - $bnode, - $resource->new( MOBY::RDF::Predicates::FETA->exampleInput ), - new RDF::Core::Literal( $unit_test->example_input ) - ) - ) - if $unit_test->example_input - and $unit_test->example_input ne ''; + # add the example input if defined + $model->addStmt( + new RDF::Core::Statement( + $bnode, + $resource->new( + MOBY::RDF::Predicates::FETA->exampleInput + ), + new RDF::Core::Literal( $unit_test->example_input ) + ) + ) + if $unit_test->example_input + and $unit_test->example_input ne ''; - # add the valid output xml if defined - $model->addStmt( + # add the valid output xml if defined + $model->addStmt( new RDF::Core::Statement( $bnode, $resource->new( @@ -538,39 +556,46 @@ ), new RDF::Core::Literal( $unit_test->expected_output ) ) - ) - if $unit_test->expected_output - and $unit_test->expected_output ne ''; + ) + if $unit_test->expected_output + and $unit_test->expected_output ne ''; - # add the valid regex if defined - $model->addStmt( - new RDF::Core::Statement( - $bnode, - $resource->new( MOBY::RDF::Predicates::FETA->validREGEX ), - new RDF::Core::Literal( $unit_test->regex ) + # add the valid regex if defined + $model->addStmt( + new RDF::Core::Statement( + $bnode, + $resource->new( + MOBY::RDF::Predicates::FETA->validREGEX + ), + new RDF::Core::Literal( $unit_test->regex ) + ) ) - ) - if $unit_test->regex - and $unit_test->regex ne ''; + if $unit_test->regex + and $unit_test->regex ne ''; - # add the valid xpath expression if defined - $model->addStmt( - new RDF::Core::Statement( - $bnode, - $resource->new( MOBY::RDF::Predicates::FETA->validXPath ), - new RDF::Core::Literal( $unit_test->xpath ) + # add the valid xpath expression if defined + $model->addStmt( + new RDF::Core::Statement( + $bnode, + $resource->new( + MOBY::RDF::Predicates::FETA->validXPath + ), + new RDF::Core::Literal( $unit_test->xpath ) + ) ) - ) - if $unit_test->xpath - and $unit_test->xpath ne ''; + if $unit_test->xpath + and $unit_test->xpath ne ''; - $model->addStmt( - new RDF::Core::Statement( - $operation, - $resource->new( MOBY::RDF::Predicates::FETA->hasUnitTest ), - $bnode - ) - ); + $model->addStmt( + new RDF::Core::Statement( + $operation, + $resource->new( + MOBY::RDF::Predicates::FETA->hasUnitTest + ), + $bnode + ) + ); + } } my $inputs = $SI->input; @@ -616,7 +641,7 @@ ) ) ); - + my $oType = new RDF::Core::Resource( $self->{instance_uri}, @@ -637,13 +662,14 @@ $oType ) ); + $model->addStmt( new RDF::Core::Statement( $oType, $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( - $self->{datatype_uri} . $_->objectType - ) #TODO check for lsid + $self->{datatype_uri} . $_->objectType + )#TODO check for lsids ) ); @@ -713,7 +739,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + ) #TODO check for lsids ) ); } @@ -797,7 +823,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{datatype_uri} . $simp->objectType - ) #TODO check for lsid + )#TODO check for lsids ) ); my $namespaces = $simp->namespaces; @@ -845,7 +871,7 @@ ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + )#TODO check for lsids ) ); } @@ -1050,7 +1076,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{datatype_uri} . $_->objectType - ) #TODO check for lsid + )#TODO check for lsids ) ); @@ -1120,7 +1146,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + )#TODO check for lsids ) ); } @@ -1204,7 +1230,7 @@ $resource->new( MOBY::RDF::Predicates::RDF->type ), new RDF::Core::Resource( $self->{datatype_uri} . $simp->objectType - ) #TODO check for lsid + )#TODO check for lsids ) ); my $namespaces = $simp->namespaces; @@ -1252,7 +1278,7 @@ ), new RDF::Core::Resource( $self->{namespace_uri} . $n - ) #TODO check for lsids + )#TODO check for lsids ) ); } From kawas at dev.open-bio.org Wed Jan 28 14:45:18 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:45:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281445.n0SEjIcF016323@dev.open-bio.org> kawas Wed Jan 28 09:45:18 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers In directory dev.open-bio.org:/tmp/cvs-serv16288/Perl/MOBY-Server/lib/MOBY/RDF/Parsers Modified Files: ServiceParser.pm Log Message: added a loop to parse out unit tests in those instances that more than one is defined added code to parse out the datatype/namespace/servicetype term from a uri/lsid moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers ServiceParser.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2008/11/25 18:05:44 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2009/01/28 14:45:18 1.4 @@ -346,7 +346,7 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } @@ -386,11 +386,12 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } # add the param to the service push @{ $instance->input }, $param; + $param = undef; } elsif ( $val eq MOBY::RDF::Predicates::FETA->collectionParameter ) { my $param = MOBY::Client::SimpleArticle->new(); @@ -416,7 +417,7 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } @@ -456,12 +457,13 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } $collection->addSimple($param); # add the param to the service push @{ $instance->input }, $collection; + $param = undef; } elsif ( $val eq MOBY::RDF::Predicates::FETA->secondaryParameter ) { my $param = MOBY::Client::SecondaryArticle->new; @@ -556,6 +558,7 @@ # add the secondary to the service push @{ $instance->secondary }, $param; + $param = undef; } } @@ -616,7 +619,7 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } @@ -656,11 +659,12 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } # add the param to the service push @{ $instance->output }, $param; + $param = undef; } elsif ( $val eq MOBY::RDF::Predicates::FETA->collectionParameter ) { my $param = MOBY::Client::SimpleArticle->new(); @@ -686,12 +690,11 @@ ); if ( $$val[0] ) { for my $uri (@$val) { - $param->addNamespace( $uri->getURI ) + $param->addNamespace( $self->_unwrap_namespace( $uri->getURI ) ) if $uri->getURI ne MOBY::RDF::Predicates::FETA ->parameterNamespace; } } - } # get the articlename @@ -726,12 +729,13 @@ ) ); if ( $$val[0] ) { - $param->objectType( $$val[0]->getURI ); + $param->objectType( $self->_unwrap_datatype($$val[0]->getURI) ); } $collection->addSimple($param); # add the param to the service push @{ $instance->output }, $collection; + $param = undef; } } @@ -767,6 +771,24 @@ } } $val = "" if ref($val) eq 'ARRAY'; + + # check if $SI->type is an lsid or uri + if ( $val =~ m/RESOURCES\/MOBY\-S\/Services(\/[A-Za-z0-9_\-]*)?$/ ) { + + # uri is /Services/ + $val = substr $1, 1 if $1; + } + elsif ( $val =~ m/RESOURCES\/MOBY\-S\/Services(\#[A-Za-z0-9_\-]*)?$/ ) { + + # uri is /Services# + $val = substr $1, 1 if $1; + } + elsif ( $val =~ m/^urn\:lsid/i ) { + + # uri is an lsid + my $lsid = LS::ID->new($val); + $val = $lsid->object if $lsid; + } $instance->type( MOBY::RDF::Utils::trim($val) ); # dont need the performsTask node anymore @@ -834,10 +856,9 @@ $unit->xpath( MOBY::RDF::Utils::trim($val) ); # set the unit test in the service - $instance->unitTest($unit); + push @{ $instance->unitTests }, $unit; - # should only be one ... so last; - last; + #$instance->unitTest($unit); } # this service is done ... @@ -853,5 +874,35 @@ } +sub _unwrap_datatype { + my ($self, $uri) = @_; + + # process the objectType, i.e. check to see if it is an LSID, or uri, etc + if ( $uri =~ m/RESOURCES\/MOBY\-S\/Objects(\/[A-Za-z0-9_\-]*)?$/ ) { + $uri = substr $1, 1 if $1; + } elsif ( + $uri =~ m/RESOURCES\/MOBY\-S\/Objects(\#[A-Za-z0-9_\-]*)?$/ ) { + $uri = substr $1, 1 if $1; + } elsif ( $uri =~ m/^urn\:lsid/i ) { + my $lsid = LS::ID->new( $uri ); + $uri = $lsid->object if $lsid; + } + return $uri; +} + +sub _unwrap_namespace { + my ($self, $n) = @_; + # get only the namespace name (strip from lsid or URI) + if ($n =~ m/RESOURCES\/MOBY\-S\/Namespaces(\/[A-Za-z0-9_\-]*)?$/) { + $n = substr $1, 1 if $1; + } elsif ($n =~ m/RESOURCES\/MOBY\-S\/Namespaces(\#[A-Za-z0-9_\-]*)?$/ ){ + $n = substr $1, 1 if $1; + } elsif( $n =~ m/^urn\:lsid/i) { + my $lsid = LS::ID->new($n); + $n = $lsid->object if $lsid; + } + return $n; +} + 1; __END__ From kawas at dev.open-bio.org Wed Jan 28 14:46:57 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:46:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281446.n0SEkvGI016363@dev.open-bio.org> kawas Wed Jan 28 09:46:56 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv16328/Perl/MOBY-Server Modified Files: Changes Log Message: updated changes to reflect recent code activity moby-live/Perl/MOBY-Server Changes,1.18,1.19 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/11/25 19:49:38 1.18 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2009/01/28 14:46:56 1.19 @@ -1,5 +1,19 @@ Revision history for Perl extension MOBY. +1.07 + - Fix bug in CollectionArticle, SimpleInput, SecondaryArticle, and + SimpleArticle that caused objects created to have 'memory'. + - Updated the MOBY::Client::ServiceInstance module to reflect + the fact that services can have >= 0 MobyUnitTests. + - In MOBY::RDF::Utils, fixed typo in the + ref ($self) =~ m// statement + - In MOBY::RDF::Ontologies::Services, added a loop to go over + the array of unit tests + - MOBY::RDF::Parsers::ServiceParser, added a loop to parse out + unit tests in those instances that more than one is defined, + and added code to parse out the datatype/namespace/servicetype + term from a uri/lsid. + 1.06 - Changes to makefile reflecting the cpan addition of wsrf. - Added Boolean to the data sql dump file for initializing From kawas at dev.open-bio.org Wed Jan 28 14:51:36 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 09:51:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281451.n0SEpaXu016403@dev.open-bio.org> kawas Wed Jan 28 09:51:36 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers In directory dev.open-bio.org:/tmp/cvs-serv16368/Perl/MOBY-Server/lib/MOBY/RDF/Parsers Modified Files: ServiceParser.pm Log Message: forgot a use statement moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers ServiceParser.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2009/01/28 14:45:18 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Parsers/ServiceParser.pm 2009/01/28 14:51:36 1.5 @@ -28,6 +28,8 @@ use MOBY::RDF::Predicates::FETA; use MOBY::RDF::Predicates::RDFS; +use LS::ID; + use vars qw /$VERSION/; $VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; From kawas at dev.open-bio.org Wed Jan 28 17:29:20 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 28 Jan 2009 12:29:20 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901281729.n0SHTKmX017088@dev.open-bio.org> kawas Wed Jan 28 12:29:20 EST 2009 Update of /home/repository/moby/moby-live/Perl/MOBY-Client In directory dev.open-bio.org:/tmp/cvs-serv17045/Perl/MOBY-Client Modified Files: META.yml Makefile.PL Changes Log Message: updated to reflect recent changes in the source code moby-live/Perl/MOBY-Client META.yml,1.3,1.4 Makefile.PL,1.11,1.12 Changes,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/META.yml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Client/META.yml 2008/12/02 19:16:19 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/META.yml 2009/01/28 17:29:19 1.4 @@ -27,4 +27,4 @@ RDF::Core: 0.51 XML::Simple: 2.18 XML::SemanticCompare: 0.91 -version: 1.03 +version: 1.04 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2008/12/02 19:18:31 1.11 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2009/01/28 17:29:19 1.12 @@ -4,7 +4,7 @@ # all_from 'lib/MOBY/Client/Central.pm'; author 'Mark Wilkinson '; -version '1.03'; +version '1.04'; license 'perl'; abstract 'This distribution is for communicating with a MOBY Central registry'; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/Changes,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/MOBY-Client/Changes 2008/11/25 19:51:18 1.5 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/Changes 2009/01/28 17:29:19 1.6 @@ -1,5 +1,16 @@ Revision history for MOBY-Client +1.04 + * Fix bug in CollectionArticle, SimpleInput, SecondaryArticle, and + SimpleArticle that caused objects created to have 'memory'. + * Updated the MOBY::Client::ServiceInstance module to reflect + the fact that services can have >= 0 MobyUnitTests. + * In MOBY::RDF::Utils, fixed typo in the + ref ($self) =~ m// statement + * MOBY::RDF::Parsers::ServiceParser, added a loop to parse out + unit tests in those instances that more than one is defined, + and added code to parse out the datatype/namespace/servicetype + term from a uri/lsid. 1.03 * changes to makefile reflecting the cpan addition of wsrf * added MOBY/Async.pm to the module From kawas at dev.open-bio.org Thu Jan 29 18:42:36 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 13:42:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291842.n0TIgaON012155@dev.open-bio.org> kawas Thu Jan 29 13:42:35 EST 2009 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv12119/Java/docs Modified Files: ConfigureRDFAgent.html Log Message: added another FAQ question and answer moby-live/Java/docs ConfigureRDFAgent.html,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ConfigureRDFAgent.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/docs/ConfigureRDFAgent.html 2008/03/06 16:58:42 1.7 +++ /home/repository/moby/moby-live/Java/docs/ConfigureRDFAgent.html 2009/01/29 18:42:35 1.8 @@ -479,6 +479,19 @@
        agent.output.flatfile = yes 

    Once you have added that value to the config file, try testing the agent again.

    +
  • I am getting the following error:
    +
    +
    +    org.xml.sax.SAXException: Bad types (class java.lang.String -> int)
    +

    What's going on?

    +

    A.
    This happens whenever you provide the wrong value for admin.registry.removal.endpoint. + Make sure that this url points to MOBY-Admin.pl. + Also, make sure that admin.registry.removal.uri looks something like +

    +    http://your.domain/MOBY/Admin
    +

    +

    Once you have fixed that value, try testing the agent again.

    +

  • From kawas at dev.open-bio.org Thu Jan 29 19:06:10 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:06:10 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291906.n0TJ6AuW012285@dev.open-bio.org> kawas Thu Jan 29 14:06:10 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv12250/xmls Modified Files: project.pom Log Message: added XMLUnit to the dependencies. moby-live/Java/xmls project.pom,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/project.pom,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/xmls/project.pom 2008/10/30 02:33:25 1.13 +++ /home/repository/moby/moby-live/Java/xmls/project.pom 2009/01/29 19:06:10 1.14 @@ -124,6 +124,13 @@ 1.4 + + + xmlunit + xmlunit + 1.2 + + javax.activation activation From kawas at dev.open-bio.org Thu Jan 29 19:12:01 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJC1u1012545@dev.open-bio.org> kawas Thu Jan 29 14:12:01 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory dev.open-bio.org:/tmp/cvs-serv12510/src/main/org/biomoby/shared Modified Files: MobyUnitTest.java Log Message: added methods to MobyUnitTest that allow you to perform compare the service output to regular expressions, xpath and to semantically compare the expected DOM with the one obtained by calling the service. moby-live/Java/src/main/org/biomoby/shared MobyUnitTest.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyUnitTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyUnitTest.java 2008/10/21 16:34:29 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyUnitTest.java 2009/01/29 19:12:01 1.2 @@ -1,11 +1,37 @@ package org.biomoby.shared; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.custommonkey.xmlunit.DetailedDiff; +import org.custommonkey.xmlunit.Diff; +import org.custommonkey.xmlunit.Difference; +import org.custommonkey.xmlunit.ElementNameAndTextQualifier; +import org.custommonkey.xmlunit.ElementNameQualifier; +import org.custommonkey.xmlunit.NamespaceContext; +import org.custommonkey.xmlunit.SimpleNamespaceContext; +import org.custommonkey.xmlunit.XMLUnit; +import org.custommonkey.xmlunit.XpathEngine; +import org.custommonkey.xmlunit.exceptions.XpathException; +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.xml.sax.SAXException; + /** - * A class representing a moby unit test + * A class representing a moby unit test. In addition, this class has methods to + * perform the various tests required for unit testing moby services. * * @author Wendy Alexander * @author Eddie Kawas * + * @version $Id$ */ public class MobyUnitTest { @@ -29,6 +55,15 @@ setValidOutputXML(""); setValidREGEX(""); setValidXPath(""); + init(); + } + + private void init() { + // for comparing dom trees + XMLUnit.setIgnoreAttributeOrder(true); + XMLUnit.setIgnoreComments(true); + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); } /** @@ -115,11 +150,335 @@ public String toString() { StringBuffer buf = new StringBuffer(); buf.append("Unit Test:\n"); - buf.append(" Input " + getExampleInput() + "\n"); - buf.append(" Output " + getValidOutputXML() + "\n"); - buf.append(" XPath " + getValidXPath() + "\n"); - buf.append(" REGEX " + getValidREGEX() + "\n"); - return buf.toString(); + buf.append(" Input \n" + Utils.format (getExampleInput(), 2) + "\n"); + buf.append(" Output \n" + Utils.format(getValidOutputXML(),2) + "\n"); + buf.append(" XPath \n" + Utils.format(getValidXPath(),2) + "\n"); + buf.append(" REGEX \n" + Utils.format(getValidREGEX(),2) + "\n"); + //return buf.toString(); + return Utils.format (buf.toString(), 1); + } + + /** + * XML is assumed to be wellformed and valid. Comparing 'XML' that is not + * wellformed may be identical but this method will return false! + * + * @param testXML + * the XML that you would like to compare to XML obtained + * from getValidOutputXML() + * @return true if the documents are semantically similar, false otherwise + */ + public boolean compareOutputXML(String testXML) throws MobyException { + if (!getValidOutputXML().trim().equals("")) + try { + Diff diff; + diff = new Diff(getValidOutputXML(), testXML); + // diff.overrideElementQualifier(new + // RecursiveElementNameAndTextQualifier()); + diff.overrideElementQualifier(new MobyQualifier()); + return diff.similar(); + } catch (SAXException e) { + throw new MobyException(e.getMessage()); + } catch (IOException e) { + throw new MobyException(e.getMessage()); + } + return false; + } + + /** + * + * @param testXML + * the XML that you would like to test the XPATH, from + * getValidXPath(), expression against + * @return true if the XPath expression matches at least one node in the + * testXML + */ + public boolean compareXmlWithXpath(String testXML) throws MobyException { + if (!getValidXPath().trim().equals("")) + try { + Document d = XMLUnit.buildControlDocument(testXML); + HashMap m = new HashMap(); + if (d.getDocumentElement() != null) { + if (d.getDocumentElement().getPrefix() != null) + m.put(d.getDocumentElement().getPrefix(), d + .getDocumentElement().getNamespaceURI()); + } + NamespaceContext ctx = new SimpleNamespaceContext(m); + XpathEngine engine = XMLUnit.newXpathEngine(); + engine.setNamespaceContext(ctx); + return engine.getMatchingNodes(getValidXPath(), d).getLength() > 0; + } catch (IOException ioe) { + throw new MobyException("IOException:\n", ioe); + } catch (SAXException se) { + throw new MobyException("Invalid XML:\n", se); + } catch (XpathException xe) { + throw new MobyException("Invalid XPATH:\n" + xe); + } + return false; + } + + /** + * + * @param testXML + * the XML that you would like to test the REGEX, from + * getValidREGEX(), expression against + * @return true if the regular expression matches the testXML, false + * otherwise. + */ + public boolean compareXmlWithREGEX(String testXML, boolean multiline) { + if (!getValidREGEX().trim().equals("")) { + Pattern p = multiline ? Pattern.compile(getValidREGEX(), + Pattern.MULTILINE) : Pattern.compile(getValidREGEX()); + Matcher m = p.matcher(testXML); + return m.find(); + } + return false; + } + + /** + * + * @param testXML + * the XML that you would like to 'diff' to XML obtained from + * getValidOutputXML() + * @return a String of text outlining all of the differences + */ + @SuppressWarnings("unchecked") + public String getXMLDifferences(String testXML) { + if (!getValidOutputXML().trim().equals("")) + try { + StringBuilder sb = new StringBuilder(); + DetailedDiff myDiff = new DetailedDiff(new Diff( + getValidOutputXML(), testXML)); + // myDiff.overrideElementQualifier(new + // RecursiveElementNameAndTextQualifier()); + myDiff.overrideElementQualifier(new MobyQualifier()); + List differences = myDiff.getAllDifferences(); + for (Difference d : differences) + sb.append(d.toString() + "\n"); + return sb.toString(); + } catch (SAXException e) { + return e.getMessage(); + } catch (IOException e) { + return e.getMessage(); + } + return "No XML to validate against!"; } + private static final String[] ALL_ATTRIBUTES = { "*" }; + + /** + * This inner class implements a 'Qualifier' used to compare XML documents + * using the XMLUnit engine. It used both RecursiveElementNameAndTextQualifier and + * MultiLevelElementNameAndTextQualifier as a template. + * + * @author Eddie Kawas + * + */ + protected class MobyQualifier extends ElementNameQualifier { + /* + ****************************************************************** + Copyright (c) 2008, Jeff Martin, Tim Bacon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + ****************************************************************** + */ + private final String[] qualifyingAttrNames; + + private final ElementNameQualifier NAME_QUALIFIER = new ElementNameQualifier(); + + private final ElementNameAndTextQualifier NAME_AND_TEXT_QUALIFIER = new ElementNameAndTextQualifier(); + + /** + * No-args constructor: use all attributes from all elements to + * determine whether elements qualify for comparability + */ + public MobyQualifier() { + this(ALL_ATTRIBUTES); + } + + /** + * Simple constructor for a single qualifying attribute name + * + * @param attrName + * the value to use to qualify whether two elements can + * be compared further for differences + */ + public MobyQualifier(String attrName) { + this(new String[] { attrName }); + } + + /** + * Extended constructor for multiple qualifying attribute names + * + * @param attrNames + * the array of values to use to qualify whether two + * elements can be compared further for differences + */ + public MobyQualifier(String[] attrNames) { + this.qualifyingAttrNames = new String[attrNames.length]; + System.arraycopy(attrNames, 0, qualifyingAttrNames, 0, + attrNames.length); + } + + /** + * Determine whether two elements qualify for further Difference + * comparison. + * + * @param differenceEngine + * the DifferenceEngine instance wanting to determine if + * the elements are comparable + * @param control + * @param test + * @return true if the two elements qualify for further comparison based + * on both the superclass qualification (namespace URI and non- + * namespaced tag name), and the presence of qualifying + * attributes with the same values; false otherwise + */ + public boolean qualifyForComparison_old(Element control, Element test) { + if (super.qualifyForComparison(control, test)) { + return areAttributesComparable(control, test); + } + return false; + } + + public boolean qualifyForComparison(Element control, Element test) { + boolean stillSimilar = true; + Element currentControl = control; + Element currentTest = test; + + // we dont try to compare the Collection node because they have unordered children + if (!control.getLocalName().equals("Collection")) { + // not a collection, match name and attributes + stillSimilar = NAME_QUALIFIER.qualifyForComparison( + currentControl, currentTest); + + if (stillSimilar) { + if (currentControl.hasChildNodes() + && currentTest.hasChildNodes()) { + Node n1 = getFirstEligibleChild(currentControl); + Node n2 = getFirstEligibleChild(currentTest); + if (n1.getNodeType() == Node.ELEMENT_NODE + && n2.getNodeType() == Node.ELEMENT_NODE) { + currentControl = (Element) n1; + currentTest = (Element) n2; + } else { + stillSimilar = false; + } + } else { + stillSimilar = false; + } + } + + // finally compare the level containing the text child node + if (stillSimilar) { + stillSimilar = NAME_AND_TEXT_QUALIFIER + .qualifyForComparison(currentControl, currentTest); + } + } + return stillSimilar + + && areAttributesComparable(currentControl, currentTest); + + } + + private Node getFirstEligibleChild(Node parent) { + Node n1 = parent.getFirstChild(); + while (n1.getNodeType() == Node.TEXT_NODE + && n1.getNodeValue().trim().length() == 0) { + Node n2 = n1.getNextSibling(); + if (n2 == null) + break; + n1 = n2; + } + return n1; + } + + /** + * Determine whether the qualifying attributes are present in both + * elements and if so whether their values are the same + * + * @param control + * @param test + * @return true if all qualifying attributes are present with the same + * values, false otherwise + */ + protected boolean areAttributesComparable(Element control, Element test) { + String controlValue, testValue; + Attr[] qualifyingAttributes; + NamedNodeMap namedNodeMap = control.getAttributes(); + if (matchesAllAttributes(qualifyingAttrNames)) { + qualifyingAttributes = new Attr[namedNodeMap.getLength()]; + for (int n = 0; n < qualifyingAttributes.length; ++n) { + qualifyingAttributes[n] = (Attr) namedNodeMap.item(n); + } + } else { + qualifyingAttributes = new Attr[qualifyingAttrNames.length]; + for (int n = 0; n < qualifyingAttrNames.length; ++n) { + qualifyingAttributes[n] = (Attr) namedNodeMap + .getNamedItem(qualifyingAttrNames[n]); + } + } + + String nsURI, name; + for (int i = 0; i < qualifyingAttributes.length; ++i) { + if (qualifyingAttributes[i] != null) { + nsURI = qualifyingAttributes[i].getNamespaceURI(); + controlValue = qualifyingAttributes[i].getNodeValue(); + name = qualifyingAttributes[i].getName(); + } else { + // cannot be "*" case + nsURI = controlValue = ""; + name = qualifyingAttrNames[i]; + } + if (nsURI == null || nsURI.length() == 0) { + testValue = test.getAttribute(name); + } else { + testValue = test.getAttributeNS(nsURI, + qualifyingAttributes[i].getLocalName()); + } + if (controlValue == null) { + if (testValue != null) { + return false; + } + } else { + if (!controlValue.equals(testValue)) { + return false; + } + } + } + return true; + } + + private boolean matchesAllAttributes(String[] attributes) { + return Arrays.equals(attributes, ALL_ATTRIBUTES); + } + + } } From kawas at dev.open-bio.org Thu Jan 29 19:12:39 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJCdOV012585@dev.open-bio.org> kawas Thu Jan 29 14:12:39 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory dev.open-bio.org:/tmp/cvs-serv12550/src/main/org/biomoby/shared Modified Files: MobyService.java Log Message: updated MobyService to reflect the fact that >= 0 test cases are available and not 0 or 1. moby-live/Java/src/main/org/biomoby/shared MobyService.java,1.26,1.27 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2008/12/17 14:07:16 1.26 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2009/01/29 19:12:39 1.27 @@ -53,7 +53,7 @@ protected String lsid = null; protected MobyServiceType serviceType; // moby unit test object - protected MobyUnitTest unitTest = null; + protected Vector unitTests = new Vector(); public static final int UNCHECKED = 0; public static final int DEAD= 1; @@ -150,7 +150,7 @@ clone.setSignatureURL(getSignatureURL()); clone.setPathToRDF(getPathToRDF()); clone.setRDF(getRDF()); - clone.setUnitTest(getUnitTest()); + clone.setUnitTests(getUnitTests()); clone.serviceStatus = serviceStatus; clone.statusChecks = statusChecks; @@ -274,20 +274,59 @@ /** * - * @return the MobyUnitTest object associated with this service + * @return an array of MobyUnitTest objects set for this service */ - public MobyUnitTest getUnitTest() { - return unitTest; + public MobyUnitTest[] getUnitTests() { + synchronized (unitTests) { + MobyUnitTest[] tests = new MobyUnitTest[unitTests.size()]; + unitTests.copyInto(tests); + return tests; + } } /** * - * @param unitTest - * the MobyUnitTest object to associate with this service + * @param unitTests + * the tests to set for the service + */ + public void setUnitTests(MobyUnitTest[] unitTests) { + if (unitTests == null) { + this.unitTests.clear(); + } else { + for (MobyUnitTest mut : unitTests) { + addUnitTest(mut); + } + } + } + + /** + * + * @param unitTest the MobyUnitTest to add to our service + */ + public void addUnitTest(MobyUnitTest unitTest) { + if (unitTest != null) { + for (MobyUnitTest t : unitTests) { + // dont add duplicate tests + if (t.toString().equals(unitTest.toString())) + return; + } + unitTests.add(unitTest); + } + } + + /** + * + * @param unitTest the test to remove from the set of tests for the service */ - public void setUnitTest(MobyUnitTest unitTest) { - if (unitTest != null) - this.unitTest = unitTest; + public void removeUnitTest(MobyUnitTest unitTest) { + if (unitTest != null) { + for (int x = 0; x < unitTests.size(); x++) { + if (unitTest.toString().equals(unitTests.elementAt(x).toString())) { + unitTests.removeElementAt(x); + return; + } + } + } } /** @@ -510,24 +549,26 @@ if (id != null) buf.append ("ID: " + id + "\n"); // print unitTest information for this service - if (unitTest != null) { - buf.append(unitTest.toString()); + if (unitTests != null && unitTests.size() > 0) { + buf.append("Unit Tests:\n"); + for (MobyUnitTest unitTest : unitTests) + buf.append(unitTest.toString()+"\n"); } else { - buf.append("Unit Test: None available\n"); + buf.append("Unit Tests: None available\n"); } buf.append ("Primary inputs:\n"); - for (Enumeration en = primaryInputs.elements(); en.hasMoreElements(); ) + for (Enumeration en = primaryInputs.elements(); en.hasMoreElements(); ) buf.append (((MobyData)en.nextElement()).format (1)); if (secondaryInputs.size() > 0) { buf.append ("Secondary inputs:\n"); - for (Enumeration en = secondaryInputs.elements(); en.hasMoreElements(); ) + for (Enumeration en = secondaryInputs.elements(); en.hasMoreElements(); ) buf.append (((MobyData)en.nextElement()).format (1)); } buf.append ("Outputs:\n"); - for (Enumeration en = primaryOutputs.elements(); en.hasMoreElements(); ) + for (Enumeration en = primaryOutputs.elements(); en.hasMoreElements(); ) buf.append (((MobyData)en.nextElement()).format (1)); return new String (buf); From kawas at dev.open-bio.org Thu Jan 29 19:12:58 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJCwIw012625@dev.open-bio.org> kawas Thu Jan 29 14:12:58 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder In directory dev.open-bio.org:/tmp/cvs-serv12590/src/main/org/biomoby/client/rdf/builder Modified Files: ServiceInstanceRDF.java Log Message: updated to reflect the fact that >= 0 test cases are available and not 0 or 1. moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.38,1.39 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.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/rdf/builder/ServiceInstanceRDF.java 2008/11/07 17:26:34 1.38 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2009/01/29 19:12:58 1.39 @@ -347,33 +347,39 @@ hasOperation.addProperty(FetaVocabulary.performsTask, performs); // add any unit test information now - if (services[i].getUnitTest() != null) { - MobyUnitTest mobyUnitTest = services[i].getUnitTest(); - Resource unitTest = model.createResource(SI - + MD5Checksum.md5(services[i].getAuthority() - + "/" - + services[i].getName() - + "/" - + FetaVocabulary.unitTest.getURI())); - unitTest.addProperty(RDF.type, FetaVocabulary.unitTest); - // add the example input if defined - if (!mobyUnitTest.getExampleInput().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.exampleInput, mobyUnitTest.getExampleInput()); - } - // add the valid output xml if defined - if (!mobyUnitTest.getValidOutputXML().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.validOutputXML, mobyUnitTest.getValidOutputXML()); - } - // add the valid regex if defined - if (!mobyUnitTest.getValidREGEX().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.validREGEX, mobyUnitTest.getValidREGEX()); - } - // add the xpath expression if defined - if (!mobyUnitTest.getValidXPath().trim().equals("")) { - unitTest.addProperty(FetaVocabulary.validXPath, mobyUnitTest.getValidXPath()); - } - // add node to the graph - hasOperation.addProperty(FetaVocabulary.hasUnitTest, unitTest); + if (services[i].getUnitTests() != null) { + for (MobyUnitTest mobyUnitTest : services[i].getUnitTests()) { + Resource unitTest = model.createResource(SI + + MD5Checksum.md5(services[i].getAuthority() + + "/" + + services[i].getName() + + "/" + + mobyUnitTest.getExampleInput() .trim() + + mobyUnitTest.getValidOutputXML() .trim() + + mobyUnitTest.getValidREGEX() .trim() + + mobyUnitTest.getValidXPath() .trim() + + "/" + + FetaVocabulary.unitTest.getURI())); + unitTest.addProperty(RDF.type, FetaVocabulary.unitTest); + // add the example input if defined + if (!mobyUnitTest.getExampleInput().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.exampleInput, mobyUnitTest.getExampleInput()); + } + // add the valid output xml if defined + if (!mobyUnitTest.getValidOutputXML().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.validOutputXML, mobyUnitTest.getValidOutputXML()); + } + // add the valid regex if defined + if (!mobyUnitTest.getValidREGEX().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.validREGEX, mobyUnitTest.getValidREGEX()); + } + // add the xpath expression if defined + if (!mobyUnitTest.getValidXPath().trim().equals("")) { + unitTest.addProperty(FetaVocabulary.validXPath, mobyUnitTest.getValidXPath()); + } + // add node to the graph + hasOperation.addProperty(FetaVocabulary.hasUnitTest, unitTest); + } } From kawas at dev.open-bio.org Thu Jan 29 19:12:58 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:12:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291912.n0TJCwsN012645@dev.open-bio.org> kawas Thu Jan 29 14:12:58 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended In directory dev.open-bio.org:/tmp/cvs-serv12590/src/main/org/biomoby/shared/extended Modified Files: ServiceInstanceParser.java Log Message: updated to reflect the fact that >= 0 test cases are available and not 0 or 1. moby-live/Java/src/main/org/biomoby/shared/extended ServiceInstanceParser.java,1.25,1.26 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java 2008/10/21 16:41:22 1.25 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java 2009/01/29 19:12:58 1.26 @@ -23,6 +23,7 @@ import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; +import com.hp.hpl.jena.rdf.model.NodeIterator; import com.hp.hpl.jena.rdf.model.RDFNode; import com.hp.hpl.jena.rdf.model.RDFReader; import com.hp.hpl.jena.rdf.model.ResIterator; @@ -254,17 +255,23 @@ // get/set the unit test information for the service if (hoResource.hasProperty(FetaVocabulary.hasUnitTest)) { - Resource utResource = hoResource.getProperty(FetaVocabulary.hasUnitTest).getResource(); + NodeIterator ni = model.listObjectsOfProperty(hoResource, FetaVocabulary.hasUnitTest); + while (ni.hasNext()) { + RDFNode rdfNode = ni.nextNode(); + if (!rdfNode.isResource()) + continue; + Resource node = (Resource)rdfNode; MobyUnitTest mut = new MobyUnitTest(); - if (utResource.hasProperty(FetaVocabulary.exampleInput)) - mut.setExampleInput(utResource.getProperty(FetaVocabulary.exampleInput).getObject().toString()); - if (utResource.hasProperty(FetaVocabulary.validOutputXML)) - mut.setValidOutputXML(utResource.getProperty(FetaVocabulary.validOutputXML).getObject().toString()); - if (utResource.hasProperty(FetaVocabulary.validXPath)) - mut.setValidXPath(utResource.getProperty(FetaVocabulary.validXPath).getObject().toString()); - if (utResource.hasProperty(FetaVocabulary.validREGEX)) - mut.setValidREGEX(utResource.getProperty(FetaVocabulary.validREGEX).getObject().toString()); - service.setUnitTest(mut); + if (node.hasProperty(FetaVocabulary.exampleInput)) + mut.setExampleInput(node.getProperty(FetaVocabulary.exampleInput).getObject().toString()); + if (node.hasProperty(FetaVocabulary.validOutputXML)) + mut.setValidOutputXML(node.getProperty(FetaVocabulary.validOutputXML).getObject().toString()); + if (node.hasProperty(FetaVocabulary.validXPath)) + mut.setValidXPath(node.getProperty(FetaVocabulary.validXPath).getObject().toString()); + if (node.hasProperty(FetaVocabulary.validREGEX)) + mut.setValidREGEX(node.getProperty(FetaVocabulary.validREGEX).getObject().toString()); + service.addUnitTest(mut); + } } } @@ -969,7 +976,8 @@ public static void main(String[] args) throws MobyException, MalformedURLException, IOException { // show how to use this class - ServiceInstanceParser p = new ServiceInstanceParser("http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances"); + ServiceInstanceParser p = new ServiceInstanceParser("http://dev.biordf.net/~kawas/signatures/unittests/BIND_IdSearchGetFastaByCdd"); + p.setUrl("file:///C:/Users/Eddie/Desktop/BIND_IdSearchGetFastaByCdd.txt"); MobyService[] services = p.getMobyServicesFromRDF(); System.out.println(services.length); if (!p.isRDFValid()) { @@ -982,6 +990,5 @@ for (int i = 0; i < services.length; i++) { System.out.println((services[i].toString())); } - } } From kawas at dev.open-bio.org Thu Jan 29 19:15:34 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:15:34 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291915.n0TJFYUk012701@dev.open-bio.org> kawas Thu Jan 29 14:15:33 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory dev.open-bio.org:/tmp/cvs-serv12670/src/main/org/biomoby/service/dashboard/help Added Files: MobyUnitTestingPanel.html Log Message: added documenation for the MobyUnitTestingPanel moby-live/Java/src/main/org/biomoby/service/dashboard/help MobyUnitTestingPanel.html,NONE,1.1 From kawas at dev.open-bio.org Thu Jan 29 19:18:20 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:18:20 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291918.n0TJIK8Q012755@dev.open-bio.org> kawas Thu Jan 29 14:18:20 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory dev.open-bio.org:/tmp/cvs-serv12724/src/main/org/biomoby/service/dashboard/images Added Files: unitTest.gif Log Message: the unit testing panels image moby-live/Java/src/main/org/biomoby/service/dashboard/images unitTest.gif,NONE,1.1 From kawas at dev.open-bio.org Thu Jan 29 19:39:45 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 29 Jan 2009 14:39:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901291939.n0TJdj5N013142@dev.open-bio.org> kawas Thu Jan 29 14:39:45 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv13107/xmls Modified Files: rdfagentBuild.xml Log Message: added a new task for building a downloadable distribution. moby-live/Java/xmls rdfagentBuild.xml,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2008/02/22 15:11:52 1.5 +++ /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2009/01/29 19:39:45 1.6 @@ -105,3 +105,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From kawas at dev.open-bio.org Fri Jan 30 14:44:19 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:44:19 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301444.n0UEiJpY016574@dev.open-bio.org> kawas Fri Jan 30 09:44:18 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data In directory dev.open-bio.org:/tmp/cvs-serv16535/src/main/org/biomoby/service/dashboard/data Modified Files: ServiceInputPanel.java DataTypeTreeTable.java Log Message: added 2 methods that populate the table when given a moby XML message moby-live/Java/src/main/org/biomoby/service/dashboard/data ServiceInputPanel.java,1.3,1.4 DataTypeTreeTable.java,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/ServiceInputPanel.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/service/dashboard/data/ServiceInputPanel.java 2006/02/20 05:51:10 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/ServiceInputPanel.java 2009/01/30 14:44:18 1.4 @@ -9,12 +9,15 @@ package org.biomoby.service.dashboard.data; import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.MobyException; import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyData; import org.biomoby.shared.MobyPrimaryData; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; import org.biomoby.shared.MobySecondaryData; +import org.biomoby.shared.datatypes.MobyObject; +import org.biomoby.shared.parser.MobyParameter; import org.biomoby.shared.parser.MobySimple; import org.biomoby.shared.parser.MobyCollection; import org.biomoby.shared.parser.MobyJob; @@ -23,6 +26,7 @@ import org.biomoby.service.dashboard.data.ParametersTable; import org.biomoby.service.dashboard.Dashboard; +import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JPanel; @@ -166,7 +170,6 @@ * service given in the constructor of this class. *************************************************************************/ public Document getXMLDocument() { - Vector v = new Vector(); for (int i = 0; i < inputTables.size(); i = i+2) { MobyData data = (MobyData)inputTables.elementAt (i); @@ -198,6 +201,50 @@ (new Element[] { MobyJob.toXML ("sip_1_", allData) }); return doc; } + + /** + * + * @param xml + * an XML file containing a full biomoby message that we + * would like to parse and display as input to our service + * @throws MobyException if there is a problem parsing the XML or populating our table + */ + public void setValues(String xml) throws MobyException { + // create the MobyPackage + MobyPackage pack = MobyPackage.createFromXML(xml); + // get our job + MobyJob job = null; + if (pack != null && pack.getJobs().length > 0) + job = pack.getJob(0); + if (job == null) + return; + for (int i = 0; i < inputTables.size(); i = i+2) { + MobyData data = (MobyData)inputTables.elementAt (i); + DataTypeTreeTable table = (DataTypeTreeTable)inputTables.elementAt (i+1); + String articleName = data.getName(); + Object object = job.getData(articleName); + // datatype not existent in this message + if (object == null) + continue; + table.populateData((MobyObject)object); + } + + // update secondary params + if (paramsTable != null) { + Object[] values = paramsTable.tableModel.getData(); + for (int i = 0; i < values.length; i++) { + if (!"".equals(values[i])) { + String name = paramsTable.paramDefs[i].getName(); + String secondary = job.getParameter(name); + // set the secondary param + if (secondary != null) + values[i] = (UUtils.isEmpty (secondary) ? "" : secondary); + } + } + } + // update graphics + updateUI(); + } /************************************************************************* * Return an XML string representing complete input for a service =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/DataTypeTreeTable.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/DataTypeTreeTable.java 2006/04/28 00:13:41 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/data/DataTypeTreeTable.java 2009/01/30 14:44:18 1.13 @@ -8,33 +8,35 @@ package org.biomoby.service.dashboard.data; -import org.biomoby.shared.MobyDataType; -import org.biomoby.service.dashboard.Dashboard; -import org.biomoby.service.dashboard.treetable.JTreeTable; -import org.biomoby.service.dashboard.treetable.TreeTableModelAdapter; - -import org.tulsoft.tools.gui.SwingUtils; - -import org.jdom.Document; -import org.jdom.Element; +import java.awt.Component; +import java.awt.event.MouseEvent; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.EventObject; -import javax.swing.JTable; -import javax.swing.JComponent; -import javax.swing.JButton; -import javax.swing.Icon; import javax.swing.AbstractCellEditor; +import javax.swing.Icon; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JTable; +import javax.swing.event.CellEditorListener; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.JTableHeader; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; -import javax.swing.table.DefaultTableCellRenderer; -import javax.swing.table.TableModel; import javax.swing.table.TableColumn; -import javax.swing.table.JTableHeader; -import javax.swing.event.CellEditorListener; - -import java.awt.Component; +import javax.swing.table.TableModel; -import java.util.EventObject; -import java.awt.event.MouseEvent; +import org.biomoby.service.dashboard.Dashboard; +import org.biomoby.service.dashboard.treetable.JTreeTable; +import org.biomoby.service.dashboard.treetable.TreeTableModelAdapter; +import org.biomoby.shared.Central; +import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.Utils; +import org.biomoby.shared.datatypes.MobyObject; +import org.jdom.Document; +import org.jdom.Element; +import org.tulsoft.tools.gui.SwingUtils; /** * A tree-table representing one BioMoby data type (with all its @@ -155,6 +157,104 @@ public Element toXML() { return ((DataTypeNode)getInnerModel().getRoot()).toXML(); } + + /** + * + * @param mobyObject + * a MobyObject that we would like to use as a template to + * populate ourselves with actual data + */ + public void populateData(MobyObject mobyObject) { + // TODO clear old data + DataTypeNode node = ((DataTypeNode)getInnerModel().getRoot()); + // clear out 'extra' nodes + node.children = null; + node.loadChildren(); + // set id/ns for this node + node.setId(mobyObject.getId()); + node.setNamespace(mobyObject.getNamespace()); + // set a value if applicable + if (node.isPrimitive) { + node.setValue(mobyObject.getValue()); + } + // fill any children present + if (!node.isPrimitive()) + populate_children(mobyObject, node); + // show our changes + updateUI(); + } + + /* + * @param mobyObject the object with children + * @param node the DataTypeNode to populate + */ + private void populate_children(MobyObject mobyObject, DataTypeNode node) { + // no children + if (node.children == null) + return; + // iterate over the children + for (DataTypeNode n : node.children) { + // stolen from MobyParser maybe this should be made 'public' + String methodName = "getMoby_" + + Utils.mobyEscape(Utils.javaEscape(Utils + .checkOrCreateArticleName(n.getMemberName(), + mobyObject.getClass().getName()))); + // use reflection to get the datatype from this object + Method method; + try { + method = mobyObject.getClass().getMethod (methodName, new Class[] { }); + Object o = method.invoke(mobyObject, new Object[] {}); + if (o == null) + continue; + if (o.getClass().isArray()) { + // probably a has relationship + if (n.isHAS()) { + Object[] os = (Object[])o; + // here we iterate over all of the nodes but the first one + // we do this because i need to populate the actual node 'n' as well + for (int x =1; x < os.length; x++) { + DataTypeNode newNode = DataTypeNode.createNode(n.getDataType(), n.getMemberName(), Central.iHAS, n.getParentNode(), n.dtTable, n.model); + newNode.loadChildren(); + newNode.setId(((MobyObject) os[x]).getId()); + newNode.setNamespace(((MobyObject) os[x]).getNamespace()); + if (newNode.isPrimitive) + newNode.setValue(((MobyObject) os[x]).getValue()); + n.getParentNode().addChild(newNode, n.getParentNode().getChildCount()); + if (!newNode.isPrimitive()) + populate_children((MobyObject) os[x], newNode); + } + // now we populate the first one + if (os.length > 0) { + n.setId(((MobyObject) os[0]).getId()); + n.setNamespace(((MobyObject) os[0]).getNamespace()); + if (n.isPrimitive) + n.setValue(((MobyObject) os[0]).getValue()); + if (!n.isPrimitive()) + populate_children((MobyObject) os[0], n); + } + } + } else { + // not a has relationship, so populate it + n.setId(((MobyObject) o).getId()); + n.setNamespace(((MobyObject) o).getNamespace()); + if (n.isPrimitive) + n.setValue(((MobyObject) o).getValue()); + if (!n.isPrimitive()) + populate_children((MobyObject) o, n); + } + } catch (SecurityException e) { + + } catch (NoSuchMethodException e) { + + } catch (IllegalAccessException e) { + + } catch (IllegalArgumentException e) { + + } catch (InvocationTargetException e) { + + } + } + } /********************************************************************* * Load shared icons. From kawas at dev.open-bio.org Fri Jan 30 14:48:02 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:48:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301448.n0UEm2nZ016668@dev.open-bio.org> kawas Fri Jan 30 09:48:01 EST 2009 Update of /home/repository/moby/moby-live/Java/src/Clients In directory dev.open-bio.org:/tmp/cvs-serv16633/src/Clients Modified Files: CreateMobyInput.java Log Message: updated client. when invoked with a -service and data is loaded, the panel populates it members. moby-live/Java/src/Clients CreateMobyInput.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2008/04/19 19:11:18 1.10 +++ /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2009/01/30 14:48:01 1.11 @@ -6,34 +6,35 @@ // Copyright Martin Senger (martin.senger at gmail.com). // -import org.biomoby.shared.CentralCached; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyService; -import org.biomoby.shared.event.LogListener; -import org.biomoby.shared.event.Notifier; -import org.biomoby.service.dashboard.data.DataTypeTreeTable; -import org.biomoby.service.dashboard.data.ServiceInputPanel; -import org.biomoby.client.CentralDigestCachedImpl; -import org.biomoby.client.CmdLineHelper; - -import org.tulsoft.tools.BaseCmdLine; -import org.tulsoft.shared.FileUtils; -import org.tulsoft.shared.GException; -import org.tulsoft.tools.gui.SwingUtils; - -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JPanel; - -import java.awt.BorderLayout; -import java.awt.GridBagLayout; import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JPanel; + +import org.biomoby.client.CmdLineHelper; +import org.biomoby.service.dashboard.data.DataTypeTreeTable; +import org.biomoby.service.dashboard.data.ServiceInputPanel; +import org.biomoby.shared.CentralCached; +import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.MobyException; +import org.biomoby.shared.MobyService; +import org.biomoby.shared.event.LogListener; import org.jdom.Document; -import org.jdom.output.XMLOutputter; import org.jdom.output.Format; +import org.jdom.output.XMLOutputter; +import org.tulsoft.tools.BaseCmdLine; +import org.tulsoft.tools.gui.JFileChooserWithHistory; +import org.tulsoft.tools.gui.SwingUtils; /** * A small command-line application showing how to use @@ -62,10 +63,13 @@ } }); - JPanel panel = new JPanel(new BorderLayout()); - panel.add (printButton, BorderLayout.SOUTH); - panel.add (treeTable.scrollable(), BorderLayout.CENTER); - + JPanel panel = new JPanel(new GridBagLayout()); + SwingUtils.addComponent + (panel, treeTable, + 0, 0, 2, 1, GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, 1.0, 1.0); + SwingUtils.addComponent + (panel, printButton, + 0, 1, 1, 1, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHWEST, 1.0, 0.0); showIt ("Data type: " + rootType.getName(), panel); } @@ -86,12 +90,39 @@ onPrint (tables); } }); + JButton loadButton = new JButton ("Load Input"); + loadButton.addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + JFileChooserWithHistory chooser = new JFileChooserWithHistory(System.getProperty("tmp.dir"), "load-file"); + chooser.getFileChooser().setMultiSelectionEnabled(false); + if (chooser.getFileChooser().showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { + File chosen = chooser.getFileChooser().getSelectedFile(); + StringBuilder sb = new StringBuilder(); + String line = null; + try { + BufferedReader br = new BufferedReader(new FileReader(chosen)); + while ((line = br.readLine()) != null) + sb.append(line + "\n"); + onLoad(tables, sb.toString()); + } catch (FileNotFoundException fnfe) { + + } catch (IOException ioe) { + + } + + } + + } + }); SwingUtils.addComponent (panel, tables, - 0, 0, 1, 1, GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, 1.0, 1.0); + 0, 0, 2, 1, GridBagConstraints.BOTH, GridBagConstraints.NORTHWEST, 1.0, 1.0); SwingUtils.addComponent (panel, printButton, 0, 1, 1, 1, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHWEST, 1.0, 0.0); + SwingUtils.addComponent + (panel, loadButton, + 1, 1, 1, 1, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHWEST, 1.0, 0.0); showIt ("Service: " + service.getName(), panel); } @@ -124,6 +155,14 @@ protected void onPrint (ServiceInputPanel inputs) { msgln (inputs.toXML()); } + + protected void onLoad (ServiceInputPanel inputs, String xml) { + try { + inputs.setValues(xml); + } catch (MobyException me) { + me.printStackTrace(); + } + } /************************************************************************* * From kawas at dev.open-bio.org Fri Jan 30 14:51:11 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:51:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301451.n0UEpBf4016722@dev.open-bio.org> kawas Fri Jan 30 09:51:11 EST 2009 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv16691/src/main/org/biomoby/service/dashboard Added Files: UnitTestingResultPanel.java UnitTestingServiceCallermodel.java MobyUnitTestingPanel.java Log Message: Initial commit of the MobyUnitTesting panel for dashboard. moby-live/Java/src/main/org/biomoby/service/dashboard UnitTestingResultPanel.java,NONE,1.1 UnitTestingServiceCallermodel.java,NONE,1.1 MobyUnitTestingPanel.java,NONE,1.1 From kawas at dev.open-bio.org Fri Jan 30 14:55:19 2009 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 30 Jan 2009 09:55:19 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901301455.n0UEtJTw016780@dev.open-bio.org> kawas Fri Jan 30 09:55:19 EST 2009 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory dev.open-bio.org:/tmp/cvs-serv16745/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: added the unit testing panel to the list of available panels moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2008/05/15 18:59:25 1.9 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2009/01/30 14:55:19 1.10 @@ -5,4 +5,5 @@ org.biomoby.service.dashboard.StatisticsPanel org.biomoby.service.dashboard.DebuggingPanel org.biomoby.service.dashboard.ExamplePanel -org.biomoby.service.dashboard.PerlMoSeSPanel \ No newline at end of file +org.biomoby.service.dashboard.PerlMoSeSPanel +org.biomoby.service.dashboard.MobyUnitTestingPanel \ No newline at end of file From senger at dev.open-bio.org Sat Jan 31 02:23:09 2009 From: senger at dev.open-bio.org (Martin Senger) Date: Fri, 30 Jan 2009 21:23:09 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200901310223.n0V2N9RZ018496@dev.open-bio.org> senger Fri Jan 30 21:23:09 EST 2009 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv18477/xmls Modified Files: rdfagentBuild.xml Log Message: new target for rdfagent build moby-live/Java/xmls rdfagentBuild.xml,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2009/01/29 19:39:45 1.6 +++ /home/repository/moby/moby-live/Java/xmls/rdfagentBuild.xml 2009/01/31 02:23:09 1.7 @@ -109,7 +109,7 @@ -