From kawas at dev.open-bio.org Mon Jun 2 18:16:14 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 2 Jun 2008 18:16:14 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806022216.m52MGEQJ027587@dev.open-bio.org> kawas Mon Jun 2 18:16:14 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv27551/src/main/org/biomoby/service/dashboard Modified Files: PerlMoSeSPanel.java Log Message: added ability for the panel to try and use the cvs version of perl moses if the perl module hasnt been already 'installed' on the machine. One caveat, is that users still have to run moses-install.pl locally on their machine to finalize the configuration of moses. moby-live/Java/src/main/org/biomoby/service/dashboard PerlMoSeSPanel.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.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/dashboard/PerlMoSeSPanel.java 2008/05/30 15:49:30 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java 2008/06/02 22:16:14 1.8 @@ -149,7 +149,7 @@ private boolean enable_moses_actions = true; // is the user running windows - private boolean is_windows_pc = false; + private boolean is_windows_pc = false, not_installed = false; private Icon openFileIcon, openFileIconDis, closeFileIcon, closeFileIconDis, saveFileIcon, saveFileIconDis, @@ -169,7 +169,47 @@ if (System.getProperty("os.name").startsWith("Windows")) is_windows_pc = true; - // determine if perl & moses are installed + + check_install(); + + // set up some default values + if (!enable_moses_actions){ + File dir = AntModel.createFileName( + new String[]{ + System.getProperty ("user.dir"), + "..", + "Perl", + "MOSES-MOBY"} + ); + String s = ""; + if (dir.exists() && dir.isDirectory()) { + File f = new File(dir, "lib"); + // here, we set all values or none of them + if (f.exists() && f.isDirectory()) { + s = getPrefValue(PM_PERL_LIB_1, ""); + if (s.equals("")) { + // never has been set - set it to cvs path + setPrefValue(PM_PERL_LIB_1, f.getPath()); + } + // ignore PM_PERL_LIB_2 + f = new File(dir, "bin"); + if (f.exists() && f.isDirectory()) { + f = new File(f, "scripts"); + if (f.exists() && f.isDirectory()) { + s = getPrefValue(PM_SCRIPTS_INSTALL_DIR, ""); + if (s.equals("")) { + setPrefValue(PM_SCRIPTS_INSTALL_DIR, f.getPath()); + } + } + } + } + } + // this value can be set irregardless of the others + s = getPrefValue(PM_PERL_INSTALL_DIR, ""); + if (s.equals("")) + setPrefValue(PM_PERL_INSTALL_DIR, is_windows_pc ? "perl.exe" : "/usr/bin/perl"); + + } } /* @@ -178,6 +218,33 @@ */ private void check_install() { String[] command; + ArrayList prefix = new ArrayList(); + if (is_windows_pc) { + prefix.add("moses-cache-tester.bat"); + command = prefix.toArray(new String[]{}); + } else { + prefix.add("moses-cache-tester.pl"); + command = prefix.toArray(new String[]{}); + } + try { + Process process; + process = Runtime.getRuntime().exec(command); + BufferedReader br = new BufferedReader( + new InputStreamReader(process.getInputStream())); + + while (br.readLine() != null) { + //System.out.println(line + System.getProperty("line.separator")); + } + process.waitFor(); + enable_moses_actions = true; + } catch (Exception e) { + enable_moses_actions = false; + } + } + + // private method that checks if moses is installed given user values + private void user_check_install() { + String[] command; ArrayList prefix = generatePerlPrefix(); if (is_windows_pc) { prefix.add("moses-cache-tester.bat"); @@ -191,8 +258,8 @@ process = Runtime.getRuntime().exec(command); BufferedReader br = new BufferedReader( new InputStreamReader(process.getInputStream())); - String line = null; - while ((line = br.readLine()) != null) { + + while (br.readLine() != null) { //System.out.println(line + System.getProperty("line.separator")); } process.waitFor(); @@ -245,7 +312,6 @@ public JComponent getComponent(PropertyChannel propertyChannel) { setPropertyChannel(propertyChannel); - determineMoSeSDirectory(); // put some properties in the channel propertyChannel.put(PM_GENERATING_BY_AUTHORITY, new Boolean(false)); @@ -254,6 +320,11 @@ propertyChannel.put(PM_SYNC_DATATYPES, new Boolean(false)); propertyChannel.put(PM_OVERWRITE, new Boolean(false)); propertyChannel.put(PM_CGI, new Boolean(false)); + + propertyChannel.put(PM_PERL_INSTALL_DIR, getPrefValue(PM_PERL_INSTALL_DIR, "")); + propertyChannel.put(PM_PERL_LIB_1, getPrefValue(PM_PERL_LIB_1, "")); + propertyChannel.put(PM_PERL_LIB_2, getPrefValue(PM_PERL_LIB_2, "")); + propertyChannel.put(PM_SCRIPTS_INSTALL_DIR, getPrefValue(PM_SCRIPTS_INSTALL_DIR, "")); propertyChannel.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { @@ -336,7 +407,6 @@ private JPanel getMoSeSPanel() { - check_install(); JPanel p = new JPanel (new GridBagLayout()); p.setBorder (createFatBorder ("Perl-MoSeS", @@ -356,7 +426,7 @@ PM_SCRIPTS_INSTALL_DIR, propertyChannel.getString(PM_SCRIPTS_INSTALL_DIR) + "/"); // check for the scripts - check_install(); + user_check_install(); if (enable_moses_actions) { // we are good to go! enable buttons syncBtn.setEnabled(enable_moses_actions); @@ -377,10 +447,13 @@ }); JTextFieldWithHistory lib1 = createText (null, PM_PERL_LIB_1, PM_PERL_LIB_1); + lib1.setText(propertyChannel.getString(PM_PERL_LIB_1)); JTextFieldWithHistory lib2 = createText (null, PM_PERL_LIB_2, PM_PERL_LIB_2); + lib2.setText(propertyChannel.getString(PM_PERL_LIB_2)); JTextFieldWithHistory install_path = createText (null, PM_SCRIPTS_INSTALL_DIR, PM_SCRIPTS_INSTALL_DIR); - install_path.setText(is_windows_pc ? "perl.exe" : "/usr/bin/perl"); + install_path.setText(propertyChannel.getString(PM_SCRIPTS_INSTALL_DIR)); JTextFieldWithHistory perl_install_path = createText(null, PM_PERL_INSTALL_DIR, PM_PERL_INSTALL_DIR); + perl_install_path.setText(propertyChannel.getString(PM_PERL_INSTALL_DIR)); SwingUtils.addComponent(sPanel, new JLabel("Perl Path: "), 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent(sPanel, perl_install_path, 1, 0, 3, 1, HORI, NWEST, 1.0, 0.0); From kawas at dev.open-bio.org Mon Jun 2 18:29:30 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 2 Jun 2008 18:29:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806022229.m52MTUu4027643@dev.open-bio.org> kawas Mon Jun 2 18:29:29 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv27608/src/main/org/biomoby/service/dashboard Modified Files: PerlMoSeSPanel.java Log Message: layout change * moved the console tab to be the footer of the text editor sub panel * completely removed the left side tab pane. moby-live/Java/src/main/org/biomoby/service/dashboard PerlMoSeSPanel.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.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/PerlMoSeSPanel.java 2008/06/02 22:16:14 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java 2008/06/02 22:29:29 1.9 @@ -375,15 +375,10 @@ console.setAppendMode(true); console.setVerboseMode(true); - // set up tabbed pane - JTabbedPane tabbedPane = new JTabbedPane(); - tabbedPane.addTab("MoSeS Toolkit", null, getMoSeSPanel(), - "Perl-MoSeS: Build Services Faster"); - tabbedPane.addTab("Console", null, console, "Shows the console"); - // set up the splitpane - JSplitPane vsplit = vSplit(getServicesSelectionPanel(), tabbedPane, 0.8); - JSplitPane splitPane = hSplit(vsplit, getEditorPanel(), 0.1); + JSplitPane vsplit = vSplit(getServicesSelectionPanel(), getMoSeSPanel(), 0.8); + JSplitPane vsplit2 = vSplit(getEditorPanel(), console, 0.8); + JSplitPane splitPane = hSplit(vsplit, vsplit2, 0.1); // add the components SwingUtils.addComponent(pComponent, splitPane, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); return pComponent; From kawas at dev.open-bio.org Wed Jun 4 11:31:51 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 4 Jun 2008 11:31:51 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806041531.m54FVp0E001652@dev.open-bio.org> kawas Wed Jun 4 11:31:51 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory dev.open-bio.org:/tmp/cvs-serv1613/src/main/org/biomoby/service/dashboard/images Modified Files: pMoses.gif Log Message: new icon that is actually decipherable moby-live/Java/src/main/org/biomoby/service/dashboard/images pMoses.gif,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/pMoses.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/pMoses.gif 2008/05/15 19:03:54 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/pMoses.gif 2008/06/04 15:31:51 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/pMoses.gif: diff failed From kawas at dev.open-bio.org Wed Jun 4 11:59:31 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 4 Jun 2008 11:59:31 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806041559.m54FxVT9001731@dev.open-bio.org> kawas Wed Jun 4 11:59:31 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory dev.open-bio.org:/tmp/cvs-serv1696/src/main/org/biomoby/service/dashboard/help Modified Files: PerlMoSeSPanel.html Log Message: updated the doc to reflect changes in the panel moby-live/Java/src/main/org/biomoby/service/dashboard/help PerlMoSeSPanel.html,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/PerlMoSeSPanel.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/PerlMoSeSPanel.html 2008/05/27 17:23:53 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/PerlMoSeSPanel.html 2008/06/04 15:59:31 1.3 @@ -1,26 +1,27 @@

Perl MoSeS: Generate & Edit Code

This panel is a user-interface to the Perl MoSeS - sub-project. MoSeS stands for Moby Services Support and its documentation is available here.

+ sub-project. MoSeS stands for Moby Services Support and its documentation is available at:
+ http://search.cpan.org/dist/MOSES-MOBY/lib/MOSES/MOBY.pm

In order to use this panel, you will have to ensure that you (or your - sys admin) have installed Perl and the CPAN module MOSES::MOBY. + sys admin) have installed Perl and the CPAN module MOSES::MOBY (http://search.cpan.org/dist/MOSES-MOBY/). Once that module has been installed and you have performed the user configuration step (moses-install.pl), you will be able use this panel!

-

The panel has two different parts - one generates code for the - selected services, and one provides you with an editor to aid +

Once again, this panel is only useful in those situations that you have installed the CPAN module 'MOSES::MOBY' and have run the user configuration script 'moses-install.pl'!

+

The panel has two different parts - one generates code for the + selected services, and one provides you with an editor to aid in writing the business logic for any service that you generate with this Perl-MoSeS.

For both parts, you need to start by selecting a service, services, or authority in the services tree. Multiple selection is possible using SHIFT or CONTROL. If you select an authority, all services from this authority are considered selected.

-

All activities are done using the command line utilities installed by the Perl-MoSeS module.

-

MoSeS Toolkit

-

The MoSeS Toolkit sub panel allows you to:

+

All activities are done in the background using the command line utilities installed by the Perl-MoSeS module.

+

 

+

Perl-MoSeS sub panel

+

The Perl-MoSeS sub panel allows you to:

  • Generate - generate perl modules for services that you select,
  • -
  • Utilities - for synchronizing Perl-MoSeS with the Dashboard, and an
  • -
  • Editor - .for easily editing the business logic of services that you create.
  • Local User Config - for those users without root access when they installed Perl-MoSeS*
@@ -28,7 +29,7 @@

Possible caveats:

    -
  • The actions in this panel depend on the availability of certain command line tools (installed by MOSES-MOBY) being available on the system PATH.
  • +
  • The actions in this panel depend on the availability of certain command line tools (installed by MOSES-MOBY, when you did 'make install' of the cpan module) being available on the system PATH.

Generate

There is one generator in this panel for creating services, with a couple of options.

@@ -40,31 +41,17 @@

Once you have chosen your desired options, you can click on the Generate Skeletons button. This will go through and generate perl modules that represent the services that you selected in the 'Service Browser'.

All files are generated into your local Perl-MoSeS/ installation. For instance, assuming that your username is moby_user and that your home directory is /home/moby_user/, then you could find your service skeletons in /home/moby_user/Perl-MoSeS/services/Service/ directory.

When you generate CGI based moby services, an additional file is generated into /Perl-MoSeS/cgi/. In order to implement the business logic, only the skeletons mentioned above are required. The files in the cgi/ directory are only used for deploying your services.

-

 

-

Utilities

-

This sub panel is used for synchronizing the cache that Dashboard uses with the one that Perl-MoSeS uses.

-

To perform a synchronization, select 'Synchronize Services' and/or 'Synchronize Datatypes' and then hit the Synchronize button.

-

 

-

Editor

-

The editor allows you to open and easily edit perl scripts that you generate with MoSeS.

-

The editor has a really simple interface:

-
    -
  • Open - used to open a perl script.
  • -
  • Save - used to save an open script.
  • -
  • Close - used to remove the script from view.
  • -
-

There are also a two buttons for enlarging or shrinking the text in the editor.

Local User Config

The configuration sub panel allows you to specify:

  • Perl Install Path - this is the path to the PERL executable, for instance, /usr/bin/perl [required]
  • -
  • PERL5LIB directory - a directory to add to Perls' @INC [optional]
  • -
  • PERL5LIB directory (2) - another directory to add to Perls' @INC [optional]
  • -
  • MoSeS Scripts Directory - the directory that contains the moses-*.pl scripts [required]
  • +
  • PERL5LIB dir - a directory to add to Perls' @INC [required]
  • +
  • PERL5LIB dir(2) - another directory to add to Perls' @INC [optional]
  • +
  • MoSeS Scripts Dir - the directory that contains the moses-*.pl scripts [required]

Once this information is entered, and the 'Test user config' is clicked, we check whether the required MOSES scripts are accessible. If everything is deemed to be fine, the other sub panels are enabled. Otherwise, you will be prompted to check your values.

Help on setting your local user configuration

-

Some users find this information hard to obtain. One trick that I use is to enter 'perl -V' at the command prompt. Among other things, one of the last things that you will see displayed is something like:

+

Some users find this information hard to obtain. One trick that I use, is to enter 'perl -V' at the command prompt. Among other things, one of the last things that you will see displayed is something like:

Built under linux
Compiled at Nov 27 2007 10:44:36
@INC:
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
.

Keeping the above in mind and remembering that when you installed (locally for just you and not system wide!) MOSES-MOBY from the command prompt, you specified a PREFIX=/some/path/, similar to the following:

   perl Makefile.PL PREFIX=/home/ekawas/usr/local
@@ -74,7 +61,21 @@
  • /home/ekawas/usr/local/lib/site_perl
  • In other words, you are interested in using the PREFIX/lib/ directories.

    -

    The value that you should set for the MoSeS Scripts Directory are usually located in the PREFIX/bin/ directory.

    +

    The value that you should set for the 'MoSeS Scripts Directory' are usually located in the PREFIX/bin/ directory.

    +

     

    +

    Perl-MoSeS: Editor sub panel

    +

    This sub panel consists of an editor pane with various tools that will allow you to open and edit perl scripts generated by Perl-MoSeS. One of the nicer features of this editor, is the syntax highlighing that it performs on perl scripts.

    +

    Editor

    +

    The editor allows you to open and easily edit perl scripts that you generate with MoSeS.

    +

    The editor has a really simple interface:

    +
      +
    • Open - used to open a perl script.
    • +
    • Save - used to save an open script.
    • +
    • Close - used to remove the script from view.
    • +
    • Font - used to select a font for the editor.
    • +
    +

    There are also a two buttons for enlarging or shrinking the text in the editor. All of these buttons are located on a toolbar that you can detach from the panel.

    +

     

    Service deployment

    Once you have created your service, you will want to deploy it. Depending on whether you have generated a SOAP service or a CGI based service, the steps to involved to deploy your service.

    Deploying a SOAP Service

    From kawas at dev.open-bio.org Wed Jun 4 12:03:04 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 4 Jun 2008 12:03:04 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806041603.m54G34Na001793@dev.open-bio.org> kawas Wed Jun 4 12:03:04 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv1758/src/main/org/biomoby/service/dashboard Modified Files: PerlMoSeSPanel.java Log Message: * no longer use the perl moses version from the cvs; require that user has installed module MOSES::MOBY from cpan (or from cvs) first. some ui changes * removed sync panel. from now on sync is done in the back ground * removed the editor tab and moved it to a toolbar on the editor pane * removed the panels tab pane * moved the console window to be below the editor pane and always visible moby-live/Java/src/main/org/biomoby/service/dashboard PerlMoSeSPanel.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.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/PerlMoSeSPanel.java 2008/06/02 22:29:29 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java 2008/06/04 16:03:04 1.10 @@ -3,7 +3,6 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Event; -import java.awt.FlowLayout; import java.awt.Font; import java.awt.GraphicsEnvironment; import java.awt.GridBagLayout; @@ -30,6 +29,7 @@ import javax.swing.AbstractButton; import javax.swing.BorderFactory; import javax.swing.Box; +import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.Icon; import javax.swing.JButton; @@ -43,8 +43,8 @@ import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JSplitPane; -import javax.swing.JTabbedPane; import javax.swing.JTextPane; +import javax.swing.JToolBar; import javax.swing.KeyStroke; import javax.swing.SwingConstants; import javax.swing.border.Border; @@ -59,6 +59,9 @@ import org.apache.commons.io.FilenameUtils; import org.biomoby.shared.MobyException; +import org.biomoby.shared.event.NotificationEvent; +import org.biomoby.shared.event.NotificationListener; +import org.biomoby.shared.event.Notifier; import org.tulsoft.tools.gui.JTextFieldWithHistory; import org.tulsoft.tools.gui.SwingUtils; @@ -83,12 +86,6 @@ // boolean do we generate soap services static String PM_SOAP = "perl-moses-soap"; - // boolean: do we update the service cache - static String PM_UPDATE_SERVICE_CACHE = "perl-moses-update-service-cache"; - - // boolean: do we update the datatype cache - static String PM_UPDATE_DATATYPE_CACHE = "perl-moses-update-datatype-cache"; - // boolean: are we currently updating the datatype cache static String PM_SYNC_DATATYPES = "perl-moses-sync-datatypes"; @@ -143,13 +140,13 @@ private JLabel aSelectedCount, sSelectedCount, currentlyEditing; - private JButton editorSaveButton, editorCloseButton, editorOpenButton, scriptsBtn, generateBtn, syncBtn; + private JButton editorSaveButton, editorCloseButton, editorOpenButton, scriptsBtn, generateBtn; // are we enabling moses actions private boolean enable_moses_actions = true; // is the user running windows - private boolean is_windows_pc = false, not_installed = false; + private boolean is_windows_pc = false; private Icon openFileIcon, openFileIconDis, closeFileIcon, closeFileIconDis, saveFileIcon, saveFileIconDis, @@ -159,6 +156,14 @@ private JComboBox fonts; + /* + * The following strings are error messages that perl-moses produces when a + * cache needs to be created and updates fail + */ + private String SERVICE_CACHE_DOESNT_EXIST = "Please create a services cache first!"; + + private String DATATYPE_CACHE_DOESNT_EXIST = "Please create a datatype cache first!"; + /** * Default constructor: set the image, and determines * whether or not we are using windows @@ -174,36 +179,7 @@ // set up some default values if (!enable_moses_actions){ - File dir = AntModel.createFileName( - new String[]{ - System.getProperty ("user.dir"), - "..", - "Perl", - "MOSES-MOBY"} - ); String s = ""; - if (dir.exists() && dir.isDirectory()) { - File f = new File(dir, "lib"); - // here, we set all values or none of them - if (f.exists() && f.isDirectory()) { - s = getPrefValue(PM_PERL_LIB_1, ""); - if (s.equals("")) { - // never has been set - set it to cvs path - setPrefValue(PM_PERL_LIB_1, f.getPath()); - } - // ignore PM_PERL_LIB_2 - f = new File(dir, "bin"); - if (f.exists() && f.isDirectory()) { - f = new File(f, "scripts"); - if (f.exists() && f.isDirectory()) { - s = getPrefValue(PM_SCRIPTS_INSTALL_DIR, ""); - if (s.equals("")) { - setPrefValue(PM_SCRIPTS_INSTALL_DIR, f.getPath()); - } - } - } - } - } // this value can be set irregardless of the others s = getPrefValue(PM_PERL_INSTALL_DIR, ""); if (s.equals("")) @@ -342,8 +318,8 @@ return; } if (e.getPropertyName().equals(PM_INFORMATION)) { - JOptionPane.showMessageDialog(null, e.getNewValue(), - "Information", JOptionPane.INFORMATION_MESSAGE); + /* JOptionPane.showMessageDialog(null, e.getNewValue(), + "Information", JOptionPane.INFORMATION_MESSAGE);*/ console.setText("Information:" + e.getNewValue().toString() + "\n"); return; @@ -361,11 +337,28 @@ doCloseFile(); return; } - } }); + registryModel = createRegistryModel(); - + registryModel.addNotificationListener(new NotificationListener() { + public void notified(NotificationEvent e) { + if (e.getType() == Notifier.AUTHORITIES_UPDATED) { + if (enable_moses_actions && !getPropertyChannel().getBoolean(PM_SYNC_SERVICES, false)) { + getPropertyChannel().put(PM_SYNC_SERVICES, true); + onUpdateServiceCache(); + return; + } + } + + if (enable_moses_actions && e.getType() == Notifier.DATA_TYPES_UPDATED) { + if (!getPropertyChannel().getBoolean(PM_SYNC_DATATYPES, false)) { + getPropertyChannel().put(PM_SYNC_DATATYPES, true); + onUpdateDatatypeCache(); + return; + } + } + }}); if (pComponent != null) return pComponent; pComponent = new JPanel(new GridBagLayout(), true); @@ -400,6 +393,9 @@ } + private final PropertyChannel getPropertyChannel() { + return this.propertyChannel; + } private JPanel getMoSeSPanel() { JPanel p = new JPanel (new GridBagLayout()); @@ -410,7 +406,7 @@ JPanel sPanel = createTitledPanel("Local User Config"); if (!enable_moses_actions) { scriptsBtn = createButton( - "Test user config", + "Confirm values are correct", "Check whether or not your local user config is correct", KeyEvent.VK_R, new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -424,11 +420,16 @@ user_check_install(); if (enable_moses_actions) { // we are good to go! enable buttons - syncBtn.setEnabled(enable_moses_actions); - generateBtn.setEnabled(enable_moses_actions); - scriptsBtn.setEnabled(!enable_moses_actions); propertyChannel.fire(PM_INFORMATION, "Your local configuration was successful!"); - + if (enable_moses_actions && !getPropertyChannel().getBoolean(PM_SYNC_SERVICES, false)) { + getPropertyChannel().put(PM_SYNC_SERVICES, true); + onUpdateServiceCache(); + } + if (!getPropertyChannel().getBoolean(PM_SYNC_DATATYPES, false)) { + getPropertyChannel().put(PM_SYNC_DATATYPES, true); + onUpdateDatatypeCache(); + } + scriptsBtn.setEnabled(!enable_moses_actions); } else { // alert them that this directory didnt // contain anything useful @@ -486,7 +487,6 @@ return; } generateBtn.setEnabled(false); - syncBtn.setEnabled(false); propertyChannel.fire(DP_STATUS_MSG, "Processing MoSeS skeletons..."); if (propertyChannel @@ -519,120 +519,11 @@ SwingUtils.addComponent(bPanel, genSoap, 0, 2, 2, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent(bPanel, generateBtn, 0, 3, 2, 1, HORI, NWEST, 0.0, 0.0); - JPanel uPanel = createTitledPanel("Utilities"); - JCheckBox syncServices = createActionBox("Synchronize Services", - PM_UPDATE_SERVICE_CACHE); - JCheckBox syncDatatypes = createActionBox("Synchronize Datatypes", - PM_UPDATE_DATATYPE_CACHE); - - syncBtn = createButton("Synchronize", - "Synchronize the Perl-MoSeS caches with Dashboard\'s cache", - KeyEvent.VK_Z, new ActionListener() { - public void actionPerformed(ActionEvent e) { - boolean syncData = propertyChannel.getBoolean( - PM_UPDATE_DATATYPE_CACHE, false); - boolean syncServices = propertyChannel.getBoolean( - PM_UPDATE_SERVICE_CACHE, false); - - if (syncData || syncServices) { - generateBtn.setEnabled(false); - syncBtn.setEnabled(false); - if (syncData) { - propertyChannel.put(PM_SYNC_DATATYPES, true); - onUpdateDatatypeCache(); - } - if (syncServices) { - propertyChannel.put(PM_SYNC_SERVICES, true); - onUpdateServiceCache(); - } - } - } - }); - syncBtn.setEnabled(enable_moses_actions); - - SwingUtils.addComponent(uPanel, syncServices, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent(uPanel, syncDatatypes, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent(uPanel, syncBtn, 0, 2, 1, 1, HORI, NWEST, 0.0, 0.0); - - JPanel ePanel = createTitledPanel("Editor"); - - editorOpenButton = new JButton("Open", openFileIcon); - editorOpenButton.setIcon(openFileIcon); - editorOpenButton.setDisabledIcon(openFileIconDis); - editorOpenButton.setVerticalTextPosition(AbstractButton.BOTTOM); - editorOpenButton.setHorizontalTextPosition(AbstractButton.CENTER); - editorOpenButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - String path = propertyChannel.getString(PM_FILE_LAST_DIRECTORY); - JFileChooser openFile; - // provide a history - if (path == null) - openFile = new JFileChooser(); - else - openFile = new JFileChooser(path); - - openFile.setDialogTitle("Open a Perl-MoSeS impl file"); - openFile.setApproveButtonText("Open script"); - openFile.setFileSelectionMode(JFileChooser.FILES_ONLY); - openFile.addChoosableFileFilter(new FileFilter() { - @Override - public boolean accept(File f) { - if (f.isDirectory()) - return true; - String extension = FilenameUtils.getExtension(f.getName()); - return ("pm".equalsIgnoreCase(extension) - || "pl".equalsIgnoreCase(extension) - || "cgi".equalsIgnoreCase(extension)); - } - @Override - public String getDescription() { - return "Perl files"; - } - }); - int doOpen = openFile.showOpenDialog(null); - if (doOpen == JFileChooser.APPROVE_OPTION) { - propertyChannel.fire(PM_FILE_ACTION_OPEN, openFile.getSelectedFile().getPath()); - } - } - }); - - editorSaveButton = new JButton("Save", saveFileIcon); - editorSaveButton.setIcon(saveFileIcon); - editorSaveButton.setDisabledIcon(saveFileIconDis); - editorSaveButton.setVerticalTextPosition(AbstractButton.BOTTOM); - editorSaveButton.setHorizontalTextPosition(AbstractButton.CENTER); - editorSaveButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - propertyChannel.fire(PM_FILE_ACTION_SAVE, ""); - } - }); - - editorCloseButton = new JButton("Close", closeFileIcon); - editorCloseButton.setIcon(closeFileIcon); - editorCloseButton.setDisabledIcon(closeFileIconDis); - editorCloseButton.setVerticalTextPosition(AbstractButton.BOTTOM); - editorCloseButton.setHorizontalTextPosition(AbstractButton.CENTER); - editorCloseButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - propertyChannel.fire(PM_FILE_ACTION_CLOSE, ""); - } - }); - // initially open is enabled, close and save are not - editorOpenButton.setEnabled(true); - editorCloseButton.setEnabled(false); - editorSaveButton.setEnabled(false); - - SwingUtils.addComponent(ePanel, editorOpenButton, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent(ePanel, editorSaveButton, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent(ePanel, editorCloseButton, 2, 0, 1, 1, NONE, NWEST, 0.0, 0.0); - // add to the main panel int count = 0; if (!enable_moses_actions) SwingUtils.addComponent(p, sPanel, 0, count++, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent(p, bPanel, 0, count++, 2, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent(p, uPanel, 0, count++, 2, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent(p, ePanel, 0, count++, 2, 1, HORI, NWEST, 0.0, 0.0); return p; @@ -698,7 +589,7 @@ Border blackline = BorderFactory.createLineBorder(Color.black); CompoundBorder compoundBorder = BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder(blackline, - "Perl-MoSeS: Impl Editor"), BorderFactory + "Perl-MoSeS: Editor"), BorderFactory .createEmptyBorder(5, 5, 5, 5)); p.setBorder(compoundBorder); @@ -744,7 +635,8 @@ } private JComponent getFontChooser() { JLabel label = new JLabel("Font:"); - JPanel panel = new JPanel(new FlowLayout()); + JToolBar toolbar = new JToolBar("Editor"); + toolbar.setLayout(new BoxLayout(toolbar, BoxLayout.X_AXIS)); // get all the fonts available GraphicsEnvironment env = @@ -783,7 +675,7 @@ } }); - + fonts.setPreferredSize(fonts.getMinimumSize()); // create a zoom in button JButton zoomInButton = AbstractPanel.createButton ("", @@ -814,13 +706,89 @@ zoomOutButton.setDisabledIcon (zoomOutIconDis); SwingUtils.compact (zoomOutButton); - // add the font chooser and zoom buttons to the panel - panel.add(label); - panel.add(fonts); - panel.add(zoomInButton); - panel.add(zoomOutButton); - panel.add(Box.createHorizontalGlue()); - return panel; + //JPanel ePanel = createTitledPanel("File"); + + editorOpenButton = new JButton("Open", openFileIcon); + editorOpenButton.setIcon(openFileIcon); + editorOpenButton.setDisabledIcon(openFileIconDis); + editorOpenButton.setVerticalTextPosition(AbstractButton.BOTTOM); + editorOpenButton.setHorizontalTextPosition(AbstractButton.CENTER); + editorOpenButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + String path = propertyChannel.getString(PM_FILE_LAST_DIRECTORY); + JFileChooser openFile; + // provide a history + if (path == null) + openFile = new JFileChooser(); + else + openFile = new JFileChooser(path); + + openFile.setDialogTitle("Open a Perl Scrip:"); + openFile.setApproveButtonText("Open script"); + openFile.setFileSelectionMode(JFileChooser.FILES_ONLY); + openFile.addChoosableFileFilter(new FileFilter() { + @Override + public boolean accept(File f) { + if (f.isDirectory()) + return true; + String extension = FilenameUtils.getExtension(f.getName()); + return ("pm".equalsIgnoreCase(extension) + || "pl".equalsIgnoreCase(extension) + || "cgi".equalsIgnoreCase(extension)); + } + @Override + public String getDescription() { + return "Perl scripts"; + } + }); + int doOpen = openFile.showOpenDialog(null); + if (doOpen == JFileChooser.APPROVE_OPTION) { + propertyChannel.fire(PM_FILE_ACTION_OPEN, openFile.getSelectedFile().getPath()); + } + } + }); + + editorSaveButton = new JButton("Save", saveFileIcon); + editorSaveButton.setIcon(saveFileIcon); + editorSaveButton.setDisabledIcon(saveFileIconDis); + editorSaveButton.setVerticalTextPosition(AbstractButton.BOTTOM); + editorSaveButton.setHorizontalTextPosition(AbstractButton.CENTER); + editorSaveButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + propertyChannel.fire(PM_FILE_ACTION_SAVE, ""); + } + }); + + editorCloseButton = new JButton("Close", closeFileIcon); + editorCloseButton.setIcon(closeFileIcon); + editorCloseButton.setDisabledIcon(closeFileIconDis); + editorCloseButton.setVerticalTextPosition(AbstractButton.BOTTOM); + editorCloseButton.setHorizontalTextPosition(AbstractButton.CENTER); + editorCloseButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + propertyChannel.fire(PM_FILE_ACTION_CLOSE, ""); + } + }); + // initially open is enabled, close and save are not + editorOpenButton.setEnabled(true); + editorCloseButton.setEnabled(false); + editorSaveButton.setEnabled(false); + + // add the font chooser, file and zoom buttons to the panel + toolbar.add(editorOpenButton); + toolbar.add(editorSaveButton); + toolbar.add(editorCloseButton); + toolbar.addSeparator(); + toolbar.add(label); + toolbar.addSeparator(); + toolbar.add(fonts); + toolbar.addSeparator(); + toolbar.add(zoomInButton); + toolbar.add(zoomOutButton); + toolbar.add(Box.createGlue()); + Box b = Box.createHorizontalBox(); + SwingUtils.addComponent(b, toolbar, 0, 0, 1, 1, NONE, WEST, 0.0, 0.0); + return b; } private JRadioButton createHowToButton (String title, String howTo) { @@ -891,49 +859,63 @@ private void onUpdateDatatypeCache() { final SwingWorker worker = new SwingWorker() { MobyException exception = null; - + boolean updateFailed = false; + public Object construct() { + generateBtn.setEnabled(false); propertyChannel.fire(DP_STATUS_MSG, "Synchronizing Perl-MoSeS Datatype Cache..."); console.setEnabledAppendMode(false); ArrayList command = new ArrayList(); // update the moses cache first ... Process p; + StringBuffer inputstream = new StringBuffer(); + StringBuffer errorstream = new StringBuffer(); try { - // empty the command list - command = new ArrayList(); - command.addAll(generatePerlPrefix()); - String s = (command.size() > 0 ? command.remove(command.size()-1) : "") ; - - // construct the command - command.add(is_windows_pc ? "moses-generate-datatypes.bat" - : s + "moses-generate-datatypes.pl"); - command.add("-R"); - command - .add(propertyChannel - .getString(DashboardProperties.DP_REGISTRY_ENDPOINT)); - command.add("-f"); - // place command into com - String[] com = command.toArray(new String[] {}); - - // execute the command - p = Runtime.getRuntime().exec(com); - BufferedReader br = new BufferedReader( - new InputStreamReader(p.getInputStream())); - String line = null; - while ((line = br.readLine()) != null) { - console.setText(line - + System.getProperty("line.separator")); + for (int x = 0; x < 2; x++) { + inputstream = new StringBuffer(); + errorstream = new StringBuffer(); + // empty the command list + command = new ArrayList(); + command.addAll(generatePerlPrefix()); + String s = (command.size() > 0 ? command.remove(command.size()-1) : "") ; + + // construct the command + command.add(is_windows_pc ? "moses-generate-datatypes.bat" + : s + "moses-generate-datatypes.pl"); + command.add("-R"); + command + .add(propertyChannel + .getString(DashboardProperties.DP_REGISTRY_ENDPOINT)); + command.add(updateFailed ? "-f" : "-u"); + // place command into com + String[] com = command.toArray(new String[] {}); + + // execute the command + p = Runtime.getRuntime().exec(com); + BufferedReader br = new BufferedReader( + new InputStreamReader(p.getInputStream())); + String line = null; + while ((line = br.readLine()) != null) { + inputstream.append(line + + System.getProperty("line.separator")); + } + BufferedReader errorBr = new BufferedReader( + new InputStreamReader(p.getErrorStream())); + line = null; + while ((line = errorBr.readLine()) != null) { + errorstream.append(line + + System.getProperty("line.separator")); + } + p.waitFor(); + if ( + inputstream.toString().indexOf(DATATYPE_CACHE_DOESNT_EXIST) > 0 || + errorstream.toString().indexOf(DATATYPE_CACHE_DOESNT_EXIST) > 0) { + updateFailed = true; + } else { + break; + } } - BufferedReader errorBr = new BufferedReader( - new InputStreamReader(p.getErrorStream())); - line = null; - while ((line = errorBr.readLine()) != null) { - console.setText(line - + System.getProperty("line.separator")); - } - p.waitFor(); - } catch (IOException ioe) { exception = new MobyException( "There was a problem synchronizing the datatype cache(x001):\n" + ioe.getMessage(), @@ -943,6 +925,8 @@ "There was a problem synchronizing the datatype cache(x002)\n: + ie.getMessage()", ie); } + console.setText(inputstream.toString()); + console.setText(errorstream.toString()); return null; // not used here } @@ -959,7 +943,6 @@ if (!(propertyChannel.getBoolean(PM_SYNC_DATATYPES, false) || propertyChannel .getBoolean(PM_SYNC_SERVICES, false))) { - syncBtn.setEnabled(true); generateBtn.setEnabled(true); } @@ -971,48 +954,62 @@ private void onUpdateServiceCache() { final SwingWorker worker = new SwingWorker() { MobyException exception = null; - + boolean updateFailed = false; + public Object construct() { propertyChannel.fire(DP_STATUS_MSG, "Synchronizing Perl-MoSeS Service Cache..."); + generateBtn.setEnabled(false); console.setEnabledAppendMode(false); ArrayList command = new ArrayList(); // update the moses cache first ... Process p; + StringBuffer inputstream = new StringBuffer(); + StringBuffer errorstream = new StringBuffer(); try { - // empty the command list - command = new ArrayList(); - command.addAll(generatePerlPrefix()); - String s = (command.size() > 0 ? command.remove(command.size()-1) : "") ; - // construct the command - command.add(is_windows_pc ? "moses-generate-services.bat" - : s + "moses-generate-services.pl"); - command.add("-R"); - command - .add(propertyChannel - .getString(DashboardProperties.DP_REGISTRY_ENDPOINT)); - command.add("-f"); - // place command into com - String[] com = command.toArray(new String[] {}); - - // execute the command - p = Runtime.getRuntime().exec(com); - BufferedReader br = new BufferedReader( - new InputStreamReader(p.getInputStream())); - String line = null; - while ((line = br.readLine()) != null) { - console.setText(line - + System.getProperty("line.separator")); - } - BufferedReader errorBr = new BufferedReader( - new InputStreamReader(p.getErrorStream())); - line = null; - while ((line = errorBr.readLine()) != null) { - console.setText(line - + System.getProperty("line.separator")); + for (int x = 0; x < 2; x++) { + inputstream = new StringBuffer(); + errorstream = new StringBuffer(); + // empty the command list + command = new ArrayList(); + command.addAll(generatePerlPrefix()); + String s = (command.size() > 0 ? command.remove(command.size()-1) : "") ; + // construct the command + command.add(is_windows_pc ? "moses-generate-services.bat" + : s + "moses-generate-services.pl"); + command.add("-R"); + command + .add(propertyChannel + .getString(DashboardProperties.DP_REGISTRY_ENDPOINT)); + command.add(updateFailed ? "-f" : "-u"); + // place command into com + String[] com = command.toArray(new String[] {}); + + // execute the command + p = Runtime.getRuntime().exec(com); + BufferedReader br = new BufferedReader( + new InputStreamReader(p.getInputStream())); + String line = null; + while ((line = br.readLine()) != null) { + inputstream.append(line + + System.getProperty("line.separator")); + } + BufferedReader errorBr = new BufferedReader( + new InputStreamReader(p.getErrorStream())); + line = null; + while ((line = errorBr.readLine()) != null) { + errorstream.append(line + + System.getProperty("line.separator")); + } + p.waitFor(); + if ( + inputstream.toString().indexOf(SERVICE_CACHE_DOESNT_EXIST) > 0 || + errorstream.toString().indexOf(SERVICE_CACHE_DOESNT_EXIST) > 0) { + updateFailed = true; + } else { + break; + } } - p.waitFor(); - } catch (IOException ioe) { exception = new MobyException( "There was a problem synchronizing the service cache(x001):\n" + ioe.getMessage(), @@ -1022,6 +1019,8 @@ "There was a problem synchronizing the service cache(x002):\n" + ie.getMessage(), ie); } + console.setText(inputstream.toString()); + console.setText(errorstream.toString()); return null; // not used here } @@ -1038,7 +1037,6 @@ propertyChannel.getBoolean(PM_SYNC_DATATYPES, false) || propertyChannel.getBoolean(PM_SYNC_SERVICES, false))) { - syncBtn.setEnabled(true); generateBtn.setEnabled(true); } } @@ -1125,14 +1123,9 @@ propertyChannel .fire(DP_STATUS_MSG, "Generating Perl-MoSeS service skeletons complete!"); - JOptionPane.showMessageDialog(null, - "Processing of selected service completed!\n" + - "Please check the 'console' to ensure that the service\n" + - "skeletons were generated correctly.", "Completed", JOptionPane.INFORMATION_MESSAGE); - if (!(propertyChannel.getBoolean(PM_SYNC_DATATYPES, false) || propertyChannel - .getBoolean(PM_SYNC_SERVICES, false))) { - syncBtn.setEnabled(true); - } + propertyChannel.fire(PM_INFORMATION, + "Processing of selected service completed! " + + "Any errors encountered should be reported above."); } } }; @@ -1225,14 +1218,9 @@ propertyChannel .fire(DP_STATUS_MSG, "Generating Perl-MoSeS service skeletons complete!"); - JOptionPane.showMessageDialog(null, - "Processing of selected service completed!\n" + - "Please check the 'console' to ensure that the service\n" + - "skeletons were generated correctly.", "Completed", JOptionPane.INFORMATION_MESSAGE); - if (!(propertyChannel.getBoolean(PM_SYNC_DATATYPES, false) || propertyChannel - .getBoolean(PM_SYNC_SERVICES, false))) { - syncBtn.setEnabled(true); - } + propertyChannel.fire(PM_INFORMATION, + "Processing of selected service completed! " + + "Any errors encountered should be reported above."); } } }; From kawas at dev.open-bio.org Wed Jun 4 12:14:32 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 4 Jun 2008 12:14:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806041614.m54GEWNK001874@dev.open-bio.org> kawas Wed Jun 4 12:14:31 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache In directory dev.open-bio.org:/tmp/cvs-serv1839/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Modified Files: Central.pm Log Message: changed '+' to '.' in string append situations. moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.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/Cache/Central.pm 2008/05/09 20:21:48 1.6 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/06/04 16:14:31 1.7 @@ -318,7 +318,7 @@ sub { my $soap = shift; my $res = shift; - $self->throw ("There was a problem calling the registry: " . $self->_endpoint . "\@ " . $self->_namespace . ".\n" + $res); + $self->throw ("There was a problem calling the registry: " . $self->_endpoint . "\@ " . $self->_namespace . ".\n" . $res); } ); @@ -422,7 +422,7 @@ sub { my $soap = shift; my $res = shift; - $self->throw ("There was a problem calling the registry: " . $self->_endpoint . "\@ " . $self->_namespace . ".\n" + $res); + $self->throw ("There was a problem calling the registry: " . $self->_endpoint . "\@ " . $self->_namespace . ".\n" . $res); } ); From kawas at dev.open-bio.org Thu Jun 5 10:13:05 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 5 Jun 2008 10:13:05 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806051413.m55ED5ne005352@dev.open-bio.org> kawas Thu Jun 5 10:13:04 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv5317/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ServiceCache.pm Log Message: Fixed bug in the service instance cache code. Services from service providers with other registered services was not updating itself correctly. Modified the call that gets the service providers to reduce the bandwidth used when making the call. We use to get all services names and providers and now we get only service providers. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ServiceCache.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.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/Ontologies/Cache/ServiceCache.pm 2008/04/30 16:53:36 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/06/05 14:13:04 1.4 @@ -241,7 +241,7 @@ } # steps: - # read in the LIST file and extract lsids for all datatypes + # read in the LIST file and extract lsids for all services my $file = File::Spec->catfile( $self->{utils}->cachedir, $self->{utils}->_clean( $self->{utils}->_endpoint ), @@ -287,17 +287,27 @@ $new_services{$name}{$lsid} = 1; } -# go through the keys of the new one and if the keys doesnt exist or has been modified, add to 'download' queue + # go through the keys of the new one and if the keys doesnt exist or has been modified, add to 'download' queue foreach my $auth ( keys %new_services ) { next if $changed_services{$auth}; foreach my $lsid ( keys %{ $new_services{$auth} } ) { - next unless !$old_services{$auth}{$lsid}; - $changed_services{$auth} = 1; + $changed_services{$auth} = 1 unless $old_services{$auth}{$lsid}; + delete $old_services{$auth}{$lsid} if $old_services{$auth}{$lsid}; + } - } - # if their where changes, save new LIST file over the old one and get changes + # iterate over old_services and add their authority to changed_services + # old services should only have authorities with services that have been removed + foreach my $auth ( keys %old_services ) { + next if $changed_services{$auth}; + foreach my $lsid ( keys %{ $old_services{$auth} } ) { + next if $changed_services{$auth}; + $changed_services{$auth} = 1; + } + } + + # if their where changes, save new LIST file over the old one and get changes if ( keys %changed_services ) { # save new LIST file @@ -351,7 +361,7 @@ or $filename eq $self->{utils}->UPDATE_FILE; unlink($path) unless $new_services{$filename}; - $wasOld++; + $wasOld++ unless $new_services{$filename}; } }; return $wasOld; @@ -486,14 +496,14 @@ } ); - my $xml = $soap->retrieveServiceNames()->result; + my $xml = $soap->retrieveServiceProviders()->result; my %providers = (); my $parser = XML::LibXML->new(); my $doc = $parser->parse_string($xml); - my $nodes = $doc->documentElement()->getChildrenByTagName('serviceName'); + my $nodes = $doc->documentElement()->getChildrenByTagName('serviceProvider'); for ( 1 .. $nodes->size() ) { - my $name = $nodes->get_node($_)->getAttribute('authURI'); + my $name = $nodes->get_node($_)->getAttribute('name'); next if $providers{$name}; $providers{$name} = 1; } From kawas at dev.open-bio.org Thu Jun 5 10:13:52 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 5 Jun 2008 10:13:52 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806051413.m55EDqN3005400@dev.open-bio.org> kawas Thu Jun 5 10:13:52 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv5357/Perl/MOBY-Server Modified Files: Makefile.PL META.yml Changes Log Message: modifed changes file to reflect recent changes. makefile and meta.yml have been changed to reflect upcoming cpan release. moby-live/Perl/MOBY-Server Makefile.PL,1.6,1.7 META.yml,1.3,1.4 Changes,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/05/16 14:42:18 1.6 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/06/05 14:13:52 1.7 @@ -3,7 +3,7 @@ # Define metadata name 'MOBY'; - version '1.04'; + version '1.05'; 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.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml 2008/05/16 14:42:18 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/META.yml 2008/06/05 14:13:52 1.4 @@ -41,4 +41,4 @@ XML::DOM: 0 XML::LibXML: 1.62 XML::XPath: 1.12 -version: 1.04 +version: 1.05 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/05/30 15:52:09 1.7 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/06/05 14:13:52 1.8 @@ -34,6 +34,9 @@ - prompt for a username/password for the registry to access the db. if the user doesnt exist, we add it. This helps us stay away from using the root password in the mobycentral.config file. + - Fixed bug in the service instance cache code. Services from service + providers with other registered services was not updating itself + correctly. 1.04 - fixed bug in MOBY::Client::Central::DUMP that resulted From kawas at dev.open-bio.org Thu Jun 5 15:44:22 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 5 Jun 2008 15:44:22 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806051944.m55JiMpR005816@dev.open-bio.org> kawas Thu Jun 5 15:44:22 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs/images/perl-moses-panel In directory dev.open-bio.org:/tmp/cvs-serv5782/Java/docs/images/perl-moses-panel Log Message: Directory /home/repository/moby/moby-live/Java/docs/images/perl-moses-panel added to the repository moby-live/Java/docs/images/perl-moses-panel - New directory rcsdiff: /home/repository/moby/moby-live/Java/docs/images/perl-moses-panel/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/images/perl-moses-panel/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/images/perl-moses-panel/RCS/directory,v: No such file or directory From kawas at dev.open-bio.org Thu Jun 5 15:44:29 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 5 Jun 2008 15:44:29 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806051944.m55JiTPu005870@dev.open-bio.org> kawas Thu Jun 5 15:44:29 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs/images/perl-moses-panel In directory dev.open-bio.org:/tmp/cvs-serv5839/Java/docs/images/perl-moses-panel Added Files: 13.gif 08.gif 07.gif 18.gif 05.gif 16.gif 01.gif 14.gif 12.gif 03.gif 02.gif 19.gif 11.gif 09.gif 10.gif 05_small.gif 17.gif 22.gif 21.gif 04.gif 23.gif 25.gif 15.gif 20.gif 24.gif 06.gif Log Message: screen shots for the perl moses panel moby-live/Java/docs/images/perl-moses-panel 13.gif,NONE,1.1 08.gif,NONE,1.1 07.gif,NONE,1.1 18.gif,NONE,1.1 05.gif,NONE,1.1 16.gif,NONE,1.1 01.gif,NONE,1.1 14.gif,NONE,1.1 12.gif,NONE,1.1 03.gif,NONE,1.1 02.gif,NONE,1.1 19.gif,NONE,1.1 11.gif,NONE,1.1 09.gif,NONE,1.1 10.gif,NONE,1.1 05_small.gif,NONE,1.1 17.gif,NONE,1.1 22.gif,NONE,1.1 21.gif,NONE,1.1 04.gif,NONE,1.1 23.gif,NONE,1.1 25.gif,NONE,1.1 15.gif,NONE,1.1 20.gif,NONE,1.1 24.gif,NONE,1.1 06.gif,NONE,1.1 From kawas at dev.open-bio.org Thu Jun 5 15:45:11 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 5 Jun 2008 15:45:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806051945.m55JjBct005924@dev.open-bio.org> kawas Thu Jun 5 15:45:11 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv5893/Java/docs Added Files: DashboardImplementPerlService.html Log Message: tutorial on using the new perl moses panel moby-live/Java/docs DashboardImplementPerlService.html,NONE,1.1 From kawas at dev.open-bio.org Thu Jun 5 15:46:14 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 5 Jun 2008 15:46:14 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806051946.m55JkEC0006000@dev.open-bio.org> kawas Thu Jun 5 15:46:14 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory dev.open-bio.org:/tmp/cvs-serv5965/src/main/org/biomoby/service/dashboard/help Modified Files: PerlMoSeSPanel.html Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/help PerlMoSeSPanel.html,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/PerlMoSeSPanel.html,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/help/PerlMoSeSPanel.html 2008/06/04 15:59:31 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/PerlMoSeSPanel.html 2008/06/05 19:46:14 1.4 @@ -49,7 +49,7 @@
  • PERL5LIB dir(2) - another directory to add to Perls' @INC [optional]
  • MoSeS Scripts Dir - the directory that contains the moses-*.pl scripts [required]
  • -

    Once this information is entered, and the 'Test user config' is clicked, we check whether the required MOSES scripts are accessible. If everything is deemed to be fine, the other sub panels are enabled. Otherwise, you will be prompted to check your values.

    +

    Once this information is entered, and the 'Confirm values are correct' is clicked, we check whether the required MOSES scripts are accessible. If everything is deemed to be fine, the other sub panels are enabled. Otherwise, you will be prompted to check your values.

    Help on setting your local user configuration

    Some users find this information hard to obtain. One trick that I use, is to enter 'perl -V' at the command prompt. Among other things, one of the last things that you will see displayed is something like:

    Built under linux
    Compiled at Nov 27 2007 10:44:36
    @INC:
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    .
    From kawas at dev.open-bio.org Thu Jun 5 15:48:13 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 5 Jun 2008 15:48:13 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806051948.m55JmDhZ006076@dev.open-bio.org> kawas Thu Jun 5 15:48:13 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv6041/src/main/org/biomoby/service/dashboard Modified Files: PerlMoSeSPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard PerlMoSeSPanel.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.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/PerlMoSeSPanel.java 2008/06/04 16:03:04 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java 2008/06/05 19:48:13 1.11 @@ -422,10 +422,12 @@ // we are good to go! enable buttons propertyChannel.fire(PM_INFORMATION, "Your local configuration was successful!"); if (enable_moses_actions && !getPropertyChannel().getBoolean(PM_SYNC_SERVICES, false)) { + propertyChannel.fire(PM_INFORMATION, "Setting up Perl-MoSeS services!"); getPropertyChannel().put(PM_SYNC_SERVICES, true); onUpdateServiceCache(); } if (!getPropertyChannel().getBoolean(PM_SYNC_DATATYPES, false)) { + propertyChannel.fire(PM_INFORMATION, "Setting up Perl-MoSeS datatypes!"); getPropertyChannel().put(PM_SYNC_DATATYPES, true); onUpdateDatatypeCache(); } @@ -723,7 +725,7 @@ else openFile = new JFileChooser(path); - openFile.setDialogTitle("Open a Perl Scrip:"); + openFile.setDialogTitle("Open a Perl Script:"); openFile.setApproveButtonText("Open script"); openFile.setFileSelectionMode(JFileChooser.FILES_ONLY); openFile.addChoosableFileFilter(new FileFilter() { From kawas at dev.open-bio.org Fri Jun 6 19:17:53 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 6 Jun 2008 19:17:53 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806062317.m56NHrgu009319@dev.open-bio.org> kawas Fri Jun 6 19:17:53 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv9283/Java/docs Modified Files: CmdLineClients.html Log Message: fixed the DragonDB:Allele to read DragonDB_Allele moby-live/Java/docs CmdLineClients.html,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/CmdLineClients.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2005/05/19 10:56:06 1.2 +++ /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2008/06/06 23:17:53 1.3 @@ -1080,7 +1080,7 @@ <moby:mobyContent> <moby:mobyData moby:queryID="a1"> <moby:Simple moby:articleName=""> - <moby:Object moby:namespace="DragonDB:Allele" moby:id="cho" /> + <moby:Object moby:namespace="DragonDB_Allele" moby:id="cho" /> </moby:Simple> </moby:mobyData> </moby:mobyContent> From kawas at dev.open-bio.org Fri Jun 6 19:25:05 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 6 Jun 2008 19:25:05 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806062325.m56NP57D009359@dev.open-bio.org> kawas Fri Jun 6 19:25:04 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv9324/Java/docs Modified Files: CmdLineClients.html Log Message: fixed the second command line client example. the article name was missing. moby-live/Java/docs CmdLineClients.html,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/CmdLineClients.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2008/06/06 23:17:53 1.3 +++ /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2008/06/06 23:25:04 1.4 @@ -1104,7 +1104,7 @@ <moby:MOBY xmlns:moby="http://www.biomoby.org/moby"> <moby:mobyContent> <moby:mobyData moby:queryID="a1"> - <moby:Simple moby:articleName=""> + <moby:Simple moby:articleName="identifier"> <moby:Object moby:namespace="NCBI_gi" moby:id="431260" /> </moby:Simple> </moby:mobyData> From kawas at dev.open-bio.org Fri Jun 6 19:33:21 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 6 Jun 2008 19:33:21 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806062333.m56NXLid009399@dev.open-bio.org> kawas Fri Jun 6 19:33:21 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv9364/Java/docs Modified Files: CmdLineClients.html Log Message: updated the test registry url moby-live/Java/docs CmdLineClients.html,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/CmdLineClients.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2008/06/06 23:25:04 1.4 +++ /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2008/06/06 23:33:21 1.5 @@ -372,7 +372,7 @@
        run-cmdline-client \
    -      -e http://mobycentral.cbr.nrc.ca:8080/cgi-bin/MOBY05/mobycentral.pl \
    +      -e http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl \
           -uri http://mobycentral.cbr.nrc.ca:8080/MOBY/Central \
           -rd-name ColouredString \
           -rd-desc 'A string representing a colour' \
    @@ -386,7 +386,7 @@
     
     
        run-cmdline-client \
    -      -e http://mobycentral.cbr.nrc.ca:8080/cgi-bin/MOBY05/mobycentral.pl \
    +      -e http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl \
           -uri http://mobycentral.cbr.nrc.ca:8080/MOBY/Central \
           -data ColouredString
     
    @@ -630,7 +630,7 @@
        run-cmdline-client \   
    -      -e http://mobycentral.cbr.nrc.ca:8080/cgi-bin/MOBY05/mobycentral.pl  \
    +      -e http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl  \
           -uri http://mobycentral.cbr.nrc.ca:8080/MOBY/Central                 \
           -rs-name Testing_getAlleleFreq                                       \
           -rs-type Retrieval                                                   \
    @@ -650,7 +650,7 @@
     
     
        run-cmdline-client \   
    -      -e http://mobycentral.cbr.nrc.ca:8080/cgi-bin/MOBY05/mobycentral.pl  \
    +      -e http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl  \
           -uri http://mobycentral.cbr.nrc.ca:8080/MOBY/Central                 \
           -fn Testing_getAlleleFreq
     
    @@ -689,7 +689,7 @@
        run-cmdline-client \
    -      -e http://mobycentral.cbr.nrc.ca:8080/cgi-bin/MOBY05/mobycentral.pl \
    +      -e http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl \
           -uri http://mobycentral.cbr.nrc.ca:8080/MOBY/Central                \
           -us Testing_getAlleleFreq                                           \
           -ud ColouredString
    @@ -1011,7 +1011,7 @@
     
     
        run-testing-central \
    -      -e http://mobycentral.cbr.nrc.ca:8080/cgi-bin/MOBY05/mobycentral.pl \
    +      -e http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl \
           -uri http://mobycentral.cbr.nrc.ca:8080/MOBY/Central
     
    From kawas at dev.open-bio.org Mon Jun 9 08:52:19 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 9 Jun 2008 08:52:19 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806091252.m59CqJjY020864@dev.open-bio.org> kawas Mon Jun 9 08:52:18 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv20828/Java/docs Modified Files: CmdLineClients.html Log Message: articleName for example was missing moby-live/Java/docs CmdLineClients.html,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/CmdLineClients.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2008/06/06 23:33:21 1.5 +++ /home/repository/moby/moby-live/Java/docs/CmdLineClients.html 2008/06/09 12:52:18 1.6 @@ -1079,7 +1079,7 @@ <moby:MOBY xmlns:moby="http://www.biomoby.org/moby"> <moby:mobyContent> <moby:mobyData moby:queryID="a1"> - <moby:Simple moby:articleName=""> + <moby:Simple moby:articleName="input"> <moby:Object moby:namespace="DragonDB_Allele" moby:id="cho" /> </moby:Simple> </moby:mobyData> From gordonp at dev.open-bio.org Tue Jun 10 17:57:48 2008 From: gordonp at dev.open-bio.org (Paul Gordon) Date: Tue, 10 Jun 2008 17:57:48 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806102157.m5ALvmIV025116@dev.open-bio.org> gordonp Tue Jun 10 17:57:47 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services In directory dev.open-bio.org:/tmp/cvs-serv25081/src/main/ca/ucalgary/services Modified Files: LegacyService.java Log Message: Mechanism to incorporate new tranformation rules from URLs moby-live/Java/src/main/ca/ucalgary/services LegacyService.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/LegacyService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/LegacyService.java 2008/02/14 03:04:44 1.1 +++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/LegacyService.java 2008/06/10 21:57:47 1.2 @@ -50,6 +50,17 @@ String text = textClient.getText(mobyData, legacyFormatName); return text == null ? null : text.getBytes(); //TODO: should we check the encoding? } + + /** + * Mechanism to incorporate new tranformation rules + */ + protected void addLoweringMappingsFromURL(URL u) throws Exception{ + textClient.addMappingsFromURL(u); + } + + protected void addLiftingMappingsFromURL(URL u) throws Exception{ + mobyClient.addMappingsFromURL(u); + } protected boolean canProduceDataTypeFromString(MobyDataType dataType){ return mobyClient.canProduceDataTypeFromString(dataType); @@ -168,4 +179,4 @@ return service; } -} \ No newline at end of file +} From gordonp at dev.open-bio.org Tue Jun 10 17:59:58 2008 From: gordonp at dev.open-bio.org (Paul Gordon) Date: Tue, 10 Jun 2008 17:59:58 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806102159.m5ALxwg1025180@dev.open-bio.org> gordonp Tue Jun 10 17:59:57 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util In directory dev.open-bio.org:/tmp/cvs-serv25145/src/main/ca/ucalgary/services/util Modified Files: WSDLConfig.java Log Message: better sentinel value use moby-live/Java/src/main/ca/ucalgary/services/util WSDLConfig.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/WSDLConfig.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/WSDLConfig.java 2008/03/13 23:08:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/WSDLConfig.java 2008/06/10 21:59:57 1.2 @@ -140,27 +140,27 @@ throw new Exception("Part element " + partName + " of WSDL message " + messageName + " has no type attribute defined"); } - String modelReference = partElement.getAttributeNS(MobyPrefixResolver.SAWSDL_NAMESPACE, "modelReference"); + String modelReference = partElement.getAttributeNS(MobyPrefixResolver.SAWSDL_NAMESPACE, SAWSDL_MODEL_ATTR); if(modelReference == null || modelReference.length() == 0){ throw new Exception("Part element " + partName + " of WSDL message " + - messageName + " has no SAWSDL modelReference attribute defined"); + messageName + " has no SAWSDL " + SAWSDL_MODEL_ATTR + " attribute defined"); } String schemaMapping = null; if(isInputMessage){ - schemaMapping = partElement.getAttributeNS(MobyPrefixResolver.SAWSDL_NAMESPACE, "loweringSchemaMapping"); + schemaMapping = partElement.getAttributeNS(MobyPrefixResolver.SAWSDL_NAMESPACE, SAWSDL_INMAP_ATTR); if(schemaMapping == null || schemaMapping.length() == 0){ throw new Exception("Part element " + partName + " of WSDL message " + - messageName + " has no SAWSDL loweringSchemaMapping attribute defined"); + messageName + " has no SAWSDL " + SAWSDL_INMAP_ATTR + " attribute defined"); } inputs.put(partName, wsdlParam2MobyParam(partName, partType, modelReference)); inputTypes.put(partName, partType); inputMappings.put(partName, schemaMapping); } else{ - schemaMapping = partElement.getAttributeNS(MobyPrefixResolver.SAWSDL_NAMESPACE, "liftingSchemaMapping"); + schemaMapping = partElement.getAttributeNS(MobyPrefixResolver.SAWSDL_NAMESPACE, SAWSDL_OUTMAP_ATTR); if(schemaMapping == null || schemaMapping.length() == 0){ throw new Exception("Part element " + partName + " of WSDL message " + - messageName + " has no SAWSDL liftingSchemaMapping attribute defined"); + messageName + " has no SAWSDL " + SAWSDL_OUTMAP_ATTR + " attribute defined"); } outputs.put(partName, wsdlParam2MobyParam(partName, partType, modelReference)); outputTypes.put(partName, partType); From kawas at dev.open-bio.org Thu Jun 12 11:15:25 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 12 Jun 2008 11:15:25 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806121515.m5CFFP8f031670@dev.open-bio.org> kawas Thu Jun 12 11:15:25 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv31634/docs Modified Files: Download.html Log Message: added a blurb on requiring a minimum version of ant, because previous versions dont understand the maven targets moby-live/Java/docs Download.html,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/Download.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/docs/Download.html 2008/02/22 03:07:20 1.11 +++ /home/repository/moby/moby-live/Java/docs/Download.html 2008/06/12 15:15:24 1.12 @@ -97,7 +97,9 @@ The Ant is a Java tool for building, executing and playing with Java (and perhaps other, as well) programs. jMoby, as most of any -Java projects, uses it a lot.

    +Java projects, uses it a lot.
    + Please make sure that you are using Ant version 1.65 or greater. +

    From kawas at dev.open-bio.org Thu Jun 12 12:46:53 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 12 Jun 2008 12:46:53 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806121646.m5CGkrIm032024@dev.open-bio.org> kawas Thu Jun 12 12:46:53 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory dev.open-bio.org:/tmp/cvs-serv31989/src/main/org/biomoby/service/dashboard Modified Files: PerlMoSeSPanel.java Log Message: added a 'line:column' footer for the editor moby-live/Java/src/main/org/biomoby/service/dashboard PerlMoSeSPanel.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.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/PerlMoSeSPanel.java 2008/06/05 19:48:13 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java 2008/06/12 16:46:52 1.12 @@ -49,6 +49,8 @@ import javax.swing.SwingConstants; import javax.swing.border.Border; import javax.swing.border.CompoundBorder; +import javax.swing.event.CaretEvent; +import javax.swing.event.CaretListener; import javax.swing.filechooser.FileFilter; import javax.swing.text.Document; import javax.swing.text.EditorKit; @@ -138,7 +140,7 @@ private CommonConsole console; - private JLabel aSelectedCount, sSelectedCount, currentlyEditing; + private JLabel aSelectedCount, sSelectedCount, currentlyEditing, currentPosition; private JButton editorSaveButton, editorCloseButton, editorOpenButton, scriptsBtn, generateBtn; @@ -595,9 +597,26 @@ .createEmptyBorder(5, 5, 5, 5)); p.setBorder(compoundBorder); + JPanel footer = new JPanel(); + footer.setLayout(new BorderLayout()); currentlyEditing = new JLabel(""); - + currentPosition = new JLabel(""); + footer.add(currentlyEditing, BorderLayout.WEST); + footer.add(currentPosition, BorderLayout.EAST); + editorTextPane = new JTextPane(); + editorTextPane.addCaretListener(new CaretListener(){ + public void caretUpdate(CaretEvent e) { + int dot = e.getDot(); + //get current line + int line = ((JTextPane)e.getSource()).getDocument().getDefaultRootElement().getElementIndex(dot); + // get the position on the line + int pos = dot - ((JTextPane)e.getSource()).getDocument().getDefaultRootElement().getElement(line).getStartOffset(); + //System.out.println("line: "+line + " column: "+ pos); + line++; pos++; + currentPosition.setText(line + ":"+ pos); + + }}); EditorKit editorKit = new StyledEditorKit() { private static final long serialVersionUID = 1L; @@ -623,7 +642,7 @@ JScrollPane scrollPane = new JScrollPane(editorTextPane); p.add(getFontChooser(), BorderLayout.PAGE_START); - p.add(currentlyEditing, BorderLayout.PAGE_END); + p.add(footer, BorderLayout.PAGE_END); p.add(scrollPane, BorderLayout.CENTER); // set the default font Font f = new Font(fonts.getSelectedItem().toString(), editorTextPane.getFont().getStyle(), editorTextPane.getFont().getSize()); @@ -1254,8 +1273,9 @@ } propertyChannel.put(PM_FILE_CURRENT_CHECKSUM, getMD5Checksum(sb.toString())); editorTextPane.setText(sb.toString()); - editorTextPane.setCaretPosition(0); currentlyEditing.setText("Editing: " + f.getAbsolutePath()); + currentPosition.setText(""); + editorTextPane.setCaretPosition(0); editorTextPane.setEditable(true); editorCloseButton.setEnabled(true); editorSaveButton.setEnabled(true); @@ -1279,6 +1299,7 @@ } editorTextPane.setText(""); currentlyEditing.setText(""); + currentPosition.setText(""); editorTextPane.setEditable(false); editorCloseButton.setEnabled(false); editorSaveButton.setEnabled(false); From kawas at dev.open-bio.org Tue Jun 17 12:19:39 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 17 Jun 2008 12:19:39 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806171619.m5HGJdN5021477@dev.open-bio.org> kawas Tue Jun 17 12:19:39 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi In directory dev.open-bio.org:/tmp/cvs-serv21442/Perl/MOBY-Server/share/cgi Modified Files: service_tester.pl Log Message: just added number formatting to the time stamps moby-live/Perl/MOBY-Server/share/cgi service_tester.pl,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl 2008/05/29 13:32:23 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl 2008/06/17 16:19:39 1.5 @@ -87,9 +87,16 @@ foreach my $cat (@CATEGORIES) { foreach my $authURI (@providers) { my ( $second, $minute, $hour, @whatever ) = localtime(); + $hour = "0$hour" if $hour <= 9; + $second = "0$second" if $second <= 9; + $minute = "0$minute" if $minute <= 9; + print "Finding services registered by '$authURI' as '$cat' @ $hour:$minute:$second\n"; my ( $services, $reg ) = $central->findService( Registry => "mobycentral",category => $cat, authURI => $authURI ); ( $second, $minute, $hour, @whatever ) = localtime(); + $hour = "0$hour" if $hour <= 9; + $second = "0$second" if $second <= 9; + $minute = "0$minute" if $minute <= 9; print "Services found " . scalar @$services . "... processing @ $hour:$minute:$second \n"; @@ -179,6 +186,9 @@ # dont proceed until we are completed with the first batch of children! wait, $count-- while $count > 0; ( $second, $minute, $hour, @whatever ) = localtime(); + $hour = "0$hour" if $hour <= 9; + $second = "0$second" if $second <= 9; + $minute = "0$minute" if $minute <= 9; print "Testing of '$cat' services from '$authURI' completed @ $hour:$minute:$second \n"; } } From kawas at dev.open-bio.org Thu Jun 19 13:02:26 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 19 Jun 2008 13:02:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806191702.m5JH2QOE003389@dev.open-bio.org> kawas Thu Jun 19 13:02:25 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi In directory dev.open-bio.org:/tmp/cvs-serv3353/Perl/MOBY-Server/share/cgi Modified Files: RESOURCES Log Message: changes to the service instance regex so that requests in the form of authURI/service_name and authURI,service_name are fullfilled moby-live/Perl/MOBY-Server/share/cgi RESOURCES,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/RESOURCES,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/RESOURCES 2008/03/06 23:18:32 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/RESOURCES 2008/06/19 17:02:25 1.3 @@ -87,10 +87,43 @@ print $form->header('text/xml'), $rdf if $rdf; } if $1; } elsif ( $url =~ -m/^RESOURCES\/MOBY\-S\/ServiceInstances(\/[A-Za-z0-9_\-.]*,[A-Za-z0-9_\-]*)?$/ +m/^RESOURCES\/MOBY\-S\/ServiceInstances(\/[A-Za-z0-9_\-.]*,[A-Za-z0-9_\-]*){1}$/ ) { my $string = $1 || ""; + # remove the trailing forward slash + $string =~ s/^\///; + do { + my $x = MOBY::RDF::Ontologies::Services->new; + my $sname = substr ($string, index($string, ',')+1); + my $prov = substr ($string, 0, index($string, ',')); + + # get pretty printed RDF/XML for one service + $x = $x->findService( + { + serviceName => $sname, + authURI => $prov, + isAlive => "yes" + } + ); + print $form->header('text/xml'), $x if $x; + } if $string; + + do { + print $form->header('text/html'); + $form->start_html( -title => 'not MOBY-S', ); + print h2( "not", "MOBY-S" ); + print end_html; + } unless $string; + +} elsif ( $url =~ +m/^RESOURCES\/MOBY\-S\/ServiceInstances(\/[A-Za-z0-9_\-.]*\/[A-Za-z0-9_\-]*)?$/ + ) +{ + my $string = $1 || ""; + # remove the trailing forward slash + $string =~ s/^\///; + do { my $x; @@ -122,14 +155,15 @@ } unless $string; do { my $x = MOBY::RDF::Ontologies::Services->new; - my $sname = substr( $string, index( $string, ',' ) + 1 ); - my $prov = substr( $string, 1, index( $string, ',' ) - 1 ); + my $sname = substr ($string, index($string, '/')+1); + my $prov = substr ($string, 0, index($string, '/')); # get pretty printed RDF/XML for one service $x = $x->findService( { serviceName => $sname, authURI => $prov, + isAlive => "yes" } ); print $form->header('text/xml'), $x if $x; From mwilkinson at dev.open-bio.org Thu Jun 19 13:33:57 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Thu, 19 Jun 2008 13:33:57 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806191733.m5JHXvsT003473@dev.open-bio.org> mwilkinson Thu Jun 19 13:33:57 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/t In directory dev.open-bio.org:/tmp/cvs-serv3457/t Removed Files: MOBY.t Log Message: getting rid of the failed test moby-live/Perl/MOBY-Server/t MOBY.t,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Perl/MOBY-Server/t/RCS/MOBY.t,v: No such file or directory From kawas at dev.open-bio.org Thu Jun 19 17:47:36 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 19 Jun 2008 17:47:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806192147.m5JLlaoE003981@dev.open-bio.org> kawas Thu Jun 19 17:47:36 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv3946/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ServiceCache.pm Log Message: isAlive information is removed from cached rdf because it made absolutely no sense keeping it here. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ServiceCache.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.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/Ontologies/Cache/ServiceCache.pm 2008/06/05 14:13:04 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/06/19 21:47:35 1.5 @@ -169,7 +169,7 @@ $xml = MOBY::RDF::Ontologies::Services->new( endpoint => $self->{utils}->_endpoint ); - $xml = $xml->findService( { authURI => $name } ); + $xml = $xml->findService( { authURI => $name, isAlive => 'no' } ); my $file = File::Spec->catfile( $self->{utils}->cachedir, $self->{utils}->_clean( $self->{utils}->_endpoint ), @@ -327,7 +327,7 @@ $xml = MOBY::RDF::Ontologies::Services->new( endpoint => $self->{utils}->_endpoint, ); - $xml = $xml->findService( { authURI => $authURI } ); + $xml = $xml->findService( { authURI => $authURI, isAlive => 'no' } ); $file = File::Spec->catfile( $self->{utils}->cachedir, $self->{utils}->_clean( $self->{utils}->_endpoint ), From kawas at dev.open-bio.org Thu Jun 19 17:49:01 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 19 Jun 2008 17:49:01 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806192149.m5JLn1U2004033@dev.open-bio.org> kawas Thu Jun 19 17:49:01 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies In directory dev.open-bio.org:/tmp/cvs-serv3986/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Modified Files: ServiceTypes.pm Objects.pm Services.pm Namespaces.pm Log Message: #'s converted to forward slashes so that the URIs are resolvable fixed a bug in Services.pm that caused the incorrect domain name to be placed in the URIs moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies ServiceTypes.pm,1.2,1.3 Objects.pm,1.3,1.4 Services.pm,1.3,1.4 Namespaces.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/ServiceTypes.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/ServiceTypes.pm 2008/02/21 17:15:41 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/ServiceTypes.pm 2008/06/19 21:49:01 1.3 @@ -77,8 +77,8 @@ # save some information retrieved from mobycentral.config my $CONF = MOBY::Config->new; - $self->{uri} = $CONF->{mobyservice}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Services#'; - $self->{uri} = $self->{uri} . "#" unless $self->{uri} =~ m/^.*(\#{1})$/; + $self->{uri} = $CONF->{mobyservice}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Services/'; + $self->{uri} = $self->{uri} . "/" unless $self->{uri} =~ m/^.*(\/{1})$/; $self->{query_all} = <new; - $self->{uri} = $CONF->{mobyobject}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Objects#'; - $self->{uri} = $self->{uri} . "#" unless $self->{uri} =~ m/^.*(\#{1})$/; + $self->{uri} = $CONF->{mobyobject}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Objects/'; + $self->{uri} = $self->{uri} . "/" unless $self->{uri} =~ m/^.*(\/{1})$/; $self->{uri_comp} = $self->{uri}; $self->{uri_comp} =~ s/\/MOBY\-S\//\/MOBY_SUB_COMPONENT\//; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.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/Ontologies/Services.pm 2008/04/01 18:26:19 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/06/19 21:49:01 1.4 @@ -111,12 +111,14 @@ # save some information retrieved from mobycentral.config my $CONF = MOBY::Config->new; - # FIXME get me from api call - $self->{instance_uri} = $CONF->{mobycentral}->{resourceURL} || ''; - $self->{service_uri} = $CONF->{mobyservice}->{resourceURL} || ''; - $self->{datatype_uri} = $CONF->{mobyobject}->{resourceURL} || ''; - $self->{namespace_uri} = $CONF->{mobynamespace}->{resourceURL} || ''; - + # set the uris unless an endpoint was specified + do { + $self->{instance_uri} = $CONF->{mobycentral}->{resourceURL} || ''; + $self->{service_uri} = $CONF->{mobyservice}->{resourceURL} || ''; + $self->{datatype_uri} = $CONF->{mobyobject}->{resourceURL} || ''; + $self->{namespace_uri} = $CONF->{mobynamespace}->{resourceURL} || ''; + } unless $args{endpoint}; + # save the endpoint/namespace/uri if passed in $self->{endpoint} = $args{endpoint} if $args{endpoint}; $self->{namespace} = $args{endpoint} if $args{namespace}; @@ -148,28 +150,29 @@ #revert to a default value if nothing is retrieved $self->{instance_uri} = - 'http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#' + 'http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances/' unless $moby->{ServiceInstance}->[0]; - $self->{service_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Services#' + $self->{service_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Services/' unless $moby->{Services}->[0]; $self->{namespace_uri} = - 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces#' + 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces/' unless $moby->{Namespaces}->[0]; - $self->{datatype_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Objects#' + $self->{datatype_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Objects/' unless $moby->{Objects}->[0]; } # add a / at the end of the uri if it isnt there already - $self->{instance_uri} = $self->{instance_uri} . "#" - unless $self->{instance_uri} =~ m/^.*(\#{1})$/; - $self->{service_uri} = $self->{service_uri} . "#" - unless $self->{service_uri} =~ m/^.*(\#{1})$/; - $self->{namespace_uri} = $self->{namespace_uri} . "#" - unless $self->{namespace_uri} =~ m/^.*(\#{1})$/; - $self->{datatype_uri} = $self->{datatype_uri} . "#" - unless $self->{datatype_uri} =~ m/^.*(\#{1})$/; + $self->{instance_uri} = $self->{instance_uri} . "/" + unless $self->{instance_uri} =~ m/^.*(\/{1})$/; + $self->{service_uri} = $self->{service_uri} . "/" + unless $self->{service_uri} =~ m/^.*(\/{1})$/; + $self->{namespace_uri} = $self->{namespace_uri} . "/" + unless $self->{namespace_uri} =~ m/^.*(\/{1})$/; + $self->{datatype_uri} = $self->{datatype_uri} . "/" + unless $self->{datatype_uri} =~ m/^.*(\/{1})$/; - $self->{is_alive_path} = $CONF->{mobycentral}->{service_tester_path}; + #set the isAlive path + $self->{is_alive_path} = $CONF->{mobycentral}->{service_tester_path} if $ENV{MOBY_SERVER} eq $self->{endpoint}; # done return $self; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Namespaces.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/Ontologies/Namespaces.pm 2008/02/21 17:43:13 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Namespaces.pm 2008/06/19 21:49:01 1.5 @@ -76,8 +76,8 @@ # save some information retrieved from mobycentral.config my $CONF = MOBY::Config->new; - $self->{uri} = $CONF->{mobynamespace}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces#'; - $self->{uri} = $self->{uri} . "#" unless $self->{uri} =~ m/^.*(\#{1})$/; + $self->{uri} = $CONF->{mobynamespace}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces/'; + $self->{uri} = $self->{uri} . "/" unless $self->{uri} =~ m/^.*(\/{1})$/; $self->{query_all} = < kawas Thu Jun 19 17:57:36 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv4122/Perl/MOBY-Server Modified Files: Changes Log Message: updates to include recent commits moby-live/Perl/MOBY-Server Changes,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/06/05 14:13:52 1.8 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/06/19 21:57:36 1.9 @@ -37,6 +37,13 @@ - Fixed bug in the service instance cache code. Services from service providers with other registered services was not updating itself correctly. + - isAlive information is removed from cached rdf because it made + absolutely no sense keeping it there. + - #'s converted to forward slashes so that the URIs are resolvable + - fixed a bug in Services.pm that caused the incorrect domain + name to be placed + - file MOBY-Server/t/MOBY.t removed because it was tesing a non-existant + module 1.04 - fixed bug in MOBY::Client::Central::DUMP that resulted From kawas at dev.open-bio.org Thu Jun 19 18:38:11 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 19 Jun 2008 18:38:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806192238.m5JMcBHU004239@dev.open-bio.org> kawas Thu Jun 19 18:38:10 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies In directory dev.open-bio.org:/tmp/cvs-serv4204/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Modified Files: Services.pm Log Message: added some checks to quiet the warnings about uninitialize variables moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.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/Ontologies/Services.pm 2008/06/19 21:49:01 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/06/19 22:38:10 1.5 @@ -172,7 +172,7 @@ unless $self->{datatype_uri} =~ m/^.*(\/{1})$/; #set the isAlive path - $self->{is_alive_path} = $CONF->{mobycentral}->{service_tester_path} if $ENV{MOBY_SERVER} eq $self->{endpoint}; + $self->{is_alive_path} = $CONF->{mobycentral}->{service_tester_path} if $ENV{MOBY_SERVER} and $self->{endpoint} and $ENV{MOBY_SERVER} eq $self->{endpoint}; # done return $self; From kawas at dev.open-bio.org Thu Jun 19 19:59:39 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 19 Jun 2008 19:59:39 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806192359.m5JNxdUl004425@dev.open-bio.org> kawas Thu Jun 19 19:59:39 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv4390/Perl/MOBY-Server/bin/scripts Modified Files: moby-s-install.pl Log Message: fixed bug where mysql hangs moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/05/29 19:59:21 1.6 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/19 23:59:39 1.7 @@ -820,7 +820,7 @@ #check to see if we can call mysql ... if not, then die! my $mysql_installed = (`mysql --version 2>&1` =~ m/^mysql\s+Ver\s+.*$/); - my $mysql_started = (`mysql 2>&1` !~ m/^ERROR 200.*Can't connect to .*$/); + my $mysql_started = (`mysql -e "SHOW VARIABLES LIKE 'version'" 2>&1` !~ m/^ERROR 200.*Can't connect to .*$/); print "mysql is installed ...\n" if $mysql_installed; print "mysql is started ...\n" From kawas at dev.open-bio.org Fri Jun 20 11:31:38 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 11:31:38 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806201531.m5KFVcxa022368@dev.open-bio.org> kawas Fri Jun 20 11:31:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv22333/Perl/MOBY-Server/bin/scripts Modified Files: moby-s-install.pl Log Message: root/root was hard coded, changed it to use prompted values moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/19 23:59:39 1.7 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 15:31:37 1.8 @@ -966,7 +966,7 @@ ) = $central->MOBY::Client::Central::DUMP(); my $drh = DBI->install_driver("mysql"); # used for creating the user/pass for the registry - my $dbh = DBI->connect("DBI:mysql:mysql:localhost:3306", "root", "root", { RaiseError => 1, AutoCommit => 1 }); + my $dbh = DBI->connect("DBI:mysql:mysql:localhost:3306", "$username", "$password", { RaiseError => 1, AutoCommit => 1 }); my ( $fh, $filename ) = tempfile( UNLINK => 1 ); say "Processing dump for service instances ..."; print $fh $mobycentral; From kawas at dev.open-bio.org Fri Jun 20 11:53:52 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 11:53:52 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806201553.m5KFrqHq022584@dev.open-bio.org> kawas Fri Jun 20 11:53:52 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv22549/Perl/MOBY-Server/bin/scripts Modified Files: moby-s-install.pl Log Message: moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 15:31:37 1.8 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 15:53:52 1.9 @@ -35,6 +35,11 @@ my $s = join "", @_; return qq|GRANT ALL ON $s TO ?\@'localhost' IDENTIFIED BY ? WITH GRANT OPTION|; } + sub prepare_query_no_password { + my $s = join "", @_; + return qq|GRANT ALL ON $s TO ?\@'localhost' WITH GRANT OPTION|; + } + sub check_module { eval "require $_[0]"; if ($@) { @@ -980,8 +985,13 @@ }; eval { my $db = $dbsections{mobycentral} . ".*"; - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + if ($moby_password) { + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } else { + $dbh->do(prepare_query_no_password($db),undef,$moby_username) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } }; die $! if $!; system( "mysql -h $url -P $port -u $username --password=$password " @@ -1003,8 +1013,13 @@ }; eval { my $db = $dbsections{mobyobject} . ".*"; - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + if ($moby_password) { + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } else { + $dbh->do(prepare_query_no_password($db),undef,$moby_username) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobyobject} @@ -1025,8 +1040,13 @@ }; eval { my $db = $dbsections{mobyservice} . ".*"; - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + if ($moby_password) { + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } else { + $dbh->do(prepare_query_no_password($db),undef,$moby_username) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobyservice} @@ -1047,8 +1067,13 @@ }; eval { my $db = $dbsections{mobynamespace} . ".*"; - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + if ($moby_password) { + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } else { + $dbh->do(prepare_query_no_password($db),undef,$moby_username) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobynamespace} @@ -1069,8 +1094,13 @@ }; eval { my $db = $dbsections{mobyrelationship} . ".*"; - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + if ($moby_password) { + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } else { + $dbh->do(prepare_query_no_password($db),undef,$moby_username) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); + } }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobyrelationship} From kawas at dev.open-bio.org Fri Jun 20 14:39:35 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 14:39:35 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806201839.m5KIdZBE023256@dev.open-bio.org> kawas Fri Jun 20 14:39:35 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv23225/Perl/MOBY-Server Added Files: test.pl Log Message: moby-live/Perl/MOBY-Server test.pl,NONE,1.1 From kawas at dev.open-bio.org Fri Jun 20 14:57:49 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 14:57:49 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806201857.m5KIvnXd023311@dev.open-bio.org> kawas Fri Jun 20 14:57:49 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv23276/Perl/MOBY-Server/bin/scripts Modified Files: moby-s-install.pl Log Message: removed the sub no_password explicitly create the empty string for passwords moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 15:53:52 1.9 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 18:57:49 1.10 @@ -35,11 +35,6 @@ my $s = join "", @_; return qq|GRANT ALL ON $s TO ?\@'localhost' IDENTIFIED BY ? WITH GRANT OPTION|; } - sub prepare_query_no_password { - my $s = join "", @_; - return qq|GRANT ALL ON $s TO ?\@'localhost' WITH GRANT OPTION|; - } - sub check_module { eval "require $_[0]"; if ($@) { @@ -385,13 +380,14 @@ prompt_user_input( "What is your root mysql username?", "root" ); my $password = prompt_user_input( "What is your root mysql users' password?", "" ); + $password = "" unless $password; my $url = prompt_user_input( "What is the mysql url?", "localhost" ); my $port = prompt_user_input( "What is the mysql port #?", "3306" ); # prompt for a new user/password combo so that people cant determine the root password from MOBY::Config my $moby_username = prompt_user_input( "What username (I will create it if it doesn't exist)\n would you like to access your local db?", "moby_user" ); my $moby_password = prompt_user_input( "Please provide a password for '$moby_username': ", "" ); - + $moby_password = "" unless $moby_password; #db names say "\nPrompting for mysql table names. Use default names unless you know what you are doing!"; @@ -851,7 +847,7 @@ and $m_namespace and $m_central, and $moby_username, - and $moby_password; + and ($moby_password || $moby_password eq ""); # check to see if mobycentral.config has been created in the conf # directory first -> if so, parse it @@ -985,13 +981,8 @@ }; eval { my $db = $dbsections{mobycentral} . ".*"; - if ($moby_password) { - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } else { - $dbh->do(prepare_query_no_password($db),undef,$moby_username) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); }; die $! if $!; system( "mysql -h $url -P $port -u $username --password=$password " @@ -1013,13 +1004,8 @@ }; eval { my $db = $dbsections{mobyobject} . ".*"; - if ($moby_password) { - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } else { - $dbh->do(prepare_query_no_password($db),undef,$moby_username) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobyobject} @@ -1040,13 +1026,8 @@ }; eval { my $db = $dbsections{mobyservice} . ".*"; - if ($moby_password) { - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } else { - $dbh->do(prepare_query_no_password($db),undef,$moby_username) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobyservice} @@ -1067,13 +1048,8 @@ }; eval { my $db = $dbsections{mobynamespace} . ".*"; - if ($moby_password) { - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } else { - $dbh->do(prepare_query_no_password($db),undef,$moby_username) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobynamespace} @@ -1094,13 +1070,8 @@ }; eval { my $db = $dbsections{mobyrelationship} . ".*"; - if ($moby_password) { - $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } else { - $dbh->do(prepare_query_no_password($db),undef,$moby_username) - || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); - } + $dbh->do(prepare_query($db),undef,$moby_username,$moby_password) + || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr"); }; system( "mysql -h $url -P $port -u $username --password=$password " . $dbsections{mobyrelationship} From kawas at dev.open-bio.org Fri Jun 20 15:50:55 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 15:50:55 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806201950.m5KJotxN023520@dev.open-bio.org> kawas Fri Jun 20 15:50:55 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv23485/Perl/MOBY-Server/lib/MOBY Modified Files: dbConfig.pm Log Message: fixed bug that causes readSections to ignore a section if a field is empty moby-live/Perl/MOBY-Server/lib/MOBY dbConfig.pm,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/dbConfig.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/dbConfig.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/dbConfig.pm 2008/06/20 19:50:55 1.2 @@ -96,7 +96,7 @@ chomp $l2; last unless ( $l2 =~ /\S/ ); my @terms = shellwords($l2); - last unless ( scalar @terms > 2 ); + last unless ( scalar @terms >= 2 ); $self->{ $terms[0] } = $terms[2]; } } From kawas at dev.open-bio.org Fri Jun 20 15:56:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 15:56:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806201956.m5KJubnd023629@dev.open-bio.org> kawas Fri Jun 20 15:56:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv23594/Perl/MOBY-Server/bin/scripts Modified Files: moby-s-install.pl Log Message: moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.10,1.11 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 18:57:49 1.10 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 19:56:37 1.11 @@ -8,19 +8,26 @@ BEGIN { use Getopt::Std; - use vars qw/ $opt_h $opt_F /; + use vars qw/ $opt_h /; getopt; # usage if ($opt_h) { print STDOUT <<'END_OF_USAGE'; Preparing the stage for hosting a BioMOBY registry. -Usage: [-F] +Usage: moby-s-install.pl [-h] - --- SYNOPSIS HERE --- + -h .... shows this message ;-) + + Installer script for installing a BioMOBY registry + + This script goes through and edits your apache configuration, + mysql settings, and installs cgi scripts needed to host your + own registry. It is best to do this as root, because items are + copied into priviledged locations (apache directory, etc.). - The existing files are not overwritten - unless an option -F - has been used. + Good luck! + END_OF_USAGE exit(0); @@ -863,11 +870,11 @@ my @sections = split /(\[\s*\S+\s*\][^\[]*)/s, join "", ; my %db_sections = (); foreach my $section (@sections) { - my $dbConfig = MOBY::dbConfig->new( section => $section ); - next unless $dbConfig; - my $dbname = $dbConfig->section_title; - next unless $dbname; - $db_sections{$dbname} = $dbConfig; + my $dbConfig = MOBY::dbConfig->new( section => $section ); + next unless $dbConfig; + my $dbname = $dbConfig->section_title; + next unless $dbname; + $db_sections{$dbname} = $dbConfig; } $moby_username = $db_sections{mobycentral}->{username}; From kawas at dev.open-bio.org Fri Jun 20 15:58:22 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 15:58:22 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806201958.m5KJwMM2023669@dev.open-bio.org> kawas Fri Jun 20 15:58:22 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv23634/Perl/MOBY-Server Modified Files: Changes Log Message: moby-live/Perl/MOBY-Server Changes,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/06/19 21:57:36 1.9 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/06/20 19:58:22 1.10 @@ -44,6 +44,9 @@ name to be placed - file MOBY-Server/t/MOBY.t removed because it was tesing a non-existant module + - fixed the installer script, username/password, root/root was hardcoded + - fixed a bug in MOBY::dbConfig that caused certain parameters to be + ignored in the configuration file if a field was empty. 1.04 - fixed bug in MOBY::Client::Central::DUMP that resulted From kawas at dev.open-bio.org Fri Jun 20 16:53:57 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 20 Jun 2008 16:53:57 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806202053.m5KKrvQL023804@dev.open-bio.org> kawas Fri Jun 20 16:53:57 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv23772/Perl/MOBY-Server Removed Files: test.pl Log Message: moby-live/Perl/MOBY-Server test.pl,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Perl/MOBY-Server/RCS/test.pl,v: No such file or directory From kawas at dev.open-bio.org Wed Jun 25 12:13:03 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 25 Jun 2008 12:13:03 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806251613.m5PGD3d3018638@dev.open-bio.org> kawas Wed Jun 25 12:13:02 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies In directory dev.open-bio.org:/tmp/cvs-serv18603/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Modified Files: Services.pm Log Message: changes: there are no longer any bnodes. all bnodes are now unique (hopefully; we use a MD5 checksum to create the URI so there is a small probability that the uris generated may not be unique once in a very blue moon) URIs moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/06/19 22:38:10 1.5 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/06/25 16:13:02 1.6 @@ -16,6 +16,8 @@ use RDF::Core::Model::Serializer; use RDF::Core::NodeFactory; +use Digest::MD5; + use XML::LibXML; use MOBY::Client::Central; @@ -43,6 +45,8 @@ =head1 SYNOPSIS + use MOBY::RDF::Ontologies::Services; + my $x = MOBY::RDF::Ontologies::Services->new; # get pretty printed RDF/XML for one service @@ -257,7 +261,14 @@ my $model = new RDF::Core::Model( Storage => $storage ); my $node_factory = new RDF::Core::NodeFactory(); + # used to create bnode IDs + my $digest = new Digest::MD5; + foreach my $SI (@$services) { + # used for computing checksums + my $service_name = $SI->name; + my $service_authority = $SI->authority; + my $resource = new RDF::Core::Resource( $self->{instance_uri}, $SI->authority . "," . $SI->name ); @@ -355,7 +366,10 @@ } unless $addIsAlive =~ /no/i; }; # add the authoring statements - my $bnode = $node_factory->newResource; + my $bnode = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->providedBy ) + ); #$node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $resource, @@ -387,17 +401,20 @@ ) ); $model->addStmt( - new RDF::Core::Statement( - $bnode, - $resource->new( MOBY::RDF::Predicates::RDF->type ), - new RDF::Core::Resource( - MOBY::RDF::Predicates::FETA->organisation - ) - ) + new RDF::Core::Statement( + $bnode, + $resource->new( MOBY::RDF::Predicates::RDF->type ), + new RDF::Core::Resource( + MOBY::RDF::Predicates::FETA->organisation + ) + ) ); # add parameter statements - my $operation = $node_factory->newResource; + my $operation = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->hasOperation) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $resource, @@ -422,7 +439,10 @@ MOBY::RDF::Predicates::FETA->operation ) ) ); - $bnode = $node_factory->newResource; + $bnode = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->performsTask) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $operation, @@ -451,7 +471,15 @@ my $inputs = $SI->input; foreach (@$inputs) { - my $inputParameter = $node_factory->newResource; + my $inputParameter = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/") + . MOBY::RDF::Predicates::FETA->inputParameter + . "/" + . $_->articleName) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $operation, @@ -481,7 +509,18 @@ ) ); - my $oType = $node_factory->newResource; + my $oType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->inputParameter + . "/" + . $_->articleName + . "/" + . $_->objectType + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $inputParameter, @@ -502,7 +541,16 @@ ) ); - my $pType = $node_factory->newResource; + my $pType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->hasParameterType + . "/" + . $_->articleName + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $inputParameter, @@ -523,7 +571,17 @@ ); my $namespaces = $_->namespaces; foreach my $n (@$namespaces) { - my $inNamespaces = $node_factory->newResource; + my $inNamespaces = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/") + . MOBY::RDF::Predicates::FETA->inputParameter + . "/" + . $_->articleName + . "/" + . $n) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $inputParameter, @@ -574,7 +632,16 @@ ) ); - my $pType = $node_factory->newResource; + my $pType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->hasParameterType + . "/" + . $_->articleName + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $inputParameter, @@ -596,7 +663,18 @@ my $simples = $_->Simples; foreach my $simp (@$simples) { - my $oType = $node_factory->newResource; + my $oType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->inputParameter + . "/" + . $_->articleName + . "/" + . $simp->objectType + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $inputParameter, @@ -618,7 +696,17 @@ ); my $namespaces = $simp->namespaces; foreach my $n (@$namespaces) { - my $inNamespaces = $node_factory->newResource; + my $inNamespaces = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/") + . MOBY::RDF::Predicates::FETA->inputParameter + . "/" + . $_->articleName + . "/" + . $n) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $inputParameter, @@ -661,7 +749,15 @@ foreach (@$secondaries) { next unless $_->isSecondary; - my $inputParameter = $node_factory->newResource; + my $inputParameter = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . "isSecondaryInputParameter/" + . MOBY::RDF::Predicates::FETA->inputParameter + . "/" + . $_->articleName) + ); #$node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $operation, @@ -681,7 +777,16 @@ ) ); - my $pType = $node_factory->newResource; + my $pType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . "isSecondary/" + . MOBY::RDF::Predicates::FETA->hasParameterType + . "/" + . $_->articleName + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $inputParameter, @@ -770,7 +875,15 @@ my $outputs = $SI->output; foreach (@$outputs) { - my $outputParameter = $node_factory->newResource; + my $outputParameter = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/") + . MOBY::RDF::Predicates::FETA->outputParameter + . "/" + . $_->articleName) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $operation, @@ -800,7 +913,18 @@ ) ); - my $oType = $node_factory->newResource; + my $oType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->outputParameter + . "/" + . $_->articleName + . "/" + . $_->objectType + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $outputParameter, @@ -821,7 +945,16 @@ ) ); - my $pType = $node_factory->newResource; + my $pType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->hasParameterType + . "/" + . $_->articleName + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $outputParameter, @@ -842,7 +975,17 @@ ); my $namespaces = $_->namespaces; foreach my $n (@$namespaces) { - my $inNamespaces = $node_factory->newResource; + my $inNamespaces = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/") + . MOBY::RDF::Predicates::FETA->outputParameter + . "/" + . $_->articleName + . "/" + . $n) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $outputParameter, @@ -893,7 +1036,16 @@ ) ); - my $pType = $node_factory->newResource; + my $pType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->hasParameterType + . "/" + . $_->articleName + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $outputParameter, @@ -915,7 +1067,18 @@ my $simples = $_->Simples; foreach my $simp (@$simples) { - my $oType = $node_factory->newResource; + my $oType = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/" ) + . MOBY::RDF::Predicates::FETA->outputParameter + . "/" + . $_->articleName + . "/" + . $simp->objectType + ) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $outputParameter, @@ -937,7 +1100,17 @@ ); my $namespaces = $simp->namespaces; foreach my $n (@$namespaces) { - my $inNamespaces = $node_factory->newResource; + my $inNamespaces = new RDF::Core::Resource( + $self->{instance_uri}, + $digest->md5_hex( + "$service_authority/$service_name/" + . ($_->isSimple ? "isSimple/" : "isCollection/") + . MOBY::RDF::Predicates::FETA->outputParameter + . "/" + . $_->articleName + . "/" + . $n) + ); # $node_factory->newResource; $model->addStmt( new RDF::Core::Statement( $outputParameter, From gordonp at dev.open-bio.org Thu Jun 26 11:14:27 2008 From: gordonp at dev.open-bio.org (Paul Gordon) Date: Thu, 26 Jun 2008 11:14:27 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806261514.m5QFEROa021597@dev.open-bio.org> gordonp Thu Jun 26 11:14:26 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data In directory dev.open-bio.org:/tmp/cvs-serv21561/src/main/org/biomoby/shared/data Modified Files: MobyServiceException.java Log Message: Fixed Javadoc typos moby-live/Java/src/main/org/biomoby/shared/data MobyServiceException.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyServiceException.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/data/MobyServiceException.java 2006/07/07 04:12:40 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyServiceException.java 2008/06/26 15:14:26 1.2 @@ -22,7 +22,7 @@ import org.biomoby.shared.parser.MobyTags; public class MobyServiceException extends ServiceException{ - /** This iwill be the error code assigned if none is available from the instatioating XML */ + /** This will be the error code assigned if none is available from the instatiating XML */ public static final int ERROR_CODE_UNKNOWN = -35353; public static final int SEVERITY_UNKNOWN = 235823; From kawas at dev.open-bio.org Thu Jun 26 16:22:47 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 26 Jun 2008 16:22:47 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806262022.m5QKMlPx022120@dev.open-bio.org> kawas Thu Jun 26 16:22:46 EDT 2008 Update of /home/repository/moby/moby-live/Perl/templates/images In directory dev.open-bio.org:/tmp/cvs-serv22085/Perl/templates/images Log Message: Directory /home/repository/moby/moby-live/Perl/templates/images added to the repository moby-live/Perl/templates/images - New directory rcsdiff: /home/repository/moby/moby-live/Perl/templates/images/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/templates/images/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/templates/images/RCS/directory,v: No such file or directory From kawas at dev.open-bio.org Thu Jun 26 16:22:52 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 26 Jun 2008 16:22:52 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806262022.m5QKMqIW022192@dev.open-bio.org> kawas Thu Jun 26 16:22:52 EDT 2008 Update of /home/repository/moby/moby-live/Perl/templates/images In directory dev.open-bio.org:/tmp/cvs-serv22161/Perl/templates/images Added Files: file.gif moby-perl.gif treeview-default-line.gif treeview-black.gif treeview-red-line.gif folder-closed.gif treeview-black-line.gif treeview-gray.gif treeview-red.gif treeview-gray-line.gif treeview-default.gif folder.gif plus.gif treeview-famfamfam-line.gif minus.gif treeview-famfamfam.gif Log Message: changed the layout of the documentation page we use jquery now we use a jquery plugin tree view instead of a dump of modules, the modules are in a nice little tree that the user can manipulate and view the perldoc moby-live/Perl/templates/images file.gif,NONE,1.1 moby-perl.gif,NONE,1.1 treeview-default-line.gif,NONE,1.1 treeview-black.gif,NONE,1.1 treeview-red-line.gif,NONE,1.1 folder-closed.gif,NONE,1.1 treeview-black-line.gif,NONE,1.1 treeview-gray.gif,NONE,1.1 treeview-red.gif,NONE,1.1 treeview-gray-line.gif,NONE,1.1 treeview-default.gif,NONE,1.1 folder.gif,NONE,1.1 plus.gif,NONE,1.1 treeview-famfamfam-line.gif,NONE,1.1 minus.gif,NONE,1.1 treeview-famfamfam.gif,NONE,1.1 From kawas at dev.open-bio.org Thu Jun 26 16:22:52 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 26 Jun 2008 16:22:52 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806262022.m5QKMqOp022212@dev.open-bio.org> kawas Thu Jun 26 16:22:52 EDT 2008 Update of /home/repository/moby/moby-live/Perl/templates In directory dev.open-bio.org:/tmp/cvs-serv22161/Perl/templates Modified Files: index.tt Added Files: jquery.treeview.css jquery.treeview.js jquery.js Log Message: changed the layout of the documentation page we use jquery now we use a jquery plugin tree view instead of a dump of modules, the modules are in a nice little tree that the user can manipulate and view the perldoc moby-live/Perl/templates jquery.treeview.css,NONE,1.1 jquery.treeview.js,NONE,1.1 jquery.js,NONE,1.1 index.tt,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/templates/index.tt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/templates/index.tt 2008/02/25 19:27:01 1.2 +++ /home/repository/moby/moby-live/Perl/templates/index.tt 2008/06/26 20:22:52 1.3 @@ -3,21 +3,72 @@ Documentation for BioMOBY Perl Libraries - + + + + +

    Perl Documentation for MOBY

    -

    -

    Modules

    -

    -

      -[% FOREACH file IN worklist %] -[% f = replace(file) %] -
    • [% f %]
    • -[% END %] -
    +

    Here you can find the most recent BioMOBY perldoc for code contained in the CVS. You can browse the modules in the tree below and then view the ones that you select in the frame below. +
    +If you are looking for documentation on how to set up a registry or install the Biomoby client software please click on the node MOBY->MOBY in the tree below.

    +

    Modules

    + + + + + + + +
    +
    +

    +[% tree %] +

    +
    +
    From kawas at dev.open-bio.org Thu Jun 26 16:22:52 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Thu, 26 Jun 2008 16:22:52 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806262022.m5QKMqWW022232@dev.open-bio.org> kawas Thu Jun 26 16:22:52 EDT 2008 Update of /home/repository/moby/moby-live/Perl In directory dev.open-bio.org:/tmp/cvs-serv22161/Perl Modified Files: create_doc.pl Log Message: changed the layout of the documentation page we use jquery now we use a jquery plugin tree view instead of a dump of modules, the modules are in a nice little tree that the user can manipulate and view the perldoc moby-live/Perl create_doc.pl,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/create_doc.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/create_doc.pl 2008/02/25 19:28:09 1.3 +++ /home/repository/moby/moby-live/Perl/create_doc.pl 2008/06/26 20:22:52 1.4 @@ -6,6 +6,7 @@ ########################################################### use strict; use Pod::Html; +use XML::LibXML; use Pod::Find qw(pod_find); use File::Path; use Pod::Checker; @@ -31,9 +32,38 @@ # create the index file @html_files = sort(@html_files); -my $vars = { 'worklist' => \@html_files, - 'replace' => sub {my $text = shift; $text =~ s/\//::/g; return $text;} -}; + +# create the root element +my $doc = XML::LibXML::Document->new(); +my $root = &create_root_node(); +$doc->setDocumentElement($root); +$root->appendChild(&create_collapsable_node("MOBY")); +foreach my $string (@html_files) { + my @parts = split(/\//, $string); + my $last_element = undef; + my $href = "./docs/html/MOBY-Server/lib/$string.html"; + for (my $i = 0; $i < $#parts + 1; $i++) { + my $part = $parts[$i]; + #my $e = $doc->getElementById($part); + my $e = &getById($part); + # skip if $e exists already and we are not at a leaf + next if $e and $i != $#parts ;#or $part eq 'MOBY'); + if ($i == $#parts) { + # create leaf + my $leaf = &create_leaf_node($part, $href); + my $parent_id = $parts[$i - 1]; + &getById($parent_id)->appendChild($leaf); + #$doc->getElementById($parent_id)->appendChild($leaf); + } else { + # create folder + my $folder = &create_collapsable_node($part); + my $parent_id = $parts[$i - 1]; + &getById($parent_id)->appendChild($folder); + #$doc->getElementsById($parent_id)->appendChild($folder); + } + } +} +my $vars = { 'tree' => $doc->toStringHTML() }; my $template = Template->new( {} ); @@ -81,3 +111,53 @@ } } } + +sub getById { + my ($id) = @_; + foreach my $n ($doc->getElementsByTagName('*')) { + next unless $n->getAttribute('id'); + return $n if $n->getAttribute('id') eq $id; + } + return undef; +} + +sub create_root_node () { + #my $ul = $doc->createElement( "ul" ); + my $ul = XML::LibXML::Element->new( "ul" ); + $ul->setAttribute("id","browser"); + $ul->setAttribute("class","filetree treeview"); + return $ul; +} + +sub create_collapsable_node { + my ($name) = @_; + my $li = XML::LibXML::Element->new("li"); + $li->setAttribute("class","closed"); + my $div = XML::LibXML::Element->new("div"); + #$div->setAttribute("class","hitarea collapsable-hitarea"); + my $span = XML::LibXML::Element->new("span"); + $span->setAttribute("class","folder"); + $span->appendText($name); + my $ul = XML::LibXML::Element->new("ul"); + $ul->setAttribute("id","$name"); + + #$li->appendChild($div); + $li->appendChild($span); + $li->appendChild($ul); + return $li; +} + +sub create_leaf_node { + my ($name, $href) = @_; + my $li = XML::LibXML::Element->new("li"); + $li->setAttribute("class","last"); + my $span = XML::LibXML::Element->new("span"); + $span->setAttribute("class","file"); + my $a = XML::LibXML::Element->new("a"); + $a->appendText($name); + $a->setAttribute("target","_blank"); + $a->setAttribute("href","$href"); + $span->appendChild($a); + $li->appendChild($span); + return $li; +} From jmrc at dev.open-bio.org Mon Jun 30 06:31:27 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Mon, 30 Jun 2008 06:31:27 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806301031.m5UAVRFu008681@dev.open-bio.org> jmrc Mon Jun 30 06:31:26 EDT 2008 Update of /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test In directory dev.open-bio.org:/tmp/cvs-serv8645 Modified Files: AsyncService.pm Log Message: user: jmrc date: 30-June-2008 Fixing one little bug in the async service test. The outputs of this service were wrong. The service does not have to keep in mind the input "queryId's". moby-live/Docs/asyncDocs/async-MOBY-test AsyncService.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm 2008/04/23 13:08:10 1.2 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm 2008/06/30 10:31:26 1.3 @@ -4,28 +4,31 @@ use MOBY::CommonSubs qw(:all); use MOBY::Async::SimpleServer; use vars qw(@ISA); -use base qw(MOBY::Async::SimpleServer); + at ISA = qw(MOBY::Async::SimpleServer); # This variable is a subroutine which carry out the core of the service -my $sayHello = sub { - my ( $caller, $MOBY_message ) = @_; - - - # ... - # The code of your service - # ... - sleep(10); - my $serviceRequest = < - - +my $sayHello = sub +{ + my ( $caller, $MOBY_message ) = @_; + + # ... + # The code of your service + # ... + my $serviceRequest = ''; + my $MOBYDatainputs = MOBY::CommonSubs::serviceInputParser( $MOBY_message ); + foreach my $queryID ( keys %{$MOBYDatainputs} ) + { + $serviceRequest .= " + + + - -END + "; + } + sleep(180); - return SOAP::Data->type('string' => (MOBY::CommonSubs::responseHeader('cnio.es') . $serviceRequest . MOBY::CommonSubs::responseFooter())); + return SOAP::Data->type('string' => (MOBY::CommonSubs::responseHeader('cnio.es') . $serviceRequest . MOBY::CommonSubs::responseFooter())); -# return $serviceRequest; }; # This is the method that answers to synchronous requests @@ -36,21 +39,6 @@ # Here you can choose between sync or error #return $self->sync($sayHello, 180, @_); return $self->error(@_); - -# my $serviceRequest = < -# -# -# -# -# -# -# -# -#END - -# return $serviceRequest; - } # This is the method that answers to asynchronous requests @@ -59,41 +47,5 @@ return $self->async($sayHello, @_); } -#-------------------------------------- -# -# my $sayGoodbye = sub { -# my ( $caller, $MOBY_message ) = @_; -# -# sleep(10); -# my $serviceRequest = < -# -# -# -# -# END -# -# #return SOAP::Data->type('string' => (MOBY::CommonSubs::responseHeader('cnio.es') . $serviceRequest . MOBY::CommonSubs::responseFooter())); -# return $serviceRequest; -# }; - -# This is the method that answers to synchronous requests -#sub sayGoodbye { -# my ( $caller, $MOBY_message ) = @_; -# -# # Here you can choose between sync or error -# #return $self->sync($sayGoodbye, 180, @_); -# return $self->error(@_); -# -#} - -# This is the method that answers to asynchronous requests -# sub sayGoodbye_submit { -# my $self = shift @_; -# -# return $self->async($sayHello, @_); -# -# } - 1; - + From gordonp at dev.open-bio.org Mon Jun 30 13:42:29 2008 From: gordonp at dev.open-bio.org (Paul Gordon) Date: Mon, 30 Jun 2008 13:42:29 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806301742.m5UHgTkX009818@dev.open-bio.org> gordonp Mon Jun 30 13:42:29 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services In directory dev.open-bio.org:/tmp/cvs-serv9782/src/main/ca/ucalgary/services Modified Files: LegacyService.java Log Message: Changes to reflect full SAWSDL support moby-live/Java/src/main/ca/ucalgary/services LegacyService.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/LegacyService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/LegacyService.java 2008/06/10 21:57:47 1.2 +++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/LegacyService.java 2008/06/30 17:42:29 1.3 @@ -16,8 +16,8 @@ * datatypers into legacy (semi-structured) data formats. */ public class LegacyService extends MobyServlet{ - public final static String TEXT_RULES_LOCATION_PARAM = "regexRulesLoc"; - public final static String MOBY_RULES_LOCATION_PARAM = "xsltRulesLoc"; + public final static String TEXT_RULES_LOCATION_PARAM = "mobRulesLoc"; + public final static String MOBY_RULES_LOCATION_PARAM = "demRulesLoc"; public final static String TEXT_RULES_DEFAULT_RESOURCE = "ca/ucalgary/services/resources/acdRules.xml"; public final static String MOBY_RULES_DEFAULT_RESOURCE = "ca/ucalgary/services/resources/mobyRules.xsl"; From gordonp at dev.open-bio.org Mon Jun 30 13:42:29 2008 From: gordonp at dev.open-bio.org (Paul Gordon) Date: Mon, 30 Jun 2008 13:42:29 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806301742.m5UHgTQE009832@dev.open-bio.org> gordonp Mon Jun 30 13:42:29 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/test In directory dev.open-bio.org:/tmp/cvs-serv9782/src/main/ca/ucalgary/services/test Added Files: WSDLServiceTestCase.java keggTest.xml Log Message: Changes to reflect full SAWSDL support moby-live/Java/src/main/ca/ucalgary/services/test WSDLServiceTestCase.java,NONE,1.1 keggTest.xml,NONE,1.1 From gordonp at dev.open-bio.org Mon Jun 30 13:42:30 2008 From: gordonp at dev.open-bio.org (Paul Gordon) Date: Mon, 30 Jun 2008 13:42:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200806301742.m5UHgUru009882@dev.open-bio.org> gordonp Mon Jun 30 13:42:29 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test In directory dev.open-bio.org:/tmp/cvs-serv9782/src/main/ca/ucalgary/services/util/test Modified Files: KEGG.wsdl WSDLConfigTestCase.java Log Message: Changes to reflect full SAWSDL support moby-live/Java/src/main/ca/ucalgary/services/util/test KEGG.wsdl,1.1,1.2 WSDLConfigTestCase.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/KEGG.wsdl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/KEGG.wsdl 2008/03/13 23:08:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/test/KEGG.wsdl 2008/06/30 17:42:29 1.2 @@ -77,12 +77,14 @@ - + + + @@ -481,10 +483,12 @@ and the (bioxml.info) rules for converting incoming Moby XML to plain text ("dem rule" XSLT). --> + sawsdl:loweringSchemaMapping="urn:lsid:bioxml.info:mobyLoweringSchemaMapping:EC2ecPrefixedString"/> + sawsdl:modelReference="urn:lsid:biomoby.org:secondaryParamClass:String" + sawsdl:loweringSchemaMapping="urn:lsid:bioxml.info:mobyLoweringSchemaMapping:KeggDefSecondaryString2String" + moby:secondaryParamSource="list_organisms" + xmlns:moby="http://www.biomoby.org/moby"/> - + + + @@ -481,10 +483,12 @@ and the (bioxml.info) rules for converting incoming Moby XML to plain text ("dem rule" XSLT). --> + sawsdl:loweringSchemaMapping="urn:lsid:bioxml.info:mobyLoweringSchemaMapping:EC2ecPrefixedString"/> + sawsdl:modelReference="urn:lsid:biomoby.org:secondaryParamClass:String" + sawsdl:loweringSchemaMapping="urn:lsid:bioxml.info:mobyLoweringSchemaMapping:KeggDefSecondaryString2String" + moby:secondaryParamSource="list_organisms" + xmlns:moby="http://www.biomoby.org/moby"/>