Author: kono
Date: 2009-08-11 13:29:03 -0700 (Tue, 11 Aug 2009)
New Revision: 17773

Added:
   csplugins/trunk/ucsd/kono/CPDBClient/build.xml
   csplugins/trunk/ucsd/kono/CPDBClient/jar/
   csplugins/trunk/ucsd/kono/CPDBClient/jar/cpdbClient.jar
   csplugins/trunk/ucsd/kono/CPDBClient/junitLib/
   csplugins/trunk/ucsd/kono/CPDBClient/junitLib/junit-4.7.jar
   csplugins/trunk/ucsd/kono/CPDBClient/lib/
   csplugins/trunk/ucsd/kono/CPDBClient/lib/CPDBClientGenerated.jar
   csplugins/trunk/ucsd/kono/CPDBClient/resources/
   csplugins/trunk/ucsd/kono/CPDBClient/resources/plugin.props
   csplugins/trunk/ucsd/kono/CPDBClient/src/
   csplugins/trunk/ucsd/kono/CPDBClient/src/org/
   csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/
   csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/
   csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/
   
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClient.java
   
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClientPlugin.java
   csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/test/
   
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/test/BasicServiceTest.java
   csplugins/trunk/ucsd/kono/CPDBClient/wsdl/
   csplugins/trunk/ucsd/kono/CPDBClient/wsdl/CPDB.wsdl
Log:
Start writing skeleton of CPDB Client.

Added: csplugins/trunk/ucsd/kono/CPDBClient/build.xml
===================================================================
--- csplugins/trunk/ucsd/kono/CPDBClient/build.xml                              
(rev 0)
+++ csplugins/trunk/ucsd/kono/CPDBClient/build.xml      2009-08-11 20:29:03 UTC 
(rev 17773)
@@ -0,0 +1,88 @@
+<?xml version = "1.0"?>
+<project name="cpdbClient" default="all" basedir=".">
+
+       <property name="src" location="src" />
+       <property name="build" location="build" />
+       <property name="build.compiler" value="modern" />
+       <!-- path to Cytoscape under development (CVS) -->
+       <property name="cylib" location="../cytoscape" />
+       <property name="lib" location="lib" />
+       <property name="testlib" location="junitLib" />
+       <property name="jar" location="jar" />
+       <property name="doc" location="doc" />
+       <property name="projectName" value="cpdbClient" />
+
+       <property name="cytoscape.plugin" value="${lib}/plugins" />
+
+       <path id="classpath">
+               <fileset dir="${cylib}">
+                       <include name="**/*.jar" />
+               </fileset>
+               <fileset dir="${lib}">
+                       <include name="**/*.jar" />
+               </fileset>
+               <fileset dir="${testlib}">
+                       <include name="**/*.jar" />
+               </fileset>
+       </path>
+
+       <target name="prepare" depends="clean">
+               <mkdir dir="${build}" />
+       </target>
+
+       <target name="compile" depends="prepare"
+               description="Compile with Cytoscape under development">
+               <!-- Compile the java code from ${src} into ${build} -->
+               <javac source="1.5" debug="true" deprecation="true" 
srcdir="${src}"
+                       destdir="${build}">
+                       <classpath refid="classpath" />
+               </javac>
+       </target>
+
+       <target name="clean" description="clean up">
+               <!-- Delete the ${build} and ${src} directory trees -->
+               <delete dir="${build}" />
+               <delete dir="${jar}" />
+       </target>
+
+       <target name="jar" depends="compile"
+               description="makes a jar for Cytoscape under development">
+               <mkdir dir="${jar}" />
+               <unzip dest="${build}">
+                       <fileset dir="${lib}" includes="*" />
+               </unzip>
+               <copy todir="build/org/cytoscape/webservice/cpdb" 
file="resources/plugin.props" />
+               
+               <jar jarfile="${jar}/${projectName}.jar">
+                       <manifest>
+                               <attribute name="Cytoscape-Plugin"
+                                       
value="org.cytoscape.webservice.cpdb.CPDBClientPlugin" />
+                       </manifest>
+                       <fileset dir="${build}" />
+               </jar>
+       </target>
+
+       <target name="all" depends="jar" />
+
+       <target name="run" depends="jar" description="Run under development">
+               <java classname="cytoscape.CyMain" classpathref="classpath" 
fork="true"
+                       maxmemory="1g">
+                       <arg line="--JLD" />
+                       <arg line="${jar}/${projectName}.jar" />
+                       <arg line="-vt" />
+                       <arg line="5000" />
+               </java>
+       </target>
+
+
+       <!-- Target to Run JavaDoc -->
+       <target name="doc" description="Runs JavaDoc.">
+               <javadoc packagenames="cytoscape.groups.results.*" 
sourcepath="src"
+                       source="1.5" destdir="doc" 
classpathref="classpath_release">
+                       <link href="http://java.sun.com/j2se/1.5.0/docs/api/"; />
+                       <link href="http://csbi.sourceforge.net/API/"; />
+                       <link 
href="http://chianti.ucsd.edu/Cyto-2_6_3/javadoc/"; />
+               </javadoc>
+       </target>
+
+</project>
\ No newline at end of file

Added: csplugins/trunk/ucsd/kono/CPDBClient/jar/cpdbClient.jar
===================================================================
(Binary files differ)


Property changes on: csplugins/trunk/ucsd/kono/CPDBClient/jar/cpdbClient.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: csplugins/trunk/ucsd/kono/CPDBClient/junitLib/junit-4.7.jar
===================================================================
(Binary files differ)


Property changes on: csplugins/trunk/ucsd/kono/CPDBClient/junitLib/junit-4.7.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: csplugins/trunk/ucsd/kono/CPDBClient/lib/CPDBClientGenerated.jar
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/ucsd/kono/CPDBClient/lib/CPDBClientGenerated.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: csplugins/trunk/ucsd/kono/CPDBClient/resources/plugin.props
===================================================================
--- csplugins/trunk/ucsd/kono/CPDBClient/resources/plugin.props                 
        (rev 0)
+++ csplugins/trunk/ucsd/kono/CPDBClient/resources/plugin.props 2009-08-11 
20:29:03 UTC (rev 17773)
@@ -0,0 +1,34 @@
+#plugin.props 
+
+# This props file should be filled out and included in the plugin jar file.  
This props file will be used 
+# to put information into the Plugin Manager about the plugin 
+
+# -- The following properties are REQUIRED -- #
+
+# The plugin name that will be displayed to users
+pluginName=CPDBClient
+
+# Description used to give users information about the plugin such as what it 
does.  
+# Html tags are encouraged for formatting purposes.
+pluginDescription=CPDB web service client.
+
+# Plugin version number, this must be two numbers separated by a decimlal.  
Ex. 0.2, 14.03
+pluginVersion=0.1
+
+# Compatible Cytoscape version
+cytoscapeVersion=2.6
+
+# Category, use one of the categories listed on the website or create your own
+pluginCategory=Network and Attribute I/O
+
+# -- The following properties are OPTIONAL -- #
+
+# URL to a website that gives more information about your plugin, Ex. 
http://my-lab-site.org
+projectURL=http://cytoscape.org
+
+# List of authors.  Note each author and institution pair are separated by a : 
(colon)
+# each additional author institution pair must be separated from other pairs 
bye a ; (semicolon)
+pluginAuthorsIntsitutions=Keiichiro Ono:UCSD
+
+# Date this plugin/plugin version was released
+releaseDate=August 11, 2009

Added: 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClient.java
===================================================================
--- 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClient.java
                              (rev 0)
+++ 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClient.java
      2009-08-11 20:29:03 UTC (rev 17773)
@@ -0,0 +1,133 @@
+package org.cytoscape.webservice.cpdb;
+
+import javax.swing.JPanel;
+
+import soap.cpdb.CPDB;
+import cytoscape.Cytoscape;
+import cytoscape.data.CyAttributes;
+import cytoscape.data.webservice.CyWebServiceEvent;
+import cytoscape.data.webservice.CyWebServiceException;
+import cytoscape.data.webservice.NetworkImportWebServiceClient;
+import cytoscape.data.webservice.WebServiceClient;
+import cytoscape.data.webservice.WebServiceClientImplWithGUI;
+import cytoscape.data.webservice.WebServiceClientManager.ClientType;
+import cytoscape.layout.Tunable;
+import cytoscape.util.ModulePropertiesImpl;
+import cytoscape.visual.VisualStyle;
+
+/*
+ Copyright (c) 2006, 2007, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications.  In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage.  See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+/**
+ * CPDB web service client.
+ * 
+ * @author atanas, kono
+ * @version 0.1
+ * @since Cytoscape 2.6.3
+ * 
+ */
+public class CPDBClient extends WebServiceClientImplWithGUI<CPDB, JPanel>
+               implements NetworkImportWebServiceClient {
+
+       // Display name of this client.
+       private static final String DISPLAY_NAME = "IntAct Web Service Client";
+
+       // Client ID. This should be unique.
+       private static final String CLIENT_ID = "intact";
+
+       // Instance of this client. This is a singleton.
+       private static WebServiceClient<CPDB> client = new CPDBClient();
+
+       // Visual Style name for the networks generated by this client.
+       private static final String DEF_VS_NAME = "CPDB Style";
+       private VisualStyle defaultVS = null;
+
+       // Attributes.
+       private final CyAttributes nodeAttr = Cytoscape.getNodeAttributes();
+       private final CyAttributes edgeAttr = Cytoscape.getEdgeAttributes();
+
+       private void setDescription() {
+               description = "Test";
+       }
+
+       /**
+        * Return instance of this client.
+        * 
+        * @return
+        */
+       public static WebServiceClient<CPDB> getClient() {
+               return client;
+       }
+
+       /**
+        * Creates a new IntactClient object.
+        */
+       private CPDBClient() {
+               super(CLIENT_ID, DISPLAY_NAME, new ClientType[] { 
ClientType.NETWORK },
+                               null, new CPDB(), null);
+               setDescription();
+               // Set properties for this client.
+               setProperty();
+       }
+
+       /**
+        * Set props for this client.
+        */
+       private void setProperty() {
+               props = new ModulePropertiesImpl(clientID, "wsc");
+
+               props.add(new Tunable("max_interactions", "Maximum number of 
records",
+                               Tunable.INTEGER, new Integer(50000)));
+
+               props.add(new Tunable("timeout", "Timeout (sec.)", 
Tunable.INTEGER,
+                               new Integer(1200)));
+               // props.add(new Tunable("select_interaction",
+               // "Import only selected interactions",
+               // Tunable.BOOLEAN, new Boolean(false)));
+       }
+
+       @Override
+       public void executeService(CyWebServiceEvent arg0)
+                       throws CyWebServiceException {
+               // TODO Auto-generated method stub
+
+       }
+
+       public VisualStyle getDefaultVisualStyle() {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+}

Added: 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClientPlugin.java
===================================================================
--- 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClientPlugin.java
                                (rev 0)
+++ 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/CPDBClientPlugin.java
        2009-08-11 20:29:03 UTC (rev 17773)
@@ -0,0 +1,24 @@
+package org.cytoscape.webservice.cpdb;
+
+import cytoscape.data.webservice.WebServiceClientManager;
+import cytoscape.plugin.CytoscapePlugin;
+
+
+/**
+ * Intact Web Service Client Plugin.<br>
+ *
+ * @author kono
+ * @version 0.5
+ * @since Cytoscape 2.6
+ */
+public class CPDBClientPlugin extends CytoscapePlugin {
+       /**
+        * Register IntAct client to the web service client manager
+        *
+        * @throws Exception  DOCUMENT ME!
+        */
+       public CPDBClientPlugin() throws Exception {
+               // Register this client to the manager.
+               WebServiceClientManager.registerClient(CPDBClient.getClient());
+       }
+}

Added: 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/test/BasicServiceTest.java
===================================================================
--- 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/test/BasicServiceTest.java
                           (rev 0)
+++ 
csplugins/trunk/ucsd/kono/CPDBClient/src/org/cytoscape/webservice/cpdb/test/BasicServiceTest.java
   2009-08-11 20:29:03 UTC (rev 17773)
@@ -0,0 +1,17 @@
+package org.cytoscape.webservice.cpdb.test;
+
+
+import org.junit.After;
+import org.junit.Before;
+
+public class BasicServiceTest {
+
+       @Before
+       public void setUp() throws Exception {
+       }
+
+       @After
+       public void tearDown() throws Exception {
+       }
+
+}

Added: csplugins/trunk/ucsd/kono/CPDBClient/wsdl/CPDB.wsdl
===================================================================
--- csplugins/trunk/ucsd/kono/CPDBClient/wsdl/CPDB.wsdl                         
(rev 0)
+++ csplugins/trunk/ucsd/kono/CPDBClient/wsdl/CPDB.wsdl 2009-08-11 20:29:03 UTC 
(rev 17773)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="CPDB_CS" targetNamespace="SOAP/CPDB"
+       xmlns:tns="SOAP/CPDB" xmlns="http://schemas.xmlsoap.org/wsdl/";
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
+
+       <types>
+               <xsd:schema elementFormDefault="qualified" 
targetNamespace="SOAP/CPDB"
+                       xmlns:tns="SOAP/CPDB" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+
+                       <xsd:element name="evidenceInteractions">
+                               <xsd:complexType>
+                                       <xsd:sequence>
+                                               <xsd:element name="entities" 
type="xsd:string"
+                                                       minOccurs="0" 
maxOccurs="unbounded" />
+                                               <xsd:element 
name="interactions" type="xsd:string"
+                                                       minOccurs="0" 
maxOccurs="unbounded" />
+                                               <xsd:element 
name="exactMatchEntities" type="xsd:boolean"
+                                                       minOccurs="0" 
maxOccurs="1" />
+                                               <xsd:element 
name="exactMatchInteractions" type="xsd:boolean"
+                                                       minOccurs="0" 
maxOccurs="1" />
+                                       </xsd:sequence>
+                               </xsd:complexType>
+                       </xsd:element>
+                       <xsd:element name="evidenceInteractionsResponse">
+                               <xsd:complexType>
+                                       <xsd:sequence>
+                                               <xsd:element 
name="interactionAttributes" type="xsd:string"
+                                                       minOccurs="0" 
maxOccurs="unbounded" />
+                                       </xsd:sequence>
+                               </xsd:complexType>
+                       </xsd:element>
+               </xsd:schema>
+       </types>
+
+
+       <message name="evidenceInteractionsRequest">
+               <part name="arg" element="tns:evidenceInteractions" />
+       </message>
+       <message name="evidenceInteractionsResponse">
+               <part name="res" element="tns:evidenceInteractionsResponse" />
+       </message>
+
+
+       <!-- port -->
+       <portType name="CPDBportTp">
+               <operation name="evidenceInteractions">
+                       <input name="evidenceInteractions_input" 
message="tns:evidenceInteractionsRequest" />
+                       <output name="evidenceInteractions_output" 
message="tns:evidenceInteractionsResponse" />
+               </operation>
+       </portType>
+
+
+       <!-- binding -->
+       <binding name="CPDB_WS_http_binding" type="tns:CPDBportTp">
+               <soap:binding style="document"
+                       transport="http://schemas.xmlsoap.org/soap/http"; />
+               <operation name="evidenceInteractions">
+                       <soap:operation 
soapAction="SOAP/CPDB#evidenceInteractions" />
+                       <input name="evidenceInteractions_input">
+                               <soap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
+                                       use="literal" />
+                       </input>
+                       <output name="evidenceInteractions_output">
+                               <soap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
+                                       use="literal" />
+                       </output>
+               </operation>
+       </binding>
+
+
+       <!-- service -->
+       <service name="CPDB">
+               <port name="CPDBport" binding="tns:CPDB_WS_http_binding">
+                       <soap:address 
location="http://cpdb.molgen.mpg.de/csplugin"; />
+               </port>
+       </service>
+
+</definitions>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to