From: <nik...@us...> - 2015-07-30 15:28:50
|
Revision: 2352 http://sourceforge.net/p/jsbml/code/2352 Author: niko-rodrigue Date: 2015-07-30 15:28:48 +0000 (Thu, 30 Jul 2015) Log Message: ----------- added the possiblity to parse fbc sbml file that use geneProteinAssociation so that we can read them and convert them using JSBML as the element was used for a very long time Modified Paths: -------------- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCConstants.java trunk/extensions/fbc/src/org/sbml/jsbml/xml/parsers/FBCParser.java Modified: trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCConstants.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCConstants.java 2015-07-30 15:10:43 UTC (rev 2351) +++ trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCConstants.java 2015-07-30 15:28:48 UTC (rev 2352) @@ -84,6 +84,12 @@ public static final String geneProduct = "geneProduct"; /** + * Used only in some of the FBC v2 release candidates + */ + @Deprecated + public static final String geneProteinAssociation = "geneProteinAssociation"; + + /** * * @since jsbml 1.1, introduced in FBC version 2 */ Modified: trunk/extensions/fbc/src/org/sbml/jsbml/xml/parsers/FBCParser.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/xml/parsers/FBCParser.java 2015-07-30 15:10:43 UTC (rev 2351) +++ trunk/extensions/fbc/src/org/sbml/jsbml/xml/parsers/FBCParser.java 2015-07-30 15:28:48 UTC (rev 2352) @@ -224,6 +224,14 @@ if (elementName.equals(FBCConstants.geneProductAssociation)) { GeneProductAssociation gPA = fbcReaction.createGeneProductAssociation(); return gPA; + } + else if (elementName.equals(FBCConstants.geneProteinAssociation)) { + // FBCConstants.geneProteinAssociation has been used for a very long time in the FBC v2 release candidates + // so we are keeping it here in case some files still use it. + logger.warn("You are using an invalid element name '" + FBCConstants.geneProteinAssociation + + "'. It was only used for few FBC V2 release candidates."); + GeneProductAssociation gPA = fbcReaction.createGeneProductAssociation(); + return gPA; } } else if (contextObject instanceof GeneProductAssociation) { GeneProductAssociation gPA = (GeneProductAssociation) contextObject; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |