From kawas at pub.open-bio.org Thu Jun 2 11:48:01 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 2 11:27:33 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52Fm1cd015581@pub.open-bio.org> kawas Thu Jun 2 11:48:01 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool In directory pub.open-bio.org:/tmp/cvs-serv15536/org/biomoby/client/ui/graphical/applets/objectCreationTool Modified Files: ObjectCreationTool.java MobyXML.java MobyUtilities.java Registration.java Pair.java MobyPlainText.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool ObjectCreationTool.java,1.1,1.2 MobyXML.java,1.3,1.4 MobyUtilities.java,1.1,1.2 Registration.java,1.2,1.3 Pair.java,1.1,1.2 MobyPlainText.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.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/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.java 2005/06/02 15:48:01 1.2 @@ -167,7 +167,6 @@ /** * This method initializes this * - * @return void */ public void init() { this.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 24)); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java 2005/04/20 21:42:10 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java 2005/06/02 15:48:01 1.4 @@ -18,7 +18,7 @@ /** * This class contains all the methods required to output BioMoby Objects in XML. * @author Eddie Kawas - * @Jun 17, 2004 + * Jun 17, 2004 * */ public class MobyXML { @@ -305,7 +305,6 @@ * * PRE: None. *

POST: All of the relationships, inheritance and containment, are removed.

POST:

- * @return + * @return Registration */ public Registration getRegistration() { return registration; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.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/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java 2005/06/02 15:48:01 1.2 @@ -16,7 +16,7 @@ /** * Utilities that are useful for retrieving information about certain objects, parsing objects, etc. * @author Eddie Kawas - * @Jun 10, 2004 + * Jun 10, 2004 * */ public class MobyUtilities { @@ -27,7 +27,7 @@ * => The first item in the list is a string representation of the parent

* => The second item is a linked list of all the 'HAS' container relationships

* => The third item is a linked list of all the 'HASA' container relationships - * @param name, the name of the object to query for. + * @param name - the name of the object to query for. * @return returns a linked list {String, LinkedList, LinkedList} of relationships */ public static LinkedList GetRelations(String name) throws IOException { @@ -119,7 +119,6 @@ * PRE: ll is a valid linkedlist, panelDetails is a valid MobyUserPanel.

* POST: All the relations of child are outputted to the MobyUserPanel panelDetails. * @param ll - a linked list created via GetRelations() - * @param panelDetails - the MobyUserPanel to output the relationships * @param child - the object that GetRelations() was called with. */ public static String WriteToPanel(LinkedList ll, String child) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Registration.java,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/client/ui/graphical/applets/objectCreationTool/Registration.java 2005/04/20 21:42:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Registration.java 2005/06/02 15:48:01 1.3 @@ -12,7 +12,7 @@ /** * @author Eddie Kawas - * @Jun 21, 2004 + * Jun 21, 2004 * */ public class Registration extends MobyDataType{ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Pair.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/client/ui/graphical/applets/objectCreationTool/Pair.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Pair.java 2005/06/02 15:48:01 1.2 @@ -5,7 +5,7 @@ * This class contains the methods required to encapsulate

the container relationships * 'HAS' and 'HASA' from the BioMoby Object Ontology. * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 * */ public class Pair { @@ -28,7 +28,6 @@ /** * PRE: None.

* POST: The article name is retrieved. - * @param - none. * @return the contained objects name */ public String getArticlename() { @@ -38,7 +37,6 @@ /** * PRE: None.

* POST: The attribute is retrieved - * @param - none. * @return the contained objects attribute */ public String getAttribute() { @@ -48,7 +46,6 @@ /** * PRE: none.

* POST: a String representation of a Pair is returned. - * @param - none. * @return returns the string representation of a pair. */ public String toString() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyPlainText.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/client/ui/graphical/applets/objectCreationTool/MobyPlainText.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyPlainText.java 2005/06/02 15:48:01 1.2 @@ -10,7 +10,7 @@ * This class is used to maintain and then output a plain * text representation of an object. * @author Eddie Kawas - * @Jun 12, 2004 + * Jun 12, 2004 * */ public class MobyPlainText { @@ -145,7 +145,6 @@ * * PRE: None.

* POST: All of the relationships, inheritance and containment, are removed. - * @return nothing. */ public void clear() { renameRoot("MyObject"); From kawas at pub.open-bio.org Thu Jun 2 11:48:28 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 2 11:27:41 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52FmSBZ015655@pub.open-bio.org> kawas Thu Jun 2 11:48:28 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool In directory pub.open-bio.org:/tmp/cvs-serv15594/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool Modified Files: ServiceFocusListener.java MobyCollection.java InputOutputActionListener.java MobyUtilities.java HelpActionListener.java ServiceCreationTool.java ButtonBeautifier.java NamespaceTree.java ServiceTypeTree.java Pair.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool ServiceFocusListener.java,1.1,1.2 MobyCollection.java,1.1,1.2 InputOutputActionListener.java,1.1,1.2 MobyUtilities.java,1.1,1.2 HelpActionListener.java,1.1,1.2 ServiceCreationTool.java,1.2,1.3 ButtonBeautifier.java,1.2,1.3 NamespaceTree.java,1.1,1.2 ServiceTypeTree.java,1.1,1.2 Pair.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java 2005/06/02 15:48:28 1.2 @@ -11,7 +11,7 @@ /** * * @author Edward Kawas - * @date July 7, 2004 + * date July 7, 2004 * This class implements the FocusListener for the Service Creation Tool. *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.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/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.java 2005/06/02 15:48:28 1.2 @@ -11,7 +11,7 @@ /** * * @author Edward Kawas - * @date July 19, 2004 + * date July 19, 2004 * This class represents a collection, either input or output, for the Moby Services. *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.java 2005/06/02 15:48:28 1.2 @@ -12,7 +12,7 @@ /** * * @author Edward Kawas

- * @date July 16, 2004

+ * date July 16, 2004

* This class implements the ActionListener interface. *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.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/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.java 2005/06/02 15:48:28 1.2 @@ -9,7 +9,7 @@ /** * Utilities that are useful for retrieving information about certain objects, parsing objects, etc. * @author Eddie Kawas - * @Jun 10, 2004 + * Jun 10, 2004 *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com */ @@ -74,7 +74,6 @@ * PRE: ll is a valid linkedlist, panelDetails is a valid MobyUserPanel.

* POST: All the relations of child are outputted to the MobyUserPanel panelDetails. * @param ll - a linked list created via GetRelations() - * @param panelDetails - the MobyUserPanel to output the relationships * @param child - the object that GetRelations() was called with. */ public static String WriteToPanel(LinkedList ll, String child) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.java 2005/06/02 15:48:28 1.2 @@ -12,7 +12,7 @@ /** * @author Edward Kawas - * @date Sep 1, 2004 + * Sep 1, 2004 *

This class implements the ActionListener interface. *

The sole purpose of this class is to provide messages to *

the user regarding the form inputs for a service instance. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java,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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java 2005/04/07 21:01:13 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java 2005/06/02 15:48:28 1.3 @@ -22,7 +22,7 @@ /** * * @author Edward Kawas - * @date Jul 7, 2004 + * date Jul 7, 2004 * This class is the main class for the service instance creation tool. *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com @@ -215,7 +215,7 @@ } /** - * @param i, the radio button id. + * @param i - the radio button id. * -1 => no button is selected. * 1 => Primary button is selected. * 2 => Secondary button is selected. @@ -227,7 +227,7 @@ /** * * @return an int reprepresenting the radio button that is selected. - * @see setRadioButtonID(int i) + * @see #setRadioButtonID(int i) */ public int getRadioButtonID() { return radioButtonID; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java,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/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java 2005/04/20 21:42:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java 2005/06/02 15:48:28 1.3 @@ -16,7 +16,7 @@ /** * @author Eddie Kawas - * @Jun 30, 2004 + * Jun 30, 2004 *

* This class enhances the esthetic look of buttons. *

@@ -206,7 +206,7 @@ * POST: The powered by moby services image is returned in a label. *

* - * @param cls - + * @param c - * the class where program execution began. */ public static JLabel getMobyImage(Class c) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.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/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.java 2005/06/02 15:48:28 1.2 @@ -25,9 +25,9 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the Services contained in the BioMoby Service Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com */ @@ -50,7 +50,8 @@ * POST: A moby tree is constructed with the root node labeled as 'Namespace'

* and the material for the tree taken from the RDF located at * @link http://biomoby.org/RESOURCES/MOBY-S/Namespace - * @param canEdit, if true, then the nodes are editable, else they are not. + * @param canEdit - if true, then the nodes are editable, else they are not. + * @param rdf - rdf for namespaces. */ public NamespaceTree(boolean canEdit, String rdf) { @@ -92,7 +93,6 @@ /** * PRE: None.

* POST: The MobyTree Namespace contains an empty tree with a single node labeled 'Namespace' - * @return - none. * */ public void clear() { @@ -103,7 +103,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -124,7 +123,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -216,7 +215,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -268,8 +266,6 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. * */ public void makeObjectTree() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.java 2005/06/02 15:48:28 1.2 @@ -25,9 +25,9 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the Services contained in the BioMoby Service Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com * @@ -51,8 +51,8 @@ * POST: A moby tree is constructed with the root node labeled as 'Service'

* and the material for the tree taken from the RDF located at * @link http://biomoby.org/RESOURCES/MOBY-S/Service - * @param canEdit, if true, then the nodes are editable, else they are not. - * @param rdf, the location of the RDF for the service type tree. + * @param canEdit - if true, then the nodes are editable, else they are not. + * @param rdf - the location of the RDF for the service type tree. */ public ServiceTypeTree(boolean canEdit, String rdf) { @@ -96,7 +96,6 @@ /** * PRE: None.

* POST: The MobyTree object contains an empty tree with a single node labeled 'Object' - * @return - none. * */ public void clear() { @@ -107,7 +106,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -128,7 +126,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -220,7 +218,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -272,8 +269,6 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. * */ public void makeObjectTree() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.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/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.java 2005/06/02 15:48:28 1.2 @@ -5,7 +5,7 @@ * This class contains the methods required to encapsulate

the container relationships * 'HAS' and 'HASA' from the BioMoby Object Ontology. * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com */ @@ -30,7 +30,6 @@ /** * PRE: None.

* POST: The article name is retrieved. - * @param - none. * @return the contained objects name */ public String getArticlename() { @@ -40,7 +39,6 @@ /** * PRE: None.

* POST: The attribute is retrieved - * @param - none. * @return the contained objects attribute */ public String getAttribute() { @@ -50,7 +48,6 @@ /** * PRE: none.

* POST: a String representation of a Pair is returned. - * @param - none. * @return returns the string representation of a pair. */ public String toString() { From kawas at pub.open-bio.org Thu Jun 2 11:48:54 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 2 11:27:42 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52Fms7Z015697@pub.open-bio.org> kawas Thu Jun 2 11:48:54 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared In directory pub.open-bio.org:/tmp/cvs-serv15668/org/biomoby/client/ui/graphical/applets/shared Modified Files: Household.java MobyTree.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared Household.java,1.1,1.2 MobyTree.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/Household.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/client/ui/graphical/applets/shared/Household.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/Household.java 2005/06/02 15:48:54 1.2 @@ -9,7 +9,7 @@ * @author Eddie Kawas *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com - * @Jun 4, 2004 + * Jun 4, 2004 * */ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/MobyTree.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/client/ui/graphical/applets/shared/MobyTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/MobyTree.java 2005/06/02 15:48:54 1.2 @@ -23,11 +23,11 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the objects contained in the BioMoby Object Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com - * @May 31, 2004 + * May 31, 2004 * */ public class MobyTree extends JPanel { @@ -47,11 +47,12 @@ String name = ""; private static final boolean DEBUG = false; /** - * PRE: None

- * POST: A moby tree is constructed with the root node labeled as 'Object'

- * and the material for the tree taken from the RDF located at - * @link http://biomoby.org/RESOURCES/MOBY-S/Objects - * @param canEdit, if true, then the nodes are editable, else they are not. + * A moby tree is constructed with the root node labeled as 'name'

+ * and the material for the tree taken from the RDF located at + * the url rdf. + * @param canEdit - if true then nodes in tree can be edited, otherwise they cannot. + * @param rdf - the url of the RDF describing Moby Objects, Services, Service Types, and Namespaces + * @param name - the name of the root node in the tree. */ public MobyTree(boolean canEdit, String rdf, String name) { @@ -94,7 +95,6 @@ /** * PRE: None.

* POST: The MobyTree object contains an empty tree with a single node labeled 'Object' - * @return - none. * */ public void clear() { @@ -105,7 +105,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -126,7 +125,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -218,7 +217,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -270,8 +268,7 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. + * @param name - name of the object to create tree for. * */ public void makeObjectTree(String name) { From kawas at pub.open-bio.org Thu Jun 2 11:49:28 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 2 11:27:43 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021549.j52FnSfC015751@pub.open-bio.org> kawas Thu Jun 2 11:49:28 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util In directory pub.open-bio.org:/tmp/cvs-serv15726/org/biomoby/client/ui/graphical/applets/util Modified Files: TreeLoaderThread.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util TreeLoaderThread.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util/TreeLoaderThread.java,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/client/ui/graphical/applets/util/TreeLoaderThread.java 2005/04/07 20:21:18 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util/TreeLoaderThread.java 2005/06/02 15:49:28 1.3 @@ -5,7 +5,7 @@ * @author Sun Micro Systems *

This class was created to provide an abstract class that you subclass to *

perform GUI-related work in a dedicated thread. - * @see http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html + * @link http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html *

For questions, comments, or bugs *

email me at edward.kawas@gmail.com */ From kawas at pub.open-bio.org Thu Jun 2 11:50:26 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 2 11:27:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021550.j52FoQFg015804@pub.open-bio.org> kawas Thu Jun 2 11:50:26 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv15779/org/biomoby/registry/rdfagent/verifier Modified Files: DataMngr.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/04/16 14:32:12 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/02 15:50:26 1.5 @@ -160,16 +160,15 @@ /** This method use for the update service_instance table, simple_input/output table, * collection_input/output table, secondary_input table in accordance with data * from RDF file. - * @param Hashtable servSign - set of the serviceSignature data (name - value, an example: servicename - GoTerm); + * @param servSign - set of the serviceSignature data (name - value, an example: servicename - GoTerm); * Hashtable of hashtables represented by a pair: * a name of the input = hashtable for this output * example:{siminp1={object_type_uri=urn:lsid:biomoby.org:objectclass:Object, namespace_type_uris=urn:lsid:biomoby.org:namespacetype:taxon}} - * @param Hashtable of hashtables represented by a pair: + * @param servInp - Hashtable of hashtables represented by a pair: * a name of the output = hashtable for this output * @param servname - the name of service * @param authURI - the authority URI * @param signURL - URL of resource - * @return . */ public static void processService( Hashtable servSign, Hashtable servInp, Hashtable servOut, String servname,String authURI,String signURL){ @@ -582,7 +581,7 @@ /** delete the service instance by service name and signature URL * @param servName the name of service which we want delete. - * @param rdfURL the authority URI for service which we want delete. + * @param signURL the authority URI for service which we want delete. * */ @@ -667,7 +666,7 @@ /** add the record about new service instance in the service_instance table of mobycentral database * @param servName - the name of service instance the record was added for. * @param cat - the category of service instance. - * @param servTypeUri - the service type URI of service instance. + * @param servTypeURI - the service type URI of service instance. * @param authId - the authority Id of service instance. * @param url - the URL of service instance. * @param email - the contact e-Mail of service instance. @@ -778,7 +777,6 @@ * @param objTypeUri the object type URI of the simple input. * @param nsTypeUris the string with set of the nameSpaces for this simple input. * @param colInpId the collection input Id if this simple input belongs to a collection, and blank otherwise. - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSimpleInput(Integer servInstId,String articleName,String objTypeUri,String nsTypeUris,Integer colInpId){ @@ -876,7 +874,6 @@ * @param max the maximum value of the secondary input * @param min the minimum value of the secondary input * * @param enum the enumeration value for the secondary input - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSecondary(int servInstId,String article_name,String def,String dataType,BigDecimal max,BigDecimal min,String enumeration){ @@ -921,9 +918,8 @@ * @param dataType the type of data of the secondary input. * @param max the maximum value of the secondary input * @param min the minimum value of the secondary input - * @param enum the enumeration value for the secondary input + * @param enumeration the enumeration value for the secondary input * @param minSecNum minimum free number for secondary_input_id - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void updateSec(int servInstId,String article_name,String def,String dataType,BigDecimal max,BigDecimal min,String enumeration, int minSecNum){ @@ -968,7 +964,6 @@ * @param objTypeUri the object type URI of the simple output. * @param nsTypeUris the string with set of the nameSpaces for this simple output. * @param colOutId the collection input Id if this simple output belongs to a collection, and blank otherwise. - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSimpleOutput(Integer servInstId,String articleName,String objTypeUri,String nsTypeUris,Integer colOutId){ @@ -1186,7 +1181,7 @@ } /** get the secondary input data by the secondary input Id - * @param secInpId - the secondary input Id + * @param servInstId - the secondary input Id * @return carrier class Secondary */ @@ -1247,7 +1242,6 @@ /** get the simple/collection output data by the service instance Id * and build xml representation * @param servInstId - the service instance Id - * @ */ public static void getSimpleCollectOutput(int servInstId){ @@ -1300,7 +1294,6 @@ /** get the simple/collection input data by the service instance Id * and build xml representation * @param servInstId - the service instance Id - * @ */ public static void getSimpleCollectInput(int servInstId){ @@ -1516,7 +1509,7 @@ /** get the service instance Id for the given service name and signatureURL * @param servName - the name of service instance . - * @param signatureURL - URL of resource for the service instance. + * @param signURL - URL of resource for the service instance. * @return Intrger service instance Id if was found in the database, zero otherwise */ @@ -1646,7 +1639,6 @@ /** delete a record from simple table by a service instance Id and collection_input_id * (the metod is working for simple_input/output, collection input/output tables) * @param servInstId - the service instance Id. - * @return Intrger ret=1 if the record was deleted, ret=-1 otherwise. */ public static void delCollectionMember(String inout, int servInstId){ @@ -1707,7 +1699,8 @@ } /** delete a record from service_instance table by a servicename and authority Id - * @param servInstId - the service instance Id. + * @param servName - the service instance name. + * @param authId - the id of the authority * @return Intrger ret=1 if the record was deleted, ret=-1 otherwise. */ @@ -1920,7 +1913,7 @@ /** get the service authority Id from service_instance table by the servicename and signatureURL - * @param servName - the name of service + * @param serviceName - the name of service * @param signURL - the signatureURL for the given service * @return int authority Id if was found, zero otherwise. */ @@ -2100,10 +2093,13 @@ } - /** get the contact e-Mail from service_instance table by the servicename - * @param signURL - the URL of a resource - * @return String contact e-Mail if was found, empty string otherwise. - */ + /** + * + * gets the min number of records with service instance id = 0 + * @param table + * @param key_field + * @return the number of records + */ public static int getMinFreeNumber(String table, String key_field){ From kawas at pub.open-bio.org Thu Jun 2 11:52:19 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 2 11:28:35 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021552.j52FqJhN015901@pub.open-bio.org> kawas Thu Jun 2 11:52:19 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3 In directory pub.open-bio.org:/tmp/cvs-serv15877/org/biomoby/shared/mobyxml/w3c/dom3 Modified Files: Tag: java_1_5_compat MobyObjectClassImpl.java MobyObjectClassNSImpl.java MobyObjectClass.java Log Message: Fixed the javadoc comments in order to get rid of warnings and fixed some parsing logic. moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3 MobyObjectClassImpl.java,1.1,1.1.2.1 MobyObjectClassNSImpl.java,1.1,1.1.2.1 MobyObjectClass.java,1.1,1.1.2.1 rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClassImpl.java,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClassNSImpl.java,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClass.java,v: No such file or directory From dwang at pub.open-bio.org Wed Jun 1 21:33:24 2005 From: dwang at pub.open-bio.org (Dennis Wang) Date: Thu Jun 2 13:21:58 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506020133.j521XOhH012494@pub.open-bio.org> dwang Wed Jun 1 21:33:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby In directory pub.open-bio.org:/tmp/cvs-serv12468/Perl/MOBY/Adaptor/moby Modified Files: Tag: moby-DennisVersion queryapi.pm Log Message: test moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.2,1.2.2.1 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2004/07/09 00:21:53 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/06/02 01:33:23 1.2.2.1 @@ -3,6 +3,7 @@ use Carp; use vars qw($AUTOLOAD); +# Modified by Dennis { #Encapsulated class data From yanwong at pub.open-bio.org Thu Jun 9 04:19:46 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu Jun 9 03:55:55 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598Jkw3026903@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python In directory pub.open-bio.org:/tmp/cvs-serv26869 Modified Files: PKG-INFO changelog setup.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python PKG-INFO,1.6,1.7 changelog,1.8,1.9 setup.py,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Python/PKG-INFO,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Python/PKG-INFO 2005/02/18 15:58:21 1.6 +++ /home/repository/moby/moby-live/Python/PKG-INFO 2005/06/09 08:19:46 1.7 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: bioMoby -Version: 0.9 +Version: 0.9p2 Summary: Python interface for bioMoby Home-page: http://bioserv.rpbs.jussieu.fr Author: Yan Wong =================================================================== RCS file: /home/repository/moby/moby-live/Python/changelog,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Python/changelog 2005/04/22 10:13:48 1.8 +++ /home/repository/moby/moby-live/Python/changelog 2005/06/09 08:19:46 1.9 @@ -69,5 +69,5 @@ 0.9: PIB implemented as a set of string in the __PIB__ field 0.9p1: added a SQL invocator and SQL dispatcher in order to help the building of DB webservices. - +0.9p2: changed the deserialization code for TCBioMoby and MobyObject. Added a new constant MOBYNAMESPACEURI =================================================================== RCS file: /home/repository/moby/moby-live/Python/setup.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/setup.py 2005/01/27 08:44:04 1.5 +++ /home/repository/moby/moby-live/Python/setup.py 2005/06/09 08:19:46 1.6 @@ -3,7 +3,7 @@ from distutils.core import setup setup(name="bioMoby", - version=0.8, + version="0.9p2", description="An implementation of bioMoby in Python", author="Yan Wong", author_email="yanwong@ebgm.jussieu.fr", From yanwong at pub.open-bio.org Thu Jun 9 04:19:47 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu Jun 9 03:56:20 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598JlTR026965@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby/webservice In directory pub.open-bio.org:/tmp/cvs-serv26869/bioMoby/webservice Modified Files: TCBioMoby.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python/bioMoby/webservice TCBioMoby.py,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py 2005/02/01 08:52:17 1.3 +++ /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py 2005/06/09 08:19:46 1.4 @@ -9,6 +9,7 @@ Date: 12/06/2004 01/17/2005: solve the problem with GBrowse :) return a raw string instead of the text embbeded in a Body tag. + 06/08/2005: Return a string containing the MobyContent instead of the Python object """ from ZSI import _copyright, _children, \ @@ -23,12 +24,7 @@ def parse(self, elt, ps): #self.checkname(elt, ps) if _children(elt): - from bioMoby import MobyContent - mc=MobyContent() - - mc.fromMoby(elt.firstChild.nodeValue) - - return mc + return elt.firstChild.nodeValue class body(TypeCode): From yanwong at pub.open-bio.org Thu Jun 9 04:27:47 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu Jun 9 04:16:57 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090827.j598RlHS027027@pub.open-bio.org> yanwong Thu Jun 9 04:27:47 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27001/bioMoby Modified Files: mobyService.py Log Message: moby-live/Python/bioMoby mobyService.py,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:19:46 1.6 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:27:47 1.7 @@ -455,7 +455,7 @@ def join(self): """Same as Thread.join """ -self._execThread.join() + self._execThread.join() From yanwong at pub.open-bio.org Thu Jun 9 04:39:26 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu Jun 9 04:17:15 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090839.j598dQDp027169@pub.open-bio.org> yanwong Thu Jun 9 04:39:26 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27146 Removed Files: mobyService.py Log Message: moby-live/Python/bioMoby mobyService.py,1.7,NONE rcsdiff: /home/repository/moby/moby-live/Python/bioMoby/RCS/mobyService.py,v: No such file or directory From yanwong at pub.open-bio.org Thu Jun 9 04:40:13 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu Jun 9 04:17:24 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090840.j598eDh1027223@pub.open-bio.org> yanwong Thu Jun 9 04:40:13 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27197 Added Files: mobyService.py Log Message: corrected a mistakenly placed \t moby-live/Python/bioMoby mobyService.py,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 From kawas at pub.open-bio.org Thu Jun 9 13:36:00 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 9 13:13:17 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506091736.j59Ha0PF029340@pub.open-bio.org> kawas Thu Jun 9 13:35:59 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder In directory pub.open-bio.org:/tmp/cvs-serv29315/org/biomoby/client/rdf/builder Modified Files: ServiceInstanceRDF.java Log Message: Modified how the lsid domain is retrieved. Eddie moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/05/31 18:11:07 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/06/09 17:35:59 1.4 @@ -296,7 +296,7 @@ .getURL())); subject.addProperty(DC.identifier, model .createTypedLiteral("urn:lsid:" - + properties.getProperty("domain") + + properties.getProperty("lsid_domain") + ":serviceinstance:" + services[i].getAuthority() + "," + services[i].getName())); subject.addProperty(Predicates.performs_task, model From kawas at pub.open-bio.org Thu Jun 9 13:39:00 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Jun 9 13:14:35 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506091739.j59Hd0vw029457@pub.open-bio.org> kawas Thu Jun 9 13:39:00 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources In directory pub.open-bio.org:/tmp/cvs-serv29432/org/biomoby/client/ui/graphical/servlet/jresources Modified Files: RESOURCE.java Log Message: Modified how the lsid domain is retrieved. Eddie moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources RESOURCE.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/05/31 18:09:24 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/06/09 17:39:00 1.6 @@ -366,7 +366,7 @@ .getURL())); subject.addProperty(DC.identifier, model .createTypedLiteral("urn:lsid:" - + properties.getProperty("domain") + + properties.getProperty("lsid_domain") + ":serviceinstance:" + services[i].getAuthority() + "," + services[i].getName())); subject.addProperty(Predicates.performs_task, model From yanwong at pub.open-bio.org Fri Jun 10 03:47:15 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Fri Jun 10 03:22:59 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506100747.j5A7lFCx000503@pub.open-bio.org> yanwong Fri Jun 10 03:47:15 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv477 Modified Files: mobyMarshal.py Log Message: A generated object can now have a field content moby-live/Python/bioMoby mobyMarshal.py,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/09 08:19:46 1.9 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/10 07:47:15 1.10 @@ -3,7 +3,7 @@ """ Creation date 19th of May 2004 - Latest modification date: 9th of June 2005 + Latest modification date: 10th of June 2005 Author: Wong Yan Topic: Marshalling moby Objects @@ -15,6 +15,7 @@ 06/09/2005: Change the doc.getElementsByTagNameNS("http://biomoby.org/moby",'mobyContent') to doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') Parsing is now independant from the namespace. + 06/10/2005: A generated object can now have a field content! """ from xml.dom.minidom import parseString @@ -336,7 +337,7 @@ content.append(str(elem.nodeValue)) if content: - anObject.content(r"".join(content)) + anObject.content=r"".join(content) return anObject From senger at pub.open-bio.org Fri Jun 10 09:48:10 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Jun 10 09:23:39 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101348.j5ADmAcA003762@pub.open-bio.org> senger Fri Jun 10 09:48:10 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv3744 Log Message: Module for third-party libraries created Status: Vendor Tag: jars-archive Release Tags: v1 N jars-archive/README N jars-archive/current/.keep-me No conflicts created by this import jars-archive - Imported sources rcsdiff: /home/repository/moby/jars-archive/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/jars-archive/RCS/Imported,v: No such file or directory rcsdiff: /home/repository/moby/jars-archive/RCS/sources,v: No such file or directory From senger at pub.open-bio.org Fri Jun 10 09:53:03 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Jun 10 09:28:21 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101353.j5ADr3Jf003851@pub.open-bio.org> senger Fri Jun 10 09:53:03 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv3832 Modified Files: README Log Message: jars-archive README,1.1.1.1,1.2 =================================================================== RCS file: /home/repository/moby/jars-archive/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- /home/repository/moby/jars-archive/README 2005/06/10 13:48:10 1.1.1.1 +++ /home/repository/moby/jars-archive/README 2005/06/10 13:53:03 1.2 @@ -3,7 +3,7 @@ This module serves just one purpose: to store commonly (or less commonly) used third-party Java libraries (jar files) in order to -share them by several other CVS modules withouyt the need to include +share them by several other CVS modules without the need to include them separately in all those CVS modules. I guess that the purpose is similar to the CVS-native notion of the @@ -16,6 +16,12 @@ first time it builds everything. An example can be found in the moby-live module (subdirectory Java). +It started as a BioMoby initiative so it is located as a module within +the 'moby' CVS repository. But it can used by others, as well - one +does not use it as a CVS module, but like a normal HTTP resource. Only +when you want to add a new library, or to udate an existing one, you +need to check-out it as usual. + Directory structure ------------------- @@ -37,5 +43,5 @@ ---------------------------------------------------------------------- Started by: Martin Senger (martin.senger@gmail.com), June 2005 -$Id +$Id$ ---------------------------------------------------------------------- From senger at pub.open-bio.org Fri Jun 10 09:55:36 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Jun 10 09:30:54 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101355.j5ADtais003920@pub.open-bio.org> senger Fri Jun 10 09:55:36 EDT 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv3904/current Added Files: activation.jar adenine.jar alltools.jar axis-ant.jar axis.jar commons-discovery.jar commons-logging.jar concurrent.jar icu4j.jar jakarta-oro-2.0.5.jar jaxen-core.jar jaxen-jdom.jar jaxrpc.jar jdom.jar jena.jar junit.jar log4j-1.2.4.jar lsid-client-1.1.2.jar lsid-server-1.1.2.jar mail.jar mysql-connector-java-3.1.7-bin.jar rdf-api-2001-01-19.jar saaj.jar saxpath.jar servlet.jar taverna.jar wsdl4j.jar xalan.jar xercesImpl.jar xercesSamples.jar xml-apis.jar xmlParserAPIs.jar Removed Files: .keep-me Log Message: jars-archive/current activation.jar,NONE,1.1 adenine.jar,NONE,1.1 alltools.jar,NONE,1.1 axis-ant.jar,NONE,1.1 axis.jar,NONE,1.1 commons-discovery.jar,NONE,1.1 commons-logging.jar,NONE,1.1 concurrent.jar,NONE,1.1 icu4j.jar,NONE,1.1 jakarta-oro-2.0.5.jar,NONE,1.1 jaxen-core.jar,NONE,1.1 jaxen-jdom.jar,NONE,1.1 jaxrpc.jar,NONE,1.1 jdom.jar,NONE,1.1 jena.jar,NONE,1.1 junit.jar,NONE,1.1 log4j-1.2.4.jar,NONE,1.1 lsid-client-1.1.2.jar,NONE,1.1 lsid-server-1.1.2.jar,NONE,1.1 mail.jar,NONE,1.1 mysql-connector-java-3.1.7-bin.jar,NONE,1.1 rdf-api-2001-01-19.jar,NONE,1.1 saaj.jar,NONE,1.1 saxpath.jar,NONE,1.1 servlet.jar,NONE,1.1 taverna.jar,NONE,1.1 wsdl4j.jar,NONE,1.1 xalan.jar,NONE,1.1 xercesImpl.jar,NONE,1.1 xercesSamples.jar,NONE,1.1 xml-apis.jar,NONE,1.1 xmlParserAPIs.jar,NONE,1.1 .keep-me,1.1.1.1,NONE rcsdiff: /home/repository/moby/jars-archive/current/RCS/.keep-me,v: No such file or directory From senger at pub.open-bio.org Fri Jun 10 10:07:45 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Jun 10 09:43:01 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101407.j5AE7jJY004023@pub.open-bio.org> senger Fri Jun 10 10:07:45 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv4004 Modified Files: README Log Message: jars-archive README,1.2,1.3 =================================================================== RCS file: /home/repository/moby/jars-archive/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/jars-archive/README 2005/06/10 13:53:03 1.2 +++ /home/repository/moby/jars-archive/README 2005/06/10 14:07:45 1.3 @@ -19,7 +19,7 @@ It started as a BioMoby initiative so it is located as a module within the 'moby' CVS repository. But it can used by others, as well - one does not use it as a CVS module, but like a normal HTTP resource. Only -when you want to add a new library, or to udate an existing one, you +when you want to add a new library, or to update an existing one, you need to check-out it as usual. From kawas at pub.open-bio.org Mon Jun 13 14:14:36 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon Jun 13 13:49:40 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506131814.j5DIEabl026259@pub.open-bio.org> kawas Mon Jun 13 14:14:35 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv26234/org/biomoby/registry/rdfagent/verifier Modified Files: Communicator.java Log Message: Fixed a bug that crashed the agent when an RDF document retrieved from an author contained invalid xml. Eddie moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Communicator.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java 2005/04/16 14:32:12 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java 2005/06/13 18:14:35 1.5 @@ -1,4 +1,3 @@ - package org.biomoby.registry.rdfagent.verifier; import java.io.BufferedReader; @@ -25,223 +24,260 @@ import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.rdf.model.RDFException; +import com.hp.hpl.jena.shared.JenaException; + /** * @author Nina Opushneva - * - * The Communicator class allows a Java application to communicate with - * servers of service providers by HTTP protocol, and with SMTP server by message + * + * The Communicator class allows a Java application to communicate with servers + * of service providers by HTTP protocol, and with SMTP server by message */ public class Communicator { -/** get RDF model of service by signatureURL - * (make HTTP connect to server, open a file,read a file into a streem, build the model) - * @param signURL - the URL of resource (signatureURL) - * @param servNames - set of service names located at this signatureURL - * @return Model the RDF model of services located at this signatureURL - */ - - public static Model getServiceRDF(String servNames,String signURL){ - - Model model = ModelFactory.createDefaultModel(); - String mes1 = ""; - try { - URL u = new URL(signURL); - - HttpURLConnection huc = (HttpURLConnection) u.openConnection(); - huc.connect(); - - int code = huc.getResponseCode(); - Log.info("GET <"+signURL+" > - HTTP CODE: "+ code); - Report.doWrite(""); - Report.doWrite("GET SIGNATURE_URL <"+signURL+" > - HTTP CODE: "+ code); - Report.add("GET SIGNATURE_URL <"+signURL+" > - HTTP CODE: "+ code); - - if (code == 200 || code == 202 ) { - - try{ - model.read(huc.getInputStream(),""); - }catch(RDFException e){ - Log.severe("Failed : "+e); - Report.add("Error 1: "+e); -// e.getMessage(); - }catch(IOException e){ - Log.severe("Failed : "+e); - Report.add("Error 3: "+e); -// e.getMessage(); - } - - } - else { - if (code == 400){ - Log.warning("The request had bad syntax or was inherently impossible to be satisfied."); - Report.add("The request had bad syntax or was inherently impossible to be satisfied."); - } - else if (code == 401){ - Log.warning("The parameter to this message gives a specification of authorization schemes which are acceptable."); - Report.add("The parameter to this message gives a specification of authorization schemes which are acceptable."); - } - else if (code == 402){ - Report.add("The parameter to this message gives a specification of charging schemes acceptable."); - } - else if (code == 403){ - Report.add("The request is for something forbidden. Authorization will not help."); - mes1 = "The request is for something forbidden."; - } - else if (code == 404){ - Report.doWrite("The server has not found anything matching the URI given"); - Report.add("The server has not found anything matching the URI given"); - mes1 = "The RDF file was not found on the server"; + /** + * get RDF model of service by signatureURL (make HTTP connect to server, + * open a file,read a file into a streem, build the model) + * + * @param signURL - + * the URL of resource (signatureURL) + * @param servNames - + * set of service names located at this signatureURL + * @return Model the RDF model of services located at this signatureURL + */ + + public static Model getServiceRDF(String servNames, String signURL) { + + Model model = ModelFactory.createDefaultModel(); + String mes1 = ""; + try { + URL u = new URL(signURL); + + HttpURLConnection huc = (HttpURLConnection) u.openConnection(); + huc.connect(); + + int code = huc.getResponseCode(); + Log.info("GET <" + signURL + " > - HTTP CODE: " + code); + Report.doWrite(""); + Report.doWrite("GET SIGNATURE_URL <" + signURL + + " > - HTTP CODE: " + code); + Report.add("GET SIGNATURE_URL <" + signURL + " > - HTTP CODE: " + + code); + if (code == 200 || code == 202) { + + try { + model.read(huc.getInputStream(), ""); + } catch (RDFException e) { + Log.severe("Failed : " + e); + Report.add("Error 1: " + e); + + + // e.getMessage(); + } catch (JenaException e) { + //reset code to + code = 417; } - else if (code == 500){ + //http://www.w3.org/RDF/Validator/RDF/Validator/ARPServlet?URI= + } + + ////////////////////////// + // no else if here purposely, because i reset the code if an + // exception is thrown due to invalid rdfs being returned. + ////////////////////////// + if (code != 200 && code != 202) + if (code == 400) { + Log + .warning("The request had bad syntax or was inherently impossible to be satisfied."); + Report + .add("The request had bad syntax or was inherently impossible to be satisfied."); + } else if (code == 401) { + Log + .warning("The parameter to this message gives a specification of authorization schemes which are acceptable."); + Report + .add("The parameter to this message gives a specification of authorization schemes which are acceptable."); + } else if (code == 402) { + Report + .add("The parameter to this message gives a specification of charging schemes acceptable."); + } else if (code == 403) { + Report + .add("The request is for something forbidden. Authorization will not help."); + mes1 = "The request is for something forbidden."; + } else if (code == 404) { + Report + .doWrite("The server has not found anything matching the URI given"); + Report + .add("The server has not found anything matching the URI given"); + mes1 = "The RDF file was not found on the server"; + } else if (code == 417) { + Report.add(" RDF Parsing error. Possible reason being that multiple tags found in the same file."); + mes1 = " RDF Parsing error. Multiple tags found."; + } else if (code == 500) { Report.add(" Internal Error"); - mes1 = " Internal Error"; + mes1 = " Internal Error"; + } + int num = DataMngr.getServErrorNum(signURL, code); + + if (num > 0) { + if (num < 3) { + DataMngr.updErrCount(signURL, code); + } else { + + String servList = DataMngr.getServListByURL(signURL); + String s[] = servList.split(","); + Report.add("THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "); + Report + .add("THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY."); + String m1 = "THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "; + String m2 = "THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY."; + String msg = m1 + " " + m2; + + Report.doWrite("DELETED SERVICES :"); + for (int i = s.length - 1; i >= 0; i--) { + Report.doWrite(i + ". " + s[i]); + } + DataMngr.delServiceSetByURL(signURL); + DataMngr.delServErrors(signURL); + Report.add("THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "); + Report + .add("THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY"); + Report + .doWrite("======================================================================================="); } - int num = DataMngr.getServErrorNum(signURL,code); - if (num > 0){ - if (num < 3){ - DataMngr.updErrCount(signURL,code); - }else{ - - String servList = DataMngr.getServListByURL(signURL); - String s[] = servList.split(","); - Report.add("THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "); - Report.add("THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY."); - String m1 = "THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "; - String m2 = "THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY."; - String msg = m1+" "+m2; - - Report.doWrite("DELETED SERVICES :"); - for (int i = s.length - 1; i >=0; i --) { - Report.doWrite(i+". "+s[i]); - } - DataMngr.delServiceSetByURL(signURL); - DataMngr.delServErrors(signURL); - Report.add("THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "); - Report.add("THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY"); - Report.doWrite("======================================================================================="); - } - - }else{ - DataMngr.insErrCount(signURL,code); - } - - } - - huc.disconnect(); - } - catch (IOException e) { - Log.severe("Failed : "+e); - Report.add("Error 2: "+e); -// e.getMessage(); - } + } else { + DataMngr.insErrCount(signURL, code); + } + huc.disconnect(); + } catch (IOException e) { + Log.severe("Failed : " + e); + Report.add("Error 2: " + e); + // e.getMessage(); + } + + return model; - return model; - } -/** a SMTP client that allows The SMTP client establishes a connection with an SMTP server - * and waits for the server to respond . The client is then ready to construct a mail - * message. - * (make HTTP connect to server, open a file,read a file into a streem, build a model) - * @param to - where is the target of the e-mail message to be sent. - * @param subj - the subject of this MailMessage. - * @param msgStr - the text data that is to be included in this MailMessage. - * @param from - where is the e-mail address of the message transmitter. - * - */ - - - public static void sendMail(String to,String subj,String msgStr,String from){ - - try { - - Properties prop = new Properties(); - prop.put("mail.smtp.host",Constants.MB_MAIL_SERVER); + /** + * a SMTP client that allows The SMTP client establishes a connection with + * an SMTP server and waits for the server to respond . The client is then + * ready to construct a mail message. (make HTTP connect to server, open a + * file,read a file into a streem, build a model) + * + * @param to - + * where is the target of the e-mail message to be sent. + * @param subj - + * the subject of this MailMessage. + * @param msgStr - + * the text data that is to be included in this MailMessage. + * @param from - + * where is the e-mail address of the message transmitter. + * + */ + + public static void sendMail(String to, String subj, String msgStr, + String from) { + + try { + + Properties prop = new Properties(); + prop.put("mail.smtp.host", Constants.MB_MAIL_SERVER); Session ses = Session.getDefaultInstance(prop, null); - MimeMessage msg = new MimeMessage(ses); - msg.setFrom(new InternetAddress(from)); - msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); - msg.setSubject(subj); - msg.setSentDate(new Date()); - msg.setText(msgStr); - if (Constants.MB_MAIL_PSWD != null){ - Transport transport = ses.getTransport("smtp"); //for usage a password - transport.connect(Constants.MB_MAIL_SERVER,Constants.MB_MAIL_USER,Constants.MB_MAIL_PSWD); - } - Transport.send(msg); - Report.doWrite("The message have been sent to "+to); - } catch (MessagingException e) { -// Log.severe(e.getMessage()+" sendmail"); - e.getMessage(); - } + MimeMessage msg = new MimeMessage(ses); + msg.setFrom(new InternetAddress(from)); + msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); + msg.setSubject(subj); + msg.setSentDate(new Date()); + msg.setText(msgStr); + if (Constants.MB_MAIL_PSWD != null) { + Transport transport = ses.getTransport("smtp"); //for usage a + // password + transport.connect(Constants.MB_MAIL_SERVER, + Constants.MB_MAIL_USER, Constants.MB_MAIL_PSWD); + } + Transport.send(msg); + Report.doWrite("The message have been sent to " + to); + } catch (MessagingException e) { + // Log.severe(e.getMessage()+" sendmail"); + e.getMessage(); + } - } + } - public static String readFromURL(String url){ + public static String readFromURL(String url) { String list = ""; try { - URL u = new URL(url); - - HttpURLConnection huc = (HttpURLConnection) u.openConnection(); - huc.connect(); - - int code = huc.getResponseCode(); - Log.info("GET <"+url+" > - HTTP CODE: "+ code); - Report.doWrite(""); - Report.doWrite("GET SIGNATURE_URL <"+url+" > - HTTP CODE: "+ code); - Report.add("GET SIGNATURE_URL <"+url+" > - HTTP CODE: "+ code); - - if (code == 200 || code == 202 ) { + URL u = new URL(url); - }else { - - } - }catch (IOException e) { - Log.severe("Failed : "+e); - Report.add("Error 2: "+e); -// e.getMessage(); - } + HttpURLConnection huc = (HttpURLConnection) u.openConnection(); + huc.connect(); + + int code = huc.getResponseCode(); + Log.info("GET <" + url + " > - HTTP CODE: " + code); + Report.doWrite(""); + Report.doWrite("GET SIGNATURE_URL <" + url + " > - HTTP CODE: " + + code); + Report.add("GET SIGNATURE_URL <" + url + " > - HTTP CODE: " + + code); + + if (code == 200 || code == 202) { + + } else { + + } + } catch (IOException e) { + Log.severe("Failed : " + e); + Report.add("Error 2: " + e); + // e.getMessage(); + } return list; - } + } + + public static Hashtable readFromFile(String file) { - public static Hashtable readFromFile(String file) { - - Hashtable list = new Hashtable(); + Hashtable list = new Hashtable(); //...checks on aFile are elided -// StringBuffer contents = new StringBuffer(); + // StringBuffer contents = new StringBuffer(); //declared here only to make visible to finally clause BufferedReader input = null; try { - //use buffering - //this implementation reads one line at a time - input = new BufferedReader( new FileReader(file) ); - String line = null; //not declared within while loop - while (( line = input.readLine()) != null){ - list.put(line,""); -// contents.append(line); -// contents.append(System.getProperty("line.separator")); - } - } - catch (FileNotFoundException ex) { - ex.printStackTrace(); - } - catch (IOException ex){ - ex.printStackTrace(); - } - finally { - try { - if (input!= null) { - //flush and close both "input" and its underlying FileReader - input.close(); + //use buffering + //this implementation reads one line at a time + input = new BufferedReader(new FileReader(file)); + String line = null; //not declared within while loop + while ((line = input.readLine()) != null) { + list.put(line, ""); + // contents.append(line); + // contents.append(System.getProperty("line.separator")); } - } - catch (IOException ex) { + } catch (FileNotFoundException ex) { + ex.printStackTrace(); + } catch (IOException ex) { ex.printStackTrace(); - } + } finally { + try { + if (input != null) { + //flush and close both "input" and its underlying + // FileReader + input.close(); + } + } catch (IOException ex) { + ex.printStackTrace(); + } } return list; - } + } -} +} \ No newline at end of file From gss at pub.open-bio.org Thu Jun 16 12:24:15 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Jun 16 11:58:55 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161624.j5GGOFob007461@pub.open-bio.org> gss Thu Jun 16 12:24:15 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting In directory pub.open-bio.org:/tmp/cvs-serv7439/src/org/semanticmoby/meeting Removed Files: MeetingRegistrationServlet.java Log Message: Moved to archive folder moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting MeetingRegistrationServlet.java,1.1,NONE rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting/RCS/MeetingRegistrationServlet.java,v: No such file or directory From gss at pub.open-bio.org Thu Jun 16 12:24:59 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Jun 16 11:59:38 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161624.j5GGOxpb007500@pub.open-bio.org> gss Thu Jun 16 12:24:59 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org In directory pub.open-bio.org:/tmp/cvs-serv7475 Modified Files: .project Log Message: Added dependency on S-MOBY core project moby-live/S-MOBY/ref-impl/semanticmoby.org .project,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project 2005/03/21 21:40:30 1.3 +++ /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project 2005/06/16 16:24:59 1.4 @@ -3,6 +3,7 @@ semanticmoby.org + S-MOBY Core From gss at pub.open-bio.org Thu Jun 16 12:27:30 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Jun 16 12:02:24 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRUtY007557@pub.open-bio.org> gss Thu Jun 16 12:27:30 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private In directory pub.open-bio.org:/tmp/cvs-serv7533/WebRoot/developer/private Log Message: Directory /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private added to the repository moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private - New directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/directory,v: No such file or directory From gss at pub.open-bio.org Thu Jun 16 12:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Jun 16 12:02:25 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRWV5007610@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/developer Modified Files: dev-tools.html Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html 2005/06/16 16:27:32 1.2 @@ -2,8 +2,6 @@ - - Semantic MOBY Developer Tools @@ -12,21 +10,16 @@ cellspacing="0" cellpadding="0"> - + Semantic MOBY Developer Tools
- -

Convert a graph to a different format

- -
+ Paste a graph, select its input format, and press "Convert Graph" - to convert to the other format - + to convert to the other format

Input format:    N3   RDF/XML N-Triples         

- -

        

-
- -

List all statements in the S-MOBY metadata - repository

- -
-           -
- -

Validate an OWL Graph using Jena

- -
- Paste a graph in RDF/XML format and press "Validate" to see what - type of OWL the graph represents - -

- -

-
- -

Validate that a graph is MOBY canonical form

- -
- Paste a graph in RDF/XML format and press "Validate" to see if it - is MOBY canonical form - -

- -

+

        

From gss at pub.open-bio.org Thu Jun 16 12:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Jun 16 12:02:26 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRW6D007625@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/developer/private Added Files: dev-tools.html Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private dev-tools.html,NONE,1.1 From gss at pub.open-bio.org Thu Jun 16 12:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Jun 16 12:02:48 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRWww007591@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/examples/ontologies In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/examples/ontologies Added Files: geneName geneName.n3 FASTASequence sequenceText.n3 sequenceText FASTASequence.n3 Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/examples/ontologies geneName,NONE,1.1 geneName.n3,NONE,1.1 FASTASequence,NONE,1.1 sequenceText.n3,NONE,1.1 sequenceText,NONE,1.1 FASTASequence.n3,NONE,1.1 From kawas at pub.open-bio.org Fri Jun 17 15:25:32 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Fri Jun 17 15:00:18 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506171925.j5HJPWEM014018@pub.open-bio.org> kawas Fri Jun 17 15:25:31 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv13972/org/biomoby/registry/rdfagent/verifier Modified Files: DataMngr.java Log Message: Added the logic that deals with null signature urls (makes one up) Added a line that deletes secondary input information when deleting services (not sure why it was missing). Eddie moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/13 18:17:42 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/17 19:25:31 1.7 @@ -56,9 +56,22 @@ String rdfAddr = rs.getString(2); int authorityID = rs.getInt(3); if (rdfAddr == null) { - //TODO - get the list of service names so that we can + //TODO - make this code more efficient! - maybe perform one sql call instead of many // update the signatureURL field using the service name and authority id - + String bogusSigURL = "http://invalidURL.com/author/"+ authorityID + "/" + servName +".xml"; + String updateSQLString = "UPDATE service_instance " + + "SET signatureURL='"+ bogusSigURL +"' " + + "WHERE authority_id=" + authorityID + " and servicename='" + servName +"'"; + PreparedStatement preparedStatement = null; + try { + Connection updateCon = DBConnector.getConnection(); + preparedStatement = updateCon.prepareStatement(updateSQLString); + int resultSet = preparedStatement.executeUpdate(); + Log.info(resultSet + ": Updated the signatureURL field of the authority with id #" + authorityID + " to be " + bogusSigURL+"."); + } catch (SQLException e) { + Log.severe("Could not update SignatureURL field with a bogus signatureURL.\n" +e.getMessage()); + } + } else { if (rdfAddr.equals(lastAddr)) { servNames.append("," + servName); @@ -618,6 +631,7 @@ // service_instance delRow("simple_input", servInstId); // delete from table simple_input delRow("simple_output", servInstId); // delete from table simple_output + delRow("secondary_input", servInstId); //TODO - should this line be here? delCollectionMember("input", servInstId); delCollectionMember("output", servInstId); delRow("collection_input", servInstId); // delete from table @@ -645,6 +659,7 @@ // service_instance delRow("simple_input", servInstId); // delete from table simple_input delRow("simple_output", servInstId); // delete from table simple_output + delRow("secondary_input", servInstId); //TODO - should this line be here? delCollectionMember("input", servInstId); delCollectionMember("output", servInstId); delRow("collection_input", servInstId); // delete from table @@ -685,6 +700,7 @@ if (rez == 1) { del_serv.addElement(servName); } + delRow("secondary_input", servInstId); //TODO - should this line be here? delRow("simple_input", servInstId); // delete from table // simple_input delRow("simple_output", servInstId); // delete from table From gss at pub.open-bio.org Mon Jun 27 16:39:37 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Mon Jun 27 17:29:27 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506272039.j5RKdbJA004738@pub.open-bio.org> gss Mon Jun 27 16:39:36 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/doc/User In directory pub.open-bio.org:/tmp/cvs-serv4714/User Log Message: Directory /home/repository/moby/moby-live/S-MOBY/doc/User added to the repository moby-live/S-MOBY/doc/User - New directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/directory,v: No such file or directory From gss at pub.open-bio.org Mon Jun 27 16:40:27 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Mon Jun 27 17:30:15 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506272040.j5RKeR4M004783@pub.open-bio.org> gss Mon Jun 27 16:40:27 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/doc/User In directory pub.open-bio.org:/tmp/cvs-serv4762/S-MOBY/doc/User Added Files: devguide.doc Log Message: Initial draft; still needs Service Consumer section moby-live/S-MOBY/doc/User devguide.doc,NONE,1.1 From mwilkinson at pub.open-bio.org Wed Jun 29 12:58:33 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Jun 29 13:48:21 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291658.j5TGwXVu011963@pub.open-bio.org> mwilkinson Wed Jun 29 12:58:33 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools In directory pub.open-bio.org:/tmp/cvs-serv11945/Service_Creation_Tools Log Message: Directory /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools added to the repository moby-live/Perl/Accessories/Service_Creation_Tools - New directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/directory,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 13:00:48 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Jun 29 13:50:24 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291700.j5TH0mos012013@pub.open-bio.org> mwilkinson Wed Jun 29 13:00:48 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance In directory pub.open-bio.org:/tmp/cvs-serv11995/Namespace_Maintenance Log Message: Directory /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance added to the repository moby-live/Perl/Accessories/Namespace_Maintenance - New directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/directory,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 13:02:24 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Jun 29 13:52:06 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291702.j5TH2O0i012106@pub.open-bio.org> mwilkinson Wed Jun 29 13:02:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories In directory pub.open-bio.org:/tmp/cvs-serv12088 Removed Files: frame.cgi namespaceframe.cgi searchframe.cgi Log Message: shuffling files to keep things clean moby-live/Perl/Accessories frame.cgi,1.1,NONE namespaceframe.cgi,1.1,NONE searchframe.cgi,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/frame.cgi,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/namespaceframe.cgi,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/searchframe.cgi,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 13:02:24 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Jun 29 13:52:24 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291702.j5TH2OsP012121@pub.open-bio.org> mwilkinson Wed Jun 29 13:02:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance In directory pub.open-bio.org:/tmp/cvs-serv12088/Namespace_Maintenance Added Files: frame.cgi namespaceframe.cgi searchframe.cgi Log Message: shuffling files to keep things clean moby-live/Perl/Accessories/Namespace_Maintenance frame.cgi,NONE,1.1 namespaceframe.cgi,NONE,1.1 searchframe.cgi,NONE,1.1 From mwilkinson at pub.open-bio.org Wed Jun 29 13:30:30 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Jun 29 14:21:17 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291730.j5THUUjm012336@pub.open-bio.org> mwilkinson Wed Jun 29 13:30:30 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools In directory pub.open-bio.org:/tmp/cvs-serv12321 Added Files: CodeGenerator.pm code-generator0.6.cgi codebook.xml dispatcher.cgi help.cgi Log Message: adding Clarence and Michaels code to the repository moby-live/Perl/Accessories/Service_Creation_Tools CodeGenerator.pm,NONE,1.1 code-generator0.6.cgi,NONE,1.1 codebook.xml,NONE,1.1 dispatcher.cgi,NONE,1.1 help.cgi,NONE,1.1 From yanwong at pub.open-bio.org Thu Jun 9 03:55:20 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Mon Jul 25 20:36:58 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598JkBS026946@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv26869/bioMoby Modified Files: __init__.py mobyClient.py mobyDataTypes.py mobyExceptions.py mobyMarshal.py mobyRegister.py mobyService.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python/bioMoby __init__.py,1.2,1.3 mobyClient.py,1.5,1.6 mobyDataTypes.py,1.23,1.24 mobyExceptions.py,1.4,1.5 mobyMarshal.py,1.8,1.9 mobyRegister.py,1.5,1.6 mobyService.py,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Python/bioMoby/__init__.py 2005/01/18 13:46:22 1.2 +++ /home/repository/moby/moby-live/Python/bioMoby/__init__.py 2005/06/09 08:19:46 1.3 @@ -11,3 +11,6 @@ from mobyMarshal import * from webservice import * from ontology import * + +__VERSION__ = "0.9p2" +__MOBY_API_VERSION__ = "0.8" =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py 2005/06/09 08:19:46 1.6 @@ -2,7 +2,7 @@ """ """ - Date: 13th of April 2004 + Creation date: 13th of April 2004 Author: Wong Yan The Client class inherits from Central class @@ -22,10 +22,10 @@ from SOAPpy import SOAPProxy self.server=SOAPProxy(self.url, namespace=self.ns) - - if debug: - self.server.config.debug=1 - + + if debug: + self.server.config.debug=1 + del SOAPProxy @@ -68,28 +68,28 @@ def retrieveObjectDefinition(self, objectName): """Retrieves a list of object's definitions """ - dc={"urn:lsid:biomoby.org:objectrelation:isa":"ISA", - "urn:lsid:biomoby.org:objectrelation:hasa":"HASA", - "urn:lsid:biomoby.org:objectrelation:has":"HAS" - } + dc={"urn:lsid:biomoby.org:objectrelation:isa":"ISA", + "urn:lsid:biomoby.org:objectrelation:hasa":"HASA", + "urn:lsid:biomoby.org:objectrelation:has":"HAS" + } - definition={} - definition["Relationship"]={} + definition={} + definition["Relationship"]={} xmlinput=""+objectName+"" doc=parseString(self.call_method("retrieveObjectDefinition", xmlinput)) - - for child in doc.firstChild.childNodes: - if child.nodeType==child.ELEMENT_NODE and child.nodeName=="Relationship": - definition["Relationship"][dc[child.getAttribute("relationshipType")]]=[] - for elem in child.childNodes: - if elem.nodeType==elem.ELEMENT_NODE and elem.nodeName=="objectType" and elem.firstChild: - definition["Relationship"][dc[child.getAttribute("relationshipType")]].append((elem.getAttribute("articleName"), elem.firstChild.nodeValue)) - - elif child.nodeType==child.ELEMENT_NODE: - if child.firstChild: - definition[str(child.nodeName)]=child.firstChild.nodeValue - + + for child in doc.firstChild.childNodes: + if child.nodeType==child.ELEMENT_NODE and child.nodeName=="Relationship": + definition["Relationship"][dc[child.getAttribute("relationshipType")]]=[] + for elem in child.childNodes: + if elem.nodeType==elem.ELEMENT_NODE and elem.nodeName=="objectType" and elem.firstChild: + definition["Relationship"][dc[child.getAttribute("relationshipType")]].append((elem.getAttribute("articleName"), elem.firstChild.nodeValue)) + + elif child.nodeType==child.ELEMENT_NODE: + if child.firstChild: + definition[str(child.nodeName)]=child.firstChild.nodeValue + return definition def retrieveObjectSchema(self, objectName): @@ -260,6 +260,6 @@ raise ETypeMismatch def __init__(self, url="http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY05/mobycentral.pl", ns="http://mobycentral.cbr.nrc.ca/MOBY/Central"): - """Constructor for class Client - """ + """Constructor for class Client + """ Central.__init__(self, url, ns) =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/05/20 07:35:23 1.23 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/06/09 08:19:46 1.24 @@ -1,7 +1,8 @@ """Generic bioMoby data types """ -""" Date: 15th of April 2004 +""" Creation date: 15th of April 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan predefined data types: -object @@ -13,11 +14,21 @@ -MobyContent 12/13/2004: added some methods to manipulate MobyContent objects - 01/17/2005: serialization of public attributes for bioMoby objects + 01/17/2005: serialization of public attributes for bioMoby objects + 06/09/2005: changed the namespace of the message from + http://biomoby.org/moby to http://biomoby.org/moby-s + corrected a problem that prevent the Unmarshaller from + correctly unmarshall things without prefix: + + Parse of unicode string + added a constant: __MOBYNAMESPACEURI__ """ __ATTRIBUTES__=['namespace', 'id', 'articleName'] +__MOBYNAMESPACEURI__ = "http://www.biomoby.org/moby-s" + + from xml.dom.minidom import parseString class Parameter(object): @@ -26,7 +37,7 @@ def __init__(self, articleName="", value=""): self.articleName=articleName self.value=value - self.__isSecondary__=True + self.__isSecondary__=True def toMoby(self): """Returns the object as a XML @@ -34,199 +45,199 @@ return ""+str(self.value)+"" def __str__(self): - """Return the Parameter in its XML form - """ + """Return the Parameter in its XML form + """ return self.toMoby() def __repr__(self): - """Print the XML on the python command line. - """ + """Print the XML on the python command line. + """ return self.toMoby() def fromMoby(self, xml): """Get the attributes from a XML string """ - xmlelt=xml - - if isinstance(xml, str): - xmlelt=parseString(xml).firstChild - + xmlelt=xml + + if isinstance(xml, str) or isinstance(xml, unicode): + xmlelt=parseString(xml).firstChild + self.articleName=xmlelt.getAttribute('moby:articleName') - l=xmlelt.getElementsByTagName("Value") - if len(l)==0: - l=xmlelt.getElementsByTagName("moby:Value") + l=xmlelt.getElementsByTagName("Value") + if len(l)==0: + l=xmlelt.getElementsByTagName("moby:Value") - self.value=l[0].firstChild.nodeValue - + self.value=l[0].firstChild.nodeValue + class MobyGeneric(object): """A Generic object (to use with the Marshaller) """ def __init__(self, namespace="", id="", articleName="", *args, **kw): - """Class constructor, basic attributes are namespace, - identifier and the article's name - """ - self.namespace=namespace - self.id=id - self.articleName=articleName - - for name, value in kw.items(): + """Class constructor, basic attributes are namespace, + identifier and the article's name + """ + self.namespace=namespace + self.id=id + self.articleName=articleName + + for name, value in kw.items(): setattr(self, name, value) - + class MobyObject(MobyGeneric): """Define a Moby XML Object It has methods toMoby and fromMoby """ def __init__(self, prefix="moby", tag="Object", content="", *args, **kw): - """Class constructor for a bioMoby Object - """ - MobyGeneric.__init__(self, *args, **kw) - self.__prefix__=prefix - self.__tag__=tag - self.__cross__=[] - self.__PIB__=[] - - self.content=content - - + """Class constructor for a bioMoby Object + """ + MobyGeneric.__init__(self, *args, **kw) + self.__prefix__=prefix + self.__tag__=tag + self.__cross__=[] + self.__PIB__=[] + + self.content=content + + def toMoby(self): - """Deserializes the content in XML api - """ - - beginTag=["<%s:%s"%(self.__prefix__,self.__tag__)] - - #First see if the object has an identifier, a namepsace and a name - for attribute in __ATTRIBUTES__: - if hasattr(self, attribute) and getattr(self, attribute): - beginTag.append("%s:%s=\"%s\""%(self.__prefix__, attribute, getattr(self,attribute))) - - #Retrieve only object's attributes that are public. - filterFunc=lambda x: x[0] != "_" and not callable(getattr(self, x)) and x !="content" and x not in __ATTRIBUTES__ - - #Retrieve the associated objects - #In MobyObject, associated objects are object's attributes - mobyObjects=filter(filterFunc, dir(self)) - - #If none, return the tag closed - if len(mobyObjects)==0 and (not hasattr(self, "__cross__") or len(self.__cross__)==0) and (not hasattr(self, "__PIB__") or len(self.__PIB__)==0) and (not hasattr(self, "content") or (self.content==None or self.content=="")): - beginTag.append("/>") - return " ".join(beginTag) + """Deserializes the content in XML api + """ + + beginTag=["<%s:%s"%(self.__prefix__,self.__tag__)] + + #First see if the object has an identifier, a namepsace and a name + for attribute in __ATTRIBUTES__: + if hasattr(self, attribute) and getattr(self, attribute): + beginTag.append("%s:%s=\"%s\""%(self.__prefix__, attribute, getattr(self,attribute))) - #Else, end begin tag and serialize the associated objects + #Retrieve only object's attributes that are public. + filterFunc=lambda x: x[0] != "_" and not callable(getattr(self, x)) and x !="content" and x not in __ATTRIBUTES__ + + #Retrieve the associated objects + #In MobyObject, associated objects are object's attributes + mobyObjects=filter(filterFunc, dir(self)) + + #If none, return the tag closed + if len(mobyObjects)==0 and (not hasattr(self, "__cross__") or len(self.__cross__)==0) and (not hasattr(self, "__PIB__") or len(self.__PIB__)==0) and (not hasattr(self, "content") or (self.content==None or self.content=="")): + beginTag.append("/>") + return " ".join(beginTag) + + #Else, end begin tag and serialize the associated objects beginTag.append(">") - result=[" ".join(beginTag)] - - #Serialize Cross references - if hasattr(self, "__cross__") and self.__cross__: - result.append("") - - for aCross in self.__cross__: - result.append(aCross.toMoby()) - - result.append("") - + result=[" ".join(beginTag)] + + #Serialize Cross references + if hasattr(self, "__cross__") and self.__cross__: + result.append("") + + for aCross in self.__cross__: + result.append(aCross.toMoby()) + + result.append("") + #Serialize PIB - if hasattr(self, "__PIB__") and self.__PIB__: - result.append("") - - for aPIB in self.__PIB__: - result.append(str(aPIB)) - - result.append("") - - #Serialize the other attibutes - #If the attributes has a toMoby method, then use it - #Else, use a MobyMarshaller object to serialize - for mobyObject in mobyObjects: - if hasattr(getattr(self,mobyObject), "toMoby"): + if hasattr(self, "__PIB__") and self.__PIB__: + result.append("") + + for aPIB in self.__PIB__: + result.append(str(aPIB)) + + result.append("") + + #Serialize the other attibutes + #If the attributes has a toMoby method, then use it + #Else, use a MobyMarshaller object to serialize + for mobyObject in mobyObjects: + if hasattr(getattr(self,mobyObject), "toMoby"): getattr(self, mobyObject).__articleName__=mobyObject result.append(getattr(self, mobyObject).toMoby()) - else: - from bioMoby import MobyMarshaller - m=MobyMarshaller() - result.append(m.dumps(getattr(self, mobyObject), articleName=mobyObject)) - - #Put the raw content of the object - #If you want to put your special object, then then you should write - #a __str__ method + else: + from bioMoby import MobyMarshaller + m=MobyMarshaller() + result.append(m.dumps(getattr(self, mobyObject), articleName=mobyObject)) + + #Put the raw content of the object + #If you want to put your special object, then then you should write + #a __str__ method if hasattr(self, "content"): result.append("%s"%(self.content)) - - result.append(""%(self.__prefix__, self.__tag__)) - - return "".join(result) - + + result.append(""%(self.__prefix__, self.__tag__)) + + return "".join(result) + def fromMoby(self, xml): - """Deserialization method - """ - elem=xml - - if isinstance(xml, str): - doc=parseString(xml) - - elem=doc.firstChild - - self.__tag__=elem.localName - - self.__prefix__="moby" - - self.content=[] - - if elem.nodeName.split(":")>1: - self.__prefix__=elem.nodeName.split(":")[0] - - #Set the object's attributes - for attribute in elem.attributes.values(): - setattr(self, attribute.localName, str(attribute.nodeValue)) - - for child in elem.childNodes: - if child.nodeType==child.ELEMENT_NODE: - #deserializes the cross references - if child.localName=="CrossReference": - for aCross in child.childNodes: - if aCross.localName=="Xref": - aXref=MobyXref() - aXref.fromMoby(aCross) - self.__cross__.append(aXref) - if aCross.localName=="Object": - anObj=MobyObject() - anObj.fromMoby(aCross) - self.__cross__.append(anObj) - else: - #Do the same for the other objects - associatedObjectName=child.getAttribute("moby:articleName") - - if not associatedObjectName: - associatedObjectName=child.getAttribute("articleName") - - if not associatedObjectName: - associatedObjectName="associated" - - #Create an object - o=MobyObject() - o.fromMoby(child) - - #if there is already an object, then store it inside a list and - #append the other objects in the list - if hasattr(self, associatedObjectName): - if type(getattr(self, associatedObjectName)) is list: - getattr(self, associatedObjectName).append(o) - else: - setattr(self, associatedObjectName, [o]) - else: + """Deserialization method + """ + elem=xml + + if isinstance(xml, str) or isinstance(xml, unicode): + doc=parseString(xml) + + elem=doc.firstChild + + self.__tag__=elem.localName + + self.__prefix__="moby" + + self.content=[] + + if len(elem.nodeName.split(":"))>1: + self.__prefix__=elem.nodeName.split(":")[0] + + #Set the object's attributes + for attribute in elem.attributes.values(): + setattr(self, attribute.localName, str(attribute.nodeValue)) + + for child in elem.childNodes: + if child.nodeType==child.ELEMENT_NODE: + #deserializes the cross references + if child.localName=="CrossReference": + for aCross in child.childNodes: + if aCross.localName=="Xref": + aXref=MobyXref() + aXref.fromMoby(aCross) + self.__cross__.append(aXref) + if aCross.localName=="Object": + anObj=MobyObject() + anObj.fromMoby(aCross) + self.__cross__.append(anObj) + else: + #Do the same for the other objects + associatedObjectName=child.getAttribute("moby:articleName") + + if not associatedObjectName: + associatedObjectName=child.getAttribute("articleName") + + if not associatedObjectName: + associatedObjectName="associated" + + #Create an object + o=MobyObject() + o.fromMoby(child) + + #if there is already an object, then store it inside a list and + #append the other objects in the list + if hasattr(self, associatedObjectName): + if type(getattr(self, associatedObjectName)) is list: + getattr(self, associatedObjectName).append(o) + else: + setattr(self, associatedObjectName, [o]) + else: setattr(self, associatedObjectName, o) else: - self.content.append(child.nodeValue) - - self.content="".join(self.content) - + self.content.append(child.nodeValue) + + self.content="".join(self.content) + def __str__(self): - return self.toMoby() - + return self.toMoby() + def __repr__(self): - return self.toMoby() - + return self.toMoby() + class MobyXref(MobyObject): """Describes an Xref @@ -246,56 +257,56 @@ def fromMoby(self, xml): """Deserialize the Xref Object """ - if isinstance(xml, str): - doc=parseString(xml).firstChild - - doc=xml - + if isinstance(xml, str) or isinstance(xml, unicode): + doc=parseString(xml).firstChild + + doc=xml + uri=doc.namespaceURI - MobyObject.fromMoby(self, doc) + MobyObject.fromMoby(self, doc) self.authURI=doc.getAttributeNS(uri, "authURI") self.serviceName=doc.getAttributeNS(uri, "serviceName") self.evidenceCode=doc.getAttributeNS(uri, "evidenceCode") self.xrefType=doc.getAttributeNS(uri, "xrefType") - + class MobyInteger(MobyObject): """Use this object to serialize/deserialize integers """ def __init__(self, value=0, *args, **kw): - MobyObject.__init__(self, content=value, tag="Integer", *args, **kw) + MobyObject.__init__(self, content=value, tag="Integer", *args, **kw) def fromMoby(self, xml): - MobyObject.fromMoby(self, xml) - + MobyObject.fromMoby(self, xml) + try: - self.content = int(self.content) + self.content = int(self.content) except: self.content=0 - + class MobyFloat(MobyObject): """Serialize/deserialize floating point numbers """ def __init__(self, value=0, *args, **kw): - MobyObject.__init__(self, content=value, tag="Float", *args, **kw) - + MobyObject.__init__(self, content=value, tag="Float", *args, **kw) + def fromMoby(self, xml): - MobyObject.fromMoby(self, xml) - + MobyObject.fromMoby(self, xml) + try: - self.content=float(self.content) + self.content=float(self.content) except: - self.content=0.0 - + self.content=0.0 + class MobyString(MobyObject): """String Moby object """ def __init__(self, content="", *args, **kw): - MobyObject.__init__(self, content=content, *args, **kw) - self.__tag__="String" + MobyObject.__init__(self, content=content, *args, **kw) + self.__tag__="String" class MobyContent: """The class describes a Moby Content (for queries or answers) @@ -313,17 +324,17 @@ self.queryData=queryData def __str__(self): - """return the XML form of the Moby Content object - """ - return self.toMoby() - + """return the XML form of the Moby Content object + """ + return self.toMoby() + def toMoby(self): """The XML reprentation of the content """ from mobyMarshal import MobyMarshaller m=MobyMarshaller() - result=['") - #For serialization, use the MobyMarshaller object - + #For serialization, use the MobyMarshaller object + for queryObject in self.queryData[queryKey]: #if the Collection ('CollectionName',[MobyObjects]) if queryObject.__class__ is tuple: @@ -363,19 +374,19 @@ return "".join(result) def fromMoby(self, xmlObject): - """fill the properties from an XML + """fill the properties from an XML """ from bioMoby import MobyUnmarshaller - - um=MobyUnmarshaller() + + um=MobyUnmarshaller() self.queryData={} - - doc=xmlObject - - if isinstance(xmlObject, str): - doc=parseString(xmlObject) - + + doc=xmlObject + + if isinstance(xmlObject, str) or isinstance(xmlObject, unicode): + doc=parseString(xmlObject) + mdl=doc.getElementsByTagName('mobyData') if not mdl: @@ -384,115 +395,115 @@ #For each query for elt in mdl: #Get the ID - queryID=str(elt.getAttribute('queryID')) + queryID=str(elt.getAttribute('queryID')) if not queryID: queryID=str(elt.getAttribute('moby:queryID')) - #Collect the data + #Collect the data data=[] - #for each datum translate it in MobyObject, and put it in the list + #for each datum translate it in MobyObject, and put it in the list for datum in elt.childNodes: - #If it is a collection + #If it is a collection if datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Collection": - articleName=datum.getAttribute('moby:articleName') + articleName=datum.getAttribute('moby:articleName') articles=[] for article in datum.childNodes: if article.nodeType==article.ELEMENT_NODE and article.localName=="Simple": - for child in article.childNodes: - if child.nodeType==child.ELEMENT_NODE: + for child in article.childNodes: + if child.nodeType==child.ELEMENT_NODE: articles.append(um.loadn(child)) data.append((articleName, articles)) - #if it is a Simple object + #if it is a Simple object elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Simple": - for elt in datum.childNodes: + for elt in datum.childNodes: if elt.nodeType==elt.ELEMENT_NODE: - o=um.loadn(elt) - data.append(o) - elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Parameter": - #It is a Parameter - p=Parameter() - p.fromMoby(datum) - data.append(p) + o=um.loadn(elt) + data.append(o) + elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Parameter": + #It is a Parameter + p=Parameter() + p.fromMoby(datum) + data.append(p) self.queryData[queryID]=data - + def __getitem__(self, key): - """Get a query from his name + """Get a query from his name """ return self.queryData[key] def __setitem__(self, key, item): - """Store a query in the dictionary - """ + """Store a query in the dictionary + """ self.queryData[key]=item def __len__(self): - """Return the number of elements inside the dictionary - """ + """Return the number of elements inside the dictionary + """ return len(self.queryData) def keys(self): - """Return all queries's name - """ + """Return all queries's name + """ return self.queryData.keys() - + def collectionToQueries(self, aCollection): - """Turn a collection of object into a set of queries - """ - queries={} - queryName=aCollection[0] - - queryID=1 - - for aSimple in aCollection[1]: - queries["%s-%s"%(queryName, queryID)]=aSimple - - return queries - - + """Turn a collection of object into a set of queries + """ + queries={} + queryName=aCollection[0] + + queryID=1 + + for aSimple in aCollection[1]: + queries["%s-%s"%(queryName, queryID)]=aSimple + + return queries + + def getObject(self, queryName, objectName): - """Get an object from a query with its name - """ - filterfunc=lambda obj: not hasattr(obj,'__isSecondary__') and hasattr(obj, "articleName") and obj.articleName==objectName - - for obj in filter(filterfunc, self.queryData[queryName]): + """Get an object from a query with its name + """ + filterfunc=lambda obj: not hasattr(obj,'__isSecondary__') and hasattr(obj, "articleName") and obj.articleName==objectName + + for obj in filter(filterfunc, self.queryData[queryName]): return obj - + def getObjects(self, queryName): - """Retrieve objects from a query - """ - filterfunc=lambda obj: not hasattr(obj, "__isSecondary__") - - return filter(filterfunc, self.queryData[queryName]) - + """Retrieve objects from a query + """ + filterfunc=lambda obj: not hasattr(obj, "__isSecondary__") + + return filter(filterfunc, self.queryData[queryName]) + def getParameters(self, queryName): - """Retrieve parameters from a query - """ - filterfunc=lambda param: hasattr(param, "__isSecondary__") - - result={} - for param in filter(filterfunc, self.queryData[queryName]): - result[param.articleName]=param.value - - return result + """Retrieve parameters from a query + """ + filterfunc=lambda param: hasattr(param, "__isSecondary__") + + result={} + for param in filter(filterfunc, self.queryData[queryName]): + result[param.articleName]=param.value + + return result def getParameter(self, queryName, parameterName): - """Retrieve a parameter from a query and his name - """ - filterfunc=lambda param: hasattr(param, "__isSecondary__") and hasattr(param, "articleName") and param.articleName==parameterName - - l=filter(filterfunc, self.queryData[queryName]) - - if l: - return l[0] - + """Retrieve a parameter from a query and his name + """ + filterfunc=lambda param: hasattr(param, "__isSecondary__") and hasattr(param, "articleName") and param.articleName==parameterName + + l=filter(filterfunc, self.queryData[queryName]) + + if l: + return l[0] + def __repr__(self): - """put the xml of the Content - """ - return self.__str__() + """put the xml of the Content + """ + return self.__str__() =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py 2005/04/19 15:41:50 1.4 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py 2005/06/09 08:19:46 1.5 @@ -1,7 +1,7 @@ """bioMoby exceptions """ -"""Date: 15th of April 2004 +"""Creation Date: 15th of April 2004 Author: Wong Yan bioMoby exceptions @@ -41,4 +41,4 @@ """A XML input is not a Moby XML Object. """ def __str__(self): - return "The bioMoby XML object couldn't be parsed" \ No newline at end of file + return "The bioMoby XML object couldn't be parsed" =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/04/19 15:41:50 1.8 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/09 08:19:46 1.9 @@ -2,7 +2,8 @@ """ -""" Date 19th of May 2004 +""" Creation date 19th of May 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan Topic: Marshalling moby Objects @@ -10,7 +11,10 @@ 01/17/2005: MobyMarshaller and MobyUnmarshaller can operate on all objects serialisation and deserialisation are done only on public (no _ prefix) non callable attributes - The serialisation and deserialisation is recursive. + The serialisation and deserialisation is recursive. + 06/09/2005: Change the doc.getElementsByTagNameNS("http://biomoby.org/moby",'mobyContent') to + doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') Parsing is now + independant from the namespace. """ from xml.dom.minidom import parseString @@ -20,8 +24,8 @@ """ def _marshal(self, value, articleName=""): - """this method do the serialization of the object - """ + """this method do the serialization of the object + """ if type(value).__name__=='NoneType': return "" @@ -29,9 +33,9 @@ method="m_"+tvalue - if hasattr(value, "toMoby"): - return value.toMoby() - + if hasattr(value, "toMoby"): + return value.toMoby() + if hasattr(self, method): return getattr(self,method)(value,articleName=articleName) @@ -46,8 +50,8 @@ return str(m) def m_unicode(self, value, articleName=""): - """Turn a unicode string into a mobyString object - """ + """Turn a unicode string into a mobyString object + """ return self.m_str(str(value), articleName) def m_string(self, value, articleName=""): @@ -59,18 +63,18 @@ """Turn an integer into a Moby XML object """ from bioMoby.mobyDataTypes import MobyInteger - m=MobyInteger(value, namespace=namespace, id=id, articleName=articleName) - - return m.toMoby() - + m=MobyInteger(value, namespace=namespace, id=id, articleName=articleName) + + return m.toMoby() + def m_float(self, value, namespace="", id="", articleName=""): """Turn a float into a Moby XML object """ from bioMoby.mobyDataTypes import MobyFloat - m=MobyFloat(value, namespace=namespace, id=id, articleName=articleName) - - return m.toMoby() - + m=MobyFloat(value, namespace=namespace, id=id, articleName=articleName) + + return m.toMoby() + def m_list(self, value, articleName=""): """Turn a list into a Moby XML object """ @@ -113,50 +117,50 @@ def _compoundObject(self, value, articleName=""): """transforms an object and all properties into a XML """ - - result=[] - - properties=[] - - filterfunc=lambda x: x[0] != "_" and not callable(getattr(value, x)) and x !="content" and x not in ["id", "namespace", "articleName", "content"] - attribfunc= lambda x: hasattr(value, x) - - tagName="moby:%s"%type(value).__name__ - - if hasattr(value, "__tag__") and value.__tag__: - tagName="moby:%s"%value.__tag__ - - header=["<%s"%tagName] - - for attribute in filter(attribfunc, ["id", "namespace", "articleName"]): - header.append("moby:%s=\"%s\""%(attribute,getattr(value,attribute))) - - for prop in filter(filterfunc, dir(value)): - properties.append(self._marshal(getattr(value, prop), articleName=prop)) - - if not properties and not (hasattr(value, "content") and value.content): - header.append("/>") - else: - header.append(">") - - result.append(" ".join(header)) - - if properties: - result.append("".join(properties)) - - if hasattr(value, "content") and value.content: - result.append(""%value.content) - - if properties: - result.append(""%tagName) - - - return r"".join(result) - - + + result=[] + + properties=[] + + filterfunc=lambda x: x[0] != "_" and not callable(getattr(value, x)) and x !="content" and x not in ["id", "namespace", "articleName", "content"] + attribfunc= lambda x: hasattr(value, x) + + tagName="moby:%s"%type(value).__name__ + + if hasattr(value, "__tag__") and value.__tag__: + tagName="moby:%s"%value.__tag__ + + header=["<%s"%tagName] + + for attribute in filter(attribfunc, ["id", "namespace", "articleName"]): + header.append("moby:%s=\"%s\""%(attribute,getattr(value,attribute))) + + for prop in filter(filterfunc, dir(value)): + properties.append(self._marshal(getattr(value, prop), articleName=prop)) + + if not properties and not (hasattr(value, "content") and value.content): + header.append("/>") + else: + header.append(">") + + result.append(" ".join(header)) + + if properties: + result.append("".join(properties)) + + if hasattr(value, "content") and value.content: + result.append(""%value.content) + + if properties: + result.append(""%tagName) + + + return r"".join(result) + + def dumps(self, value, articleName=""): - """Serialize the object into a Moby XML object - """ + """Serialize the object into a Moby XML object + """ return self._marshal(value, articleName) @@ -169,8 +173,8 @@ """ import re - aName=str(aName) - + aName=str(aName) + if aName=="": return "" @@ -189,163 +193,215 @@ return "".join(t) def loadn(self, xmlNode): - """Deserializes an XML node and return a Python Object - """ - import bioMoby.mobyDataTypes - import bioMoby.ontology - - nn=xmlNode.localName - + """Deserializes an XML node and return a Python Object + """ + import bioMoby.mobyDataTypes + import bioMoby.ontology + + nn=xmlNode.localName + #Try to see if this object got a deserializer object2build=self._cleanName(nn) objectName=str.upper(object2build[0])+object2build[1:] - - if hasattr(bioMoby.mobyDataTypes, "Moby%s"%objectName): - o=getattr(bioMoby.mobyDataTypes, "Moby%s"%objectName)() - if hasattr(o, "fromMoby"): - o.fromMoby(xmlNode) - return o - elif hasattr(bioMoby.ontology, "Moby%s"%objectName): - o=getattr(bioMoby.ontology, "Moby%s"%objectName)() - if hasattr(o, "fromMoby"): - o.fromMoby(xmlNode) - return o - + + if hasattr(bioMoby.mobyDataTypes, "Moby%s"%objectName): + o=getattr(bioMoby.mobyDataTypes, "Moby%s"%objectName)() + if hasattr(o, "fromMoby"): + o.fromMoby(xmlNode) + return o + elif hasattr(bioMoby.ontology, "Moby%s"%objectName): + o=getattr(bioMoby.ontology, "Moby%s"%objectName)() + if hasattr(o, "fromMoby"): + o.fromMoby(xmlNode) + return o + methodName=str('m_'+nn) - - if not hasattr(self, methodName): + + if not hasattr(self, methodName): methodName="m_Object" - -# try: + +# try: return getattr(self,methodName)(xmlNode) # except: -# #if not, Raise an invalid moby XML :-( -# from bioMoby.mobyExceptions import EInvalidMobyXML - +# #if not, Raise an invalid moby XML :-( +# from bioMoby.mobyExceptions import EInvalidMobyXML + # raise EInvalidMobyXML - + def loads(self, xmlString): - """ Deserializes an xml string and return a bioMoby-Python object - """ + """ Deserializes an xml string and return a bioMoby-Python object + """ if xmlString=="": return None -# _typesmodule=["bioMoby.mobyDataTypes", "bioMoby.ontology"] - +# _typesmodule=["bioMoby.mobyDataTypes", "bioMoby.ontology"] + doc=parseString(xmlString) - mcl=doc.getElementsByTagNameNS('http://www.biomoby.org/moby','mobyContent') + mcl=doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') if len(mcl)!=0: return self.m_MobyContent(doc) element=doc.firstChild - return self.loadn(element) + return self.loadn(element) def m_Integer(self, value): - """Turn a Integer XML element into an integer - """ - value.normalize() - - if value.firstChild: - return int(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) - else: - return 0 - + """Turn a Integer XML element into an integer + """ + value.normalize() + + if value.firstChild: + return int(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) + else: + return 0 + def m_Float(self, value): - """Turn a Float XML element into a float number - """ - value.normalize() - if value.firstChild: - return float(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) + """Turn a Float XML element into a float number + """ + value.normalize() + if value.firstChild: + return float(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) return 0.0 - + def m_String(self, value): - """Turn a Moby XML String element into a String object - """ - - cnt=[] - value.normalize() - - for aChild in value.childNodes: - if aChild.nodeType==aChild.TEXT_NODE or aChild.nodeType==aChild.CDATA_SECTION_NODE: - cnt.append(aChild.wholeText) - - return r"".join(cnt) - + """Turn a Moby XML String element into a String object + """ + + cnt=[] + value.normalize() + + for aChild in value.childNodes: + if aChild.nodeType==aChild.TEXT_NODE or aChild.nodeType==aChild.CDATA_SECTION_NODE: + cnt.append(aChild.wholeText) + + return r"".join(cnt) + def m_Object(self, value): - """Turn any XML into a generic object - """ - filterFunc= lambda x: x.nodeType==x.ELEMENT_NODE - - typeName="GMoby%s"%str(value.localName) - - from bioMoby.mobyDataTypes import MobyGeneric - - NewType=type(typeName, (MobyGeneric,), {}) - - anObject=NewType() - - anObject.__prefix__="moby" - anObject.__tag__=str(value.localName) - - for tupleAttribute in value.attributes.itemsNS(): - #First item, second field: - setattr(anObject, str(tupleAttribute[0][1]), str(tupleAttribute[1])) - - i=0 - for elem in filter(filterFunc, value.childNodes): - methodName="m_%s"%str(elem.localName) - - articleName=elem.getAttribute("moby:articleName") - - if not articleName: - articleName=elem.getAttribute("articleName") - - if not articleName: - articleName="attribute_%s"%i - - if hasattr(self, methodName): - prop=getattr(self, methodName)(elem) - else: - prop=self.m_Object(elem) - - if hasattr(anObject, articleName): - t=prop - if not type(getattr(anObject, articleName)) is list: - t=getattr(anObject, articleName) - setattr(anObject, articleName, []) - getattr(anObject, articleName).append(t) - else: - setattr(anObject, articleName, prop) - i+=1 - - content=[] - - isContentNode= lambda x: x.nodeType==x.TEXT_NODE or x.nodeType==x.CDATA_SECTION_NODE - - for elem in filter(isContentNode, value.childNodes): - content.append(str(elem.nodeValue)) - - if content: - anObject.content(r"".join(content)) - - return anObject + """Turn any XML into a generic object + """ + filterFunc= lambda x: x.nodeType==x.ELEMENT_NODE + + typeName="GMoby%s"%str(value.localName) + + from bioMoby.mobyDataTypes import MobyGeneric + + NewType=type(typeName, (MobyGeneric,), {}) + + anObject=NewType() + + anObject.__prefix__="moby" + anObject.__tag__=str(value.localName) + + for tupleAttribute in value.attributes.itemsNS(): + #First item, second field: + setattr(anObject, str(tupleAttribute[0][1]), str(tupleAttribute[1])) + + i=0 + for elem in filter(filterFunc, value.childNodes): + methodName="m_%s"%str(elem.localName) + + articleName=elem.getAttribute("moby:articleName") + + if not articleName: + articleName=elem.getAttribute("articleName") + + if not articleName: + articleName="attribute_%s"%i + + if hasattr(self, methodName): + prop=getattr(self, methodName)(elem) + else: + prop=self.m_Object(elem) + + if hasattr(anObject, articleName): + t=prop + if not type(getattr(anObject, articleName)) is list: + t=getattr(anObject, articleName) + setattr(anObject, articleName, []) + getattr(anObject, articleName).append(t) + else: + setattr(anObject, articleName, prop) + i+=1 + + content=[] + + isContentNode= lambda x: x.nodeType==x.TEXT_NODE or x.nodeType==x.CDATA_SECTION_NODE + + for elem in filter(isContentNode, value.childNodes): + content.append(str(elem.nodeValue)) + + if content: + anObject.content(r"".join(content)) + + return anObject def m_MobyContent(self, value): - """Turn an MobyContentXML into a MobyContent object - """ - from bioMoby.mobyDataTypes import MobyContent - - mc=MobyContent({}) - - mc.fromMoby(value) - - del MobyContent - - return mc - + """Turn an MobyContentXML into a MobyContent object + """ + from bioMoby.mobyDataTypes import MobyContent + + mc=MobyContent({}) + + mc.fromMoby(value) + + del MobyContent + + return mc + + + def loadm(self, value): + """ Feed a MobyContent object with data from an XML MobyContent + """ + from bioMoby.mobyDataTypes import MobyContent, Parameter + + from xml.dom import pulldom + + events = pulldom.parseString(value) + + mc=MobyContent({}) + queryid="" + currentCollection = None + isCollection=False + + for (event, node) in events: + if event == pulldom.START_ELEMENT: + if node.localName in ["MOBY", "mobyContent", "Simple"]: + pass + elif node.localName == "mobyData": + queryid=node.getAttribute("moby:queryID") + if not queryid: + queryid=node.getAttribute("queryID") + mc[queryid]=[] + elif node.localName == "Collection": + isCollection=True + collectionName=node.getAttribute("moby:articleName") + if not collectionName: + collectionName=node.getAttribute("articleName") + mc[queryid].append( (collectionName, []) ) + currentCollection=mc[queryid][-1][1] + elif node.localName == "Parameter": + p=Parameter() + events.expandNode(node) + p.fromMoby(node) + if isCollection: + currentCollection.append(p) + else: + mc[queryid].append(p) + else: + events.expandNode(node) + if isCollection: + currentCollection.append(self.loadn(node)) + else: + mc[queryid].append(self.loadn(node)) + if event == pulldom.END_ELEMENT: + if node.localName == "Collection": + isCollection=False + del node + + del MobyContent, pulldom, Parameter + return mc =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py 2005/06/09 08:19:46 1.6 @@ -1,7 +1,7 @@ """Classes for registration of object's classes, service's type, namespaces """ -""" Date: 16th of April 2004 +""" Creation Date: 16th of April 2004 Author: Wong Yan @@ -19,7 +19,7 @@ self.success=0 self.id="" self.message="" - self.RDF="" + self.RDF="" #Parse the document, retrieve the success, id, message and RDF fields doc=parseString(xmlInput) @@ -32,9 +32,9 @@ self.message=doc.getElementsByTagName("message")[0].childNodes[0].nodeValue try: if len(doc.getElementsByTagName("RDF"))>0: - self.RDF=doc.getElementsByTagName("RDF")[0].firstChild.toprettyxml() - except: - pass + self.RDF=doc.getElementsByTagName("RDF")[0].firstChild.toprettyxml() + except: + pass def __str__(self): """Return the moby xml of the instance @@ -63,7 +63,7 @@ self.authURI=authURI self.description=description #it uses a central object for registration - from mobyClient import Central + from mobyClient import Central self.central=Central() del Central @@ -78,7 +78,7 @@ self.serviceType=serviceType GeneralInformations.__init__(self, contact=contactEmail, authURI=authURI, description=description) self.relationship=relationship - self.serviceType=serviceType + self.serviceType=serviceType def __str__(self): """Return the instance as a Moby XML @@ -94,7 +94,6 @@ result.append("") - return "".join(result) =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:19:46 1.6 @@ -2,11 +2,13 @@ the Service class can be used for registration or execution. """ -""" Date: 15th of April 2004 +""" Creation date: 15th of April 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan 01/17/2004: Service can be executed as a Thread, thus several queries can be made in the same time. + 06/09/2005: Service Registration will not throw a Exception if signature URL is empty """ from mobyRegister import GeneralInformations @@ -244,14 +246,14 @@ self.type="" self.category="" self.url="" - self.signatureURL="" + self.signatureURL="" self.authoritative=0 self.inputObjects=[] self.outputObjects=[] self.secondaryArticles=[] self.methods=[] self.results="" - + if len(arg)==1 and arg[0].__class__ is dict: arg=arg[0] for key in arg.keys(): @@ -264,8 +266,8 @@ self.type=arg[key] elif key=='url': self.url=arg['url'] - elif key=='signatureURL': - self.signatureURL=arg['signatureURL'] + elif key=='signatureURL': + self.signatureURL=arg['signatureURL'] elif key=='authoritative': self.authoritative=arg[key] elif key=='contactEmail': @@ -311,7 +313,7 @@ from SOAPpy import SOAPProxy - webservice=SOAPProxy(self.url,namespace=self.namespace) + webservice=SOAPProxy(self.url,namespace=self.namespace) if method=="": if len(self.methods)==0: @@ -325,8 +327,8 @@ webservice.soapaction=self.namespace+"#"+method - if debug: - webservice.config.debug=1 + if debug: + webservice.config.debug=1 toQuery=str(query) @@ -339,8 +341,8 @@ #try to return a MobyContent Object instead from bioMoby.mobyDataTypes import MobyContent - mc=MobyContent() - mc.fromMoby(result) + mc=MobyContent() + mc.fromMoby(result) del MobyContent @@ -354,7 +356,7 @@ result.append(""+self.type+"") result.append(""+self.authURI+"") result.append(""+self.url+"") - result.append(""+self.signatureURL+"") + result.append(""+self.signatureURL+"") result.append(""+self.contact+"") result.append(""+`self.authoritative`+"") result.append("") @@ -367,10 +369,10 @@ elif inputObject.__class__ is dict: result.append('') - for aSimple in inputObject[inputObject.keys()[0]]: + for aSimple in inputObject[inputObject.keys()[0]]: result.append(str(aSimple)) - result.append("") + result.append("") else: from mobyExceptions import EInvalidArgument raise EInvalidArgument, "Bad input object" @@ -385,10 +387,10 @@ elif output.__class__ is dict: result.append('') - for aSimple in output[output.keys()[0]]: + for aSimple in output[output.keys()[0]]: result.append(str(aSimple)) - result.append("") + result.append("") else: from mobyExceptions import EInvalidArgument raise EInvalidArgument, "Bad output object" @@ -410,10 +412,10 @@ """Register the service on the Moby server has been added here a code to verify that signatureURL is not empty :) """ - if self.signatureURL=="": - from mobyExceptions import EInvalidArgument - raise EInvalidArgument, "field signatureURL cannot be empty" - + #if self.signatureURL=="": + # from mobyExceptions import EInvalidArgument + # raise EInvalidArgument, "field signatureURL cannot be empty" + xmlinput=""+str(self)+"" from mobyRegister import RegistrationObject @@ -431,29 +433,29 @@ return result def _executeThread(self, mobyContent): - """Execute the service, store the result in a field - """ + """Execute the service, store the result in a field + """ - self.results=self.execute(mobyContent, returnXml=(mobyContent.__class__ is str)) + self.results=self.execute(mobyContent, returnXml=(mobyContent.__class__ is str)) def start(self, mobycontent, timeout=-1): - """Start the service as it was a thread - """ - from threading import Thread + """Start the service as it was a thread + """ + from threading import Thread - if timeout != -1: - self._execThread=Thread(target=self._executeThread, args=(mobycontent,)) - else: - self._execThread=Thread(target=self._executeThread, args=(mobycontent,), timeout=timeout) + if timeout != -1: + self._execThread=Thread(target=self._executeThread, args=(mobycontent,)) + else: + self._execThread=Thread(target=self._executeThread, args=(mobycontent,), timeout=timeout) - self._execThread.start() + self._execThread.start() def join(self): - """Same as Thread.join - """ - self._execThread.join() + """Same as Thread.join + """ +self._execThread.join() @@ -502,17 +504,17 @@ for childNode in node.childNodes: if childNode.nodeName=="datatype": - if childNode.firstChild: + if childNode.firstChild: secondary.type=childNode.firstChild.nodeValue elif childNode.nodeName=="default": if childNode.firstChild: - secondary.default=childNode.firstChild.nodeValue + secondary.default=childNode.firstChild.nodeValue elif childNode.nodeName=="min": if childNode.firstChild: - secondary.min=childNode.firstChild.nodeValue + secondary.min=childNode.firstChild.nodeValue elif childNode.nodeName=="max": if childNode.firstChild: - secondary.max=childNode.firstChild.nodeValue + secondary.max=childNode.firstChild.nodeValue elif childNode.nodeName=="enum": if childNode.firstChild: secondary.enums.append(childNode.firstChild.nodeValue) @@ -547,7 +549,7 @@ service.contact=child.firstChild.nodeValue elif child.nodeName=="URL" and child.firstChild: service.url=child.firstChild.nodeValue - elif child.nodeName=="signatureURL" and child.firstChild: + elif child.nodeName=="signatureURL" and child.firstChild: service.signatureURL=child.firstChild.nodeValue elif child.nodeName=="Input": for article in child.childNodes: From kawas at pub.open-bio.org Thu Jun 2 11:48:01 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:48:01 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52Fm1cd015581@pub.open-bio.org> kawas Thu Jun 2 11:48:01 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool In directory pub.open-bio.org:/tmp/cvs-serv15536/org/biomoby/client/ui/graphical/applets/objectCreationTool Modified Files: ObjectCreationTool.java MobyXML.java MobyUtilities.java Registration.java Pair.java MobyPlainText.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool ObjectCreationTool.java,1.1,1.2 MobyXML.java,1.3,1.4 MobyUtilities.java,1.1,1.2 Registration.java,1.2,1.3 Pair.java,1.1,1.2 MobyPlainText.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.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/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.java 2005/06/02 15:48:01 1.2 @@ -167,7 +167,6 @@ /** * This method initializes this * - * @return void */ public void init() { this.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 24)); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java 2005/04/20 21:42:10 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java 2005/06/02 15:48:01 1.4 @@ -18,7 +18,7 @@ /** * This class contains all the methods required to output BioMoby Objects in XML. * @author Eddie Kawas - * @Jun 17, 2004 + * Jun 17, 2004 * */ public class MobyXML { @@ -305,7 +305,6 @@ * * PRE: None. *

POST: All of the relationships, inheritance and containment, are removed.

POST:

- * @return + * @return Registration */ public Registration getRegistration() { return registration; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.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/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java 2005/06/02 15:48:01 1.2 @@ -16,7 +16,7 @@ /** * Utilities that are useful for retrieving information about certain objects, parsing objects, etc. * @author Eddie Kawas - * @Jun 10, 2004 + * Jun 10, 2004 * */ public class MobyUtilities { @@ -27,7 +27,7 @@ * => The first item in the list is a string representation of the parent

* => The second item is a linked list of all the 'HAS' container relationships

* => The third item is a linked list of all the 'HASA' container relationships - * @param name, the name of the object to query for. + * @param name - the name of the object to query for. * @return returns a linked list {String, LinkedList, LinkedList} of relationships */ public static LinkedList GetRelations(String name) throws IOException { @@ -119,7 +119,6 @@ * PRE: ll is a valid linkedlist, panelDetails is a valid MobyUserPanel.

* POST: All the relations of child are outputted to the MobyUserPanel panelDetails. * @param ll - a linked list created via GetRelations() - * @param panelDetails - the MobyUserPanel to output the relationships * @param child - the object that GetRelations() was called with. */ public static String WriteToPanel(LinkedList ll, String child) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Registration.java,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/client/ui/graphical/applets/objectCreationTool/Registration.java 2005/04/20 21:42:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Registration.java 2005/06/02 15:48:01 1.3 @@ -12,7 +12,7 @@ /** * @author Eddie Kawas - * @Jun 21, 2004 + * Jun 21, 2004 * */ public class Registration extends MobyDataType{ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Pair.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/client/ui/graphical/applets/objectCreationTool/Pair.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Pair.java 2005/06/02 15:48:01 1.2 @@ -5,7 +5,7 @@ * This class contains the methods required to encapsulate

the container relationships * 'HAS' and 'HASA' from the BioMoby Object Ontology. * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 * */ public class Pair { @@ -28,7 +28,6 @@ /** * PRE: None.

* POST: The article name is retrieved. - * @param - none. * @return the contained objects name */ public String getArticlename() { @@ -38,7 +37,6 @@ /** * PRE: None.

* POST: The attribute is retrieved - * @param - none. * @return the contained objects attribute */ public String getAttribute() { @@ -48,7 +46,6 @@ /** * PRE: none.

* POST: a String representation of a Pair is returned. - * @param - none. * @return returns the string representation of a pair. */ public String toString() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyPlainText.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/client/ui/graphical/applets/objectCreationTool/MobyPlainText.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyPlainText.java 2005/06/02 15:48:01 1.2 @@ -10,7 +10,7 @@ * This class is used to maintain and then output a plain * text representation of an object. * @author Eddie Kawas - * @Jun 12, 2004 + * Jun 12, 2004 * */ public class MobyPlainText { @@ -145,7 +145,6 @@ * * PRE: None.

* POST: All of the relationships, inheritance and containment, are removed. - * @return nothing. */ public void clear() { renameRoot("MyObject"); From kawas at pub.open-bio.org Thu Jun 2 11:48:28 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:48:28 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52FmSBZ015655@pub.open-bio.org> kawas Thu Jun 2 11:48:28 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool In directory pub.open-bio.org:/tmp/cvs-serv15594/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool Modified Files: ServiceFocusListener.java MobyCollection.java InputOutputActionListener.java MobyUtilities.java HelpActionListener.java ServiceCreationTool.java ButtonBeautifier.java NamespaceTree.java ServiceTypeTree.java Pair.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool ServiceFocusListener.java,1.1,1.2 MobyCollection.java,1.1,1.2 InputOutputActionListener.java,1.1,1.2 MobyUtilities.java,1.1,1.2 HelpActionListener.java,1.1,1.2 ServiceCreationTool.java,1.2,1.3 ButtonBeautifier.java,1.2,1.3 NamespaceTree.java,1.1,1.2 ServiceTypeTree.java,1.1,1.2 Pair.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java 2005/06/02 15:48:28 1.2 @@ -11,7 +11,7 @@ /** * * @author Edward Kawas - * @date July 7, 2004 + * date July 7, 2004 * This class implements the FocusListener for the Service Creation Tool. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.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/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.java 2005/06/02 15:48:28 1.2 @@ -11,7 +11,7 @@ /** * * @author Edward Kawas - * @date July 19, 2004 + * date July 19, 2004 * This class represents a collection, either input or output, for the Moby Services. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.java 2005/06/02 15:48:28 1.2 @@ -12,7 +12,7 @@ /** * * @author Edward Kawas

- * @date July 16, 2004

+ * date July 16, 2004

* This class implements the ActionListener interface. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.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/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.java 2005/06/02 15:48:28 1.2 @@ -9,7 +9,7 @@ /** * Utilities that are useful for retrieving information about certain objects, parsing objects, etc. * @author Eddie Kawas - * @Jun 10, 2004 + * Jun 10, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ @@ -74,7 +74,6 @@ * PRE: ll is a valid linkedlist, panelDetails is a valid MobyUserPanel.

* POST: All the relations of child are outputted to the MobyUserPanel panelDetails. * @param ll - a linked list created via GetRelations() - * @param panelDetails - the MobyUserPanel to output the relationships * @param child - the object that GetRelations() was called with. */ public static String WriteToPanel(LinkedList ll, String child) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.java 2005/06/02 15:48:28 1.2 @@ -12,7 +12,7 @@ /** * @author Edward Kawas - * @date Sep 1, 2004 + * Sep 1, 2004 *

This class implements the ActionListener interface. *

The sole purpose of this class is to provide messages to *

the user regarding the form inputs for a service instance. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java,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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java 2005/04/07 21:01:13 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java 2005/06/02 15:48:28 1.3 @@ -22,7 +22,7 @@ /** * * @author Edward Kawas - * @date Jul 7, 2004 + * date Jul 7, 2004 * This class is the main class for the service instance creation tool. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com @@ -215,7 +215,7 @@ } /** - * @param i, the radio button id. + * @param i - the radio button id. * -1 => no button is selected. * 1 => Primary button is selected. * 2 => Secondary button is selected. @@ -227,7 +227,7 @@ /** * * @return an int reprepresenting the radio button that is selected. - * @see setRadioButtonID(int i) + * @see #setRadioButtonID(int i) */ public int getRadioButtonID() { return radioButtonID; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java,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/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java 2005/04/20 21:42:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java 2005/06/02 15:48:28 1.3 @@ -16,7 +16,7 @@ /** * @author Eddie Kawas - * @Jun 30, 2004 + * Jun 30, 2004 *

* This class enhances the esthetic look of buttons. *

@@ -206,7 +206,7 @@ * POST: The powered by moby services image is returned in a label. *

* - * @param cls - + * @param c - * the class where program execution began. */ public static JLabel getMobyImage(Class c) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.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/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.java 2005/06/02 15:48:28 1.2 @@ -25,9 +25,9 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the Services contained in the BioMoby Service Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ @@ -50,7 +50,8 @@ * POST: A moby tree is constructed with the root node labeled as 'Namespace'

* and the material for the tree taken from the RDF located at * @link http://biomoby.org/RESOURCES/MOBY-S/Namespace - * @param canEdit, if true, then the nodes are editable, else they are not. + * @param canEdit - if true, then the nodes are editable, else they are not. + * @param rdf - rdf for namespaces. */ public NamespaceTree(boolean canEdit, String rdf) { @@ -92,7 +93,6 @@ /** * PRE: None.

* POST: The MobyTree Namespace contains an empty tree with a single node labeled 'Namespace' - * @return - none. * */ public void clear() { @@ -103,7 +103,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -124,7 +123,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -216,7 +215,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -268,8 +266,6 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. * */ public void makeObjectTree() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.java 2005/06/02 15:48:28 1.2 @@ -25,9 +25,9 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the Services contained in the BioMoby Service Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com * @@ -51,8 +51,8 @@ * POST: A moby tree is constructed with the root node labeled as 'Service'

* and the material for the tree taken from the RDF located at * @link http://biomoby.org/RESOURCES/MOBY-S/Service - * @param canEdit, if true, then the nodes are editable, else they are not. - * @param rdf, the location of the RDF for the service type tree. + * @param canEdit - if true, then the nodes are editable, else they are not. + * @param rdf - the location of the RDF for the service type tree. */ public ServiceTypeTree(boolean canEdit, String rdf) { @@ -96,7 +96,6 @@ /** * PRE: None.

* POST: The MobyTree object contains an empty tree with a single node labeled 'Object' - * @return - none. * */ public void clear() { @@ -107,7 +106,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -128,7 +126,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -220,7 +218,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -272,8 +269,6 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. * */ public void makeObjectTree() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.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/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.java 2005/06/02 15:48:28 1.2 @@ -5,7 +5,7 @@ * This class contains the methods required to encapsulate

the container relationships * 'HAS' and 'HASA' from the BioMoby Object Ontology. * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ @@ -30,7 +30,6 @@ /** * PRE: None.

* POST: The article name is retrieved. - * @param - none. * @return the contained objects name */ public String getArticlename() { @@ -40,7 +39,6 @@ /** * PRE: None.

* POST: The attribute is retrieved - * @param - none. * @return the contained objects attribute */ public String getAttribute() { @@ -50,7 +48,6 @@ /** * PRE: none.

* POST: a String representation of a Pair is returned. - * @param - none. * @return returns the string representation of a pair. */ public String toString() { From kawas at pub.open-bio.org Thu Jun 2 11:48:54 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:48:54 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52Fms7Z015697@pub.open-bio.org> kawas Thu Jun 2 11:48:54 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared In directory pub.open-bio.org:/tmp/cvs-serv15668/org/biomoby/client/ui/graphical/applets/shared Modified Files: Household.java MobyTree.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared Household.java,1.1,1.2 MobyTree.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/Household.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/client/ui/graphical/applets/shared/Household.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/Household.java 2005/06/02 15:48:54 1.2 @@ -9,7 +9,7 @@ * @author Eddie Kawas *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com - * @Jun 4, 2004 + * Jun 4, 2004 * */ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/MobyTree.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/client/ui/graphical/applets/shared/MobyTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/MobyTree.java 2005/06/02 15:48:54 1.2 @@ -23,11 +23,11 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the objects contained in the BioMoby Object Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com - * @May 31, 2004 + * May 31, 2004 * */ public class MobyTree extends JPanel { @@ -47,11 +47,12 @@ String name = ""; private static final boolean DEBUG = false; /** - * PRE: None

- * POST: A moby tree is constructed with the root node labeled as 'Object'

- * and the material for the tree taken from the RDF located at - * @link http://biomoby.org/RESOURCES/MOBY-S/Objects - * @param canEdit, if true, then the nodes are editable, else they are not. + * A moby tree is constructed with the root node labeled as 'name'

+ * and the material for the tree taken from the RDF located at + * the url rdf. + * @param canEdit - if true then nodes in tree can be edited, otherwise they cannot. + * @param rdf - the url of the RDF describing Moby Objects, Services, Service Types, and Namespaces + * @param name - the name of the root node in the tree. */ public MobyTree(boolean canEdit, String rdf, String name) { @@ -94,7 +95,6 @@ /** * PRE: None.

* POST: The MobyTree object contains an empty tree with a single node labeled 'Object' - * @return - none. * */ public void clear() { @@ -105,7 +105,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -126,7 +125,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -218,7 +217,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -270,8 +268,7 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. + * @param name - name of the object to create tree for. * */ public void makeObjectTree(String name) { From kawas at pub.open-bio.org Thu Jun 2 11:49:28 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:49:28 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021549.j52FnSfC015751@pub.open-bio.org> kawas Thu Jun 2 11:49:28 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util In directory pub.open-bio.org:/tmp/cvs-serv15726/org/biomoby/client/ui/graphical/applets/util Modified Files: TreeLoaderThread.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util TreeLoaderThread.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util/TreeLoaderThread.java,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/client/ui/graphical/applets/util/TreeLoaderThread.java 2005/04/07 20:21:18 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util/TreeLoaderThread.java 2005/06/02 15:49:28 1.3 @@ -5,7 +5,7 @@ * @author Sun Micro Systems *

This class was created to provide an abstract class that you subclass to *

perform GUI-related work in a dedicated thread. - * @see http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html + * @link http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ From kawas at pub.open-bio.org Thu Jun 2 11:50:26 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:50:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021550.j52FoQFg015804@pub.open-bio.org> kawas Thu Jun 2 11:50:26 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv15779/org/biomoby/registry/rdfagent/verifier Modified Files: DataMngr.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/04/16 14:32:12 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/02 15:50:26 1.5 @@ -160,16 +160,15 @@ /** This method use for the update service_instance table, simple_input/output table, * collection_input/output table, secondary_input table in accordance with data * from RDF file. - * @param Hashtable servSign - set of the serviceSignature data (name - value, an example: servicename - GoTerm); + * @param servSign - set of the serviceSignature data (name - value, an example: servicename - GoTerm); * Hashtable of hashtables represented by a pair: * a name of the input = hashtable for this output * example:{siminp1={object_type_uri=urn:lsid:biomoby.org:objectclass:Object, namespace_type_uris=urn:lsid:biomoby.org:namespacetype:taxon}} - * @param Hashtable of hashtables represented by a pair: + * @param servInp - Hashtable of hashtables represented by a pair: * a name of the output = hashtable for this output * @param servname - the name of service * @param authURI - the authority URI * @param signURL - URL of resource - * @return . */ public static void processService( Hashtable servSign, Hashtable servInp, Hashtable servOut, String servname,String authURI,String signURL){ @@ -582,7 +581,7 @@ /** delete the service instance by service name and signature URL * @param servName the name of service which we want delete. - * @param rdfURL the authority URI for service which we want delete. + * @param signURL the authority URI for service which we want delete. * */ @@ -667,7 +666,7 @@ /** add the record about new service instance in the service_instance table of mobycentral database * @param servName - the name of service instance the record was added for. * @param cat - the category of service instance. - * @param servTypeUri - the service type URI of service instance. + * @param servTypeURI - the service type URI of service instance. * @param authId - the authority Id of service instance. * @param url - the URL of service instance. * @param email - the contact e-Mail of service instance. @@ -778,7 +777,6 @@ * @param objTypeUri the object type URI of the simple input. * @param nsTypeUris the string with set of the nameSpaces for this simple input. * @param colInpId the collection input Id if this simple input belongs to a collection, and blank otherwise. - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSimpleInput(Integer servInstId,String articleName,String objTypeUri,String nsTypeUris,Integer colInpId){ @@ -876,7 +874,6 @@ * @param max the maximum value of the secondary input * @param min the minimum value of the secondary input * * @param enum the enumeration value for the secondary input - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSecondary(int servInstId,String article_name,String def,String dataType,BigDecimal max,BigDecimal min,String enumeration){ @@ -921,9 +918,8 @@ * @param dataType the type of data of the secondary input. * @param max the maximum value of the secondary input * @param min the minimum value of the secondary input - * @param enum the enumeration value for the secondary input + * @param enumeration the enumeration value for the secondary input * @param minSecNum minimum free number for secondary_input_id - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void updateSec(int servInstId,String article_name,String def,String dataType,BigDecimal max,BigDecimal min,String enumeration, int minSecNum){ @@ -968,7 +964,6 @@ * @param objTypeUri the object type URI of the simple output. * @param nsTypeUris the string with set of the nameSpaces for this simple output. * @param colOutId the collection input Id if this simple output belongs to a collection, and blank otherwise. - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSimpleOutput(Integer servInstId,String articleName,String objTypeUri,String nsTypeUris,Integer colOutId){ @@ -1186,7 +1181,7 @@ } /** get the secondary input data by the secondary input Id - * @param secInpId - the secondary input Id + * @param servInstId - the secondary input Id * @return carrier class Secondary */ @@ -1247,7 +1242,6 @@ /** get the simple/collection output data by the service instance Id * and build xml representation * @param servInstId - the service instance Id - * @ */ public static void getSimpleCollectOutput(int servInstId){ @@ -1300,7 +1294,6 @@ /** get the simple/collection input data by the service instance Id * and build xml representation * @param servInstId - the service instance Id - * @ */ public static void getSimpleCollectInput(int servInstId){ @@ -1516,7 +1509,7 @@ /** get the service instance Id for the given service name and signatureURL * @param servName - the name of service instance . - * @param signatureURL - URL of resource for the service instance. + * @param signURL - URL of resource for the service instance. * @return Intrger service instance Id if was found in the database, zero otherwise */ @@ -1646,7 +1639,6 @@ /** delete a record from simple table by a service instance Id and collection_input_id * (the metod is working for simple_input/output, collection input/output tables) * @param servInstId - the service instance Id. - * @return Intrger ret=1 if the record was deleted, ret=-1 otherwise. */ public static void delCollectionMember(String inout, int servInstId){ @@ -1707,7 +1699,8 @@ } /** delete a record from service_instance table by a servicename and authority Id - * @param servInstId - the service instance Id. + * @param servName - the service instance name. + * @param authId - the id of the authority * @return Intrger ret=1 if the record was deleted, ret=-1 otherwise. */ @@ -1920,7 +1913,7 @@ /** get the service authority Id from service_instance table by the servicename and signatureURL - * @param servName - the name of service + * @param serviceName - the name of service * @param signURL - the signatureURL for the given service * @return int authority Id if was found, zero otherwise. */ @@ -2100,10 +2093,13 @@ } - /** get the contact e-Mail from service_instance table by the servicename - * @param signURL - the URL of a resource - * @return String contact e-Mail if was found, empty string otherwise. - */ + /** + * + * gets the min number of records with service instance id = 0 + * @param table + * @param key_field + * @return the number of records + */ public static int getMinFreeNumber(String table, String key_field){ From kawas at pub.open-bio.org Thu Jun 2 11:52:19 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:52:19 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021552.j52FqJhN015901@pub.open-bio.org> kawas Thu Jun 2 11:52:19 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3 In directory pub.open-bio.org:/tmp/cvs-serv15877/org/biomoby/shared/mobyxml/w3c/dom3 Modified Files: Tag: java_1_5_compat MobyObjectClassImpl.java MobyObjectClassNSImpl.java MobyObjectClass.java Log Message: Fixed the javadoc comments in order to get rid of warnings and fixed some parsing logic. moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3 MobyObjectClassImpl.java,1.1,1.1.2.1 MobyObjectClassNSImpl.java,1.1,1.1.2.1 MobyObjectClass.java,1.1,1.1.2.1 rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClassImpl.java,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClassNSImpl.java,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClass.java,v: No such file or directory From dwang at pub.open-bio.org Wed Jun 1 21:33:24 2005 From: dwang at pub.open-bio.org (Dennis Wang) Date: Wed, 1 Jun 2005 21:33:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506020133.j521XOhH012494@pub.open-bio.org> dwang Wed Jun 1 21:33:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby In directory pub.open-bio.org:/tmp/cvs-serv12468/Perl/MOBY/Adaptor/moby Modified Files: Tag: moby-DennisVersion queryapi.pm Log Message: test moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.2,1.2.2.1 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2004/07/09 00:21:53 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/06/02 01:33:23 1.2.2.1 @@ -3,6 +3,7 @@ use Carp; use vars qw($AUTOLOAD); +# Modified by Dennis { #Encapsulated class data From yanwong at pub.open-bio.org Thu Jun 9 04:19:46 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:19:46 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598Jkw3026903@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python In directory pub.open-bio.org:/tmp/cvs-serv26869 Modified Files: PKG-INFO changelog setup.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python PKG-INFO,1.6,1.7 changelog,1.8,1.9 setup.py,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Python/PKG-INFO,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Python/PKG-INFO 2005/02/18 15:58:21 1.6 +++ /home/repository/moby/moby-live/Python/PKG-INFO 2005/06/09 08:19:46 1.7 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: bioMoby -Version: 0.9 +Version: 0.9p2 Summary: Python interface for bioMoby Home-page: http://bioserv.rpbs.jussieu.fr Author: Yan Wong =================================================================== RCS file: /home/repository/moby/moby-live/Python/changelog,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Python/changelog 2005/04/22 10:13:48 1.8 +++ /home/repository/moby/moby-live/Python/changelog 2005/06/09 08:19:46 1.9 @@ -69,5 +69,5 @@ 0.9: PIB implemented as a set of string in the __PIB__ field 0.9p1: added a SQL invocator and SQL dispatcher in order to help the building of DB webservices. - +0.9p2: changed the deserialization code for TCBioMoby and MobyObject. Added a new constant MOBYNAMESPACEURI =================================================================== RCS file: /home/repository/moby/moby-live/Python/setup.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/setup.py 2005/01/27 08:44:04 1.5 +++ /home/repository/moby/moby-live/Python/setup.py 2005/06/09 08:19:46 1.6 @@ -3,7 +3,7 @@ from distutils.core import setup setup(name="bioMoby", - version=0.8, + version="0.9p2", description="An implementation of bioMoby in Python", author="Yan Wong", author_email="yanwong at ebgm.jussieu.fr", From yanwong at pub.open-bio.org Thu Jun 9 04:19:47 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:19:47 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598JlTR026965@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby/webservice In directory pub.open-bio.org:/tmp/cvs-serv26869/bioMoby/webservice Modified Files: TCBioMoby.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python/bioMoby/webservice TCBioMoby.py,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py 2005/02/01 08:52:17 1.3 +++ /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py 2005/06/09 08:19:46 1.4 @@ -9,6 +9,7 @@ Date: 12/06/2004 01/17/2005: solve the problem with GBrowse :) return a raw string instead of the text embbeded in a Body tag. + 06/08/2005: Return a string containing the MobyContent instead of the Python object """ from ZSI import _copyright, _children, \ @@ -23,12 +24,7 @@ def parse(self, elt, ps): #self.checkname(elt, ps) if _children(elt): - from bioMoby import MobyContent - mc=MobyContent() - - mc.fromMoby(elt.firstChild.nodeValue) - - return mc + return elt.firstChild.nodeValue class body(TypeCode): From yanwong at pub.open-bio.org Thu Jun 9 04:27:47 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:27:47 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090827.j598RlHS027027@pub.open-bio.org> yanwong Thu Jun 9 04:27:47 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27001/bioMoby Modified Files: mobyService.py Log Message: moby-live/Python/bioMoby mobyService.py,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:19:46 1.6 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:27:47 1.7 @@ -455,7 +455,7 @@ def join(self): """Same as Thread.join """ -self._execThread.join() + self._execThread.join() From yanwong at pub.open-bio.org Thu Jun 9 04:39:26 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:39:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090839.j598dQDp027169@pub.open-bio.org> yanwong Thu Jun 9 04:39:26 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27146 Removed Files: mobyService.py Log Message: moby-live/Python/bioMoby mobyService.py,1.7,NONE rcsdiff: /home/repository/moby/moby-live/Python/bioMoby/RCS/mobyService.py,v: No such file or directory From yanwong at pub.open-bio.org Thu Jun 9 04:40:13 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:40:13 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090840.j598eDh1027223@pub.open-bio.org> yanwong Thu Jun 9 04:40:13 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27197 Added Files: mobyService.py Log Message: corrected a mistakenly placed \t moby-live/Python/bioMoby mobyService.py,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 From kawas at pub.open-bio.org Thu Jun 9 13:36:00 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 9 Jun 2005 13:36:00 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506091736.j59Ha0PF029340@pub.open-bio.org> kawas Thu Jun 9 13:35:59 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder In directory pub.open-bio.org:/tmp/cvs-serv29315/org/biomoby/client/rdf/builder Modified Files: ServiceInstanceRDF.java Log Message: Modified how the lsid domain is retrieved. Eddie moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/05/31 18:11:07 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/06/09 17:35:59 1.4 @@ -296,7 +296,7 @@ .getURL())); subject.addProperty(DC.identifier, model .createTypedLiteral("urn:lsid:" - + properties.getProperty("domain") + + properties.getProperty("lsid_domain") + ":serviceinstance:" + services[i].getAuthority() + "," + services[i].getName())); subject.addProperty(Predicates.performs_task, model From kawas at pub.open-bio.org Thu Jun 9 13:39:00 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 9 Jun 2005 13:39:00 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506091739.j59Hd0vw029457@pub.open-bio.org> kawas Thu Jun 9 13:39:00 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources In directory pub.open-bio.org:/tmp/cvs-serv29432/org/biomoby/client/ui/graphical/servlet/jresources Modified Files: RESOURCE.java Log Message: Modified how the lsid domain is retrieved. Eddie moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources RESOURCE.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/05/31 18:09:24 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/06/09 17:39:00 1.6 @@ -366,7 +366,7 @@ .getURL())); subject.addProperty(DC.identifier, model .createTypedLiteral("urn:lsid:" - + properties.getProperty("domain") + + properties.getProperty("lsid_domain") + ":serviceinstance:" + services[i].getAuthority() + "," + services[i].getName())); subject.addProperty(Predicates.performs_task, model From yanwong at pub.open-bio.org Fri Jun 10 03:47:15 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Fri, 10 Jun 2005 03:47:15 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506100747.j5A7lFCx000503@pub.open-bio.org> yanwong Fri Jun 10 03:47:15 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv477 Modified Files: mobyMarshal.py Log Message: A generated object can now have a field content moby-live/Python/bioMoby mobyMarshal.py,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/09 08:19:46 1.9 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/10 07:47:15 1.10 @@ -3,7 +3,7 @@ """ Creation date 19th of May 2004 - Latest modification date: 9th of June 2005 + Latest modification date: 10th of June 2005 Author: Wong Yan Topic: Marshalling moby Objects @@ -15,6 +15,7 @@ 06/09/2005: Change the doc.getElementsByTagNameNS("http://biomoby.org/moby",'mobyContent') to doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') Parsing is now independant from the namespace. + 06/10/2005: A generated object can now have a field content! """ from xml.dom.minidom import parseString @@ -336,7 +337,7 @@ content.append(str(elem.nodeValue)) if content: - anObject.content(r"".join(content)) + anObject.content=r"".join(content) return anObject From senger at pub.open-bio.org Fri Jun 10 09:48:10 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 09:48:10 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101348.j5ADmAcA003762@pub.open-bio.org> senger Fri Jun 10 09:48:10 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv3744 Log Message: Module for third-party libraries created Status: Vendor Tag: jars-archive Release Tags: v1 N jars-archive/README N jars-archive/current/.keep-me No conflicts created by this import jars-archive - Imported sources rcsdiff: /home/repository/moby/jars-archive/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/jars-archive/RCS/Imported,v: No such file or directory rcsdiff: /home/repository/moby/jars-archive/RCS/sources,v: No such file or directory From senger at pub.open-bio.org Fri Jun 10 09:53:03 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 09:53:03 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101353.j5ADr3Jf003851@pub.open-bio.org> senger Fri Jun 10 09:53:03 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv3832 Modified Files: README Log Message: jars-archive README,1.1.1.1,1.2 =================================================================== RCS file: /home/repository/moby/jars-archive/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- /home/repository/moby/jars-archive/README 2005/06/10 13:48:10 1.1.1.1 +++ /home/repository/moby/jars-archive/README 2005/06/10 13:53:03 1.2 @@ -3,7 +3,7 @@ This module serves just one purpose: to store commonly (or less commonly) used third-party Java libraries (jar files) in order to -share them by several other CVS modules withouyt the need to include +share them by several other CVS modules without the need to include them separately in all those CVS modules. I guess that the purpose is similar to the CVS-native notion of the @@ -16,6 +16,12 @@ first time it builds everything. An example can be found in the moby-live module (subdirectory Java). +It started as a BioMoby initiative so it is located as a module within +the 'moby' CVS repository. But it can used by others, as well - one +does not use it as a CVS module, but like a normal HTTP resource. Only +when you want to add a new library, or to udate an existing one, you +need to check-out it as usual. + Directory structure ------------------- @@ -37,5 +43,5 @@ ---------------------------------------------------------------------- Started by: Martin Senger (martin.senger at gmail.com), June 2005 -$Id +$Id$ ---------------------------------------------------------------------- From senger at pub.open-bio.org Fri Jun 10 09:55:36 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 09:55:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101355.j5ADtais003920@pub.open-bio.org> senger Fri Jun 10 09:55:36 EDT 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv3904/current Added Files: activation.jar adenine.jar alltools.jar axis-ant.jar axis.jar commons-discovery.jar commons-logging.jar concurrent.jar icu4j.jar jakarta-oro-2.0.5.jar jaxen-core.jar jaxen-jdom.jar jaxrpc.jar jdom.jar jena.jar junit.jar log4j-1.2.4.jar lsid-client-1.1.2.jar lsid-server-1.1.2.jar mail.jar mysql-connector-java-3.1.7-bin.jar rdf-api-2001-01-19.jar saaj.jar saxpath.jar servlet.jar taverna.jar wsdl4j.jar xalan.jar xercesImpl.jar xercesSamples.jar xml-apis.jar xmlParserAPIs.jar Removed Files: .keep-me Log Message: jars-archive/current activation.jar,NONE,1.1 adenine.jar,NONE,1.1 alltools.jar,NONE,1.1 axis-ant.jar,NONE,1.1 axis.jar,NONE,1.1 commons-discovery.jar,NONE,1.1 commons-logging.jar,NONE,1.1 concurrent.jar,NONE,1.1 icu4j.jar,NONE,1.1 jakarta-oro-2.0.5.jar,NONE,1.1 jaxen-core.jar,NONE,1.1 jaxen-jdom.jar,NONE,1.1 jaxrpc.jar,NONE,1.1 jdom.jar,NONE,1.1 jena.jar,NONE,1.1 junit.jar,NONE,1.1 log4j-1.2.4.jar,NONE,1.1 lsid-client-1.1.2.jar,NONE,1.1 lsid-server-1.1.2.jar,NONE,1.1 mail.jar,NONE,1.1 mysql-connector-java-3.1.7-bin.jar,NONE,1.1 rdf-api-2001-01-19.jar,NONE,1.1 saaj.jar,NONE,1.1 saxpath.jar,NONE,1.1 servlet.jar,NONE,1.1 taverna.jar,NONE,1.1 wsdl4j.jar,NONE,1.1 xalan.jar,NONE,1.1 xercesImpl.jar,NONE,1.1 xercesSamples.jar,NONE,1.1 xml-apis.jar,NONE,1.1 xmlParserAPIs.jar,NONE,1.1 .keep-me,1.1.1.1,NONE rcsdiff: /home/repository/moby/jars-archive/current/RCS/.keep-me,v: No such file or directory From senger at pub.open-bio.org Fri Jun 10 10:07:45 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 10:07:45 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101407.j5AE7jJY004023@pub.open-bio.org> senger Fri Jun 10 10:07:45 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv4004 Modified Files: README Log Message: jars-archive README,1.2,1.3 =================================================================== RCS file: /home/repository/moby/jars-archive/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/jars-archive/README 2005/06/10 13:53:03 1.2 +++ /home/repository/moby/jars-archive/README 2005/06/10 14:07:45 1.3 @@ -19,7 +19,7 @@ It started as a BioMoby initiative so it is located as a module within the 'moby' CVS repository. But it can used by others, as well - one does not use it as a CVS module, but like a normal HTTP resource. Only -when you want to add a new library, or to udate an existing one, you +when you want to add a new library, or to update an existing one, you need to check-out it as usual. From kawas at pub.open-bio.org Mon Jun 13 14:14:36 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon, 13 Jun 2005 14:14:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506131814.j5DIEabl026259@pub.open-bio.org> kawas Mon Jun 13 14:14:35 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv26234/org/biomoby/registry/rdfagent/verifier Modified Files: Communicator.java Log Message: Fixed a bug that crashed the agent when an RDF document retrieved from an author contained invalid xml. Eddie moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Communicator.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java 2005/04/16 14:32:12 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java 2005/06/13 18:14:35 1.5 @@ -1,4 +1,3 @@ - package org.biomoby.registry.rdfagent.verifier; import java.io.BufferedReader; @@ -25,223 +24,260 @@ import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.rdf.model.RDFException; +import com.hp.hpl.jena.shared.JenaException; + /** * @author Nina Opushneva - * - * The Communicator class allows a Java application to communicate with - * servers of service providers by HTTP protocol, and with SMTP server by message + * + * The Communicator class allows a Java application to communicate with servers + * of service providers by HTTP protocol, and with SMTP server by message */ public class Communicator { -/** get RDF model of service by signatureURL - * (make HTTP connect to server, open a file,read a file into a streem, build the model) - * @param signURL - the URL of resource (signatureURL) - * @param servNames - set of service names located at this signatureURL - * @return Model the RDF model of services located at this signatureURL - */ - - public static Model getServiceRDF(String servNames,String signURL){ - - Model model = ModelFactory.createDefaultModel(); - String mes1 = ""; - try { - URL u = new URL(signURL); - - HttpURLConnection huc = (HttpURLConnection) u.openConnection(); - huc.connect(); - - int code = huc.getResponseCode(); - Log.info("GET <"+signURL+" > - HTTP CODE: "+ code); - Report.doWrite(""); - Report.doWrite("GET SIGNATURE_URL <"+signURL+" > - HTTP CODE: "+ code); - Report.add("GET SIGNATURE_URL <"+signURL+" > - HTTP CODE: "+ code); - - if (code == 200 || code == 202 ) { - - try{ - model.read(huc.getInputStream(),""); - }catch(RDFException e){ - Log.severe("Failed : "+e); - Report.add("Error 1: "+e); -// e.getMessage(); - }catch(IOException e){ - Log.severe("Failed : "+e); - Report.add("Error 3: "+e); -// e.getMessage(); - } - - } - else { - if (code == 400){ - Log.warning("The request had bad syntax or was inherently impossible to be satisfied."); - Report.add("The request had bad syntax or was inherently impossible to be satisfied."); - } - else if (code == 401){ - Log.warning("The parameter to this message gives a specification of authorization schemes which are acceptable."); - Report.add("The parameter to this message gives a specification of authorization schemes which are acceptable."); - } - else if (code == 402){ - Report.add("The parameter to this message gives a specification of charging schemes acceptable."); - } - else if (code == 403){ - Report.add("The request is for something forbidden. Authorization will not help."); - mes1 = "The request is for something forbidden."; - } - else if (code == 404){ - Report.doWrite("The server has not found anything matching the URI given"); - Report.add("The server has not found anything matching the URI given"); - mes1 = "The RDF file was not found on the server"; + /** + * get RDF model of service by signatureURL (make HTTP connect to server, + * open a file,read a file into a streem, build the model) + * + * @param signURL - + * the URL of resource (signatureURL) + * @param servNames - + * set of service names located at this signatureURL + * @return Model the RDF model of services located at this signatureURL + */ + + public static Model getServiceRDF(String servNames, String signURL) { + + Model model = ModelFactory.createDefaultModel(); + String mes1 = ""; + try { + URL u = new URL(signURL); + + HttpURLConnection huc = (HttpURLConnection) u.openConnection(); + huc.connect(); + + int code = huc.getResponseCode(); + Log.info("GET <" + signURL + " > - HTTP CODE: " + code); + Report.doWrite(""); + Report.doWrite("GET SIGNATURE_URL <" + signURL + + " > - HTTP CODE: " + code); + Report.add("GET SIGNATURE_URL <" + signURL + " > - HTTP CODE: " + + code); + if (code == 200 || code == 202) { + + try { + model.read(huc.getInputStream(), ""); + } catch (RDFException e) { + Log.severe("Failed : " + e); + Report.add("Error 1: " + e); + + + // e.getMessage(); + } catch (JenaException e) { + //reset code to + code = 417; } - else if (code == 500){ + //http://www.w3.org/RDF/Validator/RDF/Validator/ARPServlet?URI= + } + + ////////////////////////// + // no else if here purposely, because i reset the code if an + // exception is thrown due to invalid rdfs being returned. + ////////////////////////// + if (code != 200 && code != 202) + if (code == 400) { + Log + .warning("The request had bad syntax or was inherently impossible to be satisfied."); + Report + .add("The request had bad syntax or was inherently impossible to be satisfied."); + } else if (code == 401) { + Log + .warning("The parameter to this message gives a specification of authorization schemes which are acceptable."); + Report + .add("The parameter to this message gives a specification of authorization schemes which are acceptable."); + } else if (code == 402) { + Report + .add("The parameter to this message gives a specification of charging schemes acceptable."); + } else if (code == 403) { + Report + .add("The request is for something forbidden. Authorization will not help."); + mes1 = "The request is for something forbidden."; + } else if (code == 404) { + Report + .doWrite("The server has not found anything matching the URI given"); + Report + .add("The server has not found anything matching the URI given"); + mes1 = "The RDF file was not found on the server"; + } else if (code == 417) { + Report.add(" RDF Parsing error. Possible reason being that multiple tags found in the same file."); + mes1 = " RDF Parsing error. Multiple tags found."; + } else if (code == 500) { Report.add(" Internal Error"); - mes1 = " Internal Error"; + mes1 = " Internal Error"; + } + int num = DataMngr.getServErrorNum(signURL, code); + + if (num > 0) { + if (num < 3) { + DataMngr.updErrCount(signURL, code); + } else { + + String servList = DataMngr.getServListByURL(signURL); + String s[] = servList.split(","); + Report.add("THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "); + Report + .add("THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY."); + String m1 = "THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "; + String m2 = "THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY."; + String msg = m1 + " " + m2; + + Report.doWrite("DELETED SERVICES :"); + for (int i = s.length - 1; i >= 0; i--) { + Report.doWrite(i + ". " + s[i]); + } + DataMngr.delServiceSetByURL(signURL); + DataMngr.delServErrors(signURL); + Report.add("THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "); + Report + .add("THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY"); + Report + .doWrite("======================================================================================="); } - int num = DataMngr.getServErrorNum(signURL,code); - if (num > 0){ - if (num < 3){ - DataMngr.updErrCount(signURL,code); - }else{ - - String servList = DataMngr.getServListByURL(signURL); - String s[] = servList.split(","); - Report.add("THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "); - Report.add("THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY."); - String m1 = "THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "; - String m2 = "THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY."; - String msg = m1+" "+m2; - - Report.doWrite("DELETED SERVICES :"); - for (int i = s.length - 1; i >=0; i --) { - Report.doWrite(i+". "+s[i]); - } - DataMngr.delServiceSetByURL(signURL); - DataMngr.delServErrors(signURL); - Report.add("THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "); - Report.add("THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY"); - Report.doWrite("======================================================================================="); - } - - }else{ - DataMngr.insErrCount(signURL,code); - } - - } - - huc.disconnect(); - } - catch (IOException e) { - Log.severe("Failed : "+e); - Report.add("Error 2: "+e); -// e.getMessage(); - } + } else { + DataMngr.insErrCount(signURL, code); + } + huc.disconnect(); + } catch (IOException e) { + Log.severe("Failed : " + e); + Report.add("Error 2: " + e); + // e.getMessage(); + } + + return model; - return model; - } -/** a SMTP client that allows The SMTP client establishes a connection with an SMTP server - * and waits for the server to respond . The client is then ready to construct a mail - * message. - * (make HTTP connect to server, open a file,read a file into a streem, build a model) - * @param to - where is the target of the e-mail message to be sent. - * @param subj - the subject of this MailMessage. - * @param msgStr - the text data that is to be included in this MailMessage. - * @param from - where is the e-mail address of the message transmitter. - * - */ - - - public static void sendMail(String to,String subj,String msgStr,String from){ - - try { - - Properties prop = new Properties(); - prop.put("mail.smtp.host",Constants.MB_MAIL_SERVER); + /** + * a SMTP client that allows The SMTP client establishes a connection with + * an SMTP server and waits for the server to respond . The client is then + * ready to construct a mail message. (make HTTP connect to server, open a + * file,read a file into a streem, build a model) + * + * @param to - + * where is the target of the e-mail message to be sent. + * @param subj - + * the subject of this MailMessage. + * @param msgStr - + * the text data that is to be included in this MailMessage. + * @param from - + * where is the e-mail address of the message transmitter. + * + */ + + public static void sendMail(String to, String subj, String msgStr, + String from) { + + try { + + Properties prop = new Properties(); + prop.put("mail.smtp.host", Constants.MB_MAIL_SERVER); Session ses = Session.getDefaultInstance(prop, null); - MimeMessage msg = new MimeMessage(ses); - msg.setFrom(new InternetAddress(from)); - msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); - msg.setSubject(subj); - msg.setSentDate(new Date()); - msg.setText(msgStr); - if (Constants.MB_MAIL_PSWD != null){ - Transport transport = ses.getTransport("smtp"); //for usage a password - transport.connect(Constants.MB_MAIL_SERVER,Constants.MB_MAIL_USER,Constants.MB_MAIL_PSWD); - } - Transport.send(msg); - Report.doWrite("The message have been sent to "+to); - } catch (MessagingException e) { -// Log.severe(e.getMessage()+" sendmail"); - e.getMessage(); - } + MimeMessage msg = new MimeMessage(ses); + msg.setFrom(new InternetAddress(from)); + msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); + msg.setSubject(subj); + msg.setSentDate(new Date()); + msg.setText(msgStr); + if (Constants.MB_MAIL_PSWD != null) { + Transport transport = ses.getTransport("smtp"); //for usage a + // password + transport.connect(Constants.MB_MAIL_SERVER, + Constants.MB_MAIL_USER, Constants.MB_MAIL_PSWD); + } + Transport.send(msg); + Report.doWrite("The message have been sent to " + to); + } catch (MessagingException e) { + // Log.severe(e.getMessage()+" sendmail"); + e.getMessage(); + } - } + } - public static String readFromURL(String url){ + public static String readFromURL(String url) { String list = ""; try { - URL u = new URL(url); - - HttpURLConnection huc = (HttpURLConnection) u.openConnection(); - huc.connect(); - - int code = huc.getResponseCode(); - Log.info("GET <"+url+" > - HTTP CODE: "+ code); - Report.doWrite(""); - Report.doWrite("GET SIGNATURE_URL <"+url+" > - HTTP CODE: "+ code); - Report.add("GET SIGNATURE_URL <"+url+" > - HTTP CODE: "+ code); - - if (code == 200 || code == 202 ) { + URL u = new URL(url); - }else { - - } - }catch (IOException e) { - Log.severe("Failed : "+e); - Report.add("Error 2: "+e); -// e.getMessage(); - } + HttpURLConnection huc = (HttpURLConnection) u.openConnection(); + huc.connect(); + + int code = huc.getResponseCode(); + Log.info("GET <" + url + " > - HTTP CODE: " + code); + Report.doWrite(""); + Report.doWrite("GET SIGNATURE_URL <" + url + " > - HTTP CODE: " + + code); + Report.add("GET SIGNATURE_URL <" + url + " > - HTTP CODE: " + + code); + + if (code == 200 || code == 202) { + + } else { + + } + } catch (IOException e) { + Log.severe("Failed : " + e); + Report.add("Error 2: " + e); + // e.getMessage(); + } return list; - } + } + + public static Hashtable readFromFile(String file) { - public static Hashtable readFromFile(String file) { - - Hashtable list = new Hashtable(); + Hashtable list = new Hashtable(); //...checks on aFile are elided -// StringBuffer contents = new StringBuffer(); + // StringBuffer contents = new StringBuffer(); //declared here only to make visible to finally clause BufferedReader input = null; try { - //use buffering - //this implementation reads one line at a time - input = new BufferedReader( new FileReader(file) ); - String line = null; //not declared within while loop - while (( line = input.readLine()) != null){ - list.put(line,""); -// contents.append(line); -// contents.append(System.getProperty("line.separator")); - } - } - catch (FileNotFoundException ex) { - ex.printStackTrace(); - } - catch (IOException ex){ - ex.printStackTrace(); - } - finally { - try { - if (input!= null) { - //flush and close both "input" and its underlying FileReader - input.close(); + //use buffering + //this implementation reads one line at a time + input = new BufferedReader(new FileReader(file)); + String line = null; //not declared within while loop + while ((line = input.readLine()) != null) { + list.put(line, ""); + // contents.append(line); + // contents.append(System.getProperty("line.separator")); } - } - catch (IOException ex) { + } catch (FileNotFoundException ex) { + ex.printStackTrace(); + } catch (IOException ex) { ex.printStackTrace(); - } + } finally { + try { + if (input != null) { + //flush and close both "input" and its underlying + // FileReader + input.close(); + } + } catch (IOException ex) { + ex.printStackTrace(); + } } return list; - } + } -} +} \ No newline at end of file From gss at pub.open-bio.org Thu Jun 16 12:24:15 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:24:15 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161624.j5GGOFob007461@pub.open-bio.org> gss Thu Jun 16 12:24:15 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting In directory pub.open-bio.org:/tmp/cvs-serv7439/src/org/semanticmoby/meeting Removed Files: MeetingRegistrationServlet.java Log Message: Moved to archive folder moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting MeetingRegistrationServlet.java,1.1,NONE rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting/RCS/MeetingRegistrationServlet.java,v: No such file or directory From gss at pub.open-bio.org Thu Jun 16 12:24:59 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:24:59 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161624.j5GGOxpb007500@pub.open-bio.org> gss Thu Jun 16 12:24:59 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org In directory pub.open-bio.org:/tmp/cvs-serv7475 Modified Files: .project Log Message: Added dependency on S-MOBY core project moby-live/S-MOBY/ref-impl/semanticmoby.org .project,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project 2005/03/21 21:40:30 1.3 +++ /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project 2005/06/16 16:24:59 1.4 @@ -3,6 +3,7 @@ semanticmoby.org + S-MOBY Core From gss at pub.open-bio.org Thu Jun 16 12:27:30 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRUtY007557@pub.open-bio.org> gss Thu Jun 16 12:27:30 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private In directory pub.open-bio.org:/tmp/cvs-serv7533/WebRoot/developer/private Log Message: Directory /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private added to the repository moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private - New directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/directory,v: No such file or directory From gss at pub.open-bio.org Thu Jun 16 12:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRWV5007610@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/developer Modified Files: dev-tools.html Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html 2005/06/16 16:27:32 1.2 @@ -2,8 +2,6 @@ - - Semantic MOBY Developer Tools @@ -12,21 +10,16 @@ cellspacing="0" cellpadding="0"> - + Semantic MOBY Developer Tools
- -

Convert a graph to a different format

- -
+ Paste a graph, select its input format, and press "Convert Graph" - to convert to the other format - + to convert to the other format

Input format:    N3   RDF/XML N-Triples         

- -

        

-
- -

List all statements in the S-MOBY metadata - repository

- -
-           -
- -

Validate an OWL Graph using Jena

- -
- Paste a graph in RDF/XML format and press "Validate" to see what - type of OWL the graph represents - -

- -

-
- -

Validate that a graph is MOBY canonical form

- -
- Paste a graph in RDF/XML format and press "Validate" to see if it - is MOBY canonical form - -

- -

+

        

From gss at pub.open-bio.org Thu Jun 16 12:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRW6D007625@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/developer/private Added Files: dev-tools.html Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private dev-tools.html,NONE,1.1 From gss at pub.open-bio.org Thu Jun 16 12:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRWww007591@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/examples/ontologies In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/examples/ontologies Added Files: geneName geneName.n3 FASTASequence sequenceText.n3 sequenceText FASTASequence.n3 Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/examples/ontologies geneName,NONE,1.1 geneName.n3,NONE,1.1 FASTASequence,NONE,1.1 sequenceText.n3,NONE,1.1 sequenceText,NONE,1.1 FASTASequence.n3,NONE,1.1 From kawas at pub.open-bio.org Fri Jun 17 15:25:32 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Fri, 17 Jun 2005 15:25:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506171925.j5HJPWEM014018@pub.open-bio.org> kawas Fri Jun 17 15:25:31 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv13972/org/biomoby/registry/rdfagent/verifier Modified Files: DataMngr.java Log Message: Added the logic that deals with null signature urls (makes one up) Added a line that deletes secondary input information when deleting services (not sure why it was missing). Eddie moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/13 18:17:42 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/17 19:25:31 1.7 @@ -56,9 +56,22 @@ String rdfAddr = rs.getString(2); int authorityID = rs.getInt(3); if (rdfAddr == null) { - //TODO - get the list of service names so that we can + //TODO - make this code more efficient! - maybe perform one sql call instead of many // update the signatureURL field using the service name and authority id - + String bogusSigURL = "http://invalidURL.com/author/"+ authorityID + "/" + servName +".xml"; + String updateSQLString = "UPDATE service_instance " + + "SET signatureURL='"+ bogusSigURL +"' " + + "WHERE authority_id=" + authorityID + " and servicename='" + servName +"'"; + PreparedStatement preparedStatement = null; + try { + Connection updateCon = DBConnector.getConnection(); + preparedStatement = updateCon.prepareStatement(updateSQLString); + int resultSet = preparedStatement.executeUpdate(); + Log.info(resultSet + ": Updated the signatureURL field of the authority with id #" + authorityID + " to be " + bogusSigURL+"."); + } catch (SQLException e) { + Log.severe("Could not update SignatureURL field with a bogus signatureURL.\n" +e.getMessage()); + } + } else { if (rdfAddr.equals(lastAddr)) { servNames.append("," + servName); @@ -618,6 +631,7 @@ // service_instance delRow("simple_input", servInstId); // delete from table simple_input delRow("simple_output", servInstId); // delete from table simple_output + delRow("secondary_input", servInstId); //TODO - should this line be here? delCollectionMember("input", servInstId); delCollectionMember("output", servInstId); delRow("collection_input", servInstId); // delete from table @@ -645,6 +659,7 @@ // service_instance delRow("simple_input", servInstId); // delete from table simple_input delRow("simple_output", servInstId); // delete from table simple_output + delRow("secondary_input", servInstId); //TODO - should this line be here? delCollectionMember("input", servInstId); delCollectionMember("output", servInstId); delRow("collection_input", servInstId); // delete from table @@ -685,6 +700,7 @@ if (rez == 1) { del_serv.addElement(servName); } + delRow("secondary_input", servInstId); //TODO - should this line be here? delRow("simple_input", servInstId); // delete from table // simple_input delRow("simple_output", servInstId); // delete from table From gss at pub.open-bio.org Mon Jun 27 16:39:37 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Mon, 27 Jun 2005 16:39:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506272039.j5RKdbJA004738@pub.open-bio.org> gss Mon Jun 27 16:39:36 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/doc/User In directory pub.open-bio.org:/tmp/cvs-serv4714/User Log Message: Directory /home/repository/moby/moby-live/S-MOBY/doc/User added to the repository moby-live/S-MOBY/doc/User - New directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/directory,v: No such file or directory From gss at pub.open-bio.org Mon Jun 27 16:40:27 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Mon, 27 Jun 2005 16:40:27 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506272040.j5RKeR4M004783@pub.open-bio.org> gss Mon Jun 27 16:40:27 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/doc/User In directory pub.open-bio.org:/tmp/cvs-serv4762/S-MOBY/doc/User Added Files: devguide.doc Log Message: Initial draft; still needs Service Consumer section moby-live/S-MOBY/doc/User devguide.doc,NONE,1.1 From mwilkinson at pub.open-bio.org Wed Jun 29 12:58:33 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 12:58:33 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291658.j5TGwXVu011963@pub.open-bio.org> mwilkinson Wed Jun 29 12:58:33 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools In directory pub.open-bio.org:/tmp/cvs-serv11945/Service_Creation_Tools Log Message: Directory /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools added to the repository moby-live/Perl/Accessories/Service_Creation_Tools - New directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/directory,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 13:00:48 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:00:48 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291700.j5TH0mos012013@pub.open-bio.org> mwilkinson Wed Jun 29 13:00:48 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance In directory pub.open-bio.org:/tmp/cvs-serv11995/Namespace_Maintenance Log Message: Directory /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance added to the repository moby-live/Perl/Accessories/Namespace_Maintenance - New directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/directory,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 13:02:24 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:02:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291702.j5TH2O0i012106@pub.open-bio.org> mwilkinson Wed Jun 29 13:02:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories In directory pub.open-bio.org:/tmp/cvs-serv12088 Removed Files: frame.cgi namespaceframe.cgi searchframe.cgi Log Message: shuffling files to keep things clean moby-live/Perl/Accessories frame.cgi,1.1,NONE namespaceframe.cgi,1.1,NONE searchframe.cgi,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/frame.cgi,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/namespaceframe.cgi,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/searchframe.cgi,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 13:02:24 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:02:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291702.j5TH2OsP012121@pub.open-bio.org> mwilkinson Wed Jun 29 13:02:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance In directory pub.open-bio.org:/tmp/cvs-serv12088/Namespace_Maintenance Added Files: frame.cgi namespaceframe.cgi searchframe.cgi Log Message: shuffling files to keep things clean moby-live/Perl/Accessories/Namespace_Maintenance frame.cgi,NONE,1.1 namespaceframe.cgi,NONE,1.1 searchframe.cgi,NONE,1.1 From mwilkinson at pub.open-bio.org Wed Jun 29 13:30:30 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:30:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291730.j5THUUjm012336@pub.open-bio.org> mwilkinson Wed Jun 29 13:30:30 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools In directory pub.open-bio.org:/tmp/cvs-serv12321 Added Files: CodeGenerator.pm code-generator0.6.cgi codebook.xml dispatcher.cgi help.cgi Log Message: adding Clarence and Michaels code to the repository moby-live/Perl/Accessories/Service_Creation_Tools CodeGenerator.pm,NONE,1.1 code-generator0.6.cgi,NONE,1.1 codebook.xml,NONE,1.1 dispatcher.cgi,NONE,1.1 help.cgi,NONE,1.1 From yanwong at pub.open-bio.org Thu Jun 9 03:55:20 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 09 Jun 2005 07:55:20 -0000 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598JkBS026946@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv26869/bioMoby Modified Files: __init__.py mobyClient.py mobyDataTypes.py mobyExceptions.py mobyMarshal.py mobyRegister.py mobyService.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python/bioMoby __init__.py,1.2,1.3 mobyClient.py,1.5,1.6 mobyDataTypes.py,1.23,1.24 mobyExceptions.py,1.4,1.5 mobyMarshal.py,1.8,1.9 mobyRegister.py,1.5,1.6 mobyService.py,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Python/bioMoby/__init__.py 2005/01/18 13:46:22 1.2 +++ /home/repository/moby/moby-live/Python/bioMoby/__init__.py 2005/06/09 08:19:46 1.3 @@ -11,3 +11,6 @@ from mobyMarshal import * from webservice import * from ontology import * + +__VERSION__ = "0.9p2" +__MOBY_API_VERSION__ = "0.8" =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py 2005/06/09 08:19:46 1.6 @@ -2,7 +2,7 @@ """ """ - Date: 13th of April 2004 + Creation date: 13th of April 2004 Author: Wong Yan The Client class inherits from Central class @@ -22,10 +22,10 @@ from SOAPpy import SOAPProxy self.server=SOAPProxy(self.url, namespace=self.ns) - - if debug: - self.server.config.debug=1 - + + if debug: + self.server.config.debug=1 + del SOAPProxy @@ -68,28 +68,28 @@ def retrieveObjectDefinition(self, objectName): """Retrieves a list of object's definitions """ - dc={"urn:lsid:biomoby.org:objectrelation:isa":"ISA", - "urn:lsid:biomoby.org:objectrelation:hasa":"HASA", - "urn:lsid:biomoby.org:objectrelation:has":"HAS" - } + dc={"urn:lsid:biomoby.org:objectrelation:isa":"ISA", + "urn:lsid:biomoby.org:objectrelation:hasa":"HASA", + "urn:lsid:biomoby.org:objectrelation:has":"HAS" + } - definition={} - definition["Relationship"]={} + definition={} + definition["Relationship"]={} xmlinput=""+objectName+"" doc=parseString(self.call_method("retrieveObjectDefinition", xmlinput)) - - for child in doc.firstChild.childNodes: - if child.nodeType==child.ELEMENT_NODE and child.nodeName=="Relationship": - definition["Relationship"][dc[child.getAttribute("relationshipType")]]=[] - for elem in child.childNodes: - if elem.nodeType==elem.ELEMENT_NODE and elem.nodeName=="objectType" and elem.firstChild: - definition["Relationship"][dc[child.getAttribute("relationshipType")]].append((elem.getAttribute("articleName"), elem.firstChild.nodeValue)) - - elif child.nodeType==child.ELEMENT_NODE: - if child.firstChild: - definition[str(child.nodeName)]=child.firstChild.nodeValue - + + for child in doc.firstChild.childNodes: + if child.nodeType==child.ELEMENT_NODE and child.nodeName=="Relationship": + definition["Relationship"][dc[child.getAttribute("relationshipType")]]=[] + for elem in child.childNodes: + if elem.nodeType==elem.ELEMENT_NODE and elem.nodeName=="objectType" and elem.firstChild: + definition["Relationship"][dc[child.getAttribute("relationshipType")]].append((elem.getAttribute("articleName"), elem.firstChild.nodeValue)) + + elif child.nodeType==child.ELEMENT_NODE: + if child.firstChild: + definition[str(child.nodeName)]=child.firstChild.nodeValue + return definition def retrieveObjectSchema(self, objectName): @@ -260,6 +260,6 @@ raise ETypeMismatch def __init__(self, url="http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY05/mobycentral.pl", ns="http://mobycentral.cbr.nrc.ca/MOBY/Central"): - """Constructor for class Client - """ + """Constructor for class Client + """ Central.__init__(self, url, ns) =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/05/20 07:35:23 1.23 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/06/09 08:19:46 1.24 @@ -1,7 +1,8 @@ """Generic bioMoby data types """ -""" Date: 15th of April 2004 +""" Creation date: 15th of April 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan predefined data types: -object @@ -13,11 +14,21 @@ -MobyContent 12/13/2004: added some methods to manipulate MobyContent objects - 01/17/2005: serialization of public attributes for bioMoby objects + 01/17/2005: serialization of public attributes for bioMoby objects + 06/09/2005: changed the namespace of the message from + http://biomoby.org/moby to http://biomoby.org/moby-s + corrected a problem that prevent the Unmarshaller from + correctly unmarshall things without prefix: + + Parse of unicode string + added a constant: __MOBYNAMESPACEURI__ """ __ATTRIBUTES__=['namespace', 'id', 'articleName'] +__MOBYNAMESPACEURI__ = "http://www.biomoby.org/moby-s" + + from xml.dom.minidom import parseString class Parameter(object): @@ -26,7 +37,7 @@ def __init__(self, articleName="", value=""): self.articleName=articleName self.value=value - self.__isSecondary__=True + self.__isSecondary__=True def toMoby(self): """Returns the object as a XML @@ -34,199 +45,199 @@ return ""+str(self.value)+"" def __str__(self): - """Return the Parameter in its XML form - """ + """Return the Parameter in its XML form + """ return self.toMoby() def __repr__(self): - """Print the XML on the python command line. - """ + """Print the XML on the python command line. + """ return self.toMoby() def fromMoby(self, xml): """Get the attributes from a XML string """ - xmlelt=xml - - if isinstance(xml, str): - xmlelt=parseString(xml).firstChild - + xmlelt=xml + + if isinstance(xml, str) or isinstance(xml, unicode): + xmlelt=parseString(xml).firstChild + self.articleName=xmlelt.getAttribute('moby:articleName') - l=xmlelt.getElementsByTagName("Value") - if len(l)==0: - l=xmlelt.getElementsByTagName("moby:Value") + l=xmlelt.getElementsByTagName("Value") + if len(l)==0: + l=xmlelt.getElementsByTagName("moby:Value") - self.value=l[0].firstChild.nodeValue - + self.value=l[0].firstChild.nodeValue + class MobyGeneric(object): """A Generic object (to use with the Marshaller) """ def __init__(self, namespace="", id="", articleName="", *args, **kw): - """Class constructor, basic attributes are namespace, - identifier and the article's name - """ - self.namespace=namespace - self.id=id - self.articleName=articleName - - for name, value in kw.items(): + """Class constructor, basic attributes are namespace, + identifier and the article's name + """ + self.namespace=namespace + self.id=id + self.articleName=articleName + + for name, value in kw.items(): setattr(self, name, value) - + class MobyObject(MobyGeneric): """Define a Moby XML Object It has methods toMoby and fromMoby """ def __init__(self, prefix="moby", tag="Object", content="", *args, **kw): - """Class constructor for a bioMoby Object - """ - MobyGeneric.__init__(self, *args, **kw) - self.__prefix__=prefix - self.__tag__=tag - self.__cross__=[] - self.__PIB__=[] - - self.content=content - - + """Class constructor for a bioMoby Object + """ + MobyGeneric.__init__(self, *args, **kw) + self.__prefix__=prefix + self.__tag__=tag + self.__cross__=[] + self.__PIB__=[] + + self.content=content + + def toMoby(self): - """Deserializes the content in XML api - """ - - beginTag=["<%s:%s"%(self.__prefix__,self.__tag__)] - - #First see if the object has an identifier, a namepsace and a name - for attribute in __ATTRIBUTES__: - if hasattr(self, attribute) and getattr(self, attribute): - beginTag.append("%s:%s=\"%s\""%(self.__prefix__, attribute, getattr(self,attribute))) - - #Retrieve only object's attributes that are public. - filterFunc=lambda x: x[0] != "_" and not callable(getattr(self, x)) and x !="content" and x not in __ATTRIBUTES__ - - #Retrieve the associated objects - #In MobyObject, associated objects are object's attributes - mobyObjects=filter(filterFunc, dir(self)) - - #If none, return the tag closed - if len(mobyObjects)==0 and (not hasattr(self, "__cross__") or len(self.__cross__)==0) and (not hasattr(self, "__PIB__") or len(self.__PIB__)==0) and (not hasattr(self, "content") or (self.content==None or self.content=="")): - beginTag.append("/>") - return " ".join(beginTag) + """Deserializes the content in XML api + """ + + beginTag=["<%s:%s"%(self.__prefix__,self.__tag__)] + + #First see if the object has an identifier, a namepsace and a name + for attribute in __ATTRIBUTES__: + if hasattr(self, attribute) and getattr(self, attribute): + beginTag.append("%s:%s=\"%s\""%(self.__prefix__, attribute, getattr(self,attribute))) - #Else, end begin tag and serialize the associated objects + #Retrieve only object's attributes that are public. + filterFunc=lambda x: x[0] != "_" and not callable(getattr(self, x)) and x !="content" and x not in __ATTRIBUTES__ + + #Retrieve the associated objects + #In MobyObject, associated objects are object's attributes + mobyObjects=filter(filterFunc, dir(self)) + + #If none, return the tag closed + if len(mobyObjects)==0 and (not hasattr(self, "__cross__") or len(self.__cross__)==0) and (not hasattr(self, "__PIB__") or len(self.__PIB__)==0) and (not hasattr(self, "content") or (self.content==None or self.content=="")): + beginTag.append("/>") + return " ".join(beginTag) + + #Else, end begin tag and serialize the associated objects beginTag.append(">") - result=[" ".join(beginTag)] - - #Serialize Cross references - if hasattr(self, "__cross__") and self.__cross__: - result.append("") - - for aCross in self.__cross__: - result.append(aCross.toMoby()) - - result.append("") - + result=[" ".join(beginTag)] + + #Serialize Cross references + if hasattr(self, "__cross__") and self.__cross__: + result.append("") + + for aCross in self.__cross__: + result.append(aCross.toMoby()) + + result.append("") + #Serialize PIB - if hasattr(self, "__PIB__") and self.__PIB__: - result.append("") - - for aPIB in self.__PIB__: - result.append(str(aPIB)) - - result.append("") - - #Serialize the other attibutes - #If the attributes has a toMoby method, then use it - #Else, use a MobyMarshaller object to serialize - for mobyObject in mobyObjects: - if hasattr(getattr(self,mobyObject), "toMoby"): + if hasattr(self, "__PIB__") and self.__PIB__: + result.append("") + + for aPIB in self.__PIB__: + result.append(str(aPIB)) + + result.append("") + + #Serialize the other attibutes + #If the attributes has a toMoby method, then use it + #Else, use a MobyMarshaller object to serialize + for mobyObject in mobyObjects: + if hasattr(getattr(self,mobyObject), "toMoby"): getattr(self, mobyObject).__articleName__=mobyObject result.append(getattr(self, mobyObject).toMoby()) - else: - from bioMoby import MobyMarshaller - m=MobyMarshaller() - result.append(m.dumps(getattr(self, mobyObject), articleName=mobyObject)) - - #Put the raw content of the object - #If you want to put your special object, then then you should write - #a __str__ method + else: + from bioMoby import MobyMarshaller + m=MobyMarshaller() + result.append(m.dumps(getattr(self, mobyObject), articleName=mobyObject)) + + #Put the raw content of the object + #If you want to put your special object, then then you should write + #a __str__ method if hasattr(self, "content"): result.append("%s"%(self.content)) - - result.append(""%(self.__prefix__, self.__tag__)) - - return "".join(result) - + + result.append(""%(self.__prefix__, self.__tag__)) + + return "".join(result) + def fromMoby(self, xml): - """Deserialization method - """ - elem=xml - - if isinstance(xml, str): - doc=parseString(xml) - - elem=doc.firstChild - - self.__tag__=elem.localName - - self.__prefix__="moby" - - self.content=[] - - if elem.nodeName.split(":")>1: - self.__prefix__=elem.nodeName.split(":")[0] - - #Set the object's attributes - for attribute in elem.attributes.values(): - setattr(self, attribute.localName, str(attribute.nodeValue)) - - for child in elem.childNodes: - if child.nodeType==child.ELEMENT_NODE: - #deserializes the cross references - if child.localName=="CrossReference": - for aCross in child.childNodes: - if aCross.localName=="Xref": - aXref=MobyXref() - aXref.fromMoby(aCross) - self.__cross__.append(aXref) - if aCross.localName=="Object": - anObj=MobyObject() - anObj.fromMoby(aCross) - self.__cross__.append(anObj) - else: - #Do the same for the other objects - associatedObjectName=child.getAttribute("moby:articleName") - - if not associatedObjectName: - associatedObjectName=child.getAttribute("articleName") - - if not associatedObjectName: - associatedObjectName="associated" - - #Create an object - o=MobyObject() - o.fromMoby(child) - - #if there is already an object, then store it inside a list and - #append the other objects in the list - if hasattr(self, associatedObjectName): - if type(getattr(self, associatedObjectName)) is list: - getattr(self, associatedObjectName).append(o) - else: - setattr(self, associatedObjectName, [o]) - else: + """Deserialization method + """ + elem=xml + + if isinstance(xml, str) or isinstance(xml, unicode): + doc=parseString(xml) + + elem=doc.firstChild + + self.__tag__=elem.localName + + self.__prefix__="moby" + + self.content=[] + + if len(elem.nodeName.split(":"))>1: + self.__prefix__=elem.nodeName.split(":")[0] + + #Set the object's attributes + for attribute in elem.attributes.values(): + setattr(self, attribute.localName, str(attribute.nodeValue)) + + for child in elem.childNodes: + if child.nodeType==child.ELEMENT_NODE: + #deserializes the cross references + if child.localName=="CrossReference": + for aCross in child.childNodes: + if aCross.localName=="Xref": + aXref=MobyXref() + aXref.fromMoby(aCross) + self.__cross__.append(aXref) + if aCross.localName=="Object": + anObj=MobyObject() + anObj.fromMoby(aCross) + self.__cross__.append(anObj) + else: + #Do the same for the other objects + associatedObjectName=child.getAttribute("moby:articleName") + + if not associatedObjectName: + associatedObjectName=child.getAttribute("articleName") + + if not associatedObjectName: + associatedObjectName="associated" + + #Create an object + o=MobyObject() + o.fromMoby(child) + + #if there is already an object, then store it inside a list and + #append the other objects in the list + if hasattr(self, associatedObjectName): + if type(getattr(self, associatedObjectName)) is list: + getattr(self, associatedObjectName).append(o) + else: + setattr(self, associatedObjectName, [o]) + else: setattr(self, associatedObjectName, o) else: - self.content.append(child.nodeValue) - - self.content="".join(self.content) - + self.content.append(child.nodeValue) + + self.content="".join(self.content) + def __str__(self): - return self.toMoby() - + return self.toMoby() + def __repr__(self): - return self.toMoby() - + return self.toMoby() + class MobyXref(MobyObject): """Describes an Xref @@ -246,56 +257,56 @@ def fromMoby(self, xml): """Deserialize the Xref Object """ - if isinstance(xml, str): - doc=parseString(xml).firstChild - - doc=xml - + if isinstance(xml, str) or isinstance(xml, unicode): + doc=parseString(xml).firstChild + + doc=xml + uri=doc.namespaceURI - MobyObject.fromMoby(self, doc) + MobyObject.fromMoby(self, doc) self.authURI=doc.getAttributeNS(uri, "authURI") self.serviceName=doc.getAttributeNS(uri, "serviceName") self.evidenceCode=doc.getAttributeNS(uri, "evidenceCode") self.xrefType=doc.getAttributeNS(uri, "xrefType") - + class MobyInteger(MobyObject): """Use this object to serialize/deserialize integers """ def __init__(self, value=0, *args, **kw): - MobyObject.__init__(self, content=value, tag="Integer", *args, **kw) + MobyObject.__init__(self, content=value, tag="Integer", *args, **kw) def fromMoby(self, xml): - MobyObject.fromMoby(self, xml) - + MobyObject.fromMoby(self, xml) + try: - self.content = int(self.content) + self.content = int(self.content) except: self.content=0 - + class MobyFloat(MobyObject): """Serialize/deserialize floating point numbers """ def __init__(self, value=0, *args, **kw): - MobyObject.__init__(self, content=value, tag="Float", *args, **kw) - + MobyObject.__init__(self, content=value, tag="Float", *args, **kw) + def fromMoby(self, xml): - MobyObject.fromMoby(self, xml) - + MobyObject.fromMoby(self, xml) + try: - self.content=float(self.content) + self.content=float(self.content) except: - self.content=0.0 - + self.content=0.0 + class MobyString(MobyObject): """String Moby object """ def __init__(self, content="", *args, **kw): - MobyObject.__init__(self, content=content, *args, **kw) - self.__tag__="String" + MobyObject.__init__(self, content=content, *args, **kw) + self.__tag__="String" class MobyContent: """The class describes a Moby Content (for queries or answers) @@ -313,17 +324,17 @@ self.queryData=queryData def __str__(self): - """return the XML form of the Moby Content object - """ - return self.toMoby() - + """return the XML form of the Moby Content object + """ + return self.toMoby() + def toMoby(self): """The XML reprentation of the content """ from mobyMarshal import MobyMarshaller m=MobyMarshaller() - result=['") - #For serialization, use the MobyMarshaller object - + #For serialization, use the MobyMarshaller object + for queryObject in self.queryData[queryKey]: #if the Collection ('CollectionName',[MobyObjects]) if queryObject.__class__ is tuple: @@ -363,19 +374,19 @@ return "".join(result) def fromMoby(self, xmlObject): - """fill the properties from an XML + """fill the properties from an XML """ from bioMoby import MobyUnmarshaller - - um=MobyUnmarshaller() + + um=MobyUnmarshaller() self.queryData={} - - doc=xmlObject - - if isinstance(xmlObject, str): - doc=parseString(xmlObject) - + + doc=xmlObject + + if isinstance(xmlObject, str) or isinstance(xmlObject, unicode): + doc=parseString(xmlObject) + mdl=doc.getElementsByTagName('mobyData') if not mdl: @@ -384,115 +395,115 @@ #For each query for elt in mdl: #Get the ID - queryID=str(elt.getAttribute('queryID')) + queryID=str(elt.getAttribute('queryID')) if not queryID: queryID=str(elt.getAttribute('moby:queryID')) - #Collect the data + #Collect the data data=[] - #for each datum translate it in MobyObject, and put it in the list + #for each datum translate it in MobyObject, and put it in the list for datum in elt.childNodes: - #If it is a collection + #If it is a collection if datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Collection": - articleName=datum.getAttribute('moby:articleName') + articleName=datum.getAttribute('moby:articleName') articles=[] for article in datum.childNodes: if article.nodeType==article.ELEMENT_NODE and article.localName=="Simple": - for child in article.childNodes: - if child.nodeType==child.ELEMENT_NODE: + for child in article.childNodes: + if child.nodeType==child.ELEMENT_NODE: articles.append(um.loadn(child)) data.append((articleName, articles)) - #if it is a Simple object + #if it is a Simple object elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Simple": - for elt in datum.childNodes: + for elt in datum.childNodes: if elt.nodeType==elt.ELEMENT_NODE: - o=um.loadn(elt) - data.append(o) - elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Parameter": - #It is a Parameter - p=Parameter() - p.fromMoby(datum) - data.append(p) + o=um.loadn(elt) + data.append(o) + elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Parameter": + #It is a Parameter + p=Parameter() + p.fromMoby(datum) + data.append(p) self.queryData[queryID]=data - + def __getitem__(self, key): - """Get a query from his name + """Get a query from his name """ return self.queryData[key] def __setitem__(self, key, item): - """Store a query in the dictionary - """ + """Store a query in the dictionary + """ self.queryData[key]=item def __len__(self): - """Return the number of elements inside the dictionary - """ + """Return the number of elements inside the dictionary + """ return len(self.queryData) def keys(self): - """Return all queries's name - """ + """Return all queries's name + """ return self.queryData.keys() - + def collectionToQueries(self, aCollection): - """Turn a collection of object into a set of queries - """ - queries={} - queryName=aCollection[0] - - queryID=1 - - for aSimple in aCollection[1]: - queries["%s-%s"%(queryName, queryID)]=aSimple - - return queries - - + """Turn a collection of object into a set of queries + """ + queries={} + queryName=aCollection[0] + + queryID=1 + + for aSimple in aCollection[1]: + queries["%s-%s"%(queryName, queryID)]=aSimple + + return queries + + def getObject(self, queryName, objectName): - """Get an object from a query with its name - """ - filterfunc=lambda obj: not hasattr(obj,'__isSecondary__') and hasattr(obj, "articleName") and obj.articleName==objectName - - for obj in filter(filterfunc, self.queryData[queryName]): + """Get an object from a query with its name + """ + filterfunc=lambda obj: not hasattr(obj,'__isSecondary__') and hasattr(obj, "articleName") and obj.articleName==objectName + + for obj in filter(filterfunc, self.queryData[queryName]): return obj - + def getObjects(self, queryName): - """Retrieve objects from a query - """ - filterfunc=lambda obj: not hasattr(obj, "__isSecondary__") - - return filter(filterfunc, self.queryData[queryName]) - + """Retrieve objects from a query + """ + filterfunc=lambda obj: not hasattr(obj, "__isSecondary__") + + return filter(filterfunc, self.queryData[queryName]) + def getParameters(self, queryName): - """Retrieve parameters from a query - """ - filterfunc=lambda param: hasattr(param, "__isSecondary__") - - result={} - for param in filter(filterfunc, self.queryData[queryName]): - result[param.articleName]=param.value - - return result + """Retrieve parameters from a query + """ + filterfunc=lambda param: hasattr(param, "__isSecondary__") + + result={} + for param in filter(filterfunc, self.queryData[queryName]): + result[param.articleName]=param.value + + return result def getParameter(self, queryName, parameterName): - """Retrieve a parameter from a query and his name - """ - filterfunc=lambda param: hasattr(param, "__isSecondary__") and hasattr(param, "articleName") and param.articleName==parameterName - - l=filter(filterfunc, self.queryData[queryName]) - - if l: - return l[0] - + """Retrieve a parameter from a query and his name + """ + filterfunc=lambda param: hasattr(param, "__isSecondary__") and hasattr(param, "articleName") and param.articleName==parameterName + + l=filter(filterfunc, self.queryData[queryName]) + + if l: + return l[0] + def __repr__(self): - """put the xml of the Content - """ - return self.__str__() + """put the xml of the Content + """ + return self.__str__() =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py 2005/04/19 15:41:50 1.4 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py 2005/06/09 08:19:46 1.5 @@ -1,7 +1,7 @@ """bioMoby exceptions """ -"""Date: 15th of April 2004 +"""Creation Date: 15th of April 2004 Author: Wong Yan bioMoby exceptions @@ -41,4 +41,4 @@ """A XML input is not a Moby XML Object. """ def __str__(self): - return "The bioMoby XML object couldn't be parsed" \ No newline at end of file + return "The bioMoby XML object couldn't be parsed" =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/04/19 15:41:50 1.8 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/09 08:19:46 1.9 @@ -2,7 +2,8 @@ """ -""" Date 19th of May 2004 +""" Creation date 19th of May 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan Topic: Marshalling moby Objects @@ -10,7 +11,10 @@ 01/17/2005: MobyMarshaller and MobyUnmarshaller can operate on all objects serialisation and deserialisation are done only on public (no _ prefix) non callable attributes - The serialisation and deserialisation is recursive. + The serialisation and deserialisation is recursive. + 06/09/2005: Change the doc.getElementsByTagNameNS("http://biomoby.org/moby",'mobyContent') to + doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') Parsing is now + independant from the namespace. """ from xml.dom.minidom import parseString @@ -20,8 +24,8 @@ """ def _marshal(self, value, articleName=""): - """this method do the serialization of the object - """ + """this method do the serialization of the object + """ if type(value).__name__=='NoneType': return "" @@ -29,9 +33,9 @@ method="m_"+tvalue - if hasattr(value, "toMoby"): - return value.toMoby() - + if hasattr(value, "toMoby"): + return value.toMoby() + if hasattr(self, method): return getattr(self,method)(value,articleName=articleName) @@ -46,8 +50,8 @@ return str(m) def m_unicode(self, value, articleName=""): - """Turn a unicode string into a mobyString object - """ + """Turn a unicode string into a mobyString object + """ return self.m_str(str(value), articleName) def m_string(self, value, articleName=""): @@ -59,18 +63,18 @@ """Turn an integer into a Moby XML object """ from bioMoby.mobyDataTypes import MobyInteger - m=MobyInteger(value, namespace=namespace, id=id, articleName=articleName) - - return m.toMoby() - + m=MobyInteger(value, namespace=namespace, id=id, articleName=articleName) + + return m.toMoby() + def m_float(self, value, namespace="", id="", articleName=""): """Turn a float into a Moby XML object """ from bioMoby.mobyDataTypes import MobyFloat - m=MobyFloat(value, namespace=namespace, id=id, articleName=articleName) - - return m.toMoby() - + m=MobyFloat(value, namespace=namespace, id=id, articleName=articleName) + + return m.toMoby() + def m_list(self, value, articleName=""): """Turn a list into a Moby XML object """ @@ -113,50 +117,50 @@ def _compoundObject(self, value, articleName=""): """transforms an object and all properties into a XML """ - - result=[] - - properties=[] - - filterfunc=lambda x: x[0] != "_" and not callable(getattr(value, x)) and x !="content" and x not in ["id", "namespace", "articleName", "content"] - attribfunc= lambda x: hasattr(value, x) - - tagName="moby:%s"%type(value).__name__ - - if hasattr(value, "__tag__") and value.__tag__: - tagName="moby:%s"%value.__tag__ - - header=["<%s"%tagName] - - for attribute in filter(attribfunc, ["id", "namespace", "articleName"]): - header.append("moby:%s=\"%s\""%(attribute,getattr(value,attribute))) - - for prop in filter(filterfunc, dir(value)): - properties.append(self._marshal(getattr(value, prop), articleName=prop)) - - if not properties and not (hasattr(value, "content") and value.content): - header.append("/>") - else: - header.append(">") - - result.append(" ".join(header)) - - if properties: - result.append("".join(properties)) - - if hasattr(value, "content") and value.content: - result.append(""%value.content) - - if properties: - result.append(""%tagName) - - - return r"".join(result) - - + + result=[] + + properties=[] + + filterfunc=lambda x: x[0] != "_" and not callable(getattr(value, x)) and x !="content" and x not in ["id", "namespace", "articleName", "content"] + attribfunc= lambda x: hasattr(value, x) + + tagName="moby:%s"%type(value).__name__ + + if hasattr(value, "__tag__") and value.__tag__: + tagName="moby:%s"%value.__tag__ + + header=["<%s"%tagName] + + for attribute in filter(attribfunc, ["id", "namespace", "articleName"]): + header.append("moby:%s=\"%s\""%(attribute,getattr(value,attribute))) + + for prop in filter(filterfunc, dir(value)): + properties.append(self._marshal(getattr(value, prop), articleName=prop)) + + if not properties and not (hasattr(value, "content") and value.content): + header.append("/>") + else: + header.append(">") + + result.append(" ".join(header)) + + if properties: + result.append("".join(properties)) + + if hasattr(value, "content") and value.content: + result.append(""%value.content) + + if properties: + result.append(""%tagName) + + + return r"".join(result) + + def dumps(self, value, articleName=""): - """Serialize the object into a Moby XML object - """ + """Serialize the object into a Moby XML object + """ return self._marshal(value, articleName) @@ -169,8 +173,8 @@ """ import re - aName=str(aName) - + aName=str(aName) + if aName=="": return "" @@ -189,163 +193,215 @@ return "".join(t) def loadn(self, xmlNode): - """Deserializes an XML node and return a Python Object - """ - import bioMoby.mobyDataTypes - import bioMoby.ontology - - nn=xmlNode.localName - + """Deserializes an XML node and return a Python Object + """ + import bioMoby.mobyDataTypes + import bioMoby.ontology + + nn=xmlNode.localName + #Try to see if this object got a deserializer object2build=self._cleanName(nn) objectName=str.upper(object2build[0])+object2build[1:] - - if hasattr(bioMoby.mobyDataTypes, "Moby%s"%objectName): - o=getattr(bioMoby.mobyDataTypes, "Moby%s"%objectName)() - if hasattr(o, "fromMoby"): - o.fromMoby(xmlNode) - return o - elif hasattr(bioMoby.ontology, "Moby%s"%objectName): - o=getattr(bioMoby.ontology, "Moby%s"%objectName)() - if hasattr(o, "fromMoby"): - o.fromMoby(xmlNode) - return o - + + if hasattr(bioMoby.mobyDataTypes, "Moby%s"%objectName): + o=getattr(bioMoby.mobyDataTypes, "Moby%s"%objectName)() + if hasattr(o, "fromMoby"): + o.fromMoby(xmlNode) + return o + elif hasattr(bioMoby.ontology, "Moby%s"%objectName): + o=getattr(bioMoby.ontology, "Moby%s"%objectName)() + if hasattr(o, "fromMoby"): + o.fromMoby(xmlNode) + return o + methodName=str('m_'+nn) - - if not hasattr(self, methodName): + + if not hasattr(self, methodName): methodName="m_Object" - -# try: + +# try: return getattr(self,methodName)(xmlNode) # except: -# #if not, Raise an invalid moby XML :-( -# from bioMoby.mobyExceptions import EInvalidMobyXML - +# #if not, Raise an invalid moby XML :-( +# from bioMoby.mobyExceptions import EInvalidMobyXML + # raise EInvalidMobyXML - + def loads(self, xmlString): - """ Deserializes an xml string and return a bioMoby-Python object - """ + """ Deserializes an xml string and return a bioMoby-Python object + """ if xmlString=="": return None -# _typesmodule=["bioMoby.mobyDataTypes", "bioMoby.ontology"] - +# _typesmodule=["bioMoby.mobyDataTypes", "bioMoby.ontology"] + doc=parseString(xmlString) - mcl=doc.getElementsByTagNameNS('http://www.biomoby.org/moby','mobyContent') + mcl=doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') if len(mcl)!=0: return self.m_MobyContent(doc) element=doc.firstChild - return self.loadn(element) + return self.loadn(element) def m_Integer(self, value): - """Turn a Integer XML element into an integer - """ - value.normalize() - - if value.firstChild: - return int(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) - else: - return 0 - + """Turn a Integer XML element into an integer + """ + value.normalize() + + if value.firstChild: + return int(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) + else: + return 0 + def m_Float(self, value): - """Turn a Float XML element into a float number - """ - value.normalize() - if value.firstChild: - return float(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) + """Turn a Float XML element into a float number + """ + value.normalize() + if value.firstChild: + return float(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) return 0.0 - + def m_String(self, value): - """Turn a Moby XML String element into a String object - """ - - cnt=[] - value.normalize() - - for aChild in value.childNodes: - if aChild.nodeType==aChild.TEXT_NODE or aChild.nodeType==aChild.CDATA_SECTION_NODE: - cnt.append(aChild.wholeText) - - return r"".join(cnt) - + """Turn a Moby XML String element into a String object + """ + + cnt=[] + value.normalize() + + for aChild in value.childNodes: + if aChild.nodeType==aChild.TEXT_NODE or aChild.nodeType==aChild.CDATA_SECTION_NODE: + cnt.append(aChild.wholeText) + + return r"".join(cnt) + def m_Object(self, value): - """Turn any XML into a generic object - """ - filterFunc= lambda x: x.nodeType==x.ELEMENT_NODE - - typeName="GMoby%s"%str(value.localName) - - from bioMoby.mobyDataTypes import MobyGeneric - - NewType=type(typeName, (MobyGeneric,), {}) - - anObject=NewType() - - anObject.__prefix__="moby" - anObject.__tag__=str(value.localName) - - for tupleAttribute in value.attributes.itemsNS(): - #First item, second field: - setattr(anObject, str(tupleAttribute[0][1]), str(tupleAttribute[1])) - - i=0 - for elem in filter(filterFunc, value.childNodes): - methodName="m_%s"%str(elem.localName) - - articleName=elem.getAttribute("moby:articleName") - - if not articleName: - articleName=elem.getAttribute("articleName") - - if not articleName: - articleName="attribute_%s"%i - - if hasattr(self, methodName): - prop=getattr(self, methodName)(elem) - else: - prop=self.m_Object(elem) - - if hasattr(anObject, articleName): - t=prop - if not type(getattr(anObject, articleName)) is list: - t=getattr(anObject, articleName) - setattr(anObject, articleName, []) - getattr(anObject, articleName).append(t) - else: - setattr(anObject, articleName, prop) - i+=1 - - content=[] - - isContentNode= lambda x: x.nodeType==x.TEXT_NODE or x.nodeType==x.CDATA_SECTION_NODE - - for elem in filter(isContentNode, value.childNodes): - content.append(str(elem.nodeValue)) - - if content: - anObject.content(r"".join(content)) - - return anObject + """Turn any XML into a generic object + """ + filterFunc= lambda x: x.nodeType==x.ELEMENT_NODE + + typeName="GMoby%s"%str(value.localName) + + from bioMoby.mobyDataTypes import MobyGeneric + + NewType=type(typeName, (MobyGeneric,), {}) + + anObject=NewType() + + anObject.__prefix__="moby" + anObject.__tag__=str(value.localName) + + for tupleAttribute in value.attributes.itemsNS(): + #First item, second field: + setattr(anObject, str(tupleAttribute[0][1]), str(tupleAttribute[1])) + + i=0 + for elem in filter(filterFunc, value.childNodes): + methodName="m_%s"%str(elem.localName) + + articleName=elem.getAttribute("moby:articleName") + + if not articleName: + articleName=elem.getAttribute("articleName") + + if not articleName: + articleName="attribute_%s"%i + + if hasattr(self, methodName): + prop=getattr(self, methodName)(elem) + else: + prop=self.m_Object(elem) + + if hasattr(anObject, articleName): + t=prop + if not type(getattr(anObject, articleName)) is list: + t=getattr(anObject, articleName) + setattr(anObject, articleName, []) + getattr(anObject, articleName).append(t) + else: + setattr(anObject, articleName, prop) + i+=1 + + content=[] + + isContentNode= lambda x: x.nodeType==x.TEXT_NODE or x.nodeType==x.CDATA_SECTION_NODE + + for elem in filter(isContentNode, value.childNodes): + content.append(str(elem.nodeValue)) + + if content: + anObject.content(r"".join(content)) + + return anObject def m_MobyContent(self, value): - """Turn an MobyContentXML into a MobyContent object - """ - from bioMoby.mobyDataTypes import MobyContent - - mc=MobyContent({}) - - mc.fromMoby(value) - - del MobyContent - - return mc - + """Turn an MobyContentXML into a MobyContent object + """ + from bioMoby.mobyDataTypes import MobyContent + + mc=MobyContent({}) + + mc.fromMoby(value) + + del MobyContent + + return mc + + + def loadm(self, value): + """ Feed a MobyContent object with data from an XML MobyContent + """ + from bioMoby.mobyDataTypes import MobyContent, Parameter + + from xml.dom import pulldom + + events = pulldom.parseString(value) + + mc=MobyContent({}) + queryid="" + currentCollection = None + isCollection=False + + for (event, node) in events: + if event == pulldom.START_ELEMENT: + if node.localName in ["MOBY", "mobyContent", "Simple"]: + pass + elif node.localName == "mobyData": + queryid=node.getAttribute("moby:queryID") + if not queryid: + queryid=node.getAttribute("queryID") + mc[queryid]=[] + elif node.localName == "Collection": + isCollection=True + collectionName=node.getAttribute("moby:articleName") + if not collectionName: + collectionName=node.getAttribute("articleName") + mc[queryid].append( (collectionName, []) ) + currentCollection=mc[queryid][-1][1] + elif node.localName == "Parameter": + p=Parameter() + events.expandNode(node) + p.fromMoby(node) + if isCollection: + currentCollection.append(p) + else: + mc[queryid].append(p) + else: + events.expandNode(node) + if isCollection: + currentCollection.append(self.loadn(node)) + else: + mc[queryid].append(self.loadn(node)) + if event == pulldom.END_ELEMENT: + if node.localName == "Collection": + isCollection=False + del node + + del MobyContent, pulldom, Parameter + return mc =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py 2005/06/09 08:19:46 1.6 @@ -1,7 +1,7 @@ """Classes for registration of object's classes, service's type, namespaces """ -""" Date: 16th of April 2004 +""" Creation Date: 16th of April 2004 Author: Wong Yan @@ -19,7 +19,7 @@ self.success=0 self.id="" self.message="" - self.RDF="" + self.RDF="" #Parse the document, retrieve the success, id, message and RDF fields doc=parseString(xmlInput) @@ -32,9 +32,9 @@ self.message=doc.getElementsByTagName("message")[0].childNodes[0].nodeValue try: if len(doc.getElementsByTagName("RDF"))>0: - self.RDF=doc.getElementsByTagName("RDF")[0].firstChild.toprettyxml() - except: - pass + self.RDF=doc.getElementsByTagName("RDF")[0].firstChild.toprettyxml() + except: + pass def __str__(self): """Return the moby xml of the instance @@ -63,7 +63,7 @@ self.authURI=authURI self.description=description #it uses a central object for registration - from mobyClient import Central + from mobyClient import Central self.central=Central() del Central @@ -78,7 +78,7 @@ self.serviceType=serviceType GeneralInformations.__init__(self, contact=contactEmail, authURI=authURI, description=description) self.relationship=relationship - self.serviceType=serviceType + self.serviceType=serviceType def __str__(self): """Return the instance as a Moby XML @@ -94,7 +94,6 @@ result.append("") - return "".join(result) =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:19:46 1.6 @@ -2,11 +2,13 @@ the Service class can be used for registration or execution. """ -""" Date: 15th of April 2004 +""" Creation date: 15th of April 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan 01/17/2004: Service can be executed as a Thread, thus several queries can be made in the same time. + 06/09/2005: Service Registration will not throw a Exception if signature URL is empty """ from mobyRegister import GeneralInformations @@ -244,14 +246,14 @@ self.type="" self.category="" self.url="" - self.signatureURL="" + self.signatureURL="" self.authoritative=0 self.inputObjects=[] self.outputObjects=[] self.secondaryArticles=[] self.methods=[] self.results="" - + if len(arg)==1 and arg[0].__class__ is dict: arg=arg[0] for key in arg.keys(): @@ -264,8 +266,8 @@ self.type=arg[key] elif key=='url': self.url=arg['url'] - elif key=='signatureURL': - self.signatureURL=arg['signatureURL'] + elif key=='signatureURL': + self.signatureURL=arg['signatureURL'] elif key=='authoritative': self.authoritative=arg[key] elif key=='contactEmail': @@ -311,7 +313,7 @@ from SOAPpy import SOAPProxy - webservice=SOAPProxy(self.url,namespace=self.namespace) + webservice=SOAPProxy(self.url,namespace=self.namespace) if method=="": if len(self.methods)==0: @@ -325,8 +327,8 @@ webservice.soapaction=self.namespace+"#"+method - if debug: - webservice.config.debug=1 + if debug: + webservice.config.debug=1 toQuery=str(query) @@ -339,8 +341,8 @@ #try to return a MobyContent Object instead from bioMoby.mobyDataTypes import MobyContent - mc=MobyContent() - mc.fromMoby(result) + mc=MobyContent() + mc.fromMoby(result) del MobyContent @@ -354,7 +356,7 @@ result.append(""+self.type+"") result.append(""+self.authURI+"") result.append(""+self.url+"") - result.append(""+self.signatureURL+"") + result.append(""+self.signatureURL+"") result.append(""+self.contact+"") result.append(""+`self.authoritative`+"") result.append("") @@ -367,10 +369,10 @@ elif inputObject.__class__ is dict: result.append('') - for aSimple in inputObject[inputObject.keys()[0]]: + for aSimple in inputObject[inputObject.keys()[0]]: result.append(str(aSimple)) - result.append("") + result.append("") else: from mobyExceptions import EInvalidArgument raise EInvalidArgument, "Bad input object" @@ -385,10 +387,10 @@ elif output.__class__ is dict: result.append('') - for aSimple in output[output.keys()[0]]: + for aSimple in output[output.keys()[0]]: result.append(str(aSimple)) - result.append("") + result.append("") else: from mobyExceptions import EInvalidArgument raise EInvalidArgument, "Bad output object" @@ -410,10 +412,10 @@ """Register the service on the Moby server has been added here a code to verify that signatureURL is not empty :) """ - if self.signatureURL=="": - from mobyExceptions import EInvalidArgument - raise EInvalidArgument, "field signatureURL cannot be empty" - + #if self.signatureURL=="": + # from mobyExceptions import EInvalidArgument + # raise EInvalidArgument, "field signatureURL cannot be empty" + xmlinput=""+str(self)+"" from mobyRegister import RegistrationObject @@ -431,29 +433,29 @@ return result def _executeThread(self, mobyContent): - """Execute the service, store the result in a field - """ + """Execute the service, store the result in a field + """ - self.results=self.execute(mobyContent, returnXml=(mobyContent.__class__ is str)) + self.results=self.execute(mobyContent, returnXml=(mobyContent.__class__ is str)) def start(self, mobycontent, timeout=-1): - """Start the service as it was a thread - """ - from threading import Thread + """Start the service as it was a thread + """ + from threading import Thread - if timeout != -1: - self._execThread=Thread(target=self._executeThread, args=(mobycontent,)) - else: - self._execThread=Thread(target=self._executeThread, args=(mobycontent,), timeout=timeout) + if timeout != -1: + self._execThread=Thread(target=self._executeThread, args=(mobycontent,)) + else: + self._execThread=Thread(target=self._executeThread, args=(mobycontent,), timeout=timeout) - self._execThread.start() + self._execThread.start() def join(self): - """Same as Thread.join - """ - self._execThread.join() + """Same as Thread.join + """ +self._execThread.join() @@ -502,17 +504,17 @@ for childNode in node.childNodes: if childNode.nodeName=="datatype": - if childNode.firstChild: + if childNode.firstChild: secondary.type=childNode.firstChild.nodeValue elif childNode.nodeName=="default": if childNode.firstChild: - secondary.default=childNode.firstChild.nodeValue + secondary.default=childNode.firstChild.nodeValue elif childNode.nodeName=="min": if childNode.firstChild: - secondary.min=childNode.firstChild.nodeValue + secondary.min=childNode.firstChild.nodeValue elif childNode.nodeName=="max": if childNode.firstChild: - secondary.max=childNode.firstChild.nodeValue + secondary.max=childNode.firstChild.nodeValue elif childNode.nodeName=="enum": if childNode.firstChild: secondary.enums.append(childNode.firstChild.nodeValue) @@ -547,7 +549,7 @@ service.contact=child.firstChild.nodeValue elif child.nodeName=="URL" and child.firstChild: service.url=child.firstChild.nodeValue - elif child.nodeName=="signatureURL" and child.firstChild: + elif child.nodeName=="signatureURL" and child.firstChild: service.signatureURL=child.firstChild.nodeValue elif child.nodeName=="Input": for article in child.childNodes: From kawas at pub.open-bio.org Thu Jun 2 15:48:01 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:48:01 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52Fm1cd015581@pub.open-bio.org> kawas Thu Jun 2 11:48:01 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool In directory pub.open-bio.org:/tmp/cvs-serv15536/org/biomoby/client/ui/graphical/applets/objectCreationTool Modified Files: ObjectCreationTool.java MobyXML.java MobyUtilities.java Registration.java Pair.java MobyPlainText.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool ObjectCreationTool.java,1.1,1.2 MobyXML.java,1.3,1.4 MobyUtilities.java,1.1,1.2 Registration.java,1.2,1.3 Pair.java,1.1,1.2 MobyPlainText.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.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/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/ObjectCreationTool.java 2005/06/02 15:48:01 1.2 @@ -167,7 +167,6 @@ /** * This method initializes this * - * @return void */ public void init() { this.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 24)); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java 2005/04/20 21:42:10 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyXML.java 2005/06/02 15:48:01 1.4 @@ -18,7 +18,7 @@ /** * This class contains all the methods required to output BioMoby Objects in XML. * @author Eddie Kawas - * @Jun 17, 2004 + * Jun 17, 2004 * */ public class MobyXML { @@ -305,7 +305,6 @@ * * PRE: None. *

POST: All of the relationships, inheritance and containment, are removed.

POST:

- * @return + * @return Registration */ public Registration getRegistration() { return registration; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.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/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java 2005/06/02 15:48:01 1.2 @@ -16,7 +16,7 @@ /** * Utilities that are useful for retrieving information about certain objects, parsing objects, etc. * @author Eddie Kawas - * @Jun 10, 2004 + * Jun 10, 2004 * */ public class MobyUtilities { @@ -27,7 +27,7 @@ * => The first item in the list is a string representation of the parent

* => The second item is a linked list of all the 'HAS' container relationships

* => The third item is a linked list of all the 'HASA' container relationships - * @param name, the name of the object to query for. + * @param name - the name of the object to query for. * @return returns a linked list {String, LinkedList, LinkedList} of relationships */ public static LinkedList GetRelations(String name) throws IOException { @@ -119,7 +119,6 @@ * PRE: ll is a valid linkedlist, panelDetails is a valid MobyUserPanel.

* POST: All the relations of child are outputted to the MobyUserPanel panelDetails. * @param ll - a linked list created via GetRelations() - * @param panelDetails - the MobyUserPanel to output the relationships * @param child - the object that GetRelations() was called with. */ public static String WriteToPanel(LinkedList ll, String child) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Registration.java,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/client/ui/graphical/applets/objectCreationTool/Registration.java 2005/04/20 21:42:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Registration.java 2005/06/02 15:48:01 1.3 @@ -12,7 +12,7 @@ /** * @author Eddie Kawas - * @Jun 21, 2004 + * Jun 21, 2004 * */ public class Registration extends MobyDataType{ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Pair.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/client/ui/graphical/applets/objectCreationTool/Pair.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/Pair.java 2005/06/02 15:48:01 1.2 @@ -5,7 +5,7 @@ * This class contains the methods required to encapsulate

the container relationships * 'HAS' and 'HASA' from the BioMoby Object Ontology. * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 * */ public class Pair { @@ -28,7 +28,6 @@ /** * PRE: None.

* POST: The article name is retrieved. - * @param - none. * @return the contained objects name */ public String getArticlename() { @@ -38,7 +37,6 @@ /** * PRE: None.

* POST: The attribute is retrieved - * @param - none. * @return the contained objects attribute */ public String getAttribute() { @@ -48,7 +46,6 @@ /** * PRE: none.

* POST: a String representation of a Pair is returned. - * @param - none. * @return returns the string representation of a pair. */ public String toString() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyPlainText.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/client/ui/graphical/applets/objectCreationTool/MobyPlainText.java 2005/04/07 16:42:26 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyPlainText.java 2005/06/02 15:48:01 1.2 @@ -10,7 +10,7 @@ * This class is used to maintain and then output a plain * text representation of an object. * @author Eddie Kawas - * @Jun 12, 2004 + * Jun 12, 2004 * */ public class MobyPlainText { @@ -145,7 +145,6 @@ * * PRE: None.

* POST: All of the relationships, inheritance and containment, are removed. - * @return nothing. */ public void clear() { renameRoot("MyObject"); From kawas at pub.open-bio.org Thu Jun 2 15:48:28 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:48:28 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52FmSBZ015655@pub.open-bio.org> kawas Thu Jun 2 11:48:28 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool In directory pub.open-bio.org:/tmp/cvs-serv15594/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool Modified Files: ServiceFocusListener.java MobyCollection.java InputOutputActionListener.java MobyUtilities.java HelpActionListener.java ServiceCreationTool.java ButtonBeautifier.java NamespaceTree.java ServiceTypeTree.java Pair.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool ServiceFocusListener.java,1.1,1.2 MobyCollection.java,1.1,1.2 InputOutputActionListener.java,1.1,1.2 MobyUtilities.java,1.1,1.2 HelpActionListener.java,1.1,1.2 ServiceCreationTool.java,1.2,1.3 ButtonBeautifier.java,1.2,1.3 NamespaceTree.java,1.1,1.2 ServiceTypeTree.java,1.1,1.2 Pair.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java 2005/06/02 15:48:28 1.2 @@ -11,7 +11,7 @@ /** * * @author Edward Kawas - * @date July 7, 2004 + * date July 7, 2004 * This class implements the FocusListener for the Service Creation Tool. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.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/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyCollection.java 2005/06/02 15:48:28 1.2 @@ -11,7 +11,7 @@ /** * * @author Edward Kawas - * @date July 19, 2004 + * date July 19, 2004 * This class represents a collection, either input or output, for the Moby Services. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/InputOutputActionListener.java 2005/06/02 15:48:28 1.2 @@ -12,7 +12,7 @@ /** * * @author Edward Kawas

- * @date July 16, 2004

+ * date July 16, 2004

* This class implements the ActionListener interface. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.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/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/MobyUtilities.java 2005/06/02 15:48:28 1.2 @@ -9,7 +9,7 @@ /** * Utilities that are useful for retrieving information about certain objects, parsing objects, etc. * @author Eddie Kawas - * @Jun 10, 2004 + * Jun 10, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ @@ -74,7 +74,6 @@ * PRE: ll is a valid linkedlist, panelDetails is a valid MobyUserPanel.

* POST: All the relations of child are outputted to the MobyUserPanel panelDetails. * @param ll - a linked list created via GetRelations() - * @param panelDetails - the MobyUserPanel to output the relationships * @param child - the object that GetRelations() was called with. */ public static String WriteToPanel(LinkedList ll, String child) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/HelpActionListener.java 2005/06/02 15:48:28 1.2 @@ -12,7 +12,7 @@ /** * @author Edward Kawas - * @date Sep 1, 2004 + * Sep 1, 2004 *

This class implements the ActionListener interface. *

The sole purpose of this class is to provide messages to *

the user regarding the form inputs for a service instance. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java,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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java 2005/04/07 21:01:13 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceCreationTool.java 2005/06/02 15:48:28 1.3 @@ -22,7 +22,7 @@ /** * * @author Edward Kawas - * @date Jul 7, 2004 + * date Jul 7, 2004 * This class is the main class for the service instance creation tool. *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com @@ -215,7 +215,7 @@ } /** - * @param i, the radio button id. + * @param i - the radio button id. * -1 => no button is selected. * 1 => Primary button is selected. * 2 => Secondary button is selected. @@ -227,7 +227,7 @@ /** * * @return an int reprepresenting the radio button that is selected. - * @see setRadioButtonID(int i) + * @see #setRadioButtonID(int i) */ public int getRadioButtonID() { return radioButtonID; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java,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/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java 2005/04/20 21:42:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ButtonBeautifier.java 2005/06/02 15:48:28 1.3 @@ -16,7 +16,7 @@ /** * @author Eddie Kawas - * @Jun 30, 2004 + * Jun 30, 2004 *

* This class enhances the esthetic look of buttons. *

@@ -206,7 +206,7 @@ * POST: The powered by moby services image is returned in a label. *

* - * @param cls - + * @param c - * the class where program execution began. */ public static JLabel getMobyImage(Class c) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.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/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/NamespaceTree.java 2005/06/02 15:48:28 1.2 @@ -25,9 +25,9 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the Services contained in the BioMoby Service Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ @@ -50,7 +50,8 @@ * POST: A moby tree is constructed with the root node labeled as 'Namespace'

* and the material for the tree taken from the RDF located at * @link http://biomoby.org/RESOURCES/MOBY-S/Namespace - * @param canEdit, if true, then the nodes are editable, else they are not. + * @param canEdit - if true, then the nodes are editable, else they are not. + * @param rdf - rdf for namespaces. */ public NamespaceTree(boolean canEdit, String rdf) { @@ -92,7 +93,6 @@ /** * PRE: None.

* POST: The MobyTree Namespace contains an empty tree with a single node labeled 'Namespace' - * @return - none. * */ public void clear() { @@ -103,7 +103,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -124,7 +123,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -216,7 +215,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -268,8 +266,6 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. * */ public void makeObjectTree() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceTypeTree.java 2005/06/02 15:48:28 1.2 @@ -25,9 +25,9 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the Services contained in the BioMoby Service Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com * @@ -51,8 +51,8 @@ * POST: A moby tree is constructed with the root node labeled as 'Service'

* and the material for the tree taken from the RDF located at * @link http://biomoby.org/RESOURCES/MOBY-S/Service - * @param canEdit, if true, then the nodes are editable, else they are not. - * @param rdf, the location of the RDF for the service type tree. + * @param canEdit - if true, then the nodes are editable, else they are not. + * @param rdf - the location of the RDF for the service type tree. */ public ServiceTypeTree(boolean canEdit, String rdf) { @@ -96,7 +96,6 @@ /** * PRE: None.

* POST: The MobyTree object contains an empty tree with a single node labeled 'Object' - * @return - none. * */ public void clear() { @@ -107,7 +106,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -128,7 +126,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -220,7 +218,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -272,8 +269,6 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. * */ public void makeObjectTree() { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.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/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/Pair.java 2005/06/02 15:48:28 1.2 @@ -5,7 +5,7 @@ * This class contains the methods required to encapsulate

the container relationships * 'HAS' and 'HASA' from the BioMoby Object Ontology. * @author Eddie Kawas - * @May 31, 2004 + * May 31, 2004 *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ @@ -30,7 +30,6 @@ /** * PRE: None.

* POST: The article name is retrieved. - * @param - none. * @return the contained objects name */ public String getArticlename() { @@ -40,7 +39,6 @@ /** * PRE: None.

* POST: The attribute is retrieved - * @param - none. * @return the contained objects attribute */ public String getAttribute() { @@ -50,7 +48,6 @@ /** * PRE: none.

* POST: a String representation of a Pair is returned. - * @param - none. * @return returns the string representation of a pair. */ public String toString() { From kawas at pub.open-bio.org Thu Jun 2 15:48:54 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:48:54 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021548.j52Fms7Z015697@pub.open-bio.org> kawas Thu Jun 2 11:48:54 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared In directory pub.open-bio.org:/tmp/cvs-serv15668/org/biomoby/client/ui/graphical/applets/shared Modified Files: Household.java MobyTree.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared Household.java,1.1,1.2 MobyTree.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/Household.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/client/ui/graphical/applets/shared/Household.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/Household.java 2005/06/02 15:48:54 1.2 @@ -9,7 +9,7 @@ * @author Eddie Kawas *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com - * @Jun 4, 2004 + * Jun 4, 2004 * */ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/MobyTree.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/client/ui/graphical/applets/shared/MobyTree.java 2005/04/07 16:42:27 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/shared/MobyTree.java 2005/06/02 15:48:54 1.2 @@ -23,11 +23,11 @@ /** * This class encapsulates everything that is needed to create the tree

* representation of all the objects contained in the BioMoby Object Ontology. - * @see http://biomoby.org + * @link http://biomoby.org * @author Eddie Kawas *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com - * @May 31, 2004 + * May 31, 2004 * */ public class MobyTree extends JPanel { @@ -47,11 +47,12 @@ String name = ""; private static final boolean DEBUG = false; /** - * PRE: None

- * POST: A moby tree is constructed with the root node labeled as 'Object'

- * and the material for the tree taken from the RDF located at - * @link http://biomoby.org/RESOURCES/MOBY-S/Objects - * @param canEdit, if true, then the nodes are editable, else they are not. + * A moby tree is constructed with the root node labeled as 'name'

+ * and the material for the tree taken from the RDF located at + * the url rdf. + * @param canEdit - if true then nodes in tree can be edited, otherwise they cannot. + * @param rdf - the url of the RDF describing Moby Objects, Services, Service Types, and Namespaces + * @param name - the name of the root node in the tree. */ public MobyTree(boolean canEdit, String rdf, String name) { @@ -94,7 +95,6 @@ /** * PRE: None.

* POST: The MobyTree object contains an empty tree with a single node labeled 'Object' - * @return - none. * */ public void clear() { @@ -105,7 +105,6 @@ /** * PRE: A node other then the root node is selected.

* POST: if a node has been selected, then it is removed, otherwise nothing happens. - * @return - none. */ public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); @@ -126,7 +125,7 @@ * PRE: None.

* POST: Child will be added to the tree at the root node or if a node is selected,

* then the node will be added as a child of the selected node. - * @param child, the object to insert into the tree. + * @param child - the object to insert into the tree. * @return returns the newly inserted node. */ public DefaultMutableTreeNode addObject(Object child) { @@ -218,7 +217,6 @@ * PRE: None.

* POST: The tree will be refreshed to show all changes and user renamed. * @param name the name for the root node in the tree. - * @return - none. */ public void refreshTree(String name) { if (!name.equals("")) @@ -270,8 +268,7 @@ * * PRE: None.

* POST: The tree representation of the RDF taken from MobyCentral is created. - * @param none. - * @return nothing. + * @param name - name of the object to create tree for. * */ public void makeObjectTree(String name) { From kawas at pub.open-bio.org Thu Jun 2 15:49:28 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:49:28 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021549.j52FnSfC015751@pub.open-bio.org> kawas Thu Jun 2 11:49:28 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util In directory pub.open-bio.org:/tmp/cvs-serv15726/org/biomoby/client/ui/graphical/applets/util Modified Files: TreeLoaderThread.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util TreeLoaderThread.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util/TreeLoaderThread.java,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/client/ui/graphical/applets/util/TreeLoaderThread.java 2005/04/07 20:21:18 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/util/TreeLoaderThread.java 2005/06/02 15:49:28 1.3 @@ -5,7 +5,7 @@ * @author Sun Micro Systems *

This class was created to provide an abstract class that you subclass to *

perform GUI-related work in a dedicated thread. - * @see http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html + * @link http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html *

For questions, comments, or bugs *

email me at edward.kawas at gmail.com */ From kawas at pub.open-bio.org Thu Jun 2 15:50:26 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:50:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021550.j52FoQFg015804@pub.open-bio.org> kawas Thu Jun 2 11:50:26 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv15779/org/biomoby/registry/rdfagent/verifier Modified Files: DataMngr.java Log Message: Fixed the javadoc comments in order to get rid of warnings. moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/04/16 14:32:12 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/02 15:50:26 1.5 @@ -160,16 +160,15 @@ /** This method use for the update service_instance table, simple_input/output table, * collection_input/output table, secondary_input table in accordance with data * from RDF file. - * @param Hashtable servSign - set of the serviceSignature data (name - value, an example: servicename - GoTerm); + * @param servSign - set of the serviceSignature data (name - value, an example: servicename - GoTerm); * Hashtable of hashtables represented by a pair: * a name of the input = hashtable for this output * example:{siminp1={object_type_uri=urn:lsid:biomoby.org:objectclass:Object, namespace_type_uris=urn:lsid:biomoby.org:namespacetype:taxon}} - * @param Hashtable of hashtables represented by a pair: + * @param servInp - Hashtable of hashtables represented by a pair: * a name of the output = hashtable for this output * @param servname - the name of service * @param authURI - the authority URI * @param signURL - URL of resource - * @return . */ public static void processService( Hashtable servSign, Hashtable servInp, Hashtable servOut, String servname,String authURI,String signURL){ @@ -582,7 +581,7 @@ /** delete the service instance by service name and signature URL * @param servName the name of service which we want delete. - * @param rdfURL the authority URI for service which we want delete. + * @param signURL the authority URI for service which we want delete. * */ @@ -667,7 +666,7 @@ /** add the record about new service instance in the service_instance table of mobycentral database * @param servName - the name of service instance the record was added for. * @param cat - the category of service instance. - * @param servTypeUri - the service type URI of service instance. + * @param servTypeURI - the service type URI of service instance. * @param authId - the authority Id of service instance. * @param url - the URL of service instance. * @param email - the contact e-Mail of service instance. @@ -778,7 +777,6 @@ * @param objTypeUri the object type URI of the simple input. * @param nsTypeUris the string with set of the nameSpaces for this simple input. * @param colInpId the collection input Id if this simple input belongs to a collection, and blank otherwise. - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSimpleInput(Integer servInstId,String articleName,String objTypeUri,String nsTypeUris,Integer colInpId){ @@ -876,7 +874,6 @@ * @param max the maximum value of the secondary input * @param min the minimum value of the secondary input * * @param enum the enumeration value for the secondary input - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSecondary(int servInstId,String article_name,String def,String dataType,BigDecimal max,BigDecimal min,String enumeration){ @@ -921,9 +918,8 @@ * @param dataType the type of data of the secondary input. * @param max the maximum value of the secondary input * @param min the minimum value of the secondary input - * @param enum the enumeration value for the secondary input + * @param enumeration the enumeration value for the secondary input * @param minSecNum minimum free number for secondary_input_id - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void updateSec(int servInstId,String article_name,String def,String dataType,BigDecimal max,BigDecimal min,String enumeration, int minSecNum){ @@ -968,7 +964,6 @@ * @param objTypeUri the object type URI of the simple output. * @param nsTypeUris the string with set of the nameSpaces for this simple output. * @param colOutId the collection input Id if this simple output belongs to a collection, and blank otherwise. - * @return ret=1 if the record has added, and ret=-1 otherwise */ public static void insIntoSimpleOutput(Integer servInstId,String articleName,String objTypeUri,String nsTypeUris,Integer colOutId){ @@ -1186,7 +1181,7 @@ } /** get the secondary input data by the secondary input Id - * @param secInpId - the secondary input Id + * @param servInstId - the secondary input Id * @return carrier class Secondary */ @@ -1247,7 +1242,6 @@ /** get the simple/collection output data by the service instance Id * and build xml representation * @param servInstId - the service instance Id - * @ */ public static void getSimpleCollectOutput(int servInstId){ @@ -1300,7 +1294,6 @@ /** get the simple/collection input data by the service instance Id * and build xml representation * @param servInstId - the service instance Id - * @ */ public static void getSimpleCollectInput(int servInstId){ @@ -1516,7 +1509,7 @@ /** get the service instance Id for the given service name and signatureURL * @param servName - the name of service instance . - * @param signatureURL - URL of resource for the service instance. + * @param signURL - URL of resource for the service instance. * @return Intrger service instance Id if was found in the database, zero otherwise */ @@ -1646,7 +1639,6 @@ /** delete a record from simple table by a service instance Id and collection_input_id * (the metod is working for simple_input/output, collection input/output tables) * @param servInstId - the service instance Id. - * @return Intrger ret=1 if the record was deleted, ret=-1 otherwise. */ public static void delCollectionMember(String inout, int servInstId){ @@ -1707,7 +1699,8 @@ } /** delete a record from service_instance table by a servicename and authority Id - * @param servInstId - the service instance Id. + * @param servName - the service instance name. + * @param authId - the id of the authority * @return Intrger ret=1 if the record was deleted, ret=-1 otherwise. */ @@ -1920,7 +1913,7 @@ /** get the service authority Id from service_instance table by the servicename and signatureURL - * @param servName - the name of service + * @param serviceName - the name of service * @param signURL - the signatureURL for the given service * @return int authority Id if was found, zero otherwise. */ @@ -2100,10 +2093,13 @@ } - /** get the contact e-Mail from service_instance table by the servicename - * @param signURL - the URL of a resource - * @return String contact e-Mail if was found, empty string otherwise. - */ + /** + * + * gets the min number of records with service instance id = 0 + * @param table + * @param key_field + * @return the number of records + */ public static int getMinFreeNumber(String table, String key_field){ From kawas at pub.open-bio.org Thu Jun 2 15:52:19 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 2 Jun 2005 11:52:19 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506021552.j52FqJhN015901@pub.open-bio.org> kawas Thu Jun 2 11:52:19 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3 In directory pub.open-bio.org:/tmp/cvs-serv15877/org/biomoby/shared/mobyxml/w3c/dom3 Modified Files: Tag: java_1_5_compat MobyObjectClassImpl.java MobyObjectClassNSImpl.java MobyObjectClass.java Log Message: Fixed the javadoc comments in order to get rid of warnings and fixed some parsing logic. moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3 MobyObjectClassImpl.java,1.1,1.1.2.1 MobyObjectClassNSImpl.java,1.1,1.1.2.1 MobyObjectClass.java,1.1,1.1.2.1 rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClassImpl.java,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClassNSImpl.java,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/mobyxml/w3c/dom3/RCS/MobyObjectClass.java,v: No such file or directory From dwang at pub.open-bio.org Thu Jun 2 01:33:24 2005 From: dwang at pub.open-bio.org (Dennis Wang) Date: Wed, 1 Jun 2005 21:33:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506020133.j521XOhH012494@pub.open-bio.org> dwang Wed Jun 1 21:33:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby In directory pub.open-bio.org:/tmp/cvs-serv12468/Perl/MOBY/Adaptor/moby Modified Files: Tag: moby-DennisVersion queryapi.pm Log Message: test moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.2,1.2.2.1 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2004/07/09 00:21:53 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/06/02 01:33:23 1.2.2.1 @@ -3,6 +3,7 @@ use Carp; use vars qw($AUTOLOAD); +# Modified by Dennis { #Encapsulated class data From yanwong at pub.open-bio.org Thu Jun 9 08:19:46 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:19:46 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598Jkw3026903@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python In directory pub.open-bio.org:/tmp/cvs-serv26869 Modified Files: PKG-INFO changelog setup.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python PKG-INFO,1.6,1.7 changelog,1.8,1.9 setup.py,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Python/PKG-INFO,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Python/PKG-INFO 2005/02/18 15:58:21 1.6 +++ /home/repository/moby/moby-live/Python/PKG-INFO 2005/06/09 08:19:46 1.7 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: bioMoby -Version: 0.9 +Version: 0.9p2 Summary: Python interface for bioMoby Home-page: http://bioserv.rpbs.jussieu.fr Author: Yan Wong =================================================================== RCS file: /home/repository/moby/moby-live/Python/changelog,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Python/changelog 2005/04/22 10:13:48 1.8 +++ /home/repository/moby/moby-live/Python/changelog 2005/06/09 08:19:46 1.9 @@ -69,5 +69,5 @@ 0.9: PIB implemented as a set of string in the __PIB__ field 0.9p1: added a SQL invocator and SQL dispatcher in order to help the building of DB webservices. - +0.9p2: changed the deserialization code for TCBioMoby and MobyObject. Added a new constant MOBYNAMESPACEURI =================================================================== RCS file: /home/repository/moby/moby-live/Python/setup.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/setup.py 2005/01/27 08:44:04 1.5 +++ /home/repository/moby/moby-live/Python/setup.py 2005/06/09 08:19:46 1.6 @@ -3,7 +3,7 @@ from distutils.core import setup setup(name="bioMoby", - version=0.8, + version="0.9p2", description="An implementation of bioMoby in Python", author="Yan Wong", author_email="yanwong at ebgm.jussieu.fr", From yanwong at pub.open-bio.org Thu Jun 9 08:19:47 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:19:47 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598JlTR026965@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby/webservice In directory pub.open-bio.org:/tmp/cvs-serv26869/bioMoby/webservice Modified Files: TCBioMoby.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python/bioMoby/webservice TCBioMoby.py,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py 2005/02/01 08:52:17 1.3 +++ /home/repository/moby/moby-live/Python/bioMoby/webservice/TCBioMoby.py 2005/06/09 08:19:46 1.4 @@ -9,6 +9,7 @@ Date: 12/06/2004 01/17/2005: solve the problem with GBrowse :) return a raw string instead of the text embbeded in a Body tag. + 06/08/2005: Return a string containing the MobyContent instead of the Python object """ from ZSI import _copyright, _children, \ @@ -23,12 +24,7 @@ def parse(self, elt, ps): #self.checkname(elt, ps) if _children(elt): - from bioMoby import MobyContent - mc=MobyContent() - - mc.fromMoby(elt.firstChild.nodeValue) - - return mc + return elt.firstChild.nodeValue class body(TypeCode): From yanwong at pub.open-bio.org Thu Jun 9 08:27:47 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:27:47 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090827.j598RlHS027027@pub.open-bio.org> yanwong Thu Jun 9 04:27:47 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27001/bioMoby Modified Files: mobyService.py Log Message: moby-live/Python/bioMoby mobyService.py,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:19:46 1.6 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:27:47 1.7 @@ -455,7 +455,7 @@ def join(self): """Same as Thread.join """ -self._execThread.join() + self._execThread.join() From yanwong at pub.open-bio.org Thu Jun 9 08:39:26 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:39:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090839.j598dQDp027169@pub.open-bio.org> yanwong Thu Jun 9 04:39:26 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27146 Removed Files: mobyService.py Log Message: moby-live/Python/bioMoby mobyService.py,1.7,NONE rcsdiff: /home/repository/moby/moby-live/Python/bioMoby/RCS/mobyService.py,v: No such file or directory From yanwong at pub.open-bio.org Thu Jun 9 08:40:13 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 9 Jun 2005 04:40:13 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090840.j598eDh1027223@pub.open-bio.org> yanwong Thu Jun 9 04:40:13 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv27197 Added Files: mobyService.py Log Message: corrected a mistakenly placed \t moby-live/Python/bioMoby mobyService.py,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 From kawas at pub.open-bio.org Thu Jun 9 17:36:00 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 9 Jun 2005 13:36:00 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506091736.j59Ha0PF029340@pub.open-bio.org> kawas Thu Jun 9 13:35:59 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder In directory pub.open-bio.org:/tmp/cvs-serv29315/org/biomoby/client/rdf/builder Modified Files: ServiceInstanceRDF.java Log Message: Modified how the lsid domain is retrieved. Eddie moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/05/31 18:11:07 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/06/09 17:35:59 1.4 @@ -296,7 +296,7 @@ .getURL())); subject.addProperty(DC.identifier, model .createTypedLiteral("urn:lsid:" - + properties.getProperty("domain") + + properties.getProperty("lsid_domain") + ":serviceinstance:" + services[i].getAuthority() + "," + services[i].getName())); subject.addProperty(Predicates.performs_task, model From kawas at pub.open-bio.org Thu Jun 9 17:39:00 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 9 Jun 2005 13:39:00 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506091739.j59Hd0vw029457@pub.open-bio.org> kawas Thu Jun 9 13:39:00 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources In directory pub.open-bio.org:/tmp/cvs-serv29432/org/biomoby/client/ui/graphical/servlet/jresources Modified Files: RESOURCE.java Log Message: Modified how the lsid domain is retrieved. Eddie moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources RESOURCE.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/05/31 18:09:24 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/06/09 17:39:00 1.6 @@ -366,7 +366,7 @@ .getURL())); subject.addProperty(DC.identifier, model .createTypedLiteral("urn:lsid:" - + properties.getProperty("domain") + + properties.getProperty("lsid_domain") + ":serviceinstance:" + services[i].getAuthority() + "," + services[i].getName())); subject.addProperty(Predicates.performs_task, model From yanwong at pub.open-bio.org Fri Jun 10 07:47:15 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Fri, 10 Jun 2005 03:47:15 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506100747.j5A7lFCx000503@pub.open-bio.org> yanwong Fri Jun 10 03:47:15 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv477 Modified Files: mobyMarshal.py Log Message: A generated object can now have a field content moby-live/Python/bioMoby mobyMarshal.py,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/09 08:19:46 1.9 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/10 07:47:15 1.10 @@ -3,7 +3,7 @@ """ Creation date 19th of May 2004 - Latest modification date: 9th of June 2005 + Latest modification date: 10th of June 2005 Author: Wong Yan Topic: Marshalling moby Objects @@ -15,6 +15,7 @@ 06/09/2005: Change the doc.getElementsByTagNameNS("http://biomoby.org/moby",'mobyContent') to doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') Parsing is now independant from the namespace. + 06/10/2005: A generated object can now have a field content! """ from xml.dom.minidom import parseString @@ -336,7 +337,7 @@ content.append(str(elem.nodeValue)) if content: - anObject.content(r"".join(content)) + anObject.content=r"".join(content) return anObject From senger at pub.open-bio.org Fri Jun 10 13:48:10 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 09:48:10 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101348.j5ADmAcA003762@pub.open-bio.org> senger Fri Jun 10 09:48:10 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv3744 Log Message: Module for third-party libraries created Status: Vendor Tag: jars-archive Release Tags: v1 N jars-archive/README N jars-archive/current/.keep-me No conflicts created by this import jars-archive - Imported sources rcsdiff: /home/repository/moby/jars-archive/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/jars-archive/RCS/Imported,v: No such file or directory rcsdiff: /home/repository/moby/jars-archive/RCS/sources,v: No such file or directory From senger at pub.open-bio.org Fri Jun 10 13:53:03 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 09:53:03 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101353.j5ADr3Jf003851@pub.open-bio.org> senger Fri Jun 10 09:53:03 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv3832 Modified Files: README Log Message: jars-archive README,1.1.1.1,1.2 =================================================================== RCS file: /home/repository/moby/jars-archive/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- /home/repository/moby/jars-archive/README 2005/06/10 13:48:10 1.1.1.1 +++ /home/repository/moby/jars-archive/README 2005/06/10 13:53:03 1.2 @@ -3,7 +3,7 @@ This module serves just one purpose: to store commonly (or less commonly) used third-party Java libraries (jar files) in order to -share them by several other CVS modules withouyt the need to include +share them by several other CVS modules without the need to include them separately in all those CVS modules. I guess that the purpose is similar to the CVS-native notion of the @@ -16,6 +16,12 @@ first time it builds everything. An example can be found in the moby-live module (subdirectory Java). +It started as a BioMoby initiative so it is located as a module within +the 'moby' CVS repository. But it can used by others, as well - one +does not use it as a CVS module, but like a normal HTTP resource. Only +when you want to add a new library, or to udate an existing one, you +need to check-out it as usual. + Directory structure ------------------- @@ -37,5 +43,5 @@ ---------------------------------------------------------------------- Started by: Martin Senger (martin.senger at gmail.com), June 2005 -$Id +$Id$ ---------------------------------------------------------------------- From senger at pub.open-bio.org Fri Jun 10 13:55:36 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 09:55:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101355.j5ADtais003920@pub.open-bio.org> senger Fri Jun 10 09:55:36 EDT 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv3904/current Added Files: activation.jar adenine.jar alltools.jar axis-ant.jar axis.jar commons-discovery.jar commons-logging.jar concurrent.jar icu4j.jar jakarta-oro-2.0.5.jar jaxen-core.jar jaxen-jdom.jar jaxrpc.jar jdom.jar jena.jar junit.jar log4j-1.2.4.jar lsid-client-1.1.2.jar lsid-server-1.1.2.jar mail.jar mysql-connector-java-3.1.7-bin.jar rdf-api-2001-01-19.jar saaj.jar saxpath.jar servlet.jar taverna.jar wsdl4j.jar xalan.jar xercesImpl.jar xercesSamples.jar xml-apis.jar xmlParserAPIs.jar Removed Files: .keep-me Log Message: jars-archive/current activation.jar,NONE,1.1 adenine.jar,NONE,1.1 alltools.jar,NONE,1.1 axis-ant.jar,NONE,1.1 axis.jar,NONE,1.1 commons-discovery.jar,NONE,1.1 commons-logging.jar,NONE,1.1 concurrent.jar,NONE,1.1 icu4j.jar,NONE,1.1 jakarta-oro-2.0.5.jar,NONE,1.1 jaxen-core.jar,NONE,1.1 jaxen-jdom.jar,NONE,1.1 jaxrpc.jar,NONE,1.1 jdom.jar,NONE,1.1 jena.jar,NONE,1.1 junit.jar,NONE,1.1 log4j-1.2.4.jar,NONE,1.1 lsid-client-1.1.2.jar,NONE,1.1 lsid-server-1.1.2.jar,NONE,1.1 mail.jar,NONE,1.1 mysql-connector-java-3.1.7-bin.jar,NONE,1.1 rdf-api-2001-01-19.jar,NONE,1.1 saaj.jar,NONE,1.1 saxpath.jar,NONE,1.1 servlet.jar,NONE,1.1 taverna.jar,NONE,1.1 wsdl4j.jar,NONE,1.1 xalan.jar,NONE,1.1 xercesImpl.jar,NONE,1.1 xercesSamples.jar,NONE,1.1 xml-apis.jar,NONE,1.1 xmlParserAPIs.jar,NONE,1.1 .keep-me,1.1.1.1,NONE rcsdiff: /home/repository/moby/jars-archive/current/RCS/.keep-me,v: No such file or directory From senger at pub.open-bio.org Fri Jun 10 14:07:45 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 10 Jun 2005 10:07:45 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506101407.j5AE7jJY004023@pub.open-bio.org> senger Fri Jun 10 10:07:45 EDT 2005 Update of /home/repository/moby/jars-archive In directory pub.open-bio.org:/tmp/cvs-serv4004 Modified Files: README Log Message: jars-archive README,1.2,1.3 =================================================================== RCS file: /home/repository/moby/jars-archive/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/jars-archive/README 2005/06/10 13:53:03 1.2 +++ /home/repository/moby/jars-archive/README 2005/06/10 14:07:45 1.3 @@ -19,7 +19,7 @@ It started as a BioMoby initiative so it is located as a module within the 'moby' CVS repository. But it can used by others, as well - one does not use it as a CVS module, but like a normal HTTP resource. Only -when you want to add a new library, or to udate an existing one, you +when you want to add a new library, or to update an existing one, you need to check-out it as usual. From kawas at pub.open-bio.org Mon Jun 13 18:14:36 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon, 13 Jun 2005 14:14:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506131814.j5DIEabl026259@pub.open-bio.org> kawas Mon Jun 13 14:14:35 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv26234/org/biomoby/registry/rdfagent/verifier Modified Files: Communicator.java Log Message: Fixed a bug that crashed the agent when an RDF document retrieved from an author contained invalid xml. Eddie moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Communicator.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java 2005/04/16 14:32:12 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Communicator.java 2005/06/13 18:14:35 1.5 @@ -1,4 +1,3 @@ - package org.biomoby.registry.rdfagent.verifier; import java.io.BufferedReader; @@ -25,223 +24,260 @@ import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.rdf.model.RDFException; +import com.hp.hpl.jena.shared.JenaException; + /** * @author Nina Opushneva - * - * The Communicator class allows a Java application to communicate with - * servers of service providers by HTTP protocol, and with SMTP server by message + * + * The Communicator class allows a Java application to communicate with servers + * of service providers by HTTP protocol, and with SMTP server by message */ public class Communicator { -/** get RDF model of service by signatureURL - * (make HTTP connect to server, open a file,read a file into a streem, build the model) - * @param signURL - the URL of resource (signatureURL) - * @param servNames - set of service names located at this signatureURL - * @return Model the RDF model of services located at this signatureURL - */ - - public static Model getServiceRDF(String servNames,String signURL){ - - Model model = ModelFactory.createDefaultModel(); - String mes1 = ""; - try { - URL u = new URL(signURL); - - HttpURLConnection huc = (HttpURLConnection) u.openConnection(); - huc.connect(); - - int code = huc.getResponseCode(); - Log.info("GET <"+signURL+" > - HTTP CODE: "+ code); - Report.doWrite(""); - Report.doWrite("GET SIGNATURE_URL <"+signURL+" > - HTTP CODE: "+ code); - Report.add("GET SIGNATURE_URL <"+signURL+" > - HTTP CODE: "+ code); - - if (code == 200 || code == 202 ) { - - try{ - model.read(huc.getInputStream(),""); - }catch(RDFException e){ - Log.severe("Failed : "+e); - Report.add("Error 1: "+e); -// e.getMessage(); - }catch(IOException e){ - Log.severe("Failed : "+e); - Report.add("Error 3: "+e); -// e.getMessage(); - } - - } - else { - if (code == 400){ - Log.warning("The request had bad syntax or was inherently impossible to be satisfied."); - Report.add("The request had bad syntax or was inherently impossible to be satisfied."); - } - else if (code == 401){ - Log.warning("The parameter to this message gives a specification of authorization schemes which are acceptable."); - Report.add("The parameter to this message gives a specification of authorization schemes which are acceptable."); - } - else if (code == 402){ - Report.add("The parameter to this message gives a specification of charging schemes acceptable."); - } - else if (code == 403){ - Report.add("The request is for something forbidden. Authorization will not help."); - mes1 = "The request is for something forbidden."; - } - else if (code == 404){ - Report.doWrite("The server has not found anything matching the URI given"); - Report.add("The server has not found anything matching the URI given"); - mes1 = "The RDF file was not found on the server"; + /** + * get RDF model of service by signatureURL (make HTTP connect to server, + * open a file,read a file into a streem, build the model) + * + * @param signURL - + * the URL of resource (signatureURL) + * @param servNames - + * set of service names located at this signatureURL + * @return Model the RDF model of services located at this signatureURL + */ + + public static Model getServiceRDF(String servNames, String signURL) { + + Model model = ModelFactory.createDefaultModel(); + String mes1 = ""; + try { + URL u = new URL(signURL); + + HttpURLConnection huc = (HttpURLConnection) u.openConnection(); + huc.connect(); + + int code = huc.getResponseCode(); + Log.info("GET <" + signURL + " > - HTTP CODE: " + code); + Report.doWrite(""); + Report.doWrite("GET SIGNATURE_URL <" + signURL + + " > - HTTP CODE: " + code); + Report.add("GET SIGNATURE_URL <" + signURL + " > - HTTP CODE: " + + code); + if (code == 200 || code == 202) { + + try { + model.read(huc.getInputStream(), ""); + } catch (RDFException e) { + Log.severe("Failed : " + e); + Report.add("Error 1: " + e); + + + // e.getMessage(); + } catch (JenaException e) { + //reset code to + code = 417; } - else if (code == 500){ + //http://www.w3.org/RDF/Validator/RDF/Validator/ARPServlet?URI= + } + + ////////////////////////// + // no else if here purposely, because i reset the code if an + // exception is thrown due to invalid rdfs being returned. + ////////////////////////// + if (code != 200 && code != 202) + if (code == 400) { + Log + .warning("The request had bad syntax or was inherently impossible to be satisfied."); + Report + .add("The request had bad syntax or was inherently impossible to be satisfied."); + } else if (code == 401) { + Log + .warning("The parameter to this message gives a specification of authorization schemes which are acceptable."); + Report + .add("The parameter to this message gives a specification of authorization schemes which are acceptable."); + } else if (code == 402) { + Report + .add("The parameter to this message gives a specification of charging schemes acceptable."); + } else if (code == 403) { + Report + .add("The request is for something forbidden. Authorization will not help."); + mes1 = "The request is for something forbidden."; + } else if (code == 404) { + Report + .doWrite("The server has not found anything matching the URI given"); + Report + .add("The server has not found anything matching the URI given"); + mes1 = "The RDF file was not found on the server"; + } else if (code == 417) { + Report.add(" RDF Parsing error. Possible reason being that multiple tags found in the same file."); + mes1 = " RDF Parsing error. Multiple tags found."; + } else if (code == 500) { Report.add(" Internal Error"); - mes1 = " Internal Error"; + mes1 = " Internal Error"; + } + int num = DataMngr.getServErrorNum(signURL, code); + + if (num > 0) { + if (num < 3) { + DataMngr.updErrCount(signURL, code); + } else { + + String servList = DataMngr.getServListByURL(signURL); + String s[] = servList.split(","); + Report.add("THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "); + Report + .add("THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY."); + String m1 = "THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "; + String m2 = "THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY."; + String msg = m1 + " " + m2; + + Report.doWrite("DELETED SERVICES :"); + for (int i = s.length - 1; i >= 0; i--) { + Report.doWrite(i + ". " + s[i]); + } + DataMngr.delServiceSetByURL(signURL); + DataMngr.delServErrors(signURL); + Report.add("THE CONNECT TO < " + signURL + + " > WAS REFUSED WITH HTTP CODE " + code + + " THREE TIMES IN ROW. "); + Report + .add("THE SERVICES LOCATED AT < " + + signURL + + " > WILL BE DEREGISTERED FROM mobycentral REGISTRY"); + Report + .doWrite("======================================================================================="); } - int num = DataMngr.getServErrorNum(signURL,code); - if (num > 0){ - if (num < 3){ - DataMngr.updErrCount(signURL,code); - }else{ - - String servList = DataMngr.getServListByURL(signURL); - String s[] = servList.split(","); - Report.add("THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "); - Report.add("THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY."); - String m1 = "THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "; - String m2 = "THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY."; - String msg = m1+" "+m2; - - Report.doWrite("DELETED SERVICES :"); - for (int i = s.length - 1; i >=0; i --) { - Report.doWrite(i+". "+s[i]); - } - DataMngr.delServiceSetByURL(signURL); - DataMngr.delServErrors(signURL); - Report.add("THE CONNECT TO < "+signURL+" > WAS REFUSED WITH HTTP CODE "+code+" THREE TIMES IN ROW. "); - Report.add("THE SERVICES LOCATED AT < "+signURL+" > WILL BE DEREGISTERED FROM mobycentral REGISTRY"); - Report.doWrite("======================================================================================="); - } - - }else{ - DataMngr.insErrCount(signURL,code); - } - - } - - huc.disconnect(); - } - catch (IOException e) { - Log.severe("Failed : "+e); - Report.add("Error 2: "+e); -// e.getMessage(); - } + } else { + DataMngr.insErrCount(signURL, code); + } + huc.disconnect(); + } catch (IOException e) { + Log.severe("Failed : " + e); + Report.add("Error 2: " + e); + // e.getMessage(); + } + + return model; - return model; - } -/** a SMTP client that allows The SMTP client establishes a connection with an SMTP server - * and waits for the server to respond . The client is then ready to construct a mail - * message. - * (make HTTP connect to server, open a file,read a file into a streem, build a model) - * @param to - where is the target of the e-mail message to be sent. - * @param subj - the subject of this MailMessage. - * @param msgStr - the text data that is to be included in this MailMessage. - * @param from - where is the e-mail address of the message transmitter. - * - */ - - - public static void sendMail(String to,String subj,String msgStr,String from){ - - try { - - Properties prop = new Properties(); - prop.put("mail.smtp.host",Constants.MB_MAIL_SERVER); + /** + * a SMTP client that allows The SMTP client establishes a connection with + * an SMTP server and waits for the server to respond . The client is then + * ready to construct a mail message. (make HTTP connect to server, open a + * file,read a file into a streem, build a model) + * + * @param to - + * where is the target of the e-mail message to be sent. + * @param subj - + * the subject of this MailMessage. + * @param msgStr - + * the text data that is to be included in this MailMessage. + * @param from - + * where is the e-mail address of the message transmitter. + * + */ + + public static void sendMail(String to, String subj, String msgStr, + String from) { + + try { + + Properties prop = new Properties(); + prop.put("mail.smtp.host", Constants.MB_MAIL_SERVER); Session ses = Session.getDefaultInstance(prop, null); - MimeMessage msg = new MimeMessage(ses); - msg.setFrom(new InternetAddress(from)); - msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); - msg.setSubject(subj); - msg.setSentDate(new Date()); - msg.setText(msgStr); - if (Constants.MB_MAIL_PSWD != null){ - Transport transport = ses.getTransport("smtp"); //for usage a password - transport.connect(Constants.MB_MAIL_SERVER,Constants.MB_MAIL_USER,Constants.MB_MAIL_PSWD); - } - Transport.send(msg); - Report.doWrite("The message have been sent to "+to); - } catch (MessagingException e) { -// Log.severe(e.getMessage()+" sendmail"); - e.getMessage(); - } + MimeMessage msg = new MimeMessage(ses); + msg.setFrom(new InternetAddress(from)); + msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); + msg.setSubject(subj); + msg.setSentDate(new Date()); + msg.setText(msgStr); + if (Constants.MB_MAIL_PSWD != null) { + Transport transport = ses.getTransport("smtp"); //for usage a + // password + transport.connect(Constants.MB_MAIL_SERVER, + Constants.MB_MAIL_USER, Constants.MB_MAIL_PSWD); + } + Transport.send(msg); + Report.doWrite("The message have been sent to " + to); + } catch (MessagingException e) { + // Log.severe(e.getMessage()+" sendmail"); + e.getMessage(); + } - } + } - public static String readFromURL(String url){ + public static String readFromURL(String url) { String list = ""; try { - URL u = new URL(url); - - HttpURLConnection huc = (HttpURLConnection) u.openConnection(); - huc.connect(); - - int code = huc.getResponseCode(); - Log.info("GET <"+url+" > - HTTP CODE: "+ code); - Report.doWrite(""); - Report.doWrite("GET SIGNATURE_URL <"+url+" > - HTTP CODE: "+ code); - Report.add("GET SIGNATURE_URL <"+url+" > - HTTP CODE: "+ code); - - if (code == 200 || code == 202 ) { + URL u = new URL(url); - }else { - - } - }catch (IOException e) { - Log.severe("Failed : "+e); - Report.add("Error 2: "+e); -// e.getMessage(); - } + HttpURLConnection huc = (HttpURLConnection) u.openConnection(); + huc.connect(); + + int code = huc.getResponseCode(); + Log.info("GET <" + url + " > - HTTP CODE: " + code); + Report.doWrite(""); + Report.doWrite("GET SIGNATURE_URL <" + url + " > - HTTP CODE: " + + code); + Report.add("GET SIGNATURE_URL <" + url + " > - HTTP CODE: " + + code); + + if (code == 200 || code == 202) { + + } else { + + } + } catch (IOException e) { + Log.severe("Failed : " + e); + Report.add("Error 2: " + e); + // e.getMessage(); + } return list; - } + } + + public static Hashtable readFromFile(String file) { - public static Hashtable readFromFile(String file) { - - Hashtable list = new Hashtable(); + Hashtable list = new Hashtable(); //...checks on aFile are elided -// StringBuffer contents = new StringBuffer(); + // StringBuffer contents = new StringBuffer(); //declared here only to make visible to finally clause BufferedReader input = null; try { - //use buffering - //this implementation reads one line at a time - input = new BufferedReader( new FileReader(file) ); - String line = null; //not declared within while loop - while (( line = input.readLine()) != null){ - list.put(line,""); -// contents.append(line); -// contents.append(System.getProperty("line.separator")); - } - } - catch (FileNotFoundException ex) { - ex.printStackTrace(); - } - catch (IOException ex){ - ex.printStackTrace(); - } - finally { - try { - if (input!= null) { - //flush and close both "input" and its underlying FileReader - input.close(); + //use buffering + //this implementation reads one line at a time + input = new BufferedReader(new FileReader(file)); + String line = null; //not declared within while loop + while ((line = input.readLine()) != null) { + list.put(line, ""); + // contents.append(line); + // contents.append(System.getProperty("line.separator")); } - } - catch (IOException ex) { + } catch (FileNotFoundException ex) { + ex.printStackTrace(); + } catch (IOException ex) { ex.printStackTrace(); - } + } finally { + try { + if (input != null) { + //flush and close both "input" and its underlying + // FileReader + input.close(); + } + } catch (IOException ex) { + ex.printStackTrace(); + } } return list; - } + } -} +} \ No newline at end of file From gss at pub.open-bio.org Thu Jun 16 16:24:15 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:24:15 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161624.j5GGOFob007461@pub.open-bio.org> gss Thu Jun 16 12:24:15 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting In directory pub.open-bio.org:/tmp/cvs-serv7439/src/org/semanticmoby/meeting Removed Files: MeetingRegistrationServlet.java Log Message: Moved to archive folder moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting MeetingRegistrationServlet.java,1.1,NONE rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/semanticmoby/meeting/RCS/MeetingRegistrationServlet.java,v: No such file or directory From gss at pub.open-bio.org Thu Jun 16 16:24:59 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:24:59 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161624.j5GGOxpb007500@pub.open-bio.org> gss Thu Jun 16 12:24:59 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org In directory pub.open-bio.org:/tmp/cvs-serv7475 Modified Files: .project Log Message: Added dependency on S-MOBY core project moby-live/S-MOBY/ref-impl/semanticmoby.org .project,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project 2005/03/21 21:40:30 1.3 +++ /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/.project 2005/06/16 16:24:59 1.4 @@ -3,6 +3,7 @@ semanticmoby.org + S-MOBY Core From gss at pub.open-bio.org Thu Jun 16 16:27:30 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRUtY007557@pub.open-bio.org> gss Thu Jun 16 12:27:30 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private In directory pub.open-bio.org:/tmp/cvs-serv7533/WebRoot/developer/private Log Message: Directory /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private added to the repository moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private - New directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private/RCS/directory,v: No such file or directory From gss at pub.open-bio.org Thu Jun 16 16:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRWV5007610@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/developer Modified Files: dev-tools.html Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.html 2005/06/16 16:27:32 1.2 @@ -2,8 +2,6 @@ - - Semantic MOBY Developer Tools @@ -12,21 +10,16 @@ cellspacing="0" cellpadding="0"> - + Semantic MOBY Developer Tools
- -

Convert a graph to a different format

- -
+ Paste a graph, select its input format, and press "Convert Graph" - to convert to the other format - + to convert to the other format

Input format:    N3   RDF/XML N-Triples         

- -

        

-
- -

List all statements in the S-MOBY metadata - repository

- -
-           -
- -

Validate an OWL Graph using Jena

- -
- Paste a graph in RDF/XML format and press "Validate" to see what - type of OWL the graph represents - -

- -

-
- -

Validate that a graph is MOBY canonical form

- -
- Paste a graph in RDF/XML format and press "Validate" to see if it - is MOBY canonical form - -

- -

+

        

From gss at pub.open-bio.org Thu Jun 16 16:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRW6D007625@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/developer/private Added Files: dev-tools.html Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/developer/private dev-tools.html,NONE,1.1 From gss at pub.open-bio.org Thu Jun 16 16:27:32 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 16 Jun 2005 12:27:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506161627.j5GGRWww007591@pub.open-bio.org> gss Thu Jun 16 12:27:32 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/examples/ontologies In directory pub.open-bio.org:/tmp/cvs-serv7570/WebRoot/examples/ontologies Added Files: geneName geneName.n3 FASTASequence sequenceText.n3 sequenceText FASTASequence.n3 Log Message: Examples for the user guide moby-live/S-MOBY/ref-impl/semanticmoby.org/WebRoot/examples/ontologies geneName,NONE,1.1 geneName.n3,NONE,1.1 FASTASequence,NONE,1.1 sequenceText.n3,NONE,1.1 sequenceText,NONE,1.1 FASTASequence.n3,NONE,1.1 From kawas at pub.open-bio.org Fri Jun 17 19:25:32 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Fri, 17 Jun 2005 15:25:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506171925.j5HJPWEM014018@pub.open-bio.org> kawas Fri Jun 17 15:25:31 EDT 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv13972/org/biomoby/registry/rdfagent/verifier Modified Files: DataMngr.java Log Message: Added the logic that deals with null signature urls (makes one up) Added a line that deletes secondary input information when deleting services (not sure why it was missing). Eddie moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/13 18:17:42 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/06/17 19:25:31 1.7 @@ -56,9 +56,22 @@ String rdfAddr = rs.getString(2); int authorityID = rs.getInt(3); if (rdfAddr == null) { - //TODO - get the list of service names so that we can + //TODO - make this code more efficient! - maybe perform one sql call instead of many // update the signatureURL field using the service name and authority id - + String bogusSigURL = "http://invalidURL.com/author/"+ authorityID + "/" + servName +".xml"; + String updateSQLString = "UPDATE service_instance " + + "SET signatureURL='"+ bogusSigURL +"' " + + "WHERE authority_id=" + authorityID + " and servicename='" + servName +"'"; + PreparedStatement preparedStatement = null; + try { + Connection updateCon = DBConnector.getConnection(); + preparedStatement = updateCon.prepareStatement(updateSQLString); + int resultSet = preparedStatement.executeUpdate(); + Log.info(resultSet + ": Updated the signatureURL field of the authority with id #" + authorityID + " to be " + bogusSigURL+"."); + } catch (SQLException e) { + Log.severe("Could not update SignatureURL field with a bogus signatureURL.\n" +e.getMessage()); + } + } else { if (rdfAddr.equals(lastAddr)) { servNames.append("," + servName); @@ -618,6 +631,7 @@ // service_instance delRow("simple_input", servInstId); // delete from table simple_input delRow("simple_output", servInstId); // delete from table simple_output + delRow("secondary_input", servInstId); //TODO - should this line be here? delCollectionMember("input", servInstId); delCollectionMember("output", servInstId); delRow("collection_input", servInstId); // delete from table @@ -645,6 +659,7 @@ // service_instance delRow("simple_input", servInstId); // delete from table simple_input delRow("simple_output", servInstId); // delete from table simple_output + delRow("secondary_input", servInstId); //TODO - should this line be here? delCollectionMember("input", servInstId); delCollectionMember("output", servInstId); delRow("collection_input", servInstId); // delete from table @@ -685,6 +700,7 @@ if (rez == 1) { del_serv.addElement(servName); } + delRow("secondary_input", servInstId); //TODO - should this line be here? delRow("simple_input", servInstId); // delete from table // simple_input delRow("simple_output", servInstId); // delete from table From gss at pub.open-bio.org Mon Jun 27 20:39:37 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Mon, 27 Jun 2005 16:39:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506272039.j5RKdbJA004738@pub.open-bio.org> gss Mon Jun 27 16:39:36 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/doc/User In directory pub.open-bio.org:/tmp/cvs-serv4714/User Log Message: Directory /home/repository/moby/moby-live/S-MOBY/doc/User added to the repository moby-live/S-MOBY/doc/User - New directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/S-MOBY/doc/User/RCS/directory,v: No such file or directory From gss at pub.open-bio.org Mon Jun 27 20:40:27 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Mon, 27 Jun 2005 16:40:27 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506272040.j5RKeR4M004783@pub.open-bio.org> gss Mon Jun 27 16:40:27 EDT 2005 Update of /home/repository/moby/moby-live/S-MOBY/doc/User In directory pub.open-bio.org:/tmp/cvs-serv4762/S-MOBY/doc/User Added Files: devguide.doc Log Message: Initial draft; still needs Service Consumer section moby-live/S-MOBY/doc/User devguide.doc,NONE,1.1 From mwilkinson at pub.open-bio.org Wed Jun 29 16:58:33 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 12:58:33 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291658.j5TGwXVu011963@pub.open-bio.org> mwilkinson Wed Jun 29 12:58:33 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools In directory pub.open-bio.org:/tmp/cvs-serv11945/Service_Creation_Tools Log Message: Directory /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools added to the repository moby-live/Perl/Accessories/Service_Creation_Tools - New directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools/RCS/directory,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 17:00:48 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:00:48 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291700.j5TH0mos012013@pub.open-bio.org> mwilkinson Wed Jun 29 13:00:48 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance In directory pub.open-bio.org:/tmp/cvs-serv11995/Namespace_Maintenance Log Message: Directory /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance added to the repository moby-live/Perl/Accessories/Namespace_Maintenance - New directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance/RCS/directory,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 17:02:24 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:02:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291702.j5TH2O0i012106@pub.open-bio.org> mwilkinson Wed Jun 29 13:02:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories In directory pub.open-bio.org:/tmp/cvs-serv12088 Removed Files: frame.cgi namespaceframe.cgi searchframe.cgi Log Message: shuffling files to keep things clean moby-live/Perl/Accessories frame.cgi,1.1,NONE namespaceframe.cgi,1.1,NONE searchframe.cgi,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/frame.cgi,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/namespaceframe.cgi,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Perl/Accessories/RCS/searchframe.cgi,v: No such file or directory From mwilkinson at pub.open-bio.org Wed Jun 29 17:02:24 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:02:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291702.j5TH2OsP012121@pub.open-bio.org> mwilkinson Wed Jun 29 13:02:24 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Namespace_Maintenance In directory pub.open-bio.org:/tmp/cvs-serv12088/Namespace_Maintenance Added Files: frame.cgi namespaceframe.cgi searchframe.cgi Log Message: shuffling files to keep things clean moby-live/Perl/Accessories/Namespace_Maintenance frame.cgi,NONE,1.1 namespaceframe.cgi,NONE,1.1 searchframe.cgi,NONE,1.1 From mwilkinson at pub.open-bio.org Wed Jun 29 17:30:30 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 29 Jun 2005 13:30:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200506291730.j5THUUjm012336@pub.open-bio.org> mwilkinson Wed Jun 29 13:30:30 EDT 2005 Update of /home/repository/moby/moby-live/Perl/Accessories/Service_Creation_Tools In directory pub.open-bio.org:/tmp/cvs-serv12321 Added Files: CodeGenerator.pm code-generator0.6.cgi codebook.xml dispatcher.cgi help.cgi Log Message: adding Clarence and Michaels code to the repository moby-live/Perl/Accessories/Service_Creation_Tools CodeGenerator.pm,NONE,1.1 code-generator0.6.cgi,NONE,1.1 codebook.xml,NONE,1.1 dispatcher.cgi,NONE,1.1 help.cgi,NONE,1.1 From yanwong at pub.open-bio.org Thu Jun 9 07:55:20 2005 From: yanwong at pub.open-bio.org (Yan Wong) Date: Thu, 09 Jun 2005 07:55:20 -0000 Subject: [MOBY-guts] biomoby commit Message-ID: <200506090819.j598JkBS026946@pub.open-bio.org> yanwong Thu Jun 9 04:19:46 EDT 2005 Update of /home/repository/moby/moby-live/Python/bioMoby In directory pub.open-bio.org:/tmp/cvs-serv26869/bioMoby Modified Files: __init__.py mobyClient.py mobyDataTypes.py mobyExceptions.py mobyMarshal.py mobyRegister.py mobyService.py Log Message: Version 0.9p2: Changed the namespace URI from http://biomoby.org/moby to http://biomoby.org/moby-s Corrected: Unicode strings can now be unmarshalled Corrected: the prefix of this object was Object instead of moby moby-live/Python/bioMoby __init__.py,1.2,1.3 mobyClient.py,1.5,1.6 mobyDataTypes.py,1.23,1.24 mobyExceptions.py,1.4,1.5 mobyMarshal.py,1.8,1.9 mobyRegister.py,1.5,1.6 mobyService.py,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Python/bioMoby/__init__.py 2005/01/18 13:46:22 1.2 +++ /home/repository/moby/moby-live/Python/bioMoby/__init__.py 2005/06/09 08:19:46 1.3 @@ -11,3 +11,6 @@ from mobyMarshal import * from webservice import * from ontology import * + +__VERSION__ = "0.9p2" +__MOBY_API_VERSION__ = "0.8" =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyClient.py 2005/06/09 08:19:46 1.6 @@ -2,7 +2,7 @@ """ """ - Date: 13th of April 2004 + Creation date: 13th of April 2004 Author: Wong Yan The Client class inherits from Central class @@ -22,10 +22,10 @@ from SOAPpy import SOAPProxy self.server=SOAPProxy(self.url, namespace=self.ns) - - if debug: - self.server.config.debug=1 - + + if debug: + self.server.config.debug=1 + del SOAPProxy @@ -68,28 +68,28 @@ def retrieveObjectDefinition(self, objectName): """Retrieves a list of object's definitions """ - dc={"urn:lsid:biomoby.org:objectrelation:isa":"ISA", - "urn:lsid:biomoby.org:objectrelation:hasa":"HASA", - "urn:lsid:biomoby.org:objectrelation:has":"HAS" - } + dc={"urn:lsid:biomoby.org:objectrelation:isa":"ISA", + "urn:lsid:biomoby.org:objectrelation:hasa":"HASA", + "urn:lsid:biomoby.org:objectrelation:has":"HAS" + } - definition={} - definition["Relationship"]={} + definition={} + definition["Relationship"]={} xmlinput=""+objectName+"" doc=parseString(self.call_method("retrieveObjectDefinition", xmlinput)) - - for child in doc.firstChild.childNodes: - if child.nodeType==child.ELEMENT_NODE and child.nodeName=="Relationship": - definition["Relationship"][dc[child.getAttribute("relationshipType")]]=[] - for elem in child.childNodes: - if elem.nodeType==elem.ELEMENT_NODE and elem.nodeName=="objectType" and elem.firstChild: - definition["Relationship"][dc[child.getAttribute("relationshipType")]].append((elem.getAttribute("articleName"), elem.firstChild.nodeValue)) - - elif child.nodeType==child.ELEMENT_NODE: - if child.firstChild: - definition[str(child.nodeName)]=child.firstChild.nodeValue - + + for child in doc.firstChild.childNodes: + if child.nodeType==child.ELEMENT_NODE and child.nodeName=="Relationship": + definition["Relationship"][dc[child.getAttribute("relationshipType")]]=[] + for elem in child.childNodes: + if elem.nodeType==elem.ELEMENT_NODE and elem.nodeName=="objectType" and elem.firstChild: + definition["Relationship"][dc[child.getAttribute("relationshipType")]].append((elem.getAttribute("articleName"), elem.firstChild.nodeValue)) + + elif child.nodeType==child.ELEMENT_NODE: + if child.firstChild: + definition[str(child.nodeName)]=child.firstChild.nodeValue + return definition def retrieveObjectSchema(self, objectName): @@ -260,6 +260,6 @@ raise ETypeMismatch def __init__(self, url="http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY05/mobycentral.pl", ns="http://mobycentral.cbr.nrc.ca/MOBY/Central"): - """Constructor for class Client - """ + """Constructor for class Client + """ Central.__init__(self, url, ns) =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/05/20 07:35:23 1.23 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/06/09 08:19:46 1.24 @@ -1,7 +1,8 @@ """Generic bioMoby data types """ -""" Date: 15th of April 2004 +""" Creation date: 15th of April 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan predefined data types: -object @@ -13,11 +14,21 @@ -MobyContent 12/13/2004: added some methods to manipulate MobyContent objects - 01/17/2005: serialization of public attributes for bioMoby objects + 01/17/2005: serialization of public attributes for bioMoby objects + 06/09/2005: changed the namespace of the message from + http://biomoby.org/moby to http://biomoby.org/moby-s + corrected a problem that prevent the Unmarshaller from + correctly unmarshall things without prefix: + + Parse of unicode string + added a constant: __MOBYNAMESPACEURI__ """ __ATTRIBUTES__=['namespace', 'id', 'articleName'] +__MOBYNAMESPACEURI__ = "http://www.biomoby.org/moby-s" + + from xml.dom.minidom import parseString class Parameter(object): @@ -26,7 +37,7 @@ def __init__(self, articleName="", value=""): self.articleName=articleName self.value=value - self.__isSecondary__=True + self.__isSecondary__=True def toMoby(self): """Returns the object as a XML @@ -34,199 +45,199 @@ return ""+str(self.value)+"" def __str__(self): - """Return the Parameter in its XML form - """ + """Return the Parameter in its XML form + """ return self.toMoby() def __repr__(self): - """Print the XML on the python command line. - """ + """Print the XML on the python command line. + """ return self.toMoby() def fromMoby(self, xml): """Get the attributes from a XML string """ - xmlelt=xml - - if isinstance(xml, str): - xmlelt=parseString(xml).firstChild - + xmlelt=xml + + if isinstance(xml, str) or isinstance(xml, unicode): + xmlelt=parseString(xml).firstChild + self.articleName=xmlelt.getAttribute('moby:articleName') - l=xmlelt.getElementsByTagName("Value") - if len(l)==0: - l=xmlelt.getElementsByTagName("moby:Value") + l=xmlelt.getElementsByTagName("Value") + if len(l)==0: + l=xmlelt.getElementsByTagName("moby:Value") - self.value=l[0].firstChild.nodeValue - + self.value=l[0].firstChild.nodeValue + class MobyGeneric(object): """A Generic object (to use with the Marshaller) """ def __init__(self, namespace="", id="", articleName="", *args, **kw): - """Class constructor, basic attributes are namespace, - identifier and the article's name - """ - self.namespace=namespace - self.id=id - self.articleName=articleName - - for name, value in kw.items(): + """Class constructor, basic attributes are namespace, + identifier and the article's name + """ + self.namespace=namespace + self.id=id + self.articleName=articleName + + for name, value in kw.items(): setattr(self, name, value) - + class MobyObject(MobyGeneric): """Define a Moby XML Object It has methods toMoby and fromMoby """ def __init__(self, prefix="moby", tag="Object", content="", *args, **kw): - """Class constructor for a bioMoby Object - """ - MobyGeneric.__init__(self, *args, **kw) - self.__prefix__=prefix - self.__tag__=tag - self.__cross__=[] - self.__PIB__=[] - - self.content=content - - + """Class constructor for a bioMoby Object + """ + MobyGeneric.__init__(self, *args, **kw) + self.__prefix__=prefix + self.__tag__=tag + self.__cross__=[] + self.__PIB__=[] + + self.content=content + + def toMoby(self): - """Deserializes the content in XML api - """ - - beginTag=["<%s:%s"%(self.__prefix__,self.__tag__)] - - #First see if the object has an identifier, a namepsace and a name - for attribute in __ATTRIBUTES__: - if hasattr(self, attribute) and getattr(self, attribute): - beginTag.append("%s:%s=\"%s\""%(self.__prefix__, attribute, getattr(self,attribute))) - - #Retrieve only object's attributes that are public. - filterFunc=lambda x: x[0] != "_" and not callable(getattr(self, x)) and x !="content" and x not in __ATTRIBUTES__ - - #Retrieve the associated objects - #In MobyObject, associated objects are object's attributes - mobyObjects=filter(filterFunc, dir(self)) - - #If none, return the tag closed - if len(mobyObjects)==0 and (not hasattr(self, "__cross__") or len(self.__cross__)==0) and (not hasattr(self, "__PIB__") or len(self.__PIB__)==0) and (not hasattr(self, "content") or (self.content==None or self.content=="")): - beginTag.append("/>") - return " ".join(beginTag) + """Deserializes the content in XML api + """ + + beginTag=["<%s:%s"%(self.__prefix__,self.__tag__)] + + #First see if the object has an identifier, a namepsace and a name + for attribute in __ATTRIBUTES__: + if hasattr(self, attribute) and getattr(self, attribute): + beginTag.append("%s:%s=\"%s\""%(self.__prefix__, attribute, getattr(self,attribute))) - #Else, end begin tag and serialize the associated objects + #Retrieve only object's attributes that are public. + filterFunc=lambda x: x[0] != "_" and not callable(getattr(self, x)) and x !="content" and x not in __ATTRIBUTES__ + + #Retrieve the associated objects + #In MobyObject, associated objects are object's attributes + mobyObjects=filter(filterFunc, dir(self)) + + #If none, return the tag closed + if len(mobyObjects)==0 and (not hasattr(self, "__cross__") or len(self.__cross__)==0) and (not hasattr(self, "__PIB__") or len(self.__PIB__)==0) and (not hasattr(self, "content") or (self.content==None or self.content=="")): + beginTag.append("/>") + return " ".join(beginTag) + + #Else, end begin tag and serialize the associated objects beginTag.append(">") - result=[" ".join(beginTag)] - - #Serialize Cross references - if hasattr(self, "__cross__") and self.__cross__: - result.append("") - - for aCross in self.__cross__: - result.append(aCross.toMoby()) - - result.append("") - + result=[" ".join(beginTag)] + + #Serialize Cross references + if hasattr(self, "__cross__") and self.__cross__: + result.append("") + + for aCross in self.__cross__: + result.append(aCross.toMoby()) + + result.append("") + #Serialize PIB - if hasattr(self, "__PIB__") and self.__PIB__: - result.append("") - - for aPIB in self.__PIB__: - result.append(str(aPIB)) - - result.append("") - - #Serialize the other attibutes - #If the attributes has a toMoby method, then use it - #Else, use a MobyMarshaller object to serialize - for mobyObject in mobyObjects: - if hasattr(getattr(self,mobyObject), "toMoby"): + if hasattr(self, "__PIB__") and self.__PIB__: + result.append("") + + for aPIB in self.__PIB__: + result.append(str(aPIB)) + + result.append("") + + #Serialize the other attibutes + #If the attributes has a toMoby method, then use it + #Else, use a MobyMarshaller object to serialize + for mobyObject in mobyObjects: + if hasattr(getattr(self,mobyObject), "toMoby"): getattr(self, mobyObject).__articleName__=mobyObject result.append(getattr(self, mobyObject).toMoby()) - else: - from bioMoby import MobyMarshaller - m=MobyMarshaller() - result.append(m.dumps(getattr(self, mobyObject), articleName=mobyObject)) - - #Put the raw content of the object - #If you want to put your special object, then then you should write - #a __str__ method + else: + from bioMoby import MobyMarshaller + m=MobyMarshaller() + result.append(m.dumps(getattr(self, mobyObject), articleName=mobyObject)) + + #Put the raw content of the object + #If you want to put your special object, then then you should write + #a __str__ method if hasattr(self, "content"): result.append("%s"%(self.content)) - - result.append(""%(self.__prefix__, self.__tag__)) - - return "".join(result) - + + result.append(""%(self.__prefix__, self.__tag__)) + + return "".join(result) + def fromMoby(self, xml): - """Deserialization method - """ - elem=xml - - if isinstance(xml, str): - doc=parseString(xml) - - elem=doc.firstChild - - self.__tag__=elem.localName - - self.__prefix__="moby" - - self.content=[] - - if elem.nodeName.split(":")>1: - self.__prefix__=elem.nodeName.split(":")[0] - - #Set the object's attributes - for attribute in elem.attributes.values(): - setattr(self, attribute.localName, str(attribute.nodeValue)) - - for child in elem.childNodes: - if child.nodeType==child.ELEMENT_NODE: - #deserializes the cross references - if child.localName=="CrossReference": - for aCross in child.childNodes: - if aCross.localName=="Xref": - aXref=MobyXref() - aXref.fromMoby(aCross) - self.__cross__.append(aXref) - if aCross.localName=="Object": - anObj=MobyObject() - anObj.fromMoby(aCross) - self.__cross__.append(anObj) - else: - #Do the same for the other objects - associatedObjectName=child.getAttribute("moby:articleName") - - if not associatedObjectName: - associatedObjectName=child.getAttribute("articleName") - - if not associatedObjectName: - associatedObjectName="associated" - - #Create an object - o=MobyObject() - o.fromMoby(child) - - #if there is already an object, then store it inside a list and - #append the other objects in the list - if hasattr(self, associatedObjectName): - if type(getattr(self, associatedObjectName)) is list: - getattr(self, associatedObjectName).append(o) - else: - setattr(self, associatedObjectName, [o]) - else: + """Deserialization method + """ + elem=xml + + if isinstance(xml, str) or isinstance(xml, unicode): + doc=parseString(xml) + + elem=doc.firstChild + + self.__tag__=elem.localName + + self.__prefix__="moby" + + self.content=[] + + if len(elem.nodeName.split(":"))>1: + self.__prefix__=elem.nodeName.split(":")[0] + + #Set the object's attributes + for attribute in elem.attributes.values(): + setattr(self, attribute.localName, str(attribute.nodeValue)) + + for child in elem.childNodes: + if child.nodeType==child.ELEMENT_NODE: + #deserializes the cross references + if child.localName=="CrossReference": + for aCross in child.childNodes: + if aCross.localName=="Xref": + aXref=MobyXref() + aXref.fromMoby(aCross) + self.__cross__.append(aXref) + if aCross.localName=="Object": + anObj=MobyObject() + anObj.fromMoby(aCross) + self.__cross__.append(anObj) + else: + #Do the same for the other objects + associatedObjectName=child.getAttribute("moby:articleName") + + if not associatedObjectName: + associatedObjectName=child.getAttribute("articleName") + + if not associatedObjectName: + associatedObjectName="associated" + + #Create an object + o=MobyObject() + o.fromMoby(child) + + #if there is already an object, then store it inside a list and + #append the other objects in the list + if hasattr(self, associatedObjectName): + if type(getattr(self, associatedObjectName)) is list: + getattr(self, associatedObjectName).append(o) + else: + setattr(self, associatedObjectName, [o]) + else: setattr(self, associatedObjectName, o) else: - self.content.append(child.nodeValue) - - self.content="".join(self.content) - + self.content.append(child.nodeValue) + + self.content="".join(self.content) + def __str__(self): - return self.toMoby() - + return self.toMoby() + def __repr__(self): - return self.toMoby() - + return self.toMoby() + class MobyXref(MobyObject): """Describes an Xref @@ -246,56 +257,56 @@ def fromMoby(self, xml): """Deserialize the Xref Object """ - if isinstance(xml, str): - doc=parseString(xml).firstChild - - doc=xml - + if isinstance(xml, str) or isinstance(xml, unicode): + doc=parseString(xml).firstChild + + doc=xml + uri=doc.namespaceURI - MobyObject.fromMoby(self, doc) + MobyObject.fromMoby(self, doc) self.authURI=doc.getAttributeNS(uri, "authURI") self.serviceName=doc.getAttributeNS(uri, "serviceName") self.evidenceCode=doc.getAttributeNS(uri, "evidenceCode") self.xrefType=doc.getAttributeNS(uri, "xrefType") - + class MobyInteger(MobyObject): """Use this object to serialize/deserialize integers """ def __init__(self, value=0, *args, **kw): - MobyObject.__init__(self, content=value, tag="Integer", *args, **kw) + MobyObject.__init__(self, content=value, tag="Integer", *args, **kw) def fromMoby(self, xml): - MobyObject.fromMoby(self, xml) - + MobyObject.fromMoby(self, xml) + try: - self.content = int(self.content) + self.content = int(self.content) except: self.content=0 - + class MobyFloat(MobyObject): """Serialize/deserialize floating point numbers """ def __init__(self, value=0, *args, **kw): - MobyObject.__init__(self, content=value, tag="Float", *args, **kw) - + MobyObject.__init__(self, content=value, tag="Float", *args, **kw) + def fromMoby(self, xml): - MobyObject.fromMoby(self, xml) - + MobyObject.fromMoby(self, xml) + try: - self.content=float(self.content) + self.content=float(self.content) except: - self.content=0.0 - + self.content=0.0 + class MobyString(MobyObject): """String Moby object """ def __init__(self, content="", *args, **kw): - MobyObject.__init__(self, content=content, *args, **kw) - self.__tag__="String" + MobyObject.__init__(self, content=content, *args, **kw) + self.__tag__="String" class MobyContent: """The class describes a Moby Content (for queries or answers) @@ -313,17 +324,17 @@ self.queryData=queryData def __str__(self): - """return the XML form of the Moby Content object - """ - return self.toMoby() - + """return the XML form of the Moby Content object + """ + return self.toMoby() + def toMoby(self): """The XML reprentation of the content """ from mobyMarshal import MobyMarshaller m=MobyMarshaller() - result=['") - #For serialization, use the MobyMarshaller object - + #For serialization, use the MobyMarshaller object + for queryObject in self.queryData[queryKey]: #if the Collection ('CollectionName',[MobyObjects]) if queryObject.__class__ is tuple: @@ -363,19 +374,19 @@ return "".join(result) def fromMoby(self, xmlObject): - """fill the properties from an XML + """fill the properties from an XML """ from bioMoby import MobyUnmarshaller - - um=MobyUnmarshaller() + + um=MobyUnmarshaller() self.queryData={} - - doc=xmlObject - - if isinstance(xmlObject, str): - doc=parseString(xmlObject) - + + doc=xmlObject + + if isinstance(xmlObject, str) or isinstance(xmlObject, unicode): + doc=parseString(xmlObject) + mdl=doc.getElementsByTagName('mobyData') if not mdl: @@ -384,115 +395,115 @@ #For each query for elt in mdl: #Get the ID - queryID=str(elt.getAttribute('queryID')) + queryID=str(elt.getAttribute('queryID')) if not queryID: queryID=str(elt.getAttribute('moby:queryID')) - #Collect the data + #Collect the data data=[] - #for each datum translate it in MobyObject, and put it in the list + #for each datum translate it in MobyObject, and put it in the list for datum in elt.childNodes: - #If it is a collection + #If it is a collection if datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Collection": - articleName=datum.getAttribute('moby:articleName') + articleName=datum.getAttribute('moby:articleName') articles=[] for article in datum.childNodes: if article.nodeType==article.ELEMENT_NODE and article.localName=="Simple": - for child in article.childNodes: - if child.nodeType==child.ELEMENT_NODE: + for child in article.childNodes: + if child.nodeType==child.ELEMENT_NODE: articles.append(um.loadn(child)) data.append((articleName, articles)) - #if it is a Simple object + #if it is a Simple object elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Simple": - for elt in datum.childNodes: + for elt in datum.childNodes: if elt.nodeType==elt.ELEMENT_NODE: - o=um.loadn(elt) - data.append(o) - elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Parameter": - #It is a Parameter - p=Parameter() - p.fromMoby(datum) - data.append(p) + o=um.loadn(elt) + data.append(o) + elif datum.nodeType==datum.ELEMENT_NODE and datum.localName=="Parameter": + #It is a Parameter + p=Parameter() + p.fromMoby(datum) + data.append(p) self.queryData[queryID]=data - + def __getitem__(self, key): - """Get a query from his name + """Get a query from his name """ return self.queryData[key] def __setitem__(self, key, item): - """Store a query in the dictionary - """ + """Store a query in the dictionary + """ self.queryData[key]=item def __len__(self): - """Return the number of elements inside the dictionary - """ + """Return the number of elements inside the dictionary + """ return len(self.queryData) def keys(self): - """Return all queries's name - """ + """Return all queries's name + """ return self.queryData.keys() - + def collectionToQueries(self, aCollection): - """Turn a collection of object into a set of queries - """ - queries={} - queryName=aCollection[0] - - queryID=1 - - for aSimple in aCollection[1]: - queries["%s-%s"%(queryName, queryID)]=aSimple - - return queries - - + """Turn a collection of object into a set of queries + """ + queries={} + queryName=aCollection[0] + + queryID=1 + + for aSimple in aCollection[1]: + queries["%s-%s"%(queryName, queryID)]=aSimple + + return queries + + def getObject(self, queryName, objectName): - """Get an object from a query with its name - """ - filterfunc=lambda obj: not hasattr(obj,'__isSecondary__') and hasattr(obj, "articleName") and obj.articleName==objectName - - for obj in filter(filterfunc, self.queryData[queryName]): + """Get an object from a query with its name + """ + filterfunc=lambda obj: not hasattr(obj,'__isSecondary__') and hasattr(obj, "articleName") and obj.articleName==objectName + + for obj in filter(filterfunc, self.queryData[queryName]): return obj - + def getObjects(self, queryName): - """Retrieve objects from a query - """ - filterfunc=lambda obj: not hasattr(obj, "__isSecondary__") - - return filter(filterfunc, self.queryData[queryName]) - + """Retrieve objects from a query + """ + filterfunc=lambda obj: not hasattr(obj, "__isSecondary__") + + return filter(filterfunc, self.queryData[queryName]) + def getParameters(self, queryName): - """Retrieve parameters from a query - """ - filterfunc=lambda param: hasattr(param, "__isSecondary__") - - result={} - for param in filter(filterfunc, self.queryData[queryName]): - result[param.articleName]=param.value - - return result + """Retrieve parameters from a query + """ + filterfunc=lambda param: hasattr(param, "__isSecondary__") + + result={} + for param in filter(filterfunc, self.queryData[queryName]): + result[param.articleName]=param.value + + return result def getParameter(self, queryName, parameterName): - """Retrieve a parameter from a query and his name - """ - filterfunc=lambda param: hasattr(param, "__isSecondary__") and hasattr(param, "articleName") and param.articleName==parameterName - - l=filter(filterfunc, self.queryData[queryName]) - - if l: - return l[0] - + """Retrieve a parameter from a query and his name + """ + filterfunc=lambda param: hasattr(param, "__isSecondary__") and hasattr(param, "articleName") and param.articleName==parameterName + + l=filter(filterfunc, self.queryData[queryName]) + + if l: + return l[0] + def __repr__(self): - """put the xml of the Content - """ - return self.__str__() + """put the xml of the Content + """ + return self.__str__() =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py 2005/04/19 15:41:50 1.4 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyExceptions.py 2005/06/09 08:19:46 1.5 @@ -1,7 +1,7 @@ """bioMoby exceptions """ -"""Date: 15th of April 2004 +"""Creation Date: 15th of April 2004 Author: Wong Yan bioMoby exceptions @@ -41,4 +41,4 @@ """A XML input is not a Moby XML Object. """ def __str__(self): - return "The bioMoby XML object couldn't be parsed" \ No newline at end of file + return "The bioMoby XML object couldn't be parsed" =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/04/19 15:41:50 1.8 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyMarshal.py 2005/06/09 08:19:46 1.9 @@ -2,7 +2,8 @@ """ -""" Date 19th of May 2004 +""" Creation date 19th of May 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan Topic: Marshalling moby Objects @@ -10,7 +11,10 @@ 01/17/2005: MobyMarshaller and MobyUnmarshaller can operate on all objects serialisation and deserialisation are done only on public (no _ prefix) non callable attributes - The serialisation and deserialisation is recursive. + The serialisation and deserialisation is recursive. + 06/09/2005: Change the doc.getElementsByTagNameNS("http://biomoby.org/moby",'mobyContent') to + doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') Parsing is now + independant from the namespace. """ from xml.dom.minidom import parseString @@ -20,8 +24,8 @@ """ def _marshal(self, value, articleName=""): - """this method do the serialization of the object - """ + """this method do the serialization of the object + """ if type(value).__name__=='NoneType': return "" @@ -29,9 +33,9 @@ method="m_"+tvalue - if hasattr(value, "toMoby"): - return value.toMoby() - + if hasattr(value, "toMoby"): + return value.toMoby() + if hasattr(self, method): return getattr(self,method)(value,articleName=articleName) @@ -46,8 +50,8 @@ return str(m) def m_unicode(self, value, articleName=""): - """Turn a unicode string into a mobyString object - """ + """Turn a unicode string into a mobyString object + """ return self.m_str(str(value), articleName) def m_string(self, value, articleName=""): @@ -59,18 +63,18 @@ """Turn an integer into a Moby XML object """ from bioMoby.mobyDataTypes import MobyInteger - m=MobyInteger(value, namespace=namespace, id=id, articleName=articleName) - - return m.toMoby() - + m=MobyInteger(value, namespace=namespace, id=id, articleName=articleName) + + return m.toMoby() + def m_float(self, value, namespace="", id="", articleName=""): """Turn a float into a Moby XML object """ from bioMoby.mobyDataTypes import MobyFloat - m=MobyFloat(value, namespace=namespace, id=id, articleName=articleName) - - return m.toMoby() - + m=MobyFloat(value, namespace=namespace, id=id, articleName=articleName) + + return m.toMoby() + def m_list(self, value, articleName=""): """Turn a list into a Moby XML object """ @@ -113,50 +117,50 @@ def _compoundObject(self, value, articleName=""): """transforms an object and all properties into a XML """ - - result=[] - - properties=[] - - filterfunc=lambda x: x[0] != "_" and not callable(getattr(value, x)) and x !="content" and x not in ["id", "namespace", "articleName", "content"] - attribfunc= lambda x: hasattr(value, x) - - tagName="moby:%s"%type(value).__name__ - - if hasattr(value, "__tag__") and value.__tag__: - tagName="moby:%s"%value.__tag__ - - header=["<%s"%tagName] - - for attribute in filter(attribfunc, ["id", "namespace", "articleName"]): - header.append("moby:%s=\"%s\""%(attribute,getattr(value,attribute))) - - for prop in filter(filterfunc, dir(value)): - properties.append(self._marshal(getattr(value, prop), articleName=prop)) - - if not properties and not (hasattr(value, "content") and value.content): - header.append("/>") - else: - header.append(">") - - result.append(" ".join(header)) - - if properties: - result.append("".join(properties)) - - if hasattr(value, "content") and value.content: - result.append(""%value.content) - - if properties: - result.append(""%tagName) - - - return r"".join(result) - - + + result=[] + + properties=[] + + filterfunc=lambda x: x[0] != "_" and not callable(getattr(value, x)) and x !="content" and x not in ["id", "namespace", "articleName", "content"] + attribfunc= lambda x: hasattr(value, x) + + tagName="moby:%s"%type(value).__name__ + + if hasattr(value, "__tag__") and value.__tag__: + tagName="moby:%s"%value.__tag__ + + header=["<%s"%tagName] + + for attribute in filter(attribfunc, ["id", "namespace", "articleName"]): + header.append("moby:%s=\"%s\""%(attribute,getattr(value,attribute))) + + for prop in filter(filterfunc, dir(value)): + properties.append(self._marshal(getattr(value, prop), articleName=prop)) + + if not properties and not (hasattr(value, "content") and value.content): + header.append("/>") + else: + header.append(">") + + result.append(" ".join(header)) + + if properties: + result.append("".join(properties)) + + if hasattr(value, "content") and value.content: + result.append(""%value.content) + + if properties: + result.append(""%tagName) + + + return r"".join(result) + + def dumps(self, value, articleName=""): - """Serialize the object into a Moby XML object - """ + """Serialize the object into a Moby XML object + """ return self._marshal(value, articleName) @@ -169,8 +173,8 @@ """ import re - aName=str(aName) - + aName=str(aName) + if aName=="": return "" @@ -189,163 +193,215 @@ return "".join(t) def loadn(self, xmlNode): - """Deserializes an XML node and return a Python Object - """ - import bioMoby.mobyDataTypes - import bioMoby.ontology - - nn=xmlNode.localName - + """Deserializes an XML node and return a Python Object + """ + import bioMoby.mobyDataTypes + import bioMoby.ontology + + nn=xmlNode.localName + #Try to see if this object got a deserializer object2build=self._cleanName(nn) objectName=str.upper(object2build[0])+object2build[1:] - - if hasattr(bioMoby.mobyDataTypes, "Moby%s"%objectName): - o=getattr(bioMoby.mobyDataTypes, "Moby%s"%objectName)() - if hasattr(o, "fromMoby"): - o.fromMoby(xmlNode) - return o - elif hasattr(bioMoby.ontology, "Moby%s"%objectName): - o=getattr(bioMoby.ontology, "Moby%s"%objectName)() - if hasattr(o, "fromMoby"): - o.fromMoby(xmlNode) - return o - + + if hasattr(bioMoby.mobyDataTypes, "Moby%s"%objectName): + o=getattr(bioMoby.mobyDataTypes, "Moby%s"%objectName)() + if hasattr(o, "fromMoby"): + o.fromMoby(xmlNode) + return o + elif hasattr(bioMoby.ontology, "Moby%s"%objectName): + o=getattr(bioMoby.ontology, "Moby%s"%objectName)() + if hasattr(o, "fromMoby"): + o.fromMoby(xmlNode) + return o + methodName=str('m_'+nn) - - if not hasattr(self, methodName): + + if not hasattr(self, methodName): methodName="m_Object" - -# try: + +# try: return getattr(self,methodName)(xmlNode) # except: -# #if not, Raise an invalid moby XML :-( -# from bioMoby.mobyExceptions import EInvalidMobyXML - +# #if not, Raise an invalid moby XML :-( +# from bioMoby.mobyExceptions import EInvalidMobyXML + # raise EInvalidMobyXML - + def loads(self, xmlString): - """ Deserializes an xml string and return a bioMoby-Python object - """ + """ Deserializes an xml string and return a bioMoby-Python object + """ if xmlString=="": return None -# _typesmodule=["bioMoby.mobyDataTypes", "bioMoby.ontology"] - +# _typesmodule=["bioMoby.mobyDataTypes", "bioMoby.ontology"] + doc=parseString(xmlString) - mcl=doc.getElementsByTagNameNS('http://www.biomoby.org/moby','mobyContent') + mcl=doc.getElementsByTagNameNS(doc.firstChild.namespaceURI,'mobyContent') if len(mcl)!=0: return self.m_MobyContent(doc) element=doc.firstChild - return self.loadn(element) + return self.loadn(element) def m_Integer(self, value): - """Turn a Integer XML element into an integer - """ - value.normalize() - - if value.firstChild: - return int(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) - else: - return 0 - + """Turn a Integer XML element into an integer + """ + value.normalize() + + if value.firstChild: + return int(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) + else: + return 0 + def m_Float(self, value): - """Turn a Float XML element into a float number - """ - value.normalize() - if value.firstChild: - return float(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) + """Turn a Float XML element into a float number + """ + value.normalize() + if value.firstChild: + return float(value.firstChild.nodeValue.replace("\n","").replace("\t","").replace(" ","")) return 0.0 - + def m_String(self, value): - """Turn a Moby XML String element into a String object - """ - - cnt=[] - value.normalize() - - for aChild in value.childNodes: - if aChild.nodeType==aChild.TEXT_NODE or aChild.nodeType==aChild.CDATA_SECTION_NODE: - cnt.append(aChild.wholeText) - - return r"".join(cnt) - + """Turn a Moby XML String element into a String object + """ + + cnt=[] + value.normalize() + + for aChild in value.childNodes: + if aChild.nodeType==aChild.TEXT_NODE or aChild.nodeType==aChild.CDATA_SECTION_NODE: + cnt.append(aChild.wholeText) + + return r"".join(cnt) + def m_Object(self, value): - """Turn any XML into a generic object - """ - filterFunc= lambda x: x.nodeType==x.ELEMENT_NODE - - typeName="GMoby%s"%str(value.localName) - - from bioMoby.mobyDataTypes import MobyGeneric - - NewType=type(typeName, (MobyGeneric,), {}) - - anObject=NewType() - - anObject.__prefix__="moby" - anObject.__tag__=str(value.localName) - - for tupleAttribute in value.attributes.itemsNS(): - #First item, second field: - setattr(anObject, str(tupleAttribute[0][1]), str(tupleAttribute[1])) - - i=0 - for elem in filter(filterFunc, value.childNodes): - methodName="m_%s"%str(elem.localName) - - articleName=elem.getAttribute("moby:articleName") - - if not articleName: - articleName=elem.getAttribute("articleName") - - if not articleName: - articleName="attribute_%s"%i - - if hasattr(self, methodName): - prop=getattr(self, methodName)(elem) - else: - prop=self.m_Object(elem) - - if hasattr(anObject, articleName): - t=prop - if not type(getattr(anObject, articleName)) is list: - t=getattr(anObject, articleName) - setattr(anObject, articleName, []) - getattr(anObject, articleName).append(t) - else: - setattr(anObject, articleName, prop) - i+=1 - - content=[] - - isContentNode= lambda x: x.nodeType==x.TEXT_NODE or x.nodeType==x.CDATA_SECTION_NODE - - for elem in filter(isContentNode, value.childNodes): - content.append(str(elem.nodeValue)) - - if content: - anObject.content(r"".join(content)) - - return anObject + """Turn any XML into a generic object + """ + filterFunc= lambda x: x.nodeType==x.ELEMENT_NODE + + typeName="GMoby%s"%str(value.localName) + + from bioMoby.mobyDataTypes import MobyGeneric + + NewType=type(typeName, (MobyGeneric,), {}) + + anObject=NewType() + + anObject.__prefix__="moby" + anObject.__tag__=str(value.localName) + + for tupleAttribute in value.attributes.itemsNS(): + #First item, second field: + setattr(anObject, str(tupleAttribute[0][1]), str(tupleAttribute[1])) + + i=0 + for elem in filter(filterFunc, value.childNodes): + methodName="m_%s"%str(elem.localName) + + articleName=elem.getAttribute("moby:articleName") + + if not articleName: + articleName=elem.getAttribute("articleName") + + if not articleName: + articleName="attribute_%s"%i + + if hasattr(self, methodName): + prop=getattr(self, methodName)(elem) + else: + prop=self.m_Object(elem) + + if hasattr(anObject, articleName): + t=prop + if not type(getattr(anObject, articleName)) is list: + t=getattr(anObject, articleName) + setattr(anObject, articleName, []) + getattr(anObject, articleName).append(t) + else: + setattr(anObject, articleName, prop) + i+=1 + + content=[] + + isContentNode= lambda x: x.nodeType==x.TEXT_NODE or x.nodeType==x.CDATA_SECTION_NODE + + for elem in filter(isContentNode, value.childNodes): + content.append(str(elem.nodeValue)) + + if content: + anObject.content(r"".join(content)) + + return anObject def m_MobyContent(self, value): - """Turn an MobyContentXML into a MobyContent object - """ - from bioMoby.mobyDataTypes import MobyContent - - mc=MobyContent({}) - - mc.fromMoby(value) - - del MobyContent - - return mc - + """Turn an MobyContentXML into a MobyContent object + """ + from bioMoby.mobyDataTypes import MobyContent + + mc=MobyContent({}) + + mc.fromMoby(value) + + del MobyContent + + return mc + + + def loadm(self, value): + """ Feed a MobyContent object with data from an XML MobyContent + """ + from bioMoby.mobyDataTypes import MobyContent, Parameter + + from xml.dom import pulldom + + events = pulldom.parseString(value) + + mc=MobyContent({}) + queryid="" + currentCollection = None + isCollection=False + + for (event, node) in events: + if event == pulldom.START_ELEMENT: + if node.localName in ["MOBY", "mobyContent", "Simple"]: + pass + elif node.localName == "mobyData": + queryid=node.getAttribute("moby:queryID") + if not queryid: + queryid=node.getAttribute("queryID") + mc[queryid]=[] + elif node.localName == "Collection": + isCollection=True + collectionName=node.getAttribute("moby:articleName") + if not collectionName: + collectionName=node.getAttribute("articleName") + mc[queryid].append( (collectionName, []) ) + currentCollection=mc[queryid][-1][1] + elif node.localName == "Parameter": + p=Parameter() + events.expandNode(node) + p.fromMoby(node) + if isCollection: + currentCollection.append(p) + else: + mc[queryid].append(p) + else: + events.expandNode(node) + if isCollection: + currentCollection.append(self.loadn(node)) + else: + mc[queryid].append(self.loadn(node)) + if event == pulldom.END_ELEMENT: + if node.localName == "Collection": + isCollection=False + del node + + del MobyContent, pulldom, Parameter + return mc =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyRegister.py 2005/06/09 08:19:46 1.6 @@ -1,7 +1,7 @@ """Classes for registration of object's classes, service's type, namespaces """ -""" Date: 16th of April 2004 +""" Creation Date: 16th of April 2004 Author: Wong Yan @@ -19,7 +19,7 @@ self.success=0 self.id="" self.message="" - self.RDF="" + self.RDF="" #Parse the document, retrieve the success, id, message and RDF fields doc=parseString(xmlInput) @@ -32,9 +32,9 @@ self.message=doc.getElementsByTagName("message")[0].childNodes[0].nodeValue try: if len(doc.getElementsByTagName("RDF"))>0: - self.RDF=doc.getElementsByTagName("RDF")[0].firstChild.toprettyxml() - except: - pass + self.RDF=doc.getElementsByTagName("RDF")[0].firstChild.toprettyxml() + except: + pass def __str__(self): """Return the moby xml of the instance @@ -63,7 +63,7 @@ self.authURI=authURI self.description=description #it uses a central object for registration - from mobyClient import Central + from mobyClient import Central self.central=Central() del Central @@ -78,7 +78,7 @@ self.serviceType=serviceType GeneralInformations.__init__(self, contact=contactEmail, authURI=authURI, description=description) self.relationship=relationship - self.serviceType=serviceType + self.serviceType=serviceType def __str__(self): """Return the instance as a Moby XML @@ -94,7 +94,6 @@ result.append("") - return "".join(result) =================================================================== RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyService.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/04/19 15:41:50 1.5 +++ /home/repository/moby/moby-live/Python/bioMoby/mobyService.py 2005/06/09 08:19:46 1.6 @@ -2,11 +2,13 @@ the Service class can be used for registration or execution. """ -""" Date: 15th of April 2004 +""" Creation date: 15th of April 2004 + Latest modification date: 9th of June 2005 Author: Wong Yan 01/17/2004: Service can be executed as a Thread, thus several queries can be made in the same time. + 06/09/2005: Service Registration will not throw a Exception if signature URL is empty """ from mobyRegister import GeneralInformations @@ -244,14 +246,14 @@ self.type="" self.category="" self.url="" - self.signatureURL="" + self.signatureURL="" self.authoritative=0 self.inputObjects=[] self.outputObjects=[] self.secondaryArticles=[] self.methods=[] self.results="" - + if len(arg)==1 and arg[0].__class__ is dict: arg=arg[0] for key in arg.keys(): @@ -264,8 +266,8 @@ self.type=arg[key] elif key=='url': self.url=arg['url'] - elif key=='signatureURL': - self.signatureURL=arg['signatureURL'] + elif key=='signatureURL': + self.signatureURL=arg['signatureURL'] elif key=='authoritative': self.authoritative=arg[key] elif key=='contactEmail': @@ -311,7 +313,7 @@ from SOAPpy import SOAPProxy - webservice=SOAPProxy(self.url,namespace=self.namespace) + webservice=SOAPProxy(self.url,namespace=self.namespace) if method=="": if len(self.methods)==0: @@ -325,8 +327,8 @@ webservice.soapaction=self.namespace+"#"+method - if debug: - webservice.config.debug=1 + if debug: + webservice.config.debug=1 toQuery=str(query) @@ -339,8 +341,8 @@ #try to return a MobyContent Object instead from bioMoby.mobyDataTypes import MobyContent - mc=MobyContent() - mc.fromMoby(result) + mc=MobyContent() + mc.fromMoby(result) del MobyContent @@ -354,7 +356,7 @@ result.append(""+self.type+"") result.append(""+self.authURI+"") result.append(""+self.url+"") - result.append(""+self.signatureURL+"") + result.append(""+self.signatureURL+"") result.append(""+self.contact+"") result.append(""+`self.authoritative`+"") result.append("") @@ -367,10 +369,10 @@ elif inputObject.__class__ is dict: result.append('') - for aSimple in inputObject[inputObject.keys()[0]]: + for aSimple in inputObject[inputObject.keys()[0]]: result.append(str(aSimple)) - result.append("") + result.append("") else: from mobyExceptions import EInvalidArgument raise EInvalidArgument, "Bad input object" @@ -385,10 +387,10 @@ elif output.__class__ is dict: result.append('') - for aSimple in output[output.keys()[0]]: + for aSimple in output[output.keys()[0]]: result.append(str(aSimple)) - result.append("") + result.append("") else: from mobyExceptions import EInvalidArgument raise EInvalidArgument, "Bad output object" @@ -410,10 +412,10 @@ """Register the service on the Moby server has been added here a code to verify that signatureURL is not empty :) """ - if self.signatureURL=="": - from mobyExceptions import EInvalidArgument - raise EInvalidArgument, "field signatureURL cannot be empty" - + #if self.signatureURL=="": + # from mobyExceptions import EInvalidArgument + # raise EInvalidArgument, "field signatureURL cannot be empty" + xmlinput=""+str(self)+"" from mobyRegister import RegistrationObject @@ -431,29 +433,29 @@ return result def _executeThread(self, mobyContent): - """Execute the service, store the result in a field - """ + """Execute the service, store the result in a field + """ - self.results=self.execute(mobyContent, returnXml=(mobyContent.__class__ is str)) + self.results=self.execute(mobyContent, returnXml=(mobyContent.__class__ is str)) def start(self, mobycontent, timeout=-1): - """Start the service as it was a thread - """ - from threading import Thread + """Start the service as it was a thread + """ + from threading import Thread - if timeout != -1: - self._execThread=Thread(target=self._executeThread, args=(mobycontent,)) - else: - self._execThread=Thread(target=self._executeThread, args=(mobycontent,), timeout=timeout) + if timeout != -1: + self._execThread=Thread(target=self._executeThread, args=(mobycontent,)) + else: + self._execThread=Thread(target=self._executeThread, args=(mobycontent,), timeout=timeout) - self._execThread.start() + self._execThread.start() def join(self): - """Same as Thread.join - """ - self._execThread.join() + """Same as Thread.join + """ +self._execThread.join() @@ -502,17 +504,17 @@ for childNode in node.childNodes: if childNode.nodeName=="datatype": - if childNode.firstChild: + if childNode.firstChild: secondary.type=childNode.firstChild.nodeValue elif childNode.nodeName=="default": if childNode.firstChild: - secondary.default=childNode.firstChild.nodeValue + secondary.default=childNode.firstChild.nodeValue elif childNode.nodeName=="min": if childNode.firstChild: - secondary.min=childNode.firstChild.nodeValue + secondary.min=childNode.firstChild.nodeValue elif childNode.nodeName=="max": if childNode.firstChild: - secondary.max=childNode.firstChild.nodeValue + secondary.max=childNode.firstChild.nodeValue elif childNode.nodeName=="enum": if childNode.firstChild: secondary.enums.append(childNode.firstChild.nodeValue) @@ -547,7 +549,7 @@ service.contact=child.firstChild.nodeValue elif child.nodeName=="URL" and child.firstChild: service.url=child.firstChild.nodeValue - elif child.nodeName=="signatureURL" and child.firstChild: + elif child.nodeName=="signatureURL" and child.firstChild: service.signatureURL=child.firstChild.nodeValue elif child.nodeName=="Input": for article in child.childNodes: