Author: kono Date: 2011-08-11 18:22:32 -0700 (Thu, 11 Aug 2011) New Revision: 26536
Added: core3/impl/trunk/application-impl/ core3/impl/trunk/application-impl/osgi.bnd core3/impl/trunk/application-impl/pom.xml core3/impl/trunk/application-impl/src/ core3/impl/trunk/application-impl/src/main/ core3/impl/trunk/application-impl/src/main/java/ core3/impl/trunk/application-impl/src/main/java/org/ core3/impl/trunk/application-impl/src/main/java/org/cytoscape/ core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/ core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/ core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationManagerImpl.java core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyVersion.java core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/ShutdownHandler.java core3/impl/trunk/application-impl/src/main/resources/ core3/impl/trunk/application-impl/src/main/resources/META-INF/ core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/ core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context.xml core3/impl/trunk/application-impl/src/test/ core3/impl/trunk/application-impl/src/test/java/ core3/impl/trunk/application-impl/src/test/java/org/ core3/impl/trunk/application-impl/src/test/java/org/cytoscape/ core3/impl/trunk/application-impl/src/test/java/org/cytoscape/application/ core3/impl/trunk/application-impl/src/test/java/org/cytoscape/application/internal/ Log: Application-impl bundle had been added. Added: core3/impl/trunk/application-impl/osgi.bnd =================================================================== --- core3/impl/trunk/application-impl/osgi.bnd (rev 0) +++ core3/impl/trunk/application-impl/osgi.bnd 2011-08-12 01:22:32 UTC (rev 26536) @@ -0,0 +1,6 @@ +#----------------------------------------------------------------- +# Use this file to add customized Bnd instructions for the bundle +#----------------------------------------------------------------- + +Private-Package: org.cytoscape.application.internal,org.cytoscape.application.internal.* + Added: core3/impl/trunk/application-impl/pom.xml =================================================================== --- core3/impl/trunk/application-impl/pom.xml (rev 0) +++ core3/impl/trunk/application-impl/pom.xml 2011-08-12 01:22:32 UTC (rev 26536) @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <parent> + <artifactId>impl-parent</artifactId> + <groupId>org.cytoscape</groupId> + <version>3.0.0-alpha6-SNAPSHOT</version> + </parent> + + <properties> + <bundle.symbolicName>org.cytoscape.application-impl</bundle.symbolicName> + <bundle.namespace>org.cytoscape.application.impl</bundle.namespace> + </properties> + + <modelVersion>4.0.0</modelVersion> + <artifactId>application-impl</artifactId> + + <name>${bundle.symbolicName}</name> + + <packaging>bundle</packaging> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>${maven-surefire-plugin.version}</version> + <configuration> + <redirectTestOutputToFile>true</redirectTestOutputToFile> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <version>${maven-bundle-plugin.version}</version> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> + <Bundle-Version>${project.version}</Bundle-Version> + <_include>-osgi.bnd</_include> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + + <repositories> + <repository> + <id>cytoscape_snapshots</id> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + <name>Cytoscape Snapshots</name> + <url>http://cytoscape.wodaklab.org/nexus/content/repositories/snapshots/</url> + </repository> + <repository> + <id>cytoscape_releases</id> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + </releases> + <name>Cytoscape Releases</name> + <url>http://cytoscape.wodaklab.org/nexus/content/repositories/releases/</url> + </repository> + </repositories> + + + <dependencies> + <dependency> + <groupId>org.cytoscape</groupId> + <artifactId>application-api</artifactId> + </dependency> + <dependency> + <groupId>org.cytoscape</groupId> + <artifactId>property-api</artifactId> + </dependency> + </dependencies> +</project> Added: core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationManagerImpl.java =================================================================== --- core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationManagerImpl.java (rev 0) +++ core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationManagerImpl.java 2011-08-12 01:22:32 UTC (rev 26536) @@ -0,0 +1,296 @@ +/* + File: CyApplicationManagerImpl.java + + Copyright (c) 2006, 2010, The Cytoscape Consortium (www.cytoscape.org) + + 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. + */ +package org.cytoscape.application.internal; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; + +import org.cytoscape.application.CyApplicationManager; +import org.cytoscape.application.events.SetCurrentNetworkEvent; +import org.cytoscape.application.events.SetCurrentNetworkViewEvent; +import org.cytoscape.application.events.SetCurrentRenderingEngineEvent; +import org.cytoscape.application.events.SetSelectedNetworkViewsEvent; +import org.cytoscape.application.events.SetSelectedNetworksEvent; +import org.cytoscape.event.CyEventHelper; +import org.cytoscape.model.CyNetwork; +import org.cytoscape.model.CyNetworkManager; +import org.cytoscape.model.CyTable; +import org.cytoscape.model.events.NetworkAboutToBeDestroyedEvent; +import org.cytoscape.model.events.NetworkAboutToBeDestroyedListener; +import org.cytoscape.view.model.CyNetworkView; +import org.cytoscape.view.model.CyNetworkViewManager; +import org.cytoscape.view.model.events.NetworkViewAboutToBeDestroyedEvent; +import org.cytoscape.view.model.events.NetworkViewAboutToBeDestroyedListener; +import org.cytoscape.view.presentation.RenderingEngine; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * An implementation of CyApplicationManager. + */ +public class CyApplicationManagerImpl implements CyApplicationManager, NetworkAboutToBeDestroyedListener, + NetworkViewAboutToBeDestroyedListener { + + private static final Logger logger = LoggerFactory.getLogger(CyApplicationManagerImpl.class); + + private final CyEventHelper cyEventHelper; + private final CyNetworkManager networkManager; + private final CyNetworkViewManager networkViewManager; + + private final List<CyNetworkView> selectedNetworkViews; + private final List<CyNetwork> selectedNetworks; + + // Trackers for current network object + private CyNetwork currentNetwork; + private CyNetworkView currentNetworkView; + private RenderingEngine<CyNetwork> currentRenderer; + + private CyTable currentTable; + + /** + * + * @param cyEventHelper + */ + public CyApplicationManagerImpl(final CyEventHelper cyEventHelper, final CyNetworkManager networkManager, + final CyNetworkViewManager networkViewManager) { + this.cyEventHelper = cyEventHelper; + this.networkManager = networkManager; + this.networkViewManager = networkViewManager; + + selectedNetworkViews = new LinkedList<CyNetworkView>(); + selectedNetworks = new LinkedList<CyNetwork>(); + + currentNetwork = null; + currentNetworkView = null; + this.currentRenderer = null; + } + + public void handleEvent(final NetworkAboutToBeDestroyedEvent event) { + final CyNetwork toBeDestroyed = event.getNetwork(); + boolean changed = false; + synchronized (this) { + if (toBeDestroyed == currentNetwork) { + changed = true; + currentNetwork = null; + currentNetworkView = null; + + final Set<CyNetworkView> networkViews = networkViewManager.getNetworkViewSet(); + for (final CyNetworkView view : networkViews) { + if (view.getModel() != toBeDestroyed) { + currentNetworkView = view; + currentNetwork = view.getModel(); + break; + } + } + + if (currentNetwork == null) { + final Set<CyNetwork> networks = networkManager.getNetworkSet(); + for (final CyNetwork network : networks) { + if (network != toBeDestroyed) { + currentNetwork = network; + break; + } + } + } + } + } + if (changed) { + cyEventHelper.fireEvent(new SetCurrentNetworkViewEvent(this, currentNetworkView)); + } + + } + + public void handleEvent(final NetworkViewAboutToBeDestroyedEvent event) { + final CyNetworkView toBeDestroyed = event.getNetworkView(); + boolean changed = false; + synchronized (this) { + if (toBeDestroyed == currentNetworkView) { + changed = true; + currentNetworkView = null; + + final Set<CyNetworkView> networkViews = networkViewManager.getNetworkViewSet(); + for (final CyNetworkView view : networkViews) { + if (view != toBeDestroyed) { + currentNetworkView = view; + currentNetwork = view.getModel(); + break; + } + } + + if (currentNetwork == null) { + final Set<CyNetwork> networks = networkManager.getNetworkSet(); + for (final CyNetwork network : networks) { + if (network != toBeDestroyed.getModel()) { + currentNetwork = network; + break; + } + } + } + } + } + if (changed) { + cyEventHelper.fireEvent(new SetCurrentNetworkViewEvent(this, currentNetworkView)); + } + } + + public synchronized CyNetwork getCurrentNetwork() { + return currentNetwork; + } + + public void setCurrentNetwork(final long networkId) { + synchronized (this) { + if (!networkManager.networkExists(networkId)) + throw new IllegalArgumentException("Network is not registered in this ApplicationManager: ID = " + + networkId); + + logger.info("Set current network called. Current network ID = " + networkId); + currentNetwork = networkManager.getNetwork(networkId); + currentNetworkView = networkViewManager.getNetworkView(networkId); + + // reset selected networks + selectedNetworks.clear(); + selectedNetworks.add(currentNetwork); + } + + logger.debug("Current network is set. Firing SetCurrentNetworkEvent: Network ID = " + networkId); + cyEventHelper.fireEvent(new SetCurrentNetworkEvent(this, currentNetwork)); + } + + public synchronized CyNetworkView getCurrentNetworkView() { + return currentNetworkView; + } + + + // FIXME: THIS IS WRONG! we can have multiple view model, so this parameter + // should be model SUID. + public void setCurrentNetworkView(final long modelID) { + final CyNetworkView view; + synchronized (this) { + if (!networkManager.networkExists(modelID)) + throw new IllegalArgumentException("network is not recognized by this ApplicationManager"); + + view = networkViewManager.getNetworkView(modelID); + if (view == null) { + logger.warn("View was not in the NetworkViewManager."); + return; + } + + logger.debug("Set current network view called: View ID = " + view.getSUID()); + + setCurrentNetwork(modelID); + + // reset selected network views + selectedNetworkViews.clear(); + selectedNetworkViews.add(currentNetworkView); + } + + logger.debug("Current network view is set. Firing SetCurrentNetworkViewEvent: View ID = " + view.getSUID()); + cyEventHelper.fireEvent(new SetCurrentNetworkViewEvent(this, currentNetworkView)); + } + + public synchronized List<CyNetworkView> getSelectedNetworkViews() { + return new ArrayList<CyNetworkView>(selectedNetworkViews); + } + + public void setSelectedNetworkViews(final List<Long> modelIDs) { + if (modelIDs == null) + return; + + synchronized (this) { + + selectedNetworkViews.clear(); + + for (final long id : modelIDs) { + final CyNetworkView view = networkViewManager.getNetworkView(id); + if (view != null) + selectedNetworkViews.add(view); + } + + CyNetworkView cv = getCurrentNetworkView(); + + if (!selectedNetworkViews.contains(cv)) { + selectedNetworkViews.add(cv); + } + } + + cyEventHelper.fireEvent(new SetSelectedNetworkViewsEvent(this, new ArrayList<CyNetworkView>( + selectedNetworkViews))); + } + + public synchronized List<CyNetwork> getSelectedNetworks() { + return new ArrayList<CyNetwork>(selectedNetworks); + } + + public void setSelectedNetworks(final List<Long> ids) { + if (ids == null) + return; + + synchronized (this) { + selectedNetworks.clear(); + + for (Long id : ids) { + CyNetwork n = networkManager.getNetwork(id); + if (n != null) + selectedNetworks.add(n); + } + + CyNetwork cn = currentNetwork; + + if (!selectedNetworks.contains(cn)) + selectedNetworks.add(cn); + } + + cyEventHelper.fireEvent(new SetSelectedNetworksEvent(this, + new ArrayList<CyNetwork>(selectedNetworks))); + } + + public RenderingEngine<CyNetwork> getCurrentRenderingEngine() { + return currentRenderer; + } + + public void setCurrentRenderingEngine(RenderingEngine<CyNetwork> engine) { + this.currentRenderer = engine; + + cyEventHelper.fireEvent(new SetCurrentRenderingEngineEvent(this, this.currentRenderer)); + + } + + @Override + public CyTable getCurrentTable() { + return currentTable; + } + + @Override + public void setCurrentTable(CyTable table) { + currentTable = table; + } +} Added: core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyVersion.java =================================================================== --- core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyVersion.java (rev 0) +++ core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyVersion.java 2011-08-12 01:22:32 UTC (rev 26536) @@ -0,0 +1,110 @@ +/* + File: CytoscapeVersion.java + + Copyright (c) 2006, 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. + */ +package org.cytoscape.application.internal; + +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.cytoscape.application.CytoscapeVersion; +import org.cytoscape.property.CyProperty; + +/** + * Identify the version of cytoscape. + */ +public class CyVersion implements CytoscapeVersion { + + private final static Pattern p = Pattern.compile(CytoscapeVersion.VERSION_REGEX); + + private final int major; + private final int minor; + private final int bugfix; + private final String qualifier; + private final String version; + + public CyVersion(final CyProperty<Properties> props) { + version = props.getProperties().getProperty(CytoscapeVersion.VERSION_PROPERTY_NAME); + + if ( version == null ) + throw new NullPointerException("No version number found in the provided properties with property name: " + CytoscapeVersion.VERSION_PROPERTY_NAME); + + Matcher m = p.matcher(version); + + if ( !m.matches() ) + throw new IllegalArgumentException("Malformed version number: " + version + " The version number must match this regular expression: " + CytoscapeVersion.VERSION_REGEX); + + major = Integer.parseInt(m.group(1)); + minor = Integer.parseInt(m.group(2)); + bugfix = Integer.parseInt(m.group(3)); + qualifier = m.group(4); + } + + /** + * @inheritdoc + */ + public String getVersion() { + return version; + } + + /** + * @inheritdoc + */ + public int getMajorVersion() { + return major; + } + + /** + * @inheritdoc + */ + public int getMinorVersion() { + return minor; + } + + /** + * @inheritDoc + */ + public int getBugFixVersion() { + return bugfix; + } + + /** + * @inheritdoc + */ + public String getQualifier() { + return qualifier; + } +} Added: core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/ShutdownHandler.java =================================================================== --- core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/ShutdownHandler.java (rev 0) +++ core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/ShutdownHandler.java 2011-08-12 01:22:32 UTC (rev 26536) @@ -0,0 +1,70 @@ + +/* + File: ShutdownHandler.java + + Copyright (c) 2006, 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. + */ + +package org.cytoscape.application.internal; + +import org.cytoscape.application.CytoscapeShutdown; +import org.cytoscape.application.events.CytoscapeShutdownEvent; +import org.cytoscape.event.CyEventHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * + */ +public class ShutdownHandler implements CytoscapeShutdown { + + private static final Logger logger = LoggerFactory.getLogger(ShutdownHandler.class); + + private final CyEventHelper eh; + + public ShutdownHandler(CyEventHelper eh) { + this.eh = eh; + } + + public void exit(int retVal) { + CytoscapeShutdownEvent ev = new CytoscapeShutdownEvent(ShutdownHandler.this); + eh.fireEvent( ev ); + + // TODO figure out a way to do a clean shutdown of the OSGi container. + if ( ev.actuallyShutdown() ) + System.exit(retVal); + else + logger.info("NOT shutting down, per listener instruction: " + ev.whyNot() ); + } +} Added: core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml =================================================================== --- core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml (rev 0) +++ core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml 2011-08-12 01:22:32 UTC (rev 26536) @@ -0,0 +1,30 @@ +<?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-2.5.xsd + http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd" + default-lazy-init="false"> + + + <!-- Export Services --> + <osgi:service id="cyApplicationManagerService" ref="cyApplicationManager"> + <osgi:interfaces> + <value>org.cytoscape.application.CyApplicationManager</value> + <value>org.cytoscape.model.events.NetworkAboutToBeDestroyedListener</value> + <value>org.cytoscape.view.model.events.NetworkViewAboutToBeDestroyedListener</value> + </osgi:interfaces> + </osgi:service> + + <osgi:service id="cytoscapeShutdownService" ref="cytoscapeShutdown" auto-export="interfaces" /> + <osgi:service id="cytoscapeVersionService" ref="cytoscapeVersion" auto-export="interfaces" /> + + <osgi:reference id="cyEventHelperServiceRef" interface="org.cytoscape.event.CyEventHelper" /> + <osgi:reference id="cyNetworkManagerServiceRef" + interface="org.cytoscape.model.CyNetworkManager" /> + <osgi:reference id="cyNetworkViewManagerServiceRef" + interface="org.cytoscape.view.model.CyNetworkViewManager" /> + + <osgi:reference id="cytoscapePropertiesServiceRef" + interface="org.cytoscape.property.CyProperty" filter="(cyPropertyName=coreSettings)" /> + +</beans> Added: core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context.xml =================================================================== --- core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context.xml (rev 0) +++ core3/impl/trunk/application-impl/src/main/resources/META-INF/spring/bundle-context.xml 2011-08-12 01:22:32 UTC (rev 26536) @@ -0,0 +1,43 @@ +<?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:context="http://www.springframework.org/schema/context" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/aop + http://www.springframework.org/schema/aop/spring-aop-2.5.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context-2.5.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util-2.5.xsd + http://www.springframework.org/schema/lang + http://www.springframework.org/schema/lang/spring-lang-2.5.xsd + http://www.springframework.org/schema/osgi + http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd" + default-lazy-init="false"> + + <!-- regular spring configuration file defining the beans for this bundle. + We've kept the osgi definitions in a separate configuration file so that + this file can easily be used for integration testing outside of an OSGi environment --> + + <context:annotation-config /> + + <bean id="cyApplicationManager" + class="org.cytoscape.application.internal.CyApplicationManagerImpl"> + <constructor-arg ref="cyEventHelperServiceRef" /> + <constructor-arg ref="cyNetworkManagerServiceRef" /> + <constructor-arg ref="cyNetworkViewManagerServiceRef" /> + </bean> + + <!-- Cytoscape Version --> + <bean name="cytoscapeVersion" class="org.cytoscape.application.internal.CyVersion"> + <constructor-arg ref="cytoscapePropertiesServiceRef" /> + </bean> + + <!-- shutdown support --> + <bean name="cytoscapeShutdown" class="org.cytoscape.application.internal.ShutdownHandler"> + <constructor-arg ref="cyEventHelperServiceRef" /> + </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.
