Author: mes
Date: 2011-09-15 15:38:36 -0700 (Thu, 15 Sep 2011)
New Revision: 26830
Added:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
Removed:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml
Modified:
core3/impl/branches/no-spring/webservice-biomart-client-impl/osgi.bnd
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/rest/BiomartRestClient.java
Log:
removed use of spring
Modified: core3/impl/branches/no-spring/webservice-biomart-client-impl/osgi.bnd
===================================================================
--- core3/impl/branches/no-spring/webservice-biomart-client-impl/osgi.bnd
2011-09-15 22:34:18 UTC (rev 26829)
+++ core3/impl/branches/no-spring/webservice-biomart-client-impl/osgi.bnd
2011-09-15 22:38:36 UTC (rev 26830)
@@ -3,5 +3,6 @@
#-----------------------------------------------------------------
Import-Package: *
-Private-Package: org.cytoscape.io.webservice.biomart.*
-Export-Package: !org.cytoscape.io.webservice.biomart.*
+Private-Package: org.cytoscape.io.webservice.biomart,
org.cytoscape.io.webservice.biomart.*
+Bundle-Activator: org.cytoscape.io.webservice.biomart.CyActivator
+
Added:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
===================================================================
---
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
(rev 0)
+++
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/CyActivator.java
2011-09-15 22:38:36 UTC (rev 26830)
@@ -0,0 +1,50 @@
+
+package org.cytoscape.io.webservice.biomart;
+
+import org.cytoscape.model.CyNetworkManager;
+import org.cytoscape.model.CyTableFactory;
+import org.cytoscape.application.swing.CySwingApplication;
+import org.cytoscape.application.CyApplicationManager;
+import org.cytoscape.model.CyTableManager;
+import org.cytoscape.work.swing.GUITaskManager;
+
+import org.cytoscape.io.webservice.biomart.task.ShowBiomartGUIAction;
+import org.cytoscape.io.webservice.biomart.BiomartClient;
+import org.cytoscape.io.webservice.biomart.rest.BiomartRestClient;
+import org.cytoscape.io.webservice.biomart.ui.BiomartAttrMappingPanel;
+
+import org.cytoscape.application.swing.CyAction;
+
+
+import org.osgi.framework.BundleContext;
+
+import org.cytoscape.service.util.AbstractCyActivator;
+
+import java.util.Properties;
+
+
+public class CyActivator extends AbstractCyActivator {
+ public CyActivator() {
+ super();
+ }
+
+
+ public void start(BundleContext bc) {
+
+ CySwingApplication cySwingApplicationServiceRef =
getService(bc,CySwingApplication.class);
+ GUITaskManager taskManagerServiceRef =
getService(bc,GUITaskManager.class);
+ CyNetworkManager cyNetworkManagerServiceRef =
getService(bc,CyNetworkManager.class);
+ CyTableManager cyTableManagerServiceRef =
getService(bc,CyTableManager.class);
+ CyApplicationManager cyApplicationManagerServiceRef =
getService(bc,CyApplicationManager.class);
+ CyTableFactory cyTableFactoryServiceRef =
getService(bc,CyTableFactory.class);
+
+ BiomartRestClient biomartRestClient = new
BiomartRestClient("http://www.biomart.org/biomart/martservice");
+ BiomartClient biomartClient = new BiomartClient("BioMart
Client","REST version of BioMart Web Service
Client.",biomartRestClient,cyTableFactoryServiceRef,cyNetworkManagerServiceRef,cyApplicationManagerServiceRef,cySwingApplicationServiceRef,cyTableManagerServiceRef);
+ BiomartAttrMappingPanel biomartAttrMappingPanel = new
BiomartAttrMappingPanel(biomartClient,taskManagerServiceRef,cyApplicationManagerServiceRef,cyTableManagerServiceRef,cyNetworkManagerServiceRef);
+ ShowBiomartGUIAction showBiomartGUIAction = new
ShowBiomartGUIAction(biomartAttrMappingPanel,biomartClient,taskManagerServiceRef,cyApplicationManagerServiceRef,cySwingApplicationServiceRef);
+
+ registerService(bc,showBiomartGUIAction,CyAction.class, new
Properties());
+ registerAllServices(bc,biomartAttrMappingPanel, new
Properties());
+ }
+}
+
Modified:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/rest/BiomartRestClient.java
===================================================================
---
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/rest/BiomartRestClient.java
2011-09-15 22:34:18 UTC (rev 26829)
+++
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/java/org/cytoscape/io/webservice/biomart/rest/BiomartRestClient.java
2011-09-15 22:38:36 UTC (rev 26830)
@@ -64,8 +64,7 @@
*/
public class BiomartRestClient {
- private static final Logger logger = LoggerFactory
- .getLogger(BiomartRestClient.class);
+ private static final Logger logger =
LoggerFactory.getLogger(BiomartRestClient.class);
private static final int CONNECTION_TIMEOUT = 3000;
private static final int READ_TIMEOUT = 5000;
@@ -90,14 +89,18 @@
* DOCUMENT ME!
* @throws IOException
*/
- public BiomartRestClient(final String baseURL) throws IOException {
+ public BiomartRestClient(final String baseURL) {
if (baseURL == null)
throw new NullPointerException("Biomart base URL is
missing.");
this.baseURL = baseURL + "?";
+ try {
loadConversionFile();
+ } catch (IOException ioe) {
+ throw new RuntimeException("Couldn't initialize
BiomartRestClient",ioe);
+ }
logger.debug("Biomart REST client initialized.");
}
Deleted:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
---
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2011-09-15 22:34:18 UTC (rev 26829)
+++
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2011-09-15 22:38:36 UTC (rev 26830)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:osgi="http://www.springframework.org/schema/osgi"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd"
- default-lazy-init="false">
-
- <osgi:reference id="cySwingApplicationServiceRef"
- interface="org.cytoscape.application.swing.CySwingApplication"
/>
-
- <osgi:reference id="taskManagerServiceRef"
- interface="org.cytoscape.work.swing.GUITaskManager" />
-
- <!-- Network Manager -->
- <osgi:reference id="cyNetworkManagerServiceRef"
- interface="org.cytoscape.model.CyNetworkManager" />
-
- <osgi:reference id="cyTableManagerServiceRef"
interface="org.cytoscape.model.CyTableManager" />
-
- <!-- Application Manager -->
- <osgi:reference id="cyApplicationManagerServiceRef"
- interface="org.cytoscape.application.CyApplicationManager" />
-
- <osgi:reference id="cyTableFactoryServiceRef"
interface="org.cytoscape.model.CyTableFactory" />
-
- <osgi:service id="showBiomartGUIActionService"
ref="showBiomartGUIAction"
- interface="org.cytoscape.application.swing.CyAction" />
-
-
- <!-- This is necessary to listening to Column events. -->
- <osgi:service id="biomartAttrMappingPanelService"
ref="biomartAttrMappingPanel" auto-export="interfaces" />
-
-</beans>
Copied:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
(from rev 26762,
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml)
===================================================================
---
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
(rev 0)
+++
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
2011-09-15 22:38:36 UTC (rev 26830)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd"
+ default-lazy-init="false">
+
+ <osgi:reference id="cySwingApplicationServiceRef"
+ interface="org.cytoscape.application.swing.CySwingApplication"
/>
+
+ <osgi:reference id="taskManagerServiceRef"
+ interface="org.cytoscape.work.swing.GUITaskManager" />
+
+ <!-- Network Manager -->
+ <osgi:reference id="cyNetworkManagerServiceRef"
+ interface="org.cytoscape.model.CyNetworkManager" />
+
+ <osgi:reference id="cyTableManagerServiceRef"
interface="org.cytoscape.model.CyTableManager" />
+
+ <!-- Application Manager -->
+ <osgi:reference id="cyApplicationManagerServiceRef"
+ interface="org.cytoscape.application.CyApplicationManager" />
+
+ <osgi:reference id="cyTableFactoryServiceRef"
interface="org.cytoscape.model.CyTableFactory" />
+
+ <osgi:service id="showBiomartGUIActionService"
ref="showBiomartGUIAction"
+ interface="org.cytoscape.application.swing.CyAction" />
+
+
+ <!-- This is necessary to listening to Column events. -->
+ <osgi:service id="biomartAttrMappingPanelService"
ref="biomartAttrMappingPanel" auto-export="interfaces" />
+
+</beans>
Deleted:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
---
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml
2011-09-15 22:34:18 UTC (rev 26829)
+++
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml
2011-09-15 22:38:36 UTC (rev 26830)
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:osgi="http://www.springframework.org/schema/osgi"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/lang
http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
- http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd"
- default-lazy-init="false">
-
- <import resource="bundle-context-osgi.xml" />
-
- <context:annotation-config />
-
- <!-- REST version of BioMart web service client -->
- <bean id="biomartRestClient"
-
class="org.cytoscape.io.webservice.biomart.rest.BiomartRestClient">
- <constructor-arg
value="http://www.biomart.org/biomart/martservice" />
- </bean>
-
- <!-- Wrapper for the REST client -->
- <bean id="biomartClient"
class="org.cytoscape.io.webservice.biomart.BiomartClient">
- <constructor-arg index="0" value="BioMart Client" />
- <constructor-arg index="1"
- value="REST version of BioMart Web Service Client." />
- <constructor-arg ref="biomartRestClient" />
- <constructor-arg ref="cyTableFactoryServiceRef" />
- <constructor-arg ref="cyNetworkManagerServiceRef" />
- <constructor-arg ref="cyApplicationManagerServiceRef" />
- <constructor-arg ref="cySwingApplicationServiceRef" />
- <constructor-arg ref="cyTableManagerServiceRef" />
- </bean>
-
- <bean id="biomartAttrMappingPanel"
-
class="org.cytoscape.io.webservice.biomart.ui.BiomartAttrMappingPanel">
- <constructor-arg ref="biomartClient" />
- <constructor-arg ref="taskManagerServiceRef" />
- <constructor-arg ref="cyApplicationManagerServiceRef" />
- <constructor-arg ref="cyTableManagerServiceRef" />
- <constructor-arg ref="cyNetworkManagerServiceRef" />
- </bean>
-
- <!-- Task to create menu item -->
- <bean id="showBiomartGUIAction"
-
class="org.cytoscape.io.webservice.biomart.task.ShowBiomartGUIAction">
- <constructor-arg ref="biomartAttrMappingPanel" />
- <constructor-arg ref="biomartClient" />
- <constructor-arg ref="taskManagerServiceRef" />
- <constructor-arg ref="cyApplicationManagerServiceRef" />
- <constructor-arg ref="cySwingApplicationServiceRef" />
- </bean>
-</beans>
Copied:
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
(from rev 26762,
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml)
===================================================================
---
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
(rev 0)
+++
core3/impl/branches/no-spring/webservice-biomart-client-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
2011-09-15 22:38:36 UTC (rev 26830)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/aop
+ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-3.0.xsd
+ http://www.springframework.org/schema/lang
http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
+ http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd"
+ default-lazy-init="false">
+
+ <import resource="bundle-context-osgi.xml" />
+
+ <context:annotation-config />
+
+ <!-- REST version of BioMart web service client -->
+ <bean id="biomartRestClient"
+
class="org.cytoscape.io.webservice.biomart.rest.BiomartRestClient">
+ <constructor-arg
value="http://www.biomart.org/biomart/martservice" />
+ </bean>
+
+ <!-- Wrapper for the REST client -->
+ <bean id="biomartClient"
class="org.cytoscape.io.webservice.biomart.BiomartClient">
+ <constructor-arg index="0" value="BioMart Client" />
+ <constructor-arg index="1"
+ value="REST version of BioMart Web Service Client." />
+ <constructor-arg ref="biomartRestClient" />
+ <constructor-arg ref="cyTableFactoryServiceRef" />
+ <constructor-arg ref="cyNetworkManagerServiceRef" />
+ <constructor-arg ref="cyApplicationManagerServiceRef" />
+ <constructor-arg ref="cySwingApplicationServiceRef" />
+ <constructor-arg ref="cyTableManagerServiceRef" />
+ </bean>
+
+ <bean id="biomartAttrMappingPanel"
+
class="org.cytoscape.io.webservice.biomart.ui.BiomartAttrMappingPanel">
+ <constructor-arg ref="biomartClient" />
+ <constructor-arg ref="taskManagerServiceRef" />
+ <constructor-arg ref="cyApplicationManagerServiceRef" />
+ <constructor-arg ref="cyTableManagerServiceRef" />
+ <constructor-arg ref="cyNetworkManagerServiceRef" />
+ </bean>
+
+ <!-- Task to create menu item -->
+ <bean id="showBiomartGUIAction"
+
class="org.cytoscape.io.webservice.biomart.task.ShowBiomartGUIAction">
+ <constructor-arg ref="biomartAttrMappingPanel" />
+ <constructor-arg ref="biomartClient" />
+ <constructor-arg ref="taskManagerServiceRef" />
+ <constructor-arg ref="cyApplicationManagerServiceRef" />
+ <constructor-arg ref="cySwingApplicationServiceRef" />
+ </bean>
+</beans>
--
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.