Author: jm
Date: 2010-10-20 10:39:40 -0700 (Wed, 20 Oct 2010)
New Revision: 22308

Added:
   core3/sbml-impl/osgi.bnd
   core3/sbml-impl/pom.xml
   core3/sbml-impl/src/
   core3/sbml-impl/src/main/
   core3/sbml-impl/src/main/java/
   core3/sbml-impl/src/main/java/org/
   core3/sbml-impl/src/main/java/org/cytoscape/
   core3/sbml-impl/src/main/java/org/cytoscape/sbml/
   core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/
   core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLFileFilter.java
   
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewReader.java
   
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewTaskFactory.java
   core3/sbml-impl/src/main/resources/
   core3/sbml-impl/src/test/
   core3/sbml-impl/src/test/java/
   core3/sbml-impl/src/test/java/org/
   core3/sbml-impl/src/test/java/org/cytoscape/
   core3/sbml-impl/src/test/java/org/cytoscape/sbml/
   core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/
   
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLFileFilterTest.java
   
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLNetworkViewReaderTest.java
   core3/sbml-impl/src/test/resources/
   core3/sbml-impl/src/test/resources/BIOMD0000000003.xml
Modified:
   core3/sbml-impl/
Log:
Initial implementation of SBML reader


Property changes on: core3/sbml-impl
___________________________________________________________________
Name: svn:ignore
   + target


Added: core3/sbml-impl/osgi.bnd
===================================================================
--- core3/sbml-impl/osgi.bnd                            (rev 0)
+++ core3/sbml-impl/osgi.bnd    2010-10-20 17:39:40 UTC (rev 22308)
@@ -0,0 +1,7 @@
+#-----------------------------------------------------------------
+# Use this file to add customized Bnd instructions for the bundle
+#-----------------------------------------------------------------
+
+Spring-Context: META-INF/spring/*.xml
+Private-Package: ${bundle.namespace}.internal.*
+Export-Package: 
!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"

Added: core3/sbml-impl/pom.xml
===================================================================
--- core3/sbml-impl/pom.xml                             (rev 0)
+++ core3/sbml-impl/pom.xml     2010-10-20 17:39:40 UTC (rev 22308)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";
+       xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+       <parent>
+               <groupId>org.cytoscape</groupId>
+               <artifactId>parent</artifactId>
+               <version>1.0-SNAPSHOT</version>
+       </parent>
+       <properties>
+               
<bundle.symbolicName>org.cytoscape.sbml-impl</bundle.symbolicName>
+               <bundle.namespace>org.cytoscape.sbml</bundle.namespace>
+       </properties>
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.cytoscape</groupId>
+       <artifactId>sbml-impl</artifactId>
+       <version>1.0-SNAPSHOT</version>
+       <name>${bundle.symbolicName}
+               [${bundle.namespace}]</name>
+       <packaging>bundle</packaging>
+       <dependencies>
+               <dependency>
+                       <groupId>cytoscape</groupId>
+                       <artifactId>application</artifactId>
+                       <version>1.0-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>jsbml</artifactId>
+                       <version>0.8</version>
+               </dependency>
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>biojava</artifactId>
+                       <version>1.7.1</version>
+               </dependency>
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>jigsaw</artifactId>
+                       <version>2.2.6</version>
+               </dependency>
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>stax-api</artifactId>
+                       <version>1.0.1</version>
+               </dependency>
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>stax2-api</artifactId>
+                       <version>3.0.1</version>
+               </dependency>
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>staxmate</artifactId>
+                       <version>2.0.0</version>
+               </dependency>
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>woodstox-core-lgpl</artifactId>
+                       <version>4.0.5</version>
+               </dependency>
+               <dependency>
+                       <groupId>cytoscape-temp</groupId>
+                       <artifactId>xstream</artifactId>
+                       <version>1.3.1</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>osgi_R4_core</artifactId>
+                       <version>1.0</version>
+                       <scope>provided</scope>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>osgi_R4_compendium</artifactId>
+                       <version>1.0</version>
+                       <scope>provided</scope>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>${junit.version}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>test-support</artifactId>
+                       <version>1.0-SNAPSHOT</version>
+                       <scope>test</scope>
+               </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.8.1</version>
+            <scope>test</scope>
+        </dependency>
+       </dependencies>
+       
+       <repositories>
+               <repository>
+                       <id>cytoscape_thirdparty</id>
+                       <snapshots>
+                               <enabled>false</enabled>
+                       </snapshots>
+                       <releases>
+                               <enabled>true</enabled>
+                       </releases>
+                       <name>Wrapped Third Party Libraries</name>
+                       
<url>http://cytoscape.wodaklab.org/nexus/content/repositories/thirdparty/</url>
+               </repository>
+       </repositories>
+       
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.ops4j</groupId>
+                               <artifactId>maven-pax-plugin</artifactId>
+                               <version>1.4</version>
+                               <extensions>true</extensions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <version>1.4.3</version>
+                               <configuration>
+                                       <instructions>
+                                               
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
+                                               
<Bundle-Version>${pom.version}</Bundle-Version>
+                                               <_include>-osgi.bnd</_include>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file


Property changes on: core3/sbml-impl/pom.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLFileFilter.java
===================================================================
--- 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLFileFilter.java   
                            (rev 0)
+++ 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLFileFilter.java   
    2010-10-20 17:39:40 UTC (rev 22308)
@@ -0,0 +1,104 @@
+package org.cytoscape.sbml.internal;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.cytoscape.io.CyFileFilter;
+import org.cytoscape.io.DataCategory;
+import org.cytoscape.io.util.StreamUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SBMLFileFilter implements CyFileFilter {
+       private static final String SBML_XML_NAMESPACE = 
"http://www.sbml.org/sbml/";; //$NON-NLS-1$
+
+       private static final int DEFAULT_LINES_TO_CHECK = 20;
+
+       private final StreamUtil streamUtil;
+       private final Set<String> extensions;
+       private final Set<String> contentTypes;
+       private final String description;
+
+       public SBMLFileFilter(String description, StreamUtil streamUtil) {
+               this.streamUtil = streamUtil;
+               
+               extensions = new HashSet<String>();
+               extensions.add("xml"); //$NON-NLS-1$
+               
+               contentTypes = new HashSet<String>();
+               contentTypes.add("text/sbml"); //$NON-NLS-1$
+               contentTypes.add("text/sbml+xml"); //$NON-NLS-1$
+               
+               this.description = description; 
+       }
+       
+       @Override
+       public boolean accept(URI uri, DataCategory category) {
+               if (!category.equals(DataCategory.NETWORK)) {
+                       return false;
+               }
+               try {
+                       return accept(getInputStream(uri.toURL()), category);
+               } catch (IOException e) {
+                       Logger logger = LoggerFactory.getLogger(getClass());
+                       logger.error("Error while checking header", e); 
//$NON-NLS-1$
+                       return false;
+               }
+       }
+
+       private InputStream getInputStream(URL url) throws IOException {
+               return streamUtil.getInputStream(url);
+       }
+
+       private boolean checkHeader(InputStream stream) throws IOException {
+               BufferedReader reader = new BufferedReader(new 
InputStreamReader(stream));
+               int linesToCheck = DEFAULT_LINES_TO_CHECK;
+               while (linesToCheck > 0) {
+                       if (reader.readLine().contains(SBML_XML_NAMESPACE)) {
+                               return true;
+                       }
+                       linesToCheck--;
+               }
+               return false;
+       }
+
+       @Override
+       public boolean accept(InputStream stream, DataCategory category) {
+               if (!category.equals(DataCategory.NETWORK)) {
+                       return false;
+               }
+               try {
+                       return checkHeader(stream);
+               } catch (IOException e) {
+                       Logger logger = LoggerFactory.getLogger(getClass());
+                       logger.error("Error while checking header", e); 
//$NON-NLS-1$
+                       return false;
+               }
+       }
+
+       @Override
+       public Set<String> getExtensions() {
+               return extensions;
+       }
+
+       @Override
+       public Set<String> getContentTypes() {
+               return contentTypes;
+       }
+
+       @Override
+       public String getDescription() {
+               return description;
+       }
+
+       @Override
+       public DataCategory getDataCategory() {
+               return DataCategory.NETWORK;
+       }
+}


Property changes on: 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLFileFilter.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewReader.java
===================================================================
--- 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewReader.java
                                (rev 0)
+++ 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewReader.java
        2010-10-20 17:39:40 UTC (rev 22308)
@@ -0,0 +1,211 @@
+package org.cytoscape.sbml.internal;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.cytoscape.io.read.CyNetworkViewReader;
+import org.cytoscape.model.CyEdge;
+import org.cytoscape.model.CyNetwork;
+import org.cytoscape.model.CyNetworkFactory;
+import org.cytoscape.model.CyNode;
+import org.cytoscape.model.CyRow;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.CyNetworkViewFactory;
+import org.cytoscape.view.vizmap.VisualStyle;
+import org.cytoscape.work.AbstractTask;
+import org.cytoscape.work.TaskMonitor;
+import org.sbml.jsbml.JSBML;
+import org.sbml.jsbml.KineticLaw;
+import org.sbml.jsbml.LocalParameter;
+import org.sbml.jsbml.Model;
+import org.sbml.jsbml.ModifierSpeciesReference;
+import org.sbml.jsbml.Reaction;
+import org.sbml.jsbml.SBMLDocument;
+import org.sbml.jsbml.Species;
+import org.sbml.jsbml.SpeciesReference;
+
+public class SBMLNetworkViewReader extends AbstractTask implements 
CyNetworkViewReader {
+       private static final int BUFFER_SIZE = 16384;
+       
+       static final String NODE_NAME_ATTR_LABEL = "name"; //$NON-NLS-1$
+
+       static final String INTERACTION_TYPE_ATTR = "interaction type"; 
//$NON-NLS-1$
+       
+       static final String SBML_TYPE_ATTR = "sbml type"; //$NON-NLS-1$
+
+       static final String SBML_ID_ATTR = "sbml id"; //$NON-NLS-1$
+
+       static final String SBML_INITIAL_CONCENTRATION_ATTR = "sbml initial 
concentration"; //$NON-NLS-1$
+
+       static final String SBML_INITIAL_AMOUNT_ATTR = "sbml initial amount"; 
//$NON-NLS-1$
+
+       static final String SBML_CHARGE_ATTR = "sbml charge"; //$NON-NLS-1$
+
+       static final String SBML_COMPARTMENT_ATTR = "sbml compartment"; 
//$NON-NLS-1$
+
+       static final String SBML_TYPE_SPECIES = "species"; //$NON-NLS-1$
+
+       static final String SBML_TYPE_REACTION = "reaction"; //$NON-NLS-1$
+
+       static final String INTERACTION_TYPE_REACTION_PRODUCT = 
"reaction-product"; //$NON-NLS-1$
+
+       static final String INTERACTION_TYPE_REACTION_REACTANT = 
"reaction-reactant"; //$NON-NLS-1$
+
+       static final String INTERACTION_TYPE_REACTION_MODIFIER = 
"reaction-modifier"; //$NON-NLS-1$
+
+       static final String KINETIC_LAW_ATTR_TEMPLATE = "kineticLaw-%1$s"; 
//$NON-NLS-1$
+
+       static final String KINETIC_LAW_UNITS_ATTR_TEMPLATE = 
"kineticLaw-%1$s-units"; //$NON-NLS-1$
+       
+       private final InputStream stream;
+       private final CyNetworkFactory networkFactory;
+       private final CyNetworkViewFactory viewFactory;
+
+       private CyNetworkView view;
+
+       public SBMLNetworkViewReader(InputStream stream, CyNetworkFactory 
networkFactory, CyNetworkViewFactory viewFactory) {
+               this.stream = stream;
+               this.networkFactory = networkFactory;
+               this.viewFactory = viewFactory;
+       }
+
+       @SuppressWarnings("deprecation")
+       public void run(TaskMonitor taskMonitor) throws Exception {
+               String xml = readString(stream);
+               SBMLDocument document = JSBML.readSBMLFromString(xml);
+               
+               CyNetwork network = networkFactory.getInstance();
+               view = viewFactory.getNetworkView(network);
+               Model model = document.getModel();
+               
+               // Create a node for each Species
+               Map<String, CyNode> speciesById = new HashMap<String, CyNode>();
+               for (Species species : model.getListOfSpecies()) {
+                       CyNode node = network.addNode();
+                       speciesById.put(species.getId(), node);
+                       CyRow attributes = node.attrs();
+                       checkNodeSchema(attributes);
+                       attributes.set(NODE_NAME_ATTR_LABEL, species.getName());
+                       attributes.set(SBML_TYPE_ATTR, SBML_TYPE_SPECIES);
+                       attributes.set(SBML_ID_ATTR, species.getId());
+
+                       attributes.set(SBML_INITIAL_CONCENTRATION_ATTR, 
species.getInitialConcentration());
+                       attributes.set(SBML_INITIAL_AMOUNT_ATTR, 
species.getInitialAmount());
+                       attributes.set(SBML_CHARGE_ATTR, species.getCharge());
+                       
+                       String compartment = species.getCompartment();
+                       if (compartment != null) {
+                               attributes.set(SBML_COMPARTMENT_ATTR, 
compartment);
+                       }
+               }
+               
+               // Create a node for each Reaction
+               Map<String, CyNode> reactionsById = new HashMap<String, 
CyNode>();
+               for (Reaction reaction : model.getListOfReactions()) {
+                       CyNode node = network.addNode();
+                       reactionsById.put(reaction.getId(), node);
+                       CyRow attributes = node.attrs();
+                       checkNodeSchema(attributes);
+                       String name = reaction.getName();
+                       if (name == null) {
+                               attributes.set(NODE_NAME_ATTR_LABEL, 
reaction.getId());
+                       } else {
+                               attributes.set(NODE_NAME_ATTR_LABEL, name);
+                       }
+                       attributes.set(SBML_TYPE_ATTR, SBML_TYPE_REACTION);
+                       attributes.set(SBML_ID_ATTR, reaction.getId());
+                       
+                       for (SpeciesReference product : 
reaction.getListOfProducts()) {
+                               CyNode sourceNode = 
speciesById.get(product.getSpecies());
+                               CyEdge edge = network.addEdge(sourceNode, node, 
true);
+                               CyRow edgeAttributes = edge.attrs();
+                               checkEdgeSchema(edgeAttributes);
+                               edgeAttributes.set(INTERACTION_TYPE_ATTR, 
INTERACTION_TYPE_REACTION_PRODUCT);
+                       }
+                       
+                       for (SpeciesReference reactant : 
reaction.getListOfReactants()) {
+                               CyNode sourceNode = 
speciesById.get(reactant.getSpecies());
+                               CyEdge edge = network.addEdge(sourceNode, node, 
true);
+                               CyRow edgeAttributes = edge.attrs();
+                               checkEdgeSchema(edgeAttributes);
+                               edgeAttributes.set(INTERACTION_TYPE_ATTR, 
INTERACTION_TYPE_REACTION_REACTANT);
+                       }
+                       
+                       for (ModifierSpeciesReference modifier : 
reaction.getListOfModifiers()) {
+                               CyNode sourceNode = 
speciesById.get(modifier.getSpecies());
+                               CyEdge edge = network.addEdge(sourceNode, node, 
true);
+                               CyRow edgeAttributes = edge.attrs();
+                               checkEdgeSchema(edgeAttributes);
+                               edgeAttributes.set(INTERACTION_TYPE_ATTR, 
INTERACTION_TYPE_REACTION_MODIFIER);
+                       }
+                       
+                       KineticLaw law = reaction.getKineticLaw();
+                       if (law != null) {
+                               for (LocalParameter parameter : 
law.getListOfParameters()) {
+                                       String parameterName = 
parameter.getName();
+                                       String key = 
String.format(KINETIC_LAW_ATTR_TEMPLATE, parameterName);
+                                       checkSchema(attributes, key, 
Double.class);
+                                       attributes.set(key, 
parameter.getValue());
+                                       
+                                       String units = parameter.getUnits();
+                                       if (units != null) {
+                                               String unitsKey = 
String.format(KINETIC_LAW_UNITS_ATTR_TEMPLATE, parameterName);
+                                               checkSchema(attributes, 
unitsKey, String.class);
+                                               attributes.set(unitsKey, units);
+                                       }
+                               }
+                       }
+               }
+       }
+       
+       private void checkEdgeSchema(CyRow attributes) {
+               checkSchema(attributes, INTERACTION_TYPE_ATTR, String.class);
+       }
+
+       private void checkNodeSchema(CyRow attributes) {
+               checkSchema(attributes, SBML_TYPE_ATTR, String.class);
+               checkSchema(attributes, SBML_ID_ATTR, String.class);
+               checkSchema(attributes, SBML_INITIAL_CONCENTRATION_ATTR, 
Double.class);
+               checkSchema(attributes, SBML_INITIAL_AMOUNT_ATTR, Double.class);
+               checkSchema(attributes, SBML_CHARGE_ATTR, Integer.class);
+               checkSchema(attributes, SBML_COMPARTMENT_ATTR, String.class);
+       }
+
+       private <T> void checkSchema(CyRow attributes, String attributeName, 
Class<T> type) {
+               if (!attributes.contains(attributeName, type)) {
+                       attributes.getDataTable().createColumn(attributeName, 
type, false);
+               }
+       }
+
+       private static String readString(InputStream source) throws IOException 
{
+               StringWriter writer = new StringWriter();
+               BufferedReader reader = new BufferedReader(new 
InputStreamReader(source));
+               try {
+                       char[] buffer = new char[BUFFER_SIZE];
+                       int charactersRead = reader.read(buffer, 0, 
buffer.length);
+                       while (charactersRead != -1) {
+                               writer.write(buffer, 0, charactersRead);
+                               charactersRead = reader.read(buffer, 0, 
buffer.length);
+                       }
+               } finally {
+                       reader.close();
+               }
+               return writer.toString();
+       }
+
+       public void cancel() {
+       }
+
+       public CyNetworkView[] getNetworkViews() {
+               return new CyNetworkView[] { view };
+       }
+
+       public VisualStyle[] getVisualStyles() {
+               return null;
+       }
+}


Property changes on: 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewReader.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewTaskFactory.java
===================================================================
--- 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewTaskFactory.java
                           (rev 0)
+++ 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewTaskFactory.java
   2010-10-20 17:39:40 UTC (rev 22308)
@@ -0,0 +1,37 @@
+package org.cytoscape.sbml.internal;
+
+import java.io.InputStream;
+
+import org.cytoscape.io.CyFileFilter;
+import org.cytoscape.io.read.InputStreamTaskFactory;
+import org.cytoscape.model.CyNetworkFactory;
+import org.cytoscape.view.model.CyNetworkViewFactory;
+import org.cytoscape.work.TaskIterator;
+
+public class SBMLNetworkViewTaskFactory implements InputStreamTaskFactory {
+
+       private final CyFileFilter filter;
+       private final CyNetworkFactory networkFactory;
+       private final CyNetworkViewFactory viewFactory;
+       
+       private InputStream stream;
+
+       public SBMLNetworkViewTaskFactory(CyFileFilter filter, CyNetworkFactory 
networkFactory, CyNetworkViewFactory viewFactory) {
+               this.networkFactory = networkFactory;
+               this.viewFactory = viewFactory;
+               this.filter = filter;
+       }
+       
+       public TaskIterator getTaskIterator() {
+               return new TaskIterator(new SBMLNetworkViewReader(stream, 
networkFactory, viewFactory));
+       }
+
+       public CyFileFilter getCyFileFilter() {
+               return filter;
+       }
+
+       public void setInputStream(InputStream is) {
+               stream = is;
+       }
+
+}


Property changes on: 
core3/sbml-impl/src/main/java/org/cytoscape/sbml/internal/SBMLNetworkViewTaskFactory.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLFileFilterTest.java
===================================================================
--- 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLFileFilterTest.java
                           (rev 0)
+++ 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLFileFilterTest.java
   2010-10-20 17:39:40 UTC (rev 22308)
@@ -0,0 +1,50 @@
+package org.cytoscape.sbml.internal;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.cytoscape.io.CyFileFilter;
+import org.cytoscape.io.DataCategory;
+import org.cytoscape.io.util.StreamUtil;
+import org.junit.Before;
+import org.junit.Test;
+
+...@suppresswarnings("nls")
+public class SBMLFileFilterTest {
+       private CyFileFilter filter;
+
+       @Before
+       public void setUp() {
+               StreamUtil streamUtil = new StreamUtil() {
+                       
+                       @Override
+                       public URLConnection getURLConnection(URL source) 
throws IOException {
+                               return null;
+                       }
+                       
+                       @Override
+                       public InputStream getInputStream(URL source) throws 
IOException {
+                               return source.openStream();
+                       }
+                       
+                       @Override
+                       public InputStream getBasicInputStream(URL source) 
throws IOException {
+                               return null;
+                       }
+               };
+               filter = new SBMLFileFilter("SBML", streamUtil);
+       }
+       
+       @Test
+       public void testAcceptSBMLLevel2() throws Exception {
+               File file = new File("src/test/resources/BIOMD0000000003.xml");
+               assertTrue(filter.accept(new FileInputStream(file), 
DataCategory.NETWORK));
+               assertTrue(filter.accept(file.toURI(), DataCategory.NETWORK));
+       }
+}


Property changes on: 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLFileFilterTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLNetworkViewReaderTest.java
===================================================================
--- 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLNetworkViewReaderTest.java
                            (rev 0)
+++ 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLNetworkViewReaderTest.java
    2010-10-20 17:39:40 UTC (rev 22308)
@@ -0,0 +1,84 @@
+package org.cytoscape.sbml.internal;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import org.cytoscape.io.read.CyNetworkViewReader;
+import org.cytoscape.model.CyNetwork;
+import org.cytoscape.model.CyNetworkFactory;
+import org.cytoscape.model.CyNode;
+import org.cytoscape.model.CyRow;
+import org.cytoscape.test.support.NetworkTestSupport;
+import org.cytoscape.test.support.NetworkViewTestSupport;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.CyNetworkViewFactory;
+import org.cytoscape.work.TaskIterator;
+import org.cytoscape.work.TaskMonitor;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+...@suppresswarnings("nls")
+public class SBMLNetworkViewReaderTest {
+       @Mock TaskMonitor taskMonitor;
+       
+       private CyNetworkFactory networkFactory;
+       private CyNetworkViewFactory networkViewFactory;
+
+       @Before
+       public void setUp() {
+               MockitoAnnotations.initMocks(this);
+               
+               networkFactory = new NetworkTestSupport().getNetworkFactory();
+               networkViewFactory = new 
NetworkViewTestSupport().getNetworkViewFactory();
+       }
+       
+       
+       CyNetworkViewReader createReader(File file) throws IOException {
+               SBMLNetworkViewReader reader = new SBMLNetworkViewReader(new 
FileInputStream(file), networkFactory, networkViewFactory);
+               reader.setTaskIterator(new TaskIterator(reader));
+               return reader;
+       }
+
+       @Test
+       public void testSBMLLevel2() throws Exception {
+               File file = new File("src/test/resources/BIOMD0000000003.xml");
+               CyNetworkViewReader reader = createReader(file);
+               reader.run(taskMonitor);
+               CyNetworkView[] views = reader.getNetworkViews();
+               
+               assertNotNull(views);
+               assertEquals(1, views.length);
+               
+               CyNetworkView view = views[0];
+               assertNotNull(view);
+               
+               CyNetwork model = view.getModel();
+               assertNotNull(model);
+               
+               assertEquals(10, model.getNodeCount());
+               assertEquals(8, model.getEdgeCount());
+               
+               CyNode cyclin = findNodeById("C", model);
+               assertNotNull(cyclin);
+               CyRow attributes = cyclin.attrs();
+               assertEquals("Cyclin", 
attributes.get(SBMLNetworkViewReader.NODE_NAME_ATTR_LABEL, String.class));
+               assertEquals((Double) 0.01, 
attributes.get(SBMLNetworkViewReader.SBML_INITIAL_CONCENTRATION_ATTR, 
Double.class));
+       }
+
+       private CyNode findNodeById(String sbmlId, CyNetwork network) {
+               for (CyNode node : network.getNodeList()) {
+                       CyRow attributes = node.attrs();
+                       String id = 
attributes.get(SBMLNetworkViewReader.SBML_ID_ATTR, String.class);
+                       if (id.equals(sbmlId)) {
+                               return node;
+                       }
+               }
+               return null;
+       }
+}


Property changes on: 
core3/sbml-impl/src/test/java/org/cytoscape/sbml/internal/SBMLNetworkViewReaderTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: core3/sbml-impl/src/test/resources/BIOMD0000000003.xml
===================================================================
--- core3/sbml-impl/src/test/resources/BIOMD0000000003.xml                      
        (rev 0)
+++ core3/sbml-impl/src/test/resources/BIOMD0000000003.xml      2010-10-20 
17:39:40 UTC (rev 22308)
@@ -0,0 +1,456 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sbml xmlns="http://www.sbml.org/sbml/level2/version4"; metaid="_180324" 
level="2" version="4">
+  <model metaid="_180340" id="Goldbeter1991_MinMitOscil" 
name="Goldbeter1991_MinMitOscil">
+    <notes>
+      <body xmlns="http://www.w3.org/1999/xhtml";>
+        <p>
+      This a model from the article:
+      <br/>
+        <strong> A minimal cascade model for the mitotic oscillator involving 
cyclin and cdc2 kinase. 
+</strong>
+        <br/>
+Goldbeter A 
+      <em>Proc. Natl. Acad. Sci. U.S.A.</em> 1991:88(20):9107-11 
+      <a href="http://www.ncbi.nlm.nih.gov/pubmed/1833774";>1833774</a>,
+      <br/>
+        <strong>Abstract:</strong>
+        <br/>
+A minimal model for the mitotic oscillator is presented. The model, built on 
recent experimental advances, is based on the cascade of post-translational 
modification that modulates the activity of cdc2 kinase during the cell cycle. 
The model pertains to the situation encountered in early amphibian embryos, 
where the accumulation of cyclin suffices to trigger the onset of mitosis. In 
the first cycle of the bicyclic cascade model, cyclin promotes the activation 
of cdc2 kinase through reversible dephosphorylation, and in the second cycle, 
cdc2 kinase activates a cyclin protease by reversible phosphorylation. That 
cyclin activates cdc2 kinase while the kinase triggers the degradation of 
cyclin has suggested that oscillations may originate from such a negative 
feedback loop [Félix, M. A., Labbé, J. C., Dorée, M., Hunt, T. &amp; Karsenti, 
E. (1990) Nature (London) 346, 379-382]. This conjecture is corroborated by the 
model, which indicates that sustained oscillations of the li!
 mit cycle type can arise in the cascade, provided that a threshold exists in 
the activation of cdc2 kinase by cyclin and in the activation of cyclin 
proteolysis by cdc2 kinase. The analysis shows how miototic oscillations may 
readily arise from time lags associated with these thresholds and from the 
delayed negative feedback provided by cdc2-induced cyclin degradation. A 
mechanism for the origin of the thresholds is proposed in terms of the 
phenomenon of zero-order ultrasensitivity previously described for biochemical 
systems regulated by covalent modification.
+   </p>
+        <p style="font-size:x-small;">This is a Systems Biology Markup 
Language (SBML) file, generated by MathSBML 2.4.6 (14-January-2005) 
14-January-2005 18:33:39.806932. SBML is a form of XML, and most XML files will 
not display properly in an internet browser. To view the contents of an XML 
file use the &quot;Page Source&quot; or equivalent button on you browser.</p>
+        <p>This model originates from BioModels Database: A Database of 
Annotated Published Models (http://www.ebi.ac.uk/biomodels/). It is copyright 
(c) 2005-2010 The BioModels.net Team.<br/>For more information see the <a 
href="http://www.ebi.ac.uk/biomodels/legal.html"; target="_blank">terms of 
use</a>.<br/>To cite BioModels Database, please use: <a 
href="http://www.ncbi.nlm.nih.gov/pubmed/20587024"; target="_blank">Li C, 
Donizelli M, Rodriguez N, Dharuri H, Endler L, Chelliah V, Li L, He E, Henry A, 
Stefan MI, Snoep JL, Hucka M, Le Novère N, Laibe C (2010) BioModels Database: 
An enhanced, curated and annotated resource for published quantitative kinetic 
models. BMC Syst Biol., 4:92.</a>
+      </p>
+    </body>
+  </notes>
+  <annotation>
+    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+      <rdf:Description rdf:about="#_180340">
+        <dc:creator>
+          <rdf:Bag>
+            <rdf:li rdf:parseType="Resource">
+              <vCard:N rdf:parseType="Resource">
+                <vCard:Family>Shapiro</vCard:Family>
+                <vCard:Given>Bruce</vCard:Given>
+              </vCard:N>
+              <vCard:EMAIL>[email protected]</vCard:EMAIL>
+              <vCard:ORG rdf:parseType="Resource">
+                <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname>
+              </vCard:ORG>
+            </rdf:li>
+            <rdf:li rdf:parseType="Resource">
+              <vCard:N rdf:parseType="Resource">
+                <vCard:Family>Chelliah</vCard:Family>
+                <vCard:Given>Vijayalakshmi</vCard:Given>
+              </vCard:N>
+              <vCard:EMAIL>[email protected]</vCard:EMAIL>
+              <vCard:ORG rdf:parseType="Resource">
+                <vCard:Orgname>EMBL-EBI</vCard:Orgname>
+              </vCard:ORG>
+            </rdf:li>
+          </rdf:Bag>
+        </dc:creator>
+        <dcterms:created rdf:parseType="Resource">
+          <dcterms:W3CDTF>2005-02-06T23:39:40Z</dcterms:W3CDTF>
+        </dcterms:created>
+        <dcterms:modified rdf:parseType="Resource">
+          <dcterms:W3CDTF>2010-03-17T00:25:38Z</dcterms:W3CDTF>
+        </dcterms:modified>
+        <bqmodel:is>
+          <rdf:Bag>
+            <rdf:li rdf:resource="urn:miriam:biomodels.db:BIOMD0000000003"/>
+          </rdf:Bag>
+        </bqmodel:is>
+        <bqmodel:is>
+          <rdf:Bag>
+            <rdf:li rdf:resource="urn:miriam:biomodels.db:MODEL6614271263"/>
+          </rdf:Bag>
+        </bqmodel:is>
+        <bqmodel:isDescribedBy>
+          <rdf:Bag>
+            <rdf:li rdf:resource="urn:miriam:pubmed:1833774"/>
+          </rdf:Bag>
+        </bqmodel:isDescribedBy>
+        <bqbiol:isHomologTo>
+          <rdf:Bag>
+            <rdf:li rdf:resource="urn:miriam:reactome:REACT_152"/>
+          </rdf:Bag>
+        </bqbiol:isHomologTo>
+        <bqbiol:isVersionOf>
+          <rdf:Bag>
+            <rdf:li rdf:resource="urn:miriam:kegg.pathway:hsa04110"/>
+            <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0000278"/>
+          </rdf:Bag>
+        </bqbiol:isVersionOf>
+        <bqbiol:occursIn>
+          <rdf:Bag>
+            <rdf:li rdf:resource="urn:miriam:taxonomy:8292"/>
+          </rdf:Bag>
+        </bqbiol:occursIn>
+      </rdf:Description>
+    </rdf:RDF>
+  </annotation>
+  <listOfCompartments>
+    <compartment metaid="_230461" id="cell" name="cell" size="1" 
units="volume" sboTerm="SBO:0000290">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230461">
+            <bqbiol:is>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0005623"/>
+              </rdf:Bag>
+            </bqbiol:is>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+    </compartment>
+  </listOfCompartments>
+  <listOfSpecies>
+    <species metaid="_230475" id="C" name="Cyclin" compartment="cell" 
initialConcentration="0.01" substanceUnits="substance" sboTerm="SBO:0000252">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230475">
+            <bqbiol:isVersionOf>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:uniprot:Q4KLA0"/>
+                <rdf:li rdf:resource="urn:miriam:interpro:IPR006670"/>
+              </rdf:Bag>
+            </bqbiol:isVersionOf>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+    </species>
+    <species metaid="_230495" id="M" name="CDC-2 Kinase" compartment="cell" 
initialConcentration="0.01" substanceUnits="substance" sboTerm="SBO:0000252">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230495">
+            <bqbiol:hasVersion>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:uniprot:P24033"/>
+                <rdf:li rdf:resource="urn:miriam:uniprot:P35567"/>
+              </rdf:Bag>
+            </bqbiol:hasVersion>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+    </species>
+    <species metaid="_230515" id="X" name="Cyclin Protease" compartment="cell" 
initialConcentration="0.01" substanceUnits="substance" sboTerm="SBO:0000297">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230515">
+            <bqbiol:isVersionOf>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0005680"/>
+              </rdf:Bag>
+            </bqbiol:isVersionOf>
+            <bqbiol:hasVersion>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:reactome:REACT_7165.1"/>
+              </rdf:Bag>
+            </bqbiol:hasVersion>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+    </species>
+  </listOfSpecies>
+  <listOfParameters>
+    <parameter metaid="_961185" id="V1" name="V1" constant="false" 
sboTerm="SBO:0000186"/>
+    <parameter metaid="_961186" id="V3" name="V3" constant="false" 
sboTerm="SBO:0000186"/>
+    <parameter metaid="_961187" id="VM1" name="VM1" value="3" 
sboTerm="SBO:0000025"/>
+    <parameter metaid="_961190" id="VM3" name="VM3" value="1" 
sboTerm="SBO:0000186"/>
+    <parameter metaid="_961192" id="Kc" name="Kc" value="0.5" 
sboTerm="SBO:0000027"/>
+  </listOfParameters>
+  <listOfRules>
+    <assignmentRule metaid="rule1" variable="V1">
+      <math xmlns="http://www.w3.org/1998/Math/MathML";>
+        <apply>
+          <times/>
+          <ci> C </ci>
+          <ci> VM1 </ci>
+          <apply>
+            <power/>
+            <apply>
+              <plus/>
+              <ci> C </ci>
+              <ci> Kc </ci>
+            </apply>
+            <cn type="integer"> -1 </cn>
+          </apply>
+        </apply>
+      </math>
+    </assignmentRule>
+    <assignmentRule metaid="rule2" variable="V3">
+      <math xmlns="http://www.w3.org/1998/Math/MathML";>
+        <apply>
+          <times/>
+          <ci> M </ci>
+          <ci> VM3 </ci>
+        </apply>
+      </math>
+    </assignmentRule>
+  </listOfRules>
+  <listOfReactions>
+    <reaction metaid="_230535" id="reaction1" name="creation of cyclin" 
reversible="false" fast="false" sboTerm="SBO:0000393">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230535">
+            <bqbiol:isVersionOf>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0006412"/>
+              </rdf:Bag>
+            </bqbiol:isVersionOf>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+      <listOfProducts>
+        <speciesReference species="C"/>
+      </listOfProducts>
+      <kineticLaw>
+        <math xmlns="http://www.w3.org/1998/Math/MathML";>
+          <apply>
+            <times/>
+            <ci> cell </ci>
+            <ci> vi </ci>
+          </apply>
+        </math>
+        <listOfParameters>
+          <parameter metaid="_961167" id="vi" value="0.025" 
sboTerm="SBO:0000048"/>
+        </listOfParameters>
+      </kineticLaw>
+    </reaction>
+    <reaction metaid="_230555" id="reaction2" name="default degradation of 
cyclin" reversible="false" fast="false" sboTerm="SBO:0000179">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230555">
+            <bqbiol:isVersionOf>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0008054"/>
+              </rdf:Bag>
+            </bqbiol:isVersionOf>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+      <listOfReactants>
+        <speciesReference species="C"/>
+      </listOfReactants>
+      <kineticLaw>
+        <math xmlns="http://www.w3.org/1998/Math/MathML";>
+          <apply>
+            <times/>
+            <ci> C </ci>
+            <ci> cell </ci>
+            <ci> kd </ci>
+          </apply>
+        </math>
+        <listOfParameters>
+          <parameter metaid="_961168" id="kd" value="0.01" 
sboTerm="SBO:0000022"/>
+        </listOfParameters>
+      </kineticLaw>
+    </reaction>
+    <reaction metaid="_230575" id="reaction3" name="cdc2 kinase triggered 
degration of cyclin" reversible="false" fast="false" sboTerm="SBO:0000179">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230575">
+            <bqbiol:isVersionOf>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0008054"/>
+              </rdf:Bag>
+            </bqbiol:isVersionOf>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+      <listOfReactants>
+        <speciesReference species="C"/>
+      </listOfReactants>
+      <listOfModifiers>
+        <modifierSpeciesReference species="X"/>
+      </listOfModifiers>
+      <kineticLaw>
+        <math xmlns="http://www.w3.org/1998/Math/MathML";>
+          <apply>
+            <times/>
+            <ci> C </ci>
+            <ci> cell </ci>
+            <ci> vd </ci>
+            <ci> X </ci>
+            <apply>
+              <power/>
+              <apply>
+                <plus/>
+                <ci> C </ci>
+                <ci> Kd </ci>
+              </apply>
+              <cn type="integer"> -1 </cn>
+            </apply>
+          </apply>
+        </math>
+        <listOfParameters>
+          <parameter metaid="_961170" id="vd" value="0.25" 
sboTerm="SBO:0000186"/>
+          <parameter metaid="_961171" id="Kd" value="0.02" 
sboTerm="SBO:0000027"/>
+        </listOfParameters>
+      </kineticLaw>
+    </reaction>
+    <reaction metaid="_230595" id="reaction4" name="activation of cdc2 kinase" 
reversible="false" fast="false" sboTerm="SBO:0000330">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230595">
+            <bqbiol:isVersionOf>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:ec-code:3.1.3.16"/>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0045737"/>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0006470"/>
+              </rdf:Bag>
+            </bqbiol:isVersionOf>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+      <listOfProducts>
+        <speciesReference species="M"/>
+      </listOfProducts>
+      <kineticLaw>
+        <math xmlns="http://www.w3.org/1998/Math/MathML";>
+          <apply>
+            <times/>
+            <ci> cell </ci>
+            <apply>
+              <plus/>
+              <cn type="integer"> 1 </cn>
+              <apply>
+                <times/>
+                <cn type="integer"> -1 </cn>
+                <ci> M </ci>
+              </apply>
+            </apply>
+            <ci> V1 </ci>
+            <apply>
+              <power/>
+              <apply>
+                <plus/>
+                <ci> K1 </ci>
+                <apply>
+                  <times/>
+                  <cn type="integer"> -1 </cn>
+                  <ci> M </ci>
+                </apply>
+                <cn type="integer"> 1 </cn>
+              </apply>
+              <cn type="integer"> -1 </cn>
+            </apply>
+          </apply>
+        </math>
+        <listOfParameters>
+          <parameter metaid="_961172" id="K1" value="0.005" 
sboTerm="SBO:0000027"/>
+        </listOfParameters>
+      </kineticLaw>
+    </reaction>
+    <reaction metaid="_230615" id="reaction5" name="deactivation of cdc2 
kinase" reversible="false" fast="false" sboTerm="SBO:0000216">
+      <annotation>
+        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dcterms="http://purl.org/dc/terms/"; 
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"; 
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"; 
xmlns:bqmodel="http://biomodels.net/model-qualifiers/";>
+          <rdf:Description rdf:about="#_230615">
+            <bqbiol:isVersionOf>
+              <rdf:Bag>
+                <rdf:li rdf:resource="urn:miriam:ec-code:2.7.10.2"/>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0045736"/>
+                <rdf:li rdf:resource="urn:miriam:obo.go:GO%3A0006468"/>
+              </rdf:Bag>
+            </bqbiol:isVersionOf>
+          </rdf:Description>
+        </rdf:RDF>
+      </annotation>
+      <listOfReactants>
+        <speciesReference species="M"/>
+      </listOfReactants>
+      <kineticLaw>
+        <math xmlns="http://www.w3.org/1998/Math/MathML";>
+          <apply>
+            <times/>
+            <ci> cell </ci>
+            <ci> M </ci>
+            <ci> V2 </ci>
+            <apply>
+              <power/>
+              <apply>
+                <plus/>
+                <ci> K2 </ci>
+                <ci> M </ci>
+              </apply>
+              <cn type="integer"> -1 </cn>
+            </apply>
+          </apply>
+        </math>
+        <listOfParameters>
+          <parameter metaid="_961173" id="V2" value="1.5" 
sboTerm="SBO:0000186"/>
+          <parameter metaid="_961174" id="K2" value="0.005" 
sboTerm="SBO:0000027"/>
+        </listOfParameters>
+      </kineticLaw>
+    </reaction>
+    <reaction metaid="_230635" id="reaction6" name="activation of cyclin 
protease" reversible="false" fast="false" sboTerm="SBO:0000216">
+      <listOfProducts>
+        <speciesReference species="X"/>
+      </listOfProducts>
+      <kineticLaw>
+        <math xmlns="http://www.w3.org/1998/Math/MathML";>
+          <apply>
+            <times/>
+            <ci> cell </ci>
+            <ci> V3 </ci>
+            <apply>
+              <plus/>
+              <cn type="integer"> 1 </cn>
+              <apply>
+                <times/>
+                <cn type="integer"> -1 </cn>
+                <ci> X </ci>
+              </apply>
+            </apply>
+            <apply>
+              <power/>
+              <apply>
+                <plus/>
+                <ci> K3 </ci>
+                <apply>
+                  <times/>
+                  <cn type="integer"> -1 </cn>
+                  <ci> X </ci>
+                </apply>
+                <cn type="integer"> 1 </cn>
+              </apply>
+              <cn type="integer"> -1 </cn>
+            </apply>
+          </apply>
+        </math>
+        <listOfParameters>
+          <parameter metaid="_961175" id="K3" value="0.005" 
sboTerm="SBO:0000027"/>
+        </listOfParameters>
+      </kineticLaw>
+    </reaction>
+    <reaction metaid="_230655" id="reaction7" name="deactivation of cyclin 
protease" reversible="false" fast="false" sboTerm="SBO:0000330">
+      <listOfReactants>
+        <speciesReference species="X"/>
+      </listOfReactants>
+      <kineticLaw>
+        <math xmlns="http://www.w3.org/1998/Math/MathML";>
+          <apply>
+            <times/>
+            <ci> cell </ci>
+            <ci> V4 </ci>
+            <ci> X </ci>
+            <apply>
+              <power/>
+              <apply>
+                <plus/>
+                <ci> K4 </ci>
+                <ci> X </ci>
+              </apply>
+              <cn type="integer"> -1 </cn>
+            </apply>
+          </apply>
+        </math>
+        <listOfParameters>
+          <parameter metaid="_961177" id="K4" value="0.005" 
sboTerm="SBO:0000027"/>
+          <parameter metaid="_961180" id="V4" value="0.5" 
sboTerm="SBO:0000186"/>
+        </listOfParameters>
+      </kineticLaw>
+    </reaction>
+  </listOfReactions>
+</model>
+</sbml>


Property changes on: core3/sbml-impl/src/test/resources/BIOMD0000000003.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

-- 
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