You can subscribe to this list here.
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(27) |
Jun
(63) |
Jul
(17) |
Aug
(58) |
Sep
(7) |
Oct
(9) |
Nov
(3) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(16) |
Feb
(5) |
Mar
(8) |
Apr
(3) |
May
(9) |
Jun
(7) |
Jul
(11) |
Aug
(1) |
Sep
(5) |
Oct
(33) |
Nov
(21) |
Dec
(32) |
2014 |
Jan
(8) |
Feb
(43) |
Mar
(36) |
Apr
(22) |
May
(69) |
Jun
(76) |
Jul
(66) |
Aug
(53) |
Sep
(39) |
Oct
(62) |
Nov
(28) |
Dec
(16) |
2015 |
Jan
(7) |
Feb
(2) |
Mar
(51) |
Apr
(97) |
May
(58) |
Jun
(20) |
Jul
(8) |
Aug
(5) |
Sep
(5) |
Oct
(27) |
Nov
(28) |
Dec
(43) |
2016 |
Jan
(17) |
Feb
(4) |
Mar
(12) |
Apr
(5) |
May
(15) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rol...@us...> - 2012-05-16 11:55:11
|
Revision: 1264 http://jsbml.svn.sourceforge.net/jsbml/?rev=1264&view=rev Author: rolandkel Date: 2012-05-16 11:55:00 +0000 (Wed, 16 May 2012) Log Message: ----------- Error in Reaction.setKineticLaw corrected: The local parameters were not registered correctly. Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/Reaction.java Modified: trunk/core/src/org/sbml/jsbml/Reaction.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Reaction.java 2012-05-16 11:54:33 UTC (rev 1263) +++ trunk/core/src/org/sbml/jsbml/Reaction.java 2012-05-16 11:55:00 UTC (rev 1264) @@ -1230,7 +1230,12 @@ } } registerChild(this.kineticLaw); - } + if (this.kineticLaw.isSetListOfLocalParameters()) { + for (LocalParameter lp : this.kineticLaw.getListOfLocalParameters()) { + this.kineticLaw.registerLocalParameter(lp, false); + } + } + } /** * Sets the listOfModifiers of this {@link Reaction}. Automatically sets the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rol...@us...> - 2012-05-16 11:54:44
|
Revision: 1263 http://jsbml.svn.sourceforge.net/jsbml/?rev=1263&view=rev Author: rolandkel Date: 2012-05-16 11:54:33 +0000 (Wed, 16 May 2012) Log Message: ----------- Error in Reaction.setKineticLaw corrected: The local parameters were registered correctly. Modified Paths: -------------- branches/jsbml-0.8/src/org/sbml/jsbml/Reaction.java Modified: branches/jsbml-0.8/src/org/sbml/jsbml/Reaction.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/Reaction.java 2012-05-16 10:48:52 UTC (rev 1262) +++ branches/jsbml-0.8/src/org/sbml/jsbml/Reaction.java 2012-05-16 11:54:33 UTC (rev 1263) @@ -1224,7 +1224,12 @@ this.kineticLaw.registerLocalParameter(lp, true); } } - setThisAsParentSBMLObject(this.kineticLaw); + registerChild(this.kineticLaw); + if (this.kineticLaw.isSetListOfLocalParameters()) { + for (LocalParameter lp : this.kineticLaw.getListOfLocalParameters()) { + this.kineticLaw.registerLocalParameter(lp, false); + } + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2012-05-16 10:49:02
|
Revision: 1262 http://jsbml.svn.sourceforge.net/jsbml/?rev=1262&view=rev Author: niko-rodrigue Date: 2012-05-16 10:48:52 +0000 (Wed, 16 May 2012) Log Message: ----------- updated the NEWS.txt, build.xml, sourceforge README and SBO file + added some junit tests to see if the register/unregister methods are working as expected (which they are not) Modified Paths: -------------- branches/jsbml-0.8/NEWS.txt branches/jsbml-0.8/build.xml branches/jsbml-0.8/doc/sourceforge/README.txt branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/Tests.java Added Paths: ----------- branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/UnregisterTests.java Modified: branches/jsbml-0.8/NEWS.txt =================================================================== --- branches/jsbml-0.8/NEWS.txt 2012-05-16 06:24:51 UTC (rev 1261) +++ branches/jsbml-0.8/NEWS.txt 2012-05-16 10:48:52 UTC (rev 1262) @@ -1,7 +1,7 @@ JSBML NEWS -- History of user-visible changes ====================================================================== -Version 0.8.0 (xx-xx-2012) +Version 0.8.0 (15-05-2012) ====================================================================== * Bug Fixes: @@ -12,13 +12,24 @@ an integer number. Nearly means that the distance to the next integer is not larger than the ensured double precision. - - It was sometimes possible to unregister elements from a model that were - the result of cloning, removal of the original entry and linking the clone - to the model. When altering the previous element, pointers were deleted - in SBMLDocument and Model. - + - [Tracker item #3511439] : The cloning of a Species was not copying the + speciesType attribute. Thanks to Thomas Bernard who noticed and reported + the problem. + + - The units attribute on ASTNode was sometime not written out and the sbml + namespace was sometime missing from the mathML. It should be fine now. + +* Known issues : + + - Reading of more than one RDF Description elements in the RDF annotation + block (the official SBML annotation scheme) is not supported at the + moment. Planned for the next major release. + - The RDF block at the top level of the annotation is considered to be the + official SBML annotation. + - SBML L3 packages are not supported and not kept. + ====================================================================== -Version 0.8-rc2 (xx-xx-2012) +Version 0.8-rc2 (12-04-2012) ====================================================================== * User visible changes : Modified: branches/jsbml-0.8/build.xml =================================================================== --- branches/jsbml-0.8/build.xml 2012-05-16 06:24:51 UTC (rev 1261) +++ branches/jsbml-0.8/build.xml 2012-05-16 10:48:52 UTC (rev 1262) @@ -443,10 +443,10 @@ <antcall target="module-dist"/> <!-- Creates the archives to be distributed --> - <zip basedir="${dist.root}" destfile="${dist.root}/${name}-${version}.zip" includes="${name}-${version}/**"/> + <zip basedir="${dist.root}" destfile="${dist.root}/${name}-${version}-full.zip" includes="${name}-${version}/**"/> <!-- Not generating a tar.gz a having only a zip file should be enough --> - <!-- <tar basedir="${dist.root}" destfile="${dist.root}/${name}-${version}.tar.gz" includes="${name}-${version}/**" compression="gzip"/> --> + <tar basedir="${dist.root}" destfile="${dist.root}/${name}-${version}-full.tar.gz" includes="${name}-${version}/**" compression="gzip"/> </target> Modified: branches/jsbml-0.8/doc/sourceforge/README.txt =================================================================== --- branches/jsbml-0.8/doc/sourceforge/README.txt 2012-05-16 06:24:51 UTC (rev 1261) +++ branches/jsbml-0.8/doc/sourceforge/README.txt 2012-05-16 10:48:52 UTC (rev 1262) @@ -1,4 +1,4 @@ - J S B M L 0.8-rc2 + J S B M L 0.8 JSBML is a free, open-source programming library to help you read, write, manipulate, translate, and validate SBML files and data @@ -6,19 +6,19 @@ example programs), but rather a library you can embed in your own applications. -This is the top-level directory of the JSBML 0.8-rc2 release. Here you +This is the top-level directory of the JSBML 0.8 final release. Here you will find the following: - jsbml-0.8-rc2.jar -- jar file containing the classes of JSBML-0.8-rc2 + jsbml-0.8.jar -- jar file containing the classes of JSBML-0.8 - jsbml-0.8-rc2-with-dependencies.jar -- jar file containing the classes of - JSBML-0.8-rc2 including any needed dependencies libraries classes. + jsbml-0.8-with-dependencies.jar -- jar file containing the classes of + JSBML-0.8 including any needed dependencies libraries classes. - jsbml-0.8-rc2.zip -- full distribution of JSBML-0.8-rc2 containing the + jsbml-0.8-full.zip -- full distribution of JSBML-0.8 containing the two jars file described above plus the sources and documentation along with the build script to be able to compile the library. - jsbml-0.8-rc2.tar.gz -- same content as jsbml-0.8-rc2.zip + jsbml-0.8-full.tar.gz -- same content as jsbml-0.8-full.zip For more information about JSBML, please visit the JSBML website at http://sbml.org/Software/JSBML Modified: branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo =================================================================== --- branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo 2012-05-16 06:24:51 UTC (rev 1261) +++ branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo 2012-05-16 10:48:52 UTC (rev 1262) @@ -1,5 +1,5 @@ format-version: 1.2 -date: 08:05:2012 07:00 +date: 15:05:2012 07:00 data-version: 30:03:2012 11:02 saved-by: SBO community auto-generated-by: SBO Browser (http://www.ebi.ac.uk/sbo/) Modified: branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/Tests.java =================================================================== --- branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/Tests.java 2012-05-16 06:24:51 UTC (rev 1261) +++ branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/Tests.java 2012-05-16 10:48:52 UTC (rev 1262) @@ -31,7 +31,7 @@ * @version $Rev$ */ @RunWith(value=Suite.class) -@SuiteClasses(value={SBML_L1VxTests.class, SBML_L2V1Test.class, CheckConsistencyTests.class, GetNotesStringTests.class}) +@SuiteClasses(value={SBML_L1VxTests.class, SBML_L2V1Test.class, CheckConsistencyTests.class, GetNotesStringTests.class, UnregisterTests.class}) public class Tests { } Added: branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/UnregisterTests.java =================================================================== --- branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/UnregisterTests.java (rev 0) +++ branches/jsbml-0.8/test/org/sbml/jsbml/xml/test/UnregisterTests.java 2012-05-16 10:48:52 UTC (rev 1262) @@ -0,0 +1,248 @@ +package org.sbml.jsbml.xml.test; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.sbml.jsbml.Compartment; +import org.sbml.jsbml.IdentifierException; +import org.sbml.jsbml.LocalParameter; +import org.sbml.jsbml.Model; +import org.sbml.jsbml.Reaction; +import org.sbml.jsbml.SBMLDocument; +import org.sbml.jsbml.Species; +import org.sbml.jsbml.SpeciesReference; + +public class UnregisterTests { + + SBMLDocument doc; + Model model; + + @BeforeClass public static void initialSetUp() { + + + } + + /** + * + */ + @Before public void setUp() { + doc = new SBMLDocument(2, 4); + model = doc.createModel("model"); + + Compartment comp = model.createCompartment("cell"); + comp.setMetaId("cell"); + + Species s1 = model.createSpecies("S1", comp); + s1.setMetaId("S1"); + + Species s2 = model.createSpecies("S2", comp); + s2.setMetaId("S2"); + + Reaction r1 = model.createReaction("R1"); + r1.setMetaId("R1"); + + SpeciesReference reactant = model.createReactant("SP1"); + reactant.setMetaId("SP1"); + reactant.setSpecies(s1); + + SpeciesReference product = model.createProduct("SP2"); + product.setMetaId("SP2"); + product.setSpecies(s2); + + LocalParameter lp1 = r1.createKineticLaw().createLocalParameter("LP1"); + lp1.setMetaId("LP1"); + + } + + /** + * + */ + @Test public void testRegister() { + + try { + model.createSpecies("R1"); + fail("We should not be able to register twice the same id."); + } catch (IllegalArgumentException e) { + assertTrue(true); + // success + } + + Species s3 = new Species(); + s3.setId("SP1"); + + try { + model.addSpecies(s3); + fail("We should not be able to register twice the same id."); + } catch (IllegalArgumentException e) { + assertTrue(true); + // success + } + assertTrue(model.getSpecies("S3") == null); + + s3.setId("LP1"); + + try { + model.addSpecies(s3); + assertTrue(true); + } catch (IllegalArgumentException e) { + fail("We should be able to register an id that is the same as a local parameter id."); + } + + model.removeSpecies(s3); + assertTrue(model.getSpecies("S3") == null); + + // Testing again after having removed the Species + try { + model.addSpecies(s3); + assertTrue(true); + } catch (IllegalArgumentException e) { + fail("We should be able to register an id that is the same as a local parameter id."); + } + + model.removeSpecies(s3); + assertTrue(model.getSpecies("S3") == null); + + // Setting the same metaid as a SpeciesReference + try { + s3.setMetaId("SP1"); + assertTrue(true); + } catch (IdentifierException e) { + fail("We should be able to put any metaId to a Species removed from a model."); + } + + try { + model.addSpecies(s3); + fail("We should not be able to register twice the same metaid."); + } catch (IllegalArgumentException e) { + assertTrue(true); + // success + } + + assertTrue(model.getSpecies("S3") == null); + + try { + s3.setId("S1"); + assertTrue(true); + } catch (IdentifierException e) { + fail("We should be able to put any id to a Species removed from a model."); + } + + try { + model.addSpecies(s3); + fail("We should not be able to register twice the same id."); + } catch (IllegalArgumentException e) { + assertTrue(true); + // success + } + + assertTrue(model.getSpecies("S3") == null); + + // Setting the same metaid as a LocalParameter + + try { + s3.setMetaId("LP1"); + assertTrue(true); + } catch (IdentifierException e) { + fail("We should be able to put any metaId to a Species not linked to a model."); + } + + try { + model.addSpecies(s3); + fail("We should not be able to register twice the same metaid."); + } catch (IllegalArgumentException e) { + assertTrue(true); + // success + } + + } + + /** + * + */ + @Test public void testRegister2() { + + Species s3 = new Species(); + // Setting the same id as a LocalParameter + s3.setId("LP1"); + + // Setting the same metaid as a LocalParameter + try { + s3.setMetaId("LP1"); + assertTrue(true); + } catch (IdentifierException e) { + fail("We should be able to put any metaId to a Species not linked to a model."); + } + + try { + model.addSpecies(s3); + fail("We should not be able to register twice the same metaid."); + } catch (IllegalArgumentException e) { + assertTrue(true); + // success + } + } + + /** + * + */ + @Test public void testUnRegister() { + + + Reaction r1 = model.removeReaction("R1"); + + assertTrue(model.getReaction("R1") == null); + assertTrue(model.getReaction(0) == null); + assertTrue(model.findNamedSBase("SP1") == null); + assertTrue(model.findNamedSBase("SP2") == null); + // assertTrue(model.findNamedSBase("LP1") == null); + assertTrue(doc.findSBase("SP1") == null); + assertTrue(doc.findSBase("R1") == null); + assertTrue(doc.findSBase("LP1") == null); + + Species s3 = new Species(); + + // Setting the same id as a removed SpeciesReference + s3.setId("SP1"); + + // Setting the same metaid as a removed LocalParameter + try { + s3.setMetaId("LP1"); + assertTrue(true); + } catch (IdentifierException e) { + fail("We should be able to put any metaId to a Species not linked to a model."); + } + + try { + model.addSpecies(s3); + assertTrue(true); + } catch (IllegalArgumentException e) { + fail("We should be able to register an id or metaid from a removed element."); + // success + } + + try { + SpeciesReference reactant = r1.createReactant("S1"); + reactant.setMetaId("S1"); + } catch (IllegalArgumentException e) { + fail("We should be able to put any id to an element removed from a model."); + } catch (IdentifierException e) { + fail("We should be able to put any id to an element removed from a model."); + } + } + + /** + * + */ + @Test public void testUnRegister2() { + + Reaction r1 = model.removeReaction("R1"); + + assertTrue(r1.getReactant("SP1") != null); + + assertTrue(model.findNamedSBase("LP1") == null); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2012-05-16 06:24:59
|
Revision: 1261 http://jsbml.svn.sourceforge.net/jsbml/?rev=1261&view=rev Author: enetz Date: 2012-05-16 06:24:51 +0000 (Wed, 16 May 2012) Log Message: ----------- Render Extension: Constructors, setters and getters for classes ExtendedRenderModel, RenderInformationBase, LocalRenderInformation, GlobalRenderInformation, Style, LocalStyle, ColorDefinition, GradientBase and GradientStop. Modified Paths: -------------- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -21,6 +21,7 @@ package org.sbml.jsbml.ext.render; import org.sbml.jsbml.AbstractSBase; +import org.sbml.jsbml.LevelVersionError; /** @@ -33,14 +34,136 @@ * @date 08.05.2012 */ public class ColorDefinition extends AbstractSBase { - // TODO insert serialID + + /** + * + */ + private static final long serialVersionUID = 8904459123022343452L; + + String id; Integer value; - public AbstractSBase clone() { - // TODO Auto-generated method stub - return null; - } + /** + * Creates a ColorDefinition instance with an id and a color value + * + * @param id + * @param value + */ + public ColorDefinition(String id, int value) { + this.id = id; + this.value = value; + } + + + /** + * Creates a ColorDefinition instance with an id, color value, level, and version. + * + * @param id + * @param value + * @param level + * @param version + */ + public ColorDefinition(String id, int value, int level, int version) { + super(level, version); + if (getLevelAndVersion().compareTo(Integer.valueOf(MIN_SBML_LEVEL), + Integer.valueOf(MIN_SBML_VERSION)) < 0) { + throw new LevelVersionError(getElementName(), level, version); + } + this.id = id; + this.value = value; + } + + + /** + * Clone constructor + */ + public ColorDefinition(ColorDefinition obj) { + super(obj); + // TODO: copy all class attributes, e.g.: + // bar = obj.bar; + this.id = obj.id; + this.value = obj.value; + } + + + /** + * clones this class + */ + public ColorDefinition clone() { + return new ColorDefinition(this); + } + + /** + * @return the value of id + */ + public String getId(){ + return this.id; + } + + /** + * Set the value of id + */ + public void setId(String id){ + //String oldId = this.id; + this.id = id; + //TODO + //firePropertyChange(constant_class.id, oldId, this.id); + } + + + /** + * @return the value of value + */ + public Integer getValue() { + if (isSetValue()) { + int val = value; + return val; + } else { + return null; + } + } + + + /** + * @return whether value is set + */ + public boolean isSetValue() { + return this.value != null; + } + + + /** + * Set the value of value + */ + public void setValue(int value) { + //Integer oldValue = this.value; + this.value = value; + //TODO + //firePropertyChange(constant_class.value, oldValue, this.value); + } + + + /** + * Unsets the variable value + * @return <code>true</code>, if value was set before, + * otherwise <code>false</code> + */ + public boolean unsetValue() { + if (isSetValue()) { + //Integer oldValue = this.value; + this.value = null; + //TODO + //firePropertyChange(constant_class.value, oldValue, this.value); + return true; + } + return false; + } + + + public static final int MIN_SBML_LEVEL = 3; + public static final int MIN_SBML_VERSION = 1; + public String toString() { // TODO Auto-generated method stub return null; Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -40,9 +40,13 @@ * @date 14.05.2012 */ public class ExtendedRenderModel extends AbstractSBasePlugin { + /** * */ + private static final long serialVersionUID = 7654047378880104537L; + + protected ListOf<LocalRenderInformation> listOfLocalRenderInformation; protected ListOf<GlobalRenderInformation> listOfGlobalRenderInformation; // TODO unclear if Integer or int @@ -53,64 +57,68 @@ * */ private Model model; + + public ExtendedRenderModel(Model model) { + super(model); - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() - */ + this.model = model; + createListOfLocalRenderInformation(); + createListOfGlobalRenderInformation(); + } - @Override + private void createListOfLocalRenderInformation() { + listOfLocalRenderInformation = new ListOf<LocalRenderInformation>(); + //TODO + //listOfLocalRenderInformation.addNamespace(RenderConstant.namespaceURI); + listOfLocalRenderInformation.setSBaseListType(ListOf.Type.other); + model.registerChild(listOfLocalRenderInformation); + } + + private void createListOfGlobalRenderInformation(){ + listOfGlobalRenderInformation = new ListOf<GlobalRenderInformation>(); + //TODO + //listOfGlobalRenderInformation.addNamespace(RenderConstant.namespaceURI); + listOfGlobalRenderInformation.setSBaseListType(ListOf.Type.other); + model.registerChild(listOfGlobalRenderInformation); + } + + public static final int MIN_SBML_LEVEL = 3; + public static final int MIN_SBML_VERSION = 1; + + //TODO public SBasePlugin clone() { // TODO Auto-generated method stub return null; } - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() - */ - @Override + //TODO public boolean getAllowsChildren() { // TODO Auto-generated method stub return false; } - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) - */ - @Override + //TODO public TreeNode getChildAt(int childIndex) { // TODO Auto-generated method stub return null; } - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() - */ - @Override + //TODO public int getChildCount() { // TODO Auto-generated method stub return 0; } - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - @Override + //TODO public boolean readAttribute(String attributeName, String prefix, String value) { // TODO Auto-generated method stub return false; } - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() - */ - @Override + //TODO public Map<String, String> writeXMLAttributes() { // TODO Auto-generated method stub return null; } + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -33,5 +33,14 @@ * @date 08.05.2012 */ public class GlobalRenderInformation extends RenderInformationBase { - ListOf<Style> listOfStyles; + /** + * + */ + private static final long serialVersionUID = 855680727119080659L; + + //TODO The same as LocalRenderInformation, but with class GlobalStyle + //GlobalStyle equals Style? + ListOf<Style> listOfStyles; + + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -21,6 +21,7 @@ package org.sbml.jsbml.ext.render; import org.sbml.jsbml.AbstractSBase; +import org.sbml.jsbml.LevelVersionError; import org.sbml.jsbml.ListOf; @@ -33,22 +34,256 @@ * @since 1.0 * @date 08.05.2012 */ -public class GradientBase extends AbstractSBase { - protected enum Spread { +public class GradientBase extends AbstractSBase { + + /** + * + */ + private static final long serialVersionUID = -3921074024567604440L; + + + protected enum Spread { PAD, REFLECT, REPEAT, } + + protected String id; protected Spread spreadMethod; - protected ListOf<GradientStop> stop; + protected ListOf<GradientStop> listOfGradientStops; - public AbstractSBase clone() { - // TODO Auto-generated method stub - return null; - } + /** + * Creates an GradientBase instance + */ + public GradientBase() { + super(); + initDefaults(); + } + + /** + * Creates a GradientBase instance with an id. + * + * @param id + */ + public GradientBase(String id, GradientStop stop) { + this.id = id; + initDefaults(); + this.listOfGradientStops.add(stop); + } + + /** + * Creates a GradientBase instance with an id, name, level, and version. + * + * @param id + * @param name + * @param level + * @param version + */ + public GradientBase(String id, GradientStop stop, int level, int version) { + super(level, version); + if (getLevelAndVersion().compareTo(Integer.valueOf(MIN_SBML_LEVEL), + Integer.valueOf(MIN_SBML_VERSION)) < 0) { + throw new LevelVersionError(getElementName(), level, version); + } + initDefaults(); + this.listOfGradientStops.add(stop); + } + + + /** + * Clone constructor + */ + public GradientBase(GradientBase obj) { + super(obj); + this.id = obj.id; + this.spreadMethod = obj.spreadMethod; + this.listOfGradientStops = obj.listOfGradientStops; + } + + + /** + * clones this class + */ + public GradientBase clone() { + return new GradientBase(this); + } + + + /** + * Initializes the default values using the namespace. + */ + public void initDefaults() { + //addNamespace(constant_class.namespaceURI); + this.spreadMethod = Spread.PAD; + this.listOfGradientStops = new ListOf<GradientStop>(); + } + + + /** + * @return the value of id + */ + public String getId(){ + return this.id; + } + + /** + * Set the value of id + */ + public void setId(String id){ + //String oldId = this.id; + this.id = id; + //TODO + //firePropertyChange(constant_class.id, oldId, this.id); + } + + + /** + * @return the value of spreadMethod + */ + public Spread getSpreadMethod() { + //TODO: if variable is boolean, create an additional "isVar" + //TODO: return primitive data type if possible (e.g. int instead of Integer) + if (isSetSpreadMethod()) { + return spreadMethod; + } else { + return null; + } + } + + + /** + * @return whether spreadMethod is set + */ + public boolean isSetSpreadMethod() { + return this.spreadMethod != null; + } + + + /** + * Set the value of spreadMethod + */ + public void setSpreadMethod(Spread spreadMethod) { + //Spread oldSpreadMethod = this.spreadMethod; + this.spreadMethod = spreadMethod; + //TODO + //firePropertyChange(constant_class.spreadMethod, oldSpreadMethod, this.spreadMethod); + } + + + /** + * Unsets the variable spreadMethod + * @return <code>true</code>, if spreadMethod was set before, + * otherwise <code>false</code> + */ + public boolean unsetSpreadMethod() { + if (isSetSpreadMethod()) { + //Spread oldSpreadMethod = this.spreadMethod; + this.spreadMethod = null; + //TODO + //firePropertyChange(constant_class.spreadMethod, oldSpreadMethod, this.spreadMethod); + return true; + } + return false; + } + + public static final int MIN_SBML_LEVEL = 3; + public static final int MIN_SBML_VERSION = 1; + public String toString() { // TODO Auto-generated method stub return null; } + + + /** + * @return <code>true</code>, if listOfGradientStops contains at least one element, + * otherwise <code>false</code> + */ + public boolean isSetListOfGradientStops() { + if ((listOfGradientStops == null) || listOfGradientStops.isEmpty()) { + return false; + } + return true; + } + + + /** + * @return the listOfGradientStops + */ + public ListOf<GradientStop> getListOfGradientStops() { + if (!isSetListOfGradientStops()) { + listOfGradientStops = new ListOf<GradientStop>(getLevel(), getVersion()); + //TODO + //listOfGradientStops.addNamespace(constant_class.namespaceURI); + listOfGradientStops.setSBaseListType(ListOf.Type.other); + registerChild(listOfGradientStops); + } + return listOfGradientStops; + } + + + /** + * @param listOfGradientStops + */ + public void setListOfGradientStops(ListOf<GradientStop> listOfGradientStops) { + unsetListOfGradientStops(); + this.listOfGradientStops = listOfGradientStops; + registerChild(this.listOfGradientStops); + } + + + /** + * @return <code>true</code>, if listOfGradientStops contained at least one element, + * otherwise <code>false</code> + */ + public boolean unsetListOfGradientStops() { + if (isSetListOfGradientStops()) { + ListOf<GradientStop> oldGradientStops = this.listOfGradientStops; + this.listOfGradientStops = null; + oldGradientStops.fireNodeRemovedEvent(); + return true; + } + return false; + } + + + /** + * @param field + */ + public boolean addGradientStop(GradientStop field) { + return getListOfGradientStops().add(field); + } + + + /** + * @param field + */ + public boolean removeGradientStop(GradientStop field) { + if (isSetListOfGradientStops()) { + return getListOfGradientStops().remove(field); + } + return false; + } + + + /** + * @param i + */ + public void removeGradientStop(int i) { + if (!isSetListOfGradientStops()) { + throw new IndexOutOfBoundsException(Integer.toString(i)); + } + getListOfGradientStops().remove(i); + } + + + /** + * create a new GradientStop element and adds it to the ListOfGradientStops list + */ + public GradientStop createGradientStop(int offset, ColorDefinition stopColor) { + GradientStop field = new GradientStop(offset, stopColor, getLevel(), getVersion()); + addGradientStop(field); + return field; + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -21,6 +21,7 @@ package org.sbml.jsbml.ext.render; import org.sbml.jsbml.AbstractSBase; +import org.sbml.jsbml.LevelVersionError; /** @@ -32,16 +33,104 @@ * @since 1.0 * @date 08.05.2012 */ -public class GradientStop extends AbstractSBase { - - private Integer offset; +public class GradientStop extends AbstractSBase { + /** + * + */ + private static final long serialVersionUID = 7400974339251884133L; + + private int offset; private ColorDefinition stopColor; - - public AbstractSBase clone() { - // TODO Auto-generated method stub - return null; - } + + /** + * Creates a GradientStop instance with an offset and a color. + * + * @param offset + * @param color + */ + public GradientStop(int offset, ColorDefinition stopColor) { + this.offset = offset; + this.stopColor = stopColor; + } + + + /** + * Creates a GradientStop instance with an offset, color, level, and version. + * + * @param offset + * @param color + * @param level + * @param version + */ + public GradientStop(int offset, ColorDefinition stopColor, int level, int version) { + super(level, version); + if (getLevelAndVersion().compareTo(Integer.valueOf(MIN_SBML_LEVEL), + Integer.valueOf(MIN_SBML_VERSION)) < 0) { + throw new LevelVersionError(getElementName(), level, version); + } + this.offset = offset; + this.stopColor = stopColor; + } + + + /** + * Clone constructor + */ + public GradientStop(GradientStop obj) { + super(obj); + this.offset = obj.offset; + this.stopColor = obj.stopColor; + } + + + /** + * clones this class + */ + public GradientStop clone() { + return new GradientStop(this); + } + + + /** + * @return the value of offset + */ + public int getOffset() { + return offset; + } + + + /** + * Set the value of offset + */ + public void setOffset(int offset) { + //int oldOffset = this.offset; + this.offset = offset; + //TODO + //firePropertyChange(constant_class.offset, oldOffset, this.offset); + } + + + /** + * @return the value of stopColor + */ + public ColorDefinition getStopColor() { + return stopColor; + } + + /** + * Set the value of stopColor + */ + public void setStopColor(ColorDefinition stopColor) { + //ColorDefinition oldStopColor = this.stopColor; + this.stopColor = stopColor; + //TODO + //firePropertyChange(constant_class.stopColor, oldStopColor, this.stopColor); + } + + public static final int MIN_SBML_LEVEL = 3; + public static final int MIN_SBML_VERSION = 1; + public String toString() { // TODO Auto-generated method stub return null; Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -31,6 +31,7 @@ * @date 08.05.2012 */ public class LinearGradient extends GradientBase { + //TODO use a Point class? private Integer x1, y1, z1, x2, y2, z2; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -20,6 +20,7 @@ */ package org.sbml.jsbml.ext.render; +import org.sbml.jsbml.LevelVersionError; import org.sbml.jsbml.ListOf; @@ -33,5 +34,208 @@ * @date 08.05.2012 */ public class LocalRenderInformation extends RenderInformationBase { - protected ListOf<LocalStyle> listOfLocalStyles; + /** + * + */ + private static final long serialVersionUID = -8056565578647428405L; + + private ListOf<LocalStyle> listOfLocalStyles; + + /** + * Creates an LocalRenderInformation instance + */ + public LocalRenderInformation() { + super(); + initDefaults(); + } + + + /** + * Creates a LocalRenderInformation instance with an id. + * + * @param id + */ + public LocalRenderInformation(String id) { + super(id); + initDefaults(); + } + + + /** + * Creates a LocalRenderInformation instance with a level and version. + * + * @param level + * @param version + */ + public LocalRenderInformation(int level, int version) { + this(null, null, level, version); + } + + + /** + * Creates a LocalRenderInformation instance with an id, level, and version. + * + * @param id + * @param level + * @param version + */ + public LocalRenderInformation(String id, int level, int version) { + this(id, null, level, version); + } + + + /** + * Creates a LocalRenderInformation instance with an id, name, level, and version. + * + * @param id + * @param name + * @param level + * @param version + */ + public LocalRenderInformation(String id, String name, int level, int version) { + super(id, name, level, version); + if (getLevelAndVersion().compareTo(Integer.valueOf(MIN_SBML_LEVEL), + Integer.valueOf(MIN_SBML_VERSION)) < 0) { + throw new LevelVersionError(getElementName(), level, version); + } + initDefaults(); + } + + + /** + * Clone constructor + */ + public LocalRenderInformation(LocalRenderInformation obj) { + super(obj); + this.listOfLocalStyles = obj.listOfLocalStyles; + } + + + /** + * clones this class + */ + public LocalRenderInformation clone() { + return new LocalRenderInformation(this); + } + + + /** + * Initializes the default values using the namespace. + */ + public void initDefaults() { + //TODO + //addNamespace(constant_class.namespaceURI); + this.listOfLocalStyles = null; + } + + + /** + * @return <code>true</code>, if listOfLocalStyles contains at least one element, + * otherwise <code>false</code> + */ + public boolean isSetListOfLocalStyles() { + if ((listOfLocalStyles == null) || listOfLocalStyles.isEmpty()) { + return false; + } + return true; + } + + + /** + * @return the listOfLocalStyles + */ + public ListOf<LocalStyle> getListOfLocalStyles() { + if (!isSetListOfLocalStyles()) { + listOfLocalStyles = new ListOf<LocalStyle>(getLevel(), getVersion()); + //TODO + //listOfLocalStyles.addNamespace(constant_class.namespaceURI); + listOfLocalStyles.setSBaseListType(ListOf.Type.other); + registerChild(listOfLocalStyles); + } + return listOfLocalStyles; + } + + + /** + * @param listOfLocalStyles + */ + public void setListOfLocalStyles(ListOf<LocalStyle> listOfLocalStyles) { + unsetListOfLocalStyles(); + this.listOfLocalStyles = listOfLocalStyles; + registerChild(this.listOfLocalStyles); + } + + + /** + * @return <code>true</code>, if listOfLocalStyles contained at least one element, + * otherwise <code>false</code> + */ + public boolean unsetListOfLocalStyles() { + if (isSetListOfLocalStyles()) { + ListOf<LocalStyle> oldLocalStyles = this.listOfLocalStyles; + this.listOfLocalStyles = null; + oldLocalStyles.fireNodeRemovedEvent(); + return true; + } + return false; + } + + + /** + * @param localStyle + */ + public boolean addLocalStyle(LocalStyle localStyle) { + return getListOfLocalStyles().add(localStyle); + } + + + /** + * @param localStyle + */ + public boolean removeLocalStyle(LocalStyle localStyle) { + if (isSetListOfLocalStyles()) { + return getListOfLocalStyles().remove(localStyle); + } + return false; + } + + + /** + * @param index + */ + public void removeLocalStyle(int i) { + if (!isSetListOfLocalStyles()) { + throw new IndexOutOfBoundsException(Integer.toString(i)); + } + getListOfLocalStyles().remove(i); + } + + + /** + * create a new LocalStyle element and adds it to the ListOfLocalStyles list + */ + //TODO A Style needs a group + /* + public LocalStyle createLocalStyle(String id) { + LocalStyle field = new LocalStyle(id, getLevel(), getVersion()); + addLocalStyle(field); + return field; + } + */ + + /** + * TODO: optionally, create additional create methods with more + * variables, for instance "bar" variable + */ + // public LocalStyle createLocalStyle(String id, int bar) { + // LocalStyle field = createLocalStyle(id); + // field.setBar(bar); + // return field; + // } + /** + * + */ + + public static final int MIN_SBML_LEVEL = 3; + public static final int MIN_SBML_VERSION = 1; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -33,6 +33,65 @@ * @date 08.05.2012 */ public class LocalStyle extends Style { - // TODO for idList used type of generated serial id's - ArrayList<Long> idList; + /** + * + */ + private static final long serialVersionUID = 4976081641247006722L; + + // TODO List of ids or layouts? Type, setters and getters, add, remove + ArrayList<String> idList; + + /** + * Creates a LocalStyle instance with a group + * + * @param group + */ + public LocalStyle(Group group){ + super(group); + this.idList = new ArrayList<String>(); + } + + /** + * Creates a LocalStyle instance with a level and version. + * + * @param level + * @param version + */ + public LocalStyle(int level, int version, Group group) { + super(null, level, version, group); + this.idList = new ArrayList<String>(); + } + + + /** + * Creates a LocalStyle instance with an id, name, level, and version. + * + * @param id + * @param level + * @param version + * @param group + */ + public LocalStyle(String id, int level, int version, Group group){ + super(id, level, version, group); + this.idList = new ArrayList<String>(); + } + + + /** + * @return the value of idList + */ + public ArrayList<String> getIdList(){ + return this.idList; + } + + /** + * Set the value of idList + */ + public void setIdList(ArrayList<String> idList){ + //ArrayList<String> oldIdList = this.idList; + this.idList = idList; + //TODO + //firePropertyChange(constant_class.idList, oldIdList, this.idList); + } + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -31,7 +31,7 @@ * @date 08.05.2012 */ public class RadialGradient extends GradientBase { - // FIXME absolut vs. relativ + // FIXME absolute vs. relative, use a Point class? private Boolean absolute; private Integer cx, cy, cz, r, fx, fy, fz; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -21,8 +21,10 @@ package org.sbml.jsbml.ext.render; import org.sbml.jsbml.AbstractNamedSBase; -import org.sbml.jsbml.AbstractSBase; +import org.sbml.jsbml.LevelVersionError; import org.sbml.jsbml.ListOf; +import org.sbml.jsbml.PropertyUndefinedError; +import org.sbml.jsbml.util.filters.NameFilter; /** * @author Eugen Netz @@ -35,27 +37,537 @@ */ public class RenderInformationBase extends AbstractNamedSBase { - String programName; - String programVersion; //TODO int better? - String referenceRenderInformation; + /** + * + */ + private static final long serialVersionUID = -9096154126197866584L; + + protected String programName; + protected String programVersion; //TODO int better? + protected String referenceRenderInformation; //TODO null -> "none", rgba , default 0xFFFFFFFF - Integer backgroundColor = 0xFFFFFFFF; - ListOf<ColorDefinition> listOfColorDefinitions; + protected Integer backgroundColor; + protected ListOf<ColorDefinition> listOfColorDefinitions; // TODO maybe wrong class for linear and radial gradients - ListOf<GradientBase> listOfGradientDefinitions; - ListOf<LineEnding> listofLineEndings; + protected ListOf<GradientBase> listOfGradientBases; + protected ListOf<LineEnding> listofLineEndings; - public AbstractSBase clone() { - // TODO Auto-generated method stub + /** + * Creates an RenderInformationBase instance + */ + public RenderInformationBase() { + super(); + initDefaults(); + } + + + /** + * Creates a RenderInformationBase instance with an id. + * + * @param id + */ + public RenderInformationBase(String id) { + super(id); + initDefaults(); + } + + + /** + * Creates a RenderInformationBase instance with a level and version. + * + * @param level + * @param version + */ + public RenderInformationBase(int level, int version) { + this(null, null, level, version); + } + + + /** + * Creates a RenderInformationBase instance with an id, level, and version. + * + * @param id + * @param level + * @param version + */ + public RenderInformationBase(String id, int level, int version) { + this(id, null, level, version); + } + + + + /** + * Creates a RenderInformationBase instance with an id, name, level, and version. + * + * @param id + * @param name + * @param level + * @param version + */ + public RenderInformationBase(String id, String name, int level, int version) { + super(id, name, level, version); + if (getLevelAndVersion().compareTo(Integer.valueOf(MIN_SBML_LEVEL), + Integer.valueOf(MIN_SBML_VERSION)) < 0) { + throw new LevelVersionError(getElementName(), level, version); + } + initDefaults(); + } + + + /** + * Clone constructor + */ + public RenderInformationBase(RenderInformationBase obj) { + super(obj); + this.programName = obj.programName; + this.programVersion = obj.programVersion; + this.referenceRenderInformation = obj.referenceRenderInformation; + this.backgroundColor = obj.backgroundColor; + this.listOfColorDefinitions = obj.listOfColorDefinitions; + this.listOfGradientBases = obj.listOfGradientBases; + this.listofLineEndings = obj.listofLineEndings; + } + + + /** + * clones this class + */ + public RenderInformationBase clone() { + return new RenderInformationBase(this); + } + + + /** + * Initializes the default values using the namespace. + */ + public void initDefaults() { + //TODO + //addNamespace(.namespaceURI); + this.backgroundColor = 0xFFFFFFFF; + this.programName = null; + this.programVersion = null; + this.referenceRenderInformation = null; + this.listOfColorDefinitions = null; + this.listOfGradientBases = null; + this.listofLineEndings = null; + } + + + +/** + * @return the value of programName + */ +public String getProgramName() { + + if (isSetProgramName()) { + return this.programName; + } else { return null; } + //TODO Create a Constants class? + // This is necessary if we cannot return null here. + //throw new PropertyUndefinedError("programmName", this); +} - public String toString() { - // TODO Auto-generated method stub + +/** + * @return whether programmName is set + */ +public boolean isSetProgramName() { + return this.programName != null; +} + + +/** + * Set the value of programmName + */ +public void setProgramName(String programName) { + String oldProgramName = this.programName; + this.programName = programName; + firePropertyChange("programName", oldProgramName, this.programName); +} + + +/** + * Unsets the variable programmName + * @return <code>true</code>, if programmName was set before, + * otherwise <code>false</code> + */ +public boolean unsetProgramName() { + if (isSetProgramName()) { + String oldProgramName = this.programName; + this.programName = null; + firePropertyChange("programmName", oldProgramName, this.programName); + return true; + } + return false; +} + + +/** + * @return the value of programVersion + */ +public String getProgramVersion() { + //TODO: return primitive data type if possible (e.g. int instead of Integer) + if (isSetProgramVersion()) { + return programVersion; + } + // This is necessary if we cannot return null here. + throw new PropertyUndefinedError("programVersion", this); +} + + +/** + * @return whether programVersion is set + */ +public boolean isSetProgramVersion() { + return this.programVersion != null; +} + + +/** + * Set the value of programVersion + */ +public void setProgramVersion(String programVersion) { + String oldProgramVersion = this.programVersion; + this.programVersion = programVersion; + firePropertyChange("programVersion", oldProgramVersion, this.programVersion); +} + + +/** + * Unsets the variable programVersion + * @return <code>true</code>, if programVersion was set before, + * otherwise <code>false</code> + */ +public boolean unsetProgramVersion() { + if (isSetProgramVersion()) { + String oldProgramVersion = this.programVersion; + this.programVersion = null; + firePropertyChange("programVersion", oldProgramVersion, this.programVersion); + return true; + } + return false; +} + + +/** + * @return the value of referenceRenderInformation + */ +public String getReferenceRenderInformation() { + //TODO: if variable is boolean, create an additional "isVar" + //TODO: return primitive data type if possible (e.g. int instead of Integer) + if (isSetReferenceRenderInformation()) { + return referenceRenderInformation; + } + // This is necessary if we cannot return null here. + throw new PropertyUndefinedError("referenceRenderInformation", this); +} + + +/** + * @return whether referenceRenderInformation is set + */ +public boolean isSetReferenceRenderInformation() { + return this.referenceRenderInformation != null; +} + + +/** + * Set the value of referenceRenderInformation + */ +public void setReferenceRenderInformation(String referenceRenderInformation) { + String oldReferenceRenderInformation = this.referenceRenderInformation; + this.referenceRenderInformation = referenceRenderInformation; + firePropertyChange("referenceRenderInformation", oldReferenceRenderInformation, this.referenceRenderInformation); +} + + +/** + * Unsets the variable referenceRenderInformation + * @return <code>true</code>, if referenceRenderInformation was set before, + * otherwise <code>false</code> + */ +public boolean unsetReferenceRenderInformation() { + if (isSetReferenceRenderInformation()) { + String oldReferenceRenderInformation = this.referenceRenderInformation; + this.referenceRenderInformation = null; + firePropertyChange("referenceRenderInformation", oldReferenceRenderInformation, this.referenceRenderInformation); + return true; + } + return false; +} + + +/** + * @return the value of backgroundColor + */ +public Integer getBackgroundColor() { + //TODO: return primitive data type if possible (e.g. int instead of Integer) + if (isSetBackgroundColor()) { + return backgroundColor; + } else { return null; } + // This is necessary if we cannot return null here. + //throw new PropertyUndefinedError("backgroundColor", this); +} - @Override + +/** + * @return whether backgroundColor is set + */ +public boolean isSetBackgroundColor() { + return this.backgroundColor != null; +} + + +/** + * Set the value of backgroundColor + */ +public void setBackgroundColor(int backgroundColor) { + Integer oldBackgroundColor = this.backgroundColor; + this.backgroundColor = backgroundColor; + firePropertyChange("backgroundColor", oldBackgroundColor, this.backgroundColor); +} + + +/** + * Unsets the variable backgroundColor + * @return <code>true</code>, if backgroundColor was set before, + * otherwise <code>false</code> + */ +public boolean unsetBackgroundColor() { + if (isSetBackgroundColor()) { + Integer oldBackgroundColor = this.backgroundColor; + this.backgroundColor = null; + firePropertyChange("backgroundColor", oldBackgroundColor, this.backgroundColor); + return true; + } + return false; +} + + +/** + * @return <code>true</code>, if listOfColorDefinitions contains at least one element, + * otherwise <code>false</code> + */ +public boolean isSetListOfColorDefinitions() { + if ((this.listOfColorDefinitions == null) || listOfColorDefinitions.isEmpty()) { + return false; + } + return true; +} + + +/** + * @return the listOfColorDefinitions + */ +public ListOf<ColorDefinition> getListOfColorDefinitions() { + if (!isSetListOfColorDefinitions()) { + listOfColorDefinitions = new ListOf<ColorDefinition>(getLevel(), getVersion()); + //TODO + //listOfColorDefinitions.addNamespace(constant_class.namespaceURI); + listOfColorDefinitions.setSBaseListType(ListOf.Type.other); + registerChild(listOfColorDefinitions); + } + return listOfColorDefinitions; +} + + +/** + * @param listOfColorDefinitions + */ +public void setListOfColorDefinitions(ListOf<ColorDefinition> listOfColorDefinitions) { + unsetListOfColorDefinitions(); + this.listOfColorDefinitions = listOfColorDefinitions; + registerChild(this.listOfColorDefinitions); +} + + +/** + * @return <code>true</code>, if listOfColorDefinitions contained at least one element, + * otherwise <code>false</code> + */ +public boolean unsetListOfColorDefinitions() { + if (isSetListOfColorDefinitions()) { + ListOf<ColorDefinition> oldColorDefinitions = this.listOfColorDefinitions; + this.listOfColorDefinitions = null; + oldColorDefinitions.fireNodeRemovedEvent(); + return true; + } + return false; +} + + +/** + * @param field + */ +public boolean addColorDefinition(ColorDefinition field) { + return getListOfColorDefinitions().add(field); +} + + +/** + * @param field + */ +public boolean removeColorDefinition(ColorDefinition field) { + if (isSetListOfColorDefinitions()) { + return getListOfColorDefinitions().remove(field); + } + return false; +} + + +/** + * @param i + */ +public void removeColorDefinition(int i) { + if (!isSetListOfColorDefinitions()) { + throw new IndexOutOfBoundsException(Integer.toString(i)); + } + getListOfColorDefinitions().remove(i); +} + + +/** + * TODO: if the ID is mandatory for ColorDefinition objects, + * one should also add this methods + */ + public void removeColorDefinition(String id) { + getListOfColorDefinitions().removeFirst(new NameFilter(id)); + } + + +/** + * create a new ColorDefinition element and adds it to the ListOfColorDefinitions list + */ +public ColorDefinition createColorDefinition(String id, int value) { + ColorDefinition field = new ColorDefinition(id, value, getLevel(), getVersion()); + addColorDefinition(field); + return field; +} + +/** + * @return <code>true</code>, if listOfGradientBases contains at least one element, + * otherwise <code>false</code> + */ +public boolean isSetListOfGradientBases() { + if ((listOfGradientBases == null) || listOfGradientBases.isEmpty()) { + return false; + } + return true; +} + + +/** + * @return the listOfGradientBases + */ +public ListOf<GradientBase> getListOfGradientBases() { + if (!isSetListOfGradientBases()) { + listOfGradientBases = new ListOf<GradientBase>(getLevel(), getVersion()); + //TODO + //listOfGradientBases.addNamespace(constant_class.namespaceURI); + listOfGradientBases.setSBaseListType(ListOf.Type.other); + registerChild(listOfGradientBases); + } + return listOfGradientBases; +} + + +/** + * @param listOfGradientBases + */ +public void setListOfGradientBases(ListOf<GradientBase> listOfGradientBases) { + unsetListOfGradientBases(); + this.listOfGradientBases = listOfGradientBases; + registerChild(this.listOfGradientBases); +} + + +/** + * @return <code>true</code>, if listOfGradientBases contained at least one element, + * otherwise <code>false</code> + */ +public boolean unsetListOfGradientBases() { + if (isSetListOfGradientBases()) { + ListOf<GradientBase> oldGradientBases = this.listOfGradientBases; + this.listOfGradientBases = null; + oldGradientBases.fireNodeRemovedEvent(); + return true; + } + return false; +} + + +/** + * @param field + */ +public boolean addGradientBase(GradientBase field) { + return getListOfGradientBases().add(field); +} + + +/** + * @param field + */ +public boolean removeGradientBase(GradientBase field) { + if (isSetListOfGradientBases()) { + return getListOfGradientBases().remove(field); + } + return false; +} + + +/** + * @param i + */ +public void removeGradientBase(int i) { + if (!isSetListOfGradientBases()) { + throw new IndexOutOfBoundsException(Integer.toString(i)); + } + getListOfGradientBases().remove(i); +} + + +/** + * TODO: if the ID is mandatory for GradientBase objects, + * one should also add this methods + */ +//public void removeGradientBase(String id) { +// getListOfGradientBases().removeFirst(new NameFilter(id)); +//} + + +/** + * create a new GradientBase element and adds it to the ListOfGradientBases list + * <p><b>NOTE:</b> + * only use this method, if ID is not mandatory in GradientBase + * otherwise use @see createGradientBase(String id)!</p> + */ +/* +public GradientBase createGradientBase() { + return createGradientBase(null); +} +*/ + +/** + * create a new GradientBase element and adds it to the ListOfGradientBases list + */ +//TODO +/* +public GradientBase createGradientBase(String id) { + GradientBase field = new GradientBase(id, getLevel(), getVersion()); + addGradientBase(field); + return field; +} +*/ + + + + public static final int MIN_SBML_LEVEL = 3; + public static final int MIN_SBML_VERSION = 1; + public boolean isIdMandatory() { // TODO Auto-generated method stub return false; Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2012-05-15 12:50:15 UTC (rev 1260) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2012-05-16 06:24:51 UTC (rev 1261) @@ -23,6 +23,7 @@ import java.util.ArrayList; import org.sbml.jsbml.AbstractSBase; +import org.sbml.jsbml.LevelVersionError; /** * @author Eugen Netz @@ -33,19 +34,170 @@ * @since 1.0 * @date 08.05.2012 */ -public class Style extends AbstractSBase { - // TODO add serial ID +public class Style extends AbstractSBase { + /** + * + */ + private static final long serialVersionUID = -4660813321564690910L; + + + protected String id; + //TODO right List class? setters, getters for List or elements? add, remove for Lists protected ArrayList<String> typeList; protected ArrayList<String> roleList; protected Group group; - public AbstractSBase clone() { - // TODO Auto-generated method stub - return null; + + /** + * Creates a Style instance with a group + * + * @param group + */ + public Style(Group group) { + super(); + this.group = group; + initDefaults(); } + + /** + * Creates a Style instance with a level and version. + * + * @param level + * @param version + */ + public Style(int level, int version, Group group) { + this(null, level, version, group); + } + + + + /** + * Creates a Style instance with an id, name, level, and version. + * + * @param id + * @param level + * @param version + * @param group + */ + public Style(String id, int level, int version, Group group) { + super(level, version); + if (getLevelAndVersion().compareTo(Integer.valueOf(MIN_SBML_LEVEL), + Integer.valueOf(MIN_SBML_VERSION)) < 0) { + throw new LevelVersionError(getElementName(), level, version); + } + this.id = id; + this.group = group; + initDefaults(); + } + + + /** + * Clone constructor + */ + public Style(Style obj) { + super(obj); + this.id = obj.id; + this.roleList = obj.roleList; + this.typeList = obj.typeList; + this.group = obj.group; + } + + + /** + * clones this class + */ + public Style clone() { + return new Style(this); + } + + + /** + * Initializes the default values using the namespace. + */ + public void initDefaults() { + //TODO + //addNamespace(constant_class.namespaceURI); + this.roleList = null; + this.typeList = null; + } + + public static final int MIN_SBML_LEVEL = 3; + public static final int MIN_SBML_VERSION = 1; + + public String toString() { // TODO Auto-generated method stub return null; } + + + /** + * @return the value of id + */ + public String getId() { + return this.id; + } + + /** + * Set the value of id + */ + public void setId(String id) { + //String oldId = this.id; + this.id = id; + //TODO + //firePropertyChange(constant_class.id, oldId, this.id); + } + + /** + * @return the value of group + */ + public Group getGroup(){ + return this.group; + } + + /** + * Set the value of group + */ + public void setGroup(Group group){ + //Group olGroup = this.group; + this.group = group; + //TODO + //firePropertyChange(constant_class.group, oldGroup, this.Group); + } + + /** + * @return the value of typeList + */ + //TODO Whole list or elements? + public ArrayList<String> getTypeList(){ + return this.typeList; + } + + /** + * Set the value of typeList + */ + public void setTypeList(ArrayList<String> typeList){ + //ArrayList<String> oldTypeList = this.typeList; + this.typeList = typeList; + //TODO + //firePropertyChange(constant_class.typeList, oldTypeList, this.typeList); + } + + /** + * @return the value of roleList + */ + public ArrayList<String> getRoleList(){ + return this.roleList; + } + + /** + * Set the value of roleList + */ + public void setRoleList(ArrayList<String> roleList){ + //ArrayList<String> oldRoleList = this.roleList; + this.roleList = roleList; + //TODO + //firePropertyChange(constant_class.roleList, oldRoleList, this.roleList); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2012-05-15 12:50:21
|
Revision: 1260 http://jsbml.svn.sourceforge.net/jsbml/?rev=1260&view=rev Author: niko-rodrigue Date: 2012-05-15 12:50:15 +0000 (Tue, 15 May 2012) Log Message: ----------- corrected bug tracker #3511439 + updated the version number to be 0.8 Modified Paths: -------------- branches/jsbml-0.8/build.xml branches/jsbml-0.8/src/org/sbml/jsbml/JSBML.java branches/jsbml-0.8/src/org/sbml/jsbml/Species.java Modified: branches/jsbml-0.8/build.xml =================================================================== --- branches/jsbml-0.8/build.xml 2012-05-15 10:46:25 UTC (rev 1259) +++ branches/jsbml-0.8/build.xml 2012-05-15 12:50:15 UTC (rev 1260) @@ -15,7 +15,7 @@ <property name="Name" value="JSBML"/> <property name="name" value="jsbml"/> - <property name="version" value="0.8-rc2"/> + <property name="version" value="0.8"/> <property name="api.version" value="0.8"/> <property name="year" value="${YEAR}"/> Modified: branches/jsbml-0.8/src/org/sbml/jsbml/JSBML.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/JSBML.java 2012-05-15 10:46:25 UTC (rev 1259) +++ branches/jsbml-0.8/src/org/sbml/jsbml/JSBML.java 2012-05-15 12:50:15 UTC (rev 1260) @@ -56,7 +56,7 @@ /** * The current version number of JSBML. */ - private static final String jsbmlVersion = "0.8-rc1"; // TODO : replace automatically this version number with [BUILD.NUMBER] + private static final String jsbmlVersion = "0.8"; // TODO : replace automatically this version number with [BUILD.NUMBER] public static final int LEVEL_MISMATCH = -7; public static final int OPERATION_FAILED = -3; Modified: branches/jsbml-0.8/src/org/sbml/jsbml/Species.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/Species.java 2012-05-15 10:46:25 UTC (rev 1259) +++ branches/jsbml-0.8/src/org/sbml/jsbml/Species.java 2012-05-15 12:50:15 UTC (rev 1260) @@ -158,6 +158,9 @@ if (species.isSetConversionFactor()) { setConversionFactor(species.conversionFactorID); } + if (species.isSetSpeciesType()) { + setSpeciesType(species.getSpeciesType()); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2012-05-15 10:46:36
|
Revision: 1259 http://jsbml.svn.sourceforge.net/jsbml/?rev=1259&view=rev Author: enetz Date: 2012-05-15 10:46:25 +0000 (Tue, 15 May 2012) Log Message: ----------- Render Extension: Fields of render extension classes added. Modified Paths: -------------- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,14 +20,9 @@ */ package org.sbml.jsbml.ext.render; -import java.util.Map; +import org.sbml.jsbml.AbstractSBase; -import javax.swing.tree.TreeNode; -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - /** * @author Eugen Netz * @author Alexander Diamantikos @@ -38,5 +33,17 @@ * @date 08.05.2012 */ public class ColorDefinition extends AbstractSBase { + // TODO insert serialID + Integer value; + + public AbstractSBase clone() { + // TODO Auto-generated method stub + return null; + } + public String toString() { + // TODO Auto-generated method stub + return null; + } + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,9 @@ */ package org.sbml.jsbml.ext.render; +import java.util.ArrayList; + /** * @author Eugen Netz * @author Alexander Diamantikos @@ -31,4 +33,9 @@ * @date 08.05.2012 */ public class Curve extends GraphicalPrimitive1D { + protected LineEnding startHead; + protected LineEnding endHead; + // FIXME sollte auch für RenderCubicBezier funktionieren + protected ArrayList<RenderPoint> listOfElements; + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,5 @@ * @date 08.05.2012 */ public class Ellipse extends GraphicalPrimitive2D { + protected Integer cx, cy, cz, rx, ry; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -28,7 +28,6 @@ import org.sbml.jsbml.Model; import org.sbml.jsbml.ext.AbstractSBasePlugin; import org.sbml.jsbml.ext.SBasePlugin; -import org.sbml.jsbml.ext.layout.Layout; /** @@ -46,6 +45,9 @@ */ protected ListOf<LocalRenderInformation> listOfLocalRenderInformation; protected ListOf<GlobalRenderInformation> listOfGlobalRenderInformation; + // TODO unclear if Integer or int + protected int versionMajor; + protected int versionMinor; /** * Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,9 @@ */ package org.sbml.jsbml.ext.render; +import org.sbml.jsbml.ListOf; + /** * @author Eugen Netz * @author Alexander Diamantikos @@ -31,4 +33,5 @@ * @date 08.05.2012 */ public class GlobalRenderInformation extends RenderInformationBase { + ListOf<Style> listOfStyles; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,6 @@ */ package org.sbml.jsbml.ext.render; -import org.sbml.jsbml.PropertyUndefinedError; /** Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,14 +20,10 @@ */ package org.sbml.jsbml.ext.render; -import java.util.Map; +import org.sbml.jsbml.AbstractSBase; +import org.sbml.jsbml.ListOf; -import javax.swing.tree.TreeNode; -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - /** * @author Eugen Netz * @author Alexander Diamantikos @@ -38,4 +34,21 @@ * @date 08.05.2012 */ public class GradientBase extends AbstractSBase { + protected enum Spread { + PAD, + REFLECT, + REPEAT, + } + protected Spread spreadMethod; + protected ListOf<GradientStop> stop; + + public AbstractSBase clone() { + // TODO Auto-generated method stub + return null; + } + + public String toString() { + // TODO Auto-generated method stub + return null; + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,14 +20,9 @@ */ package org.sbml.jsbml.ext.render; -import java.util.Map; +import org.sbml.jsbml.AbstractSBase; -import javax.swing.tree.TreeNode; -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - /** * @author Eugen Netz * @author Alexander Diamantikos @@ -38,4 +33,17 @@ * @date 08.05.2012 */ public class GradientStop extends AbstractSBase { + + private Integer offset; + private ColorDefinition stopColor; + + public AbstractSBase clone() { + // TODO Auto-generated method stub + return null; + } + + public String toString() { + // TODO Auto-generated method stub + return null; + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,9 @@ */ package org.sbml.jsbml.ext.render; +import java.util.ArrayList; + /** * @author Eugen Netz * @author Alexander Diamantikos @@ -31,4 +33,8 @@ * @date 08.05.2012 */ public class GraphicalPrimitive1D extends Transformation2D { + protected ColorDefinition stroke; + protected Integer strokeWidth; + protected ArrayList<Integer> strokeDashArray; + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,11 @@ * @date 08.05.2012 */ public class GraphicalPrimitive2D extends GraphicalPrimitive1D { + //FIXME sollte auch gradient unterstützen + protected ColorDefinition fill; + protected enum FillRule { + NONZERO, + EVENODD, + } + protected FillRule fillRule; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,8 @@ * @date 08.05.2012 */ public class Group extends GraphicalPrimitive2D { + protected Integer iD; + protected Text text; + protected LineEnding startHead; + protected LineEnding endHead; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,7 @@ * @date 08.05.2012 */ public class Image extends Transformation2D { + protected Integer x, y, z, widht, height; + protected Boolean positionAbsolute, sizeAbsolute; + protected String href; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,9 @@ */ package org.sbml.jsbml.ext.render; +import org.sbml.jsbml.ext.layout.BoundingBox; + /** * @author Eugen Netz * @author Alexander Diamantikos @@ -31,4 +33,7 @@ * @date 08.05.2012 */ public class LineEnding extends GraphicalPrimitive2D { + protected Boolean enableRotationMapping; + protected BoundingBox boundingBox; + protected Group group; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,6 @@ * @date 08.05.2012 */ public class LinearGradient extends GradientBase { + private Integer x1, y1, z1, x2, y2, z2; + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,9 @@ */ package org.sbml.jsbml.ext.render; +import org.sbml.jsbml.ListOf; + /** * @author Eugen Netz * @author Alexander Diamantikos @@ -31,4 +33,5 @@ * @date 08.05.2012 */ public class LocalRenderInformation extends RenderInformationBase { + protected ListOf<LocalStyle> listOfLocalStyles; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,9 @@ */ package org.sbml.jsbml.ext.render; +import java.util.ArrayList; + /** * @author Eugen Netz * @author Alexander Diamantikos @@ -31,4 +33,6 @@ * @date 08.05.2012 */ public class LocalStyle extends Style { + // TODO for idList used type of generated serial id's + ArrayList<Long> idList; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,7 +20,9 @@ */ package org.sbml.jsbml.ext.render; +import java.util.ArrayList; + /** * @author Eugen Netz * @author Alexander Diamantikos @@ -31,4 +33,6 @@ * @date 08.05.2012 */ public class Polygon extends GraphicalPrimitive2D { + // FIXME auch RenderCubicBezier erlaubt? + private ArrayList<RenderPoint> ListOfElements; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,7 @@ * @date 08.05.2012 */ public class RadialGradient extends GradientBase { + // FIXME absolut vs. relativ + private Boolean absolute; + private Integer cx, cy, cz, r, fx, fy, fz; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,6 @@ * @date 08.05.2012 */ public class Rectangle extends GraphicalPrimitive2D { + protected Integer x, y, z, width, height, rx, ry; + protected Boolean sizeAbsolute; } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,6 @@ * @date 08.05.2012 */ public class RenderCubicBezier extends RenderPoint { + private Integer x1, y1, z1, x2, y2, z2; + } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,13 +20,9 @@ */ package org.sbml.jsbml.ext.render; -import java.util.Map; - -import javax.swing.tree.TreeNode; - +import org.sbml.jsbml.AbstractNamedSBase; import org.sbml.jsbml.AbstractSBase; -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; +import org.sbml.jsbml.ListOf; /** * @author Eugen Netz @@ -37,5 +33,31 @@ * @since 1.0 * @date 04.05.2012 */ -public class RenderInformationBase extends AbstractSBase { +public class RenderInformationBase extends AbstractNamedSBase { + + String programName; + String programVersion; //TODO int better? + String referenceRenderInformation; + //TODO null -> "none", rgba , default 0xFFFFFFFF + Integer backgroundColor = 0xFFFFFFFF; + ListOf<ColorDefinition> listOfColorDefinitions; + // TODO maybe wrong class for linear and radial gradients + ListOf<GradientBase> listOfGradientDefinitions; + ListOf<LineEnding> listofLineEndings; + + public AbstractSBase clone() { + // TODO Auto-generated method stub + return null; + } + + public String toString() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isIdMandatory() { + // TODO Auto-generated method stub + return false; + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,14 +20,9 @@ */ package org.sbml.jsbml.ext.render; -import java.util.Map; +import org.sbml.jsbml.AbstractSBase; -import javax.swing.tree.TreeNode; -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - /** * @author Eugen Netz * @author Alexander Diamantikos @@ -38,4 +33,16 @@ * @date 08.05.2012 */ public class RenderPoint extends AbstractSBase { + // TODO Punkte als eigene Klasse? Point aus Layout? + private Integer x, y, z; + + public AbstractSBase clone() { + // TODO Auto-generated method stub + return null; + } + + public String toString() { + // TODO Auto-generated method stub + return null; + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,13 +20,10 @@ */ package org.sbml.jsbml.ext.render; -import java.util.Map; +import java.util.ArrayList; -import javax.swing.tree.TreeNode; +import org.sbml.jsbml.AbstractSBase; -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - /** * @author Eugen Netz * @author Alexander Diamantikos @@ -37,4 +34,18 @@ * @date 08.05.2012 */ public class Style extends AbstractSBase { + // TODO add serial ID + protected ArrayList<String> typeList; + protected ArrayList<String> roleList; + protected Group group; + + public AbstractSBase clone() { + // TODO Auto-generated method stub + return null; + } + + public String toString() { + // TODO Auto-generated method stub + return null; + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,26 @@ * @date 08.05.2012 */ public class Text extends GraphicalPrimitive1D { + // TODO warum kann man hier keinen Text speichern? + protected Integer x, y, z; + protected FontFamily fontFamily; + protected Integer fontSize; + protected Boolean fontWeightBold, fontStyleItalic; + protected TextAnchor textAnchor; + protected VTextAnchor vTextAnchor; + protected enum TextAnchor { + START, + MIDDLE, + END, + } + protected enum VTextAnchor { + TOP, + MIDDLE, + BOTTOM, + } + protected enum FontFamily { + SERIF, + SANS_SERIF, + MONOSPACE, + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -20,14 +20,9 @@ */ package org.sbml.jsbml.ext.render; -import java.util.Map; +import org.sbml.jsbml.AbstractSBase; -import javax.swing.tree.TreeNode; -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - /** * @author Eugen Netz * @author Alexander Diamantikos @@ -38,4 +33,14 @@ * @date 08.05.2012 */ public class Transformation extends AbstractSBase { + protected Double[] transform; //initialize with size 12 + public AbstractSBase clone() { + // TODO Auto-generated method stub + return null; + } + + public String toString() { + // TODO Auto-generated method stub + return null; + } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java 2012-05-15 07:43:14 UTC (rev 1258) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java 2012-05-15 10:46:25 UTC (rev 1259) @@ -31,4 +31,5 @@ * @date 08.05.2012 */ public class Transformation2D extends Transformation { + protected Double[] transform; //use first 6 fields of superclass } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2012-05-15 07:43:25
|
Revision: 1258 http://jsbml.svn.sourceforge.net/jsbml/?rev=1258&view=rev Author: andreas-draeger Date: 2012-05-15 07:43:14 +0000 (Tue, 15 May 2012) Log Message: ----------- The pow function in the formula compiler was not working properly. Modified Paths: -------------- branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java Modified: branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java 2012-05-15 07:43:01 UTC (rev 1257) +++ branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java 2012-05-15 07:43:14 UTC (rev 1258) @@ -453,9 +453,13 @@ * @throws SBMLException */ private String checkDenominatorBrackets(ASTNode nodes) throws SBMLException { + if ((nodes.getType() == Type.POWER) && (nodes.getChildCount() > 1) + && nodes.getRightChild().toString().equals("1")) { + return checkDenominatorBrackets(nodes.getLeftChild()); + } String term = nodes.compile(this).toString(); if (nodes.isSum() || nodes.isDifference() || nodes.isUMinus() - || nodes.getType() == Type.TIMES) { + || (nodes.getType() == Type.TIMES)) { term = brackets(term).toString(); } return term; @@ -1010,18 +1014,7 @@ * org.sbml.jsbml.ASTNode) */ public ASTNodeValue pow(ASTNode left, ASTNode right) throws SBMLException { - - // Adding brackets all the time for the exponent/right ASTNode - - if (left.getChildCount() < 2) { - return new ASTNodeValue(StringTools.concat(left.compile(this), "^", "(", - right.compile(this), ")").toString(), this); - } else { - return new ASTNodeValue(StringTools.concat(Character.valueOf('('), - left.compile(this), Character.valueOf(')'), "^", "(", - right.compile(this), ")").toString(), this); - } - + return new ASTNodeValue(pow(left.compile(this), right.compile(this)).toString(), this); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2012-05-15 07:43:14
|
Revision: 1257 http://jsbml.svn.sourceforge.net/jsbml/?rev=1257&view=rev Author: andreas-draeger Date: 2012-05-15 07:43:01 +0000 (Tue, 15 May 2012) Log Message: ----------- - Updated the version number in the trunk version of JSBML 1.0-rc1 because the previous value 0.8-rc1 was not appropriate anymore. - SBML Layout extension contained bugs that caused endless recursion when trying to access referenced instances of NamedSBase from a glyph (such as CompartmentGlyph, SpeciesGlyph etc.). - The pow function in the formula compiler was not working properly. - Added more convenient methods for Unit manipulation on ASTNode. Unit checks should be unified in all classes that can be associated with units. Currently, JSBML has three different implementations of the identical check. Modified Paths: -------------- trunk/core/NEWS.txt trunk/core/src/org/sbml/jsbml/ASTNode.java trunk/core/src/org/sbml/jsbml/AbstractNamedSBaseWithUnit.java trunk/core/src/org/sbml/jsbml/JSBML.java trunk/core/src/org/sbml/jsbml/KineticLaw.java trunk/core/src/org/sbml/jsbml/Unit.java trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompilerNoPiecewise.java trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java trunk/core/src/org/sbml/jsbml/util/filters/NameFilter.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CompartmentGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ExtendedLayoutModel.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java trunk/modules/celldesigner/src/org/sbml/jsbml/cdplugin/PluginChangeListener.java Modified: trunk/core/NEWS.txt =================================================================== --- trunk/core/NEWS.txt 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/NEWS.txt 2012-05-15 07:43:01 UTC (rev 1257) @@ -57,6 +57,10 @@ * Bug Fixes: + - SBML Layout extension contained bugs that caused endless recursion when + trying to access referenced instances of NamedSBase from a glyph (such + as CompartmentGlyph, SpeciesGlyph etc.). + - It was sometimes possible to unregister elements from a model that were the result of cloning, removal of the original entry and linking the clone to the model. When altering the previous element, pointers were deleted Modified: trunk/core/src/org/sbml/jsbml/ASTNode.java =================================================================== --- trunk/core/src/org/sbml/jsbml/ASTNode.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/ASTNode.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -3541,6 +3541,22 @@ this.unitId = unitId; this.firePropertyChange(TreeNodeChangeEvent.units, oldValue, unitId); } + + /** + * + * @param unit + */ + public void setUnits(Unit.Kind unit) { + setUnits(unit.toString().toLowerCase()); + } + + /** + * + * @param ud + */ + public void setUnits(UnitDefinition ud) { + setUnits(ud.getId()); + } /** * Sets the value of this ASTNode to the given double number and sets the Modified: trunk/core/src/org/sbml/jsbml/AbstractNamedSBaseWithUnit.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractNamedSBaseWithUnit.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/AbstractNamedSBaseWithUnit.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -20,6 +20,8 @@ package org.sbml.jsbml; +import java.text.MessageFormat; + import org.sbml.jsbml.Unit.Kind; import org.sbml.jsbml.util.TreeNodeChangeEvent; @@ -262,7 +264,7 @@ if ((units != null) && (units.trim().length() == 0)) { units = null; // If we pass the empty String or null, the value is reset. } - + // TODO: Use the method Units.isValidUnit here! String oldUnits = this.unitsID; if (units == null) { unitsID = null; @@ -284,7 +286,7 @@ } } if (illegalArgument) { - throw new IllegalArgumentException(String.format( + throw new IllegalArgumentException(MessageFormat.format( JSBML.ILLEGAL_UNIT_EXCEPTION_MSG, units)); } } Modified: trunk/core/src/org/sbml/jsbml/JSBML.java =================================================================== --- trunk/core/src/org/sbml/jsbml/JSBML.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/JSBML.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -49,7 +49,7 @@ * Error message for the case that an invalid unit identifier is to be added * to this object. */ - public static final String ILLEGAL_UNIT_EXCEPTION_MSG = "Cannot identify unit %s in the model. Only a valid unit kind or the identifier of an existing unit definition are allowed."; + public static final String ILLEGAL_UNIT_EXCEPTION_MSG = "Cannot identify unit {0} in the model. Only a valid unit kind or the identifier of an existing unit definition are allowed."; public static final int INDEX_EXCEEDS_SIZE = -1; public static final int INVALID_ATTRIBUTE_VALUE = -4; public static final int INVALID_OBJECT = -5; @@ -57,7 +57,7 @@ /** * The current version number of JSBML. */ - private static final String jsbmlVersion = "0.8-rc1"; // TODO : replace automatically this version number with [BUILD.NUMBER] + private static final String jsbmlVersion = "1.0-rc1"; // TODO : replace automatically this version number with [BUILD.NUMBER] public static final int LEVEL_MISMATCH = -7; public static final int OPERATION_FAILED = -3; Modified: trunk/core/src/org/sbml/jsbml/KineticLaw.java =================================================================== --- trunk/core/src/org/sbml/jsbml/KineticLaw.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/KineticLaw.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -20,6 +20,7 @@ package org.sbml.jsbml; +import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; @@ -856,6 +857,7 @@ @Deprecated public void setUnits(String units) { String oldUnits = this.unitsID; + // TODO: Use the method Units.isValidUnit here! if (units == null) { unitsID = null; } else { @@ -874,7 +876,7 @@ } } if (illegalArgument) { - throw new IllegalArgumentException(String.format( + throw new IllegalArgumentException(MessageFormat.format( JSBML.ILLEGAL_UNIT_EXCEPTION_MSG, units)); } } Modified: trunk/core/src/org/sbml/jsbml/Unit.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Unit.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/Unit.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -1005,7 +1005,7 @@ public static boolean isValidUnit(Model model, String unit) { boolean isValidUnit = false; - if (unit != null && model != null) { + if ((unit != null) && (model != null)) { unit = unit.trim(); if (unit.length() > 0) { if (Kind.isValidUnitKindString(unit, model.getLevel(), model @@ -1015,7 +1015,7 @@ isValidUnit = true; } } - } else if (model == null && unit != null) { + } else if ((model == null) && (unit != null)) { isValidUnit = true; } Modified: trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -185,7 +185,7 @@ */ public ASTNodeValue compile(double mantissa, int exponent, String units) { - if (units != null && units.length() > 0) { + if ((units != null) && (units.length() > 0)) { isUnitsDefined = true; throw new SBMLException("Stopping the recursion, a units has been found and the SBML namespace is needed."); } @@ -198,7 +198,7 @@ */ public ASTNodeValue compile(double real, String units) { - if (units != null && units.length() > 0) { + if ((units != null) && (units.length() > 0)) { isUnitsDefined = true; throw new SBMLException("Stopping the recursion, a units has been found and the SBML namespace is needed."); } @@ -211,7 +211,7 @@ */ public ASTNodeValue compile(int integer, String units) { - if (units != null && units.length() > 0) { + if ((units != null) && (units.length() > 0)) { isUnitsDefined = true; throw new SBMLException("Stopping the recursion, a units has been found and the SBML namespace is needed."); } Modified: trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompiler.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -262,163 +262,106 @@ return arith('*', factors); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#abs(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#abs(org.sbml.jsbml.ASTNode) */ public ASTNodeValue abs(ASTNode node) throws SBMLException { return function("abs", node); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#and(java.util.List) */ public ASTNodeValue and(List<ASTNode> nodes) throws SBMLException { return logicalOperation(" and ", nodes); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccos(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccos(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccos(ASTNode node) throws SBMLException { return function("acos", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccosh(org.sbml.jsbml. - * ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccosh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccosh(ASTNode node) throws SBMLException { return function("acosh", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccot(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccot(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccot(ASTNode node) throws SBMLException { return function("acot", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccoth(org.sbml.jsbml. - * ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccoth(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccoth(ASTNode node) throws SBMLException { return function("acoth", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsc(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsc(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccsc(ASTNode node) throws SBMLException { return function("acsc", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsch(org.sbml.jsbml. - * ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsch(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccsch(ASTNode node) throws SBMLException { return function("acsch", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsec(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsec(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsec(ASTNode node) throws SBMLException { return function("asec", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsech(org.sbml.jsbml. - * ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsech(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsech(ASTNode node) throws SBMLException { return function("asech", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsin(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsin(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsin(ASTNode node) throws SBMLException { return function("asin", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsinh(org.sbml.jsbml. - * ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsinh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsinh(ASTNode node) throws SBMLException { return function("asinh", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctan(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctan(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arctan(ASTNode node) throws SBMLException { return function("atan", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctanh(org.sbml.jsbml. - * ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctanh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arctanh(ASTNode node) throws SBMLException { return function("atanh", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#ceiling(org.sbml.jsbml. - * ASTNode) + /* (non-Javadoc) + * @seeorg.sbml.jsbml.util.compilers.ASTNodeCompiler#ceiling(org.sbml.jsbml.ASTNode) */ public ASTNodeValue ceiling(ASTNode node) throws SBMLException { return function("ceil", node); @@ -437,7 +380,7 @@ if (node.isSum() || node.isDifference() || node.isUMinus()) { term = brackets(term).toString(); } else if (node.isReal()) { - if (node.getReal() < 0.0) { + if (node.getReal() < 0d) { term = brackets(term).toString(); } } @@ -453,30 +396,27 @@ * @throws SBMLException */ private String checkDenominatorBrackets(ASTNode nodes) throws SBMLException { - String term = nodes.compile(this).toString(); - if (nodes.isSum() || nodes.isDifference() || nodes.isUMinus() - || nodes.getType() == Type.TIMES) { - term = brackets(term).toString(); - } - return term; + if ((nodes.getType() == Type.POWER) && (nodes.getChildCount() > 1) + && nodes.getRightChild().toString().equals("1")) { + return checkDenominatorBrackets(nodes.getLeftChild()); + } + String term = nodes.compile(this).toString(); + if (nodes.isSum() || nodes.isDifference() || nodes.isUMinus() + || (nodes.getType() == Type.TIMES)) { + term = brackets(term).toString(); + } + return term; } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(org.sbml.jsbml. - * Compartment) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(org.sbml.jsbml.Compartment) */ public ASTNodeValue compile(Compartment c) { return new ASTNodeValue(c.getId(), this); } - /* - * (non-Javadoc) - * - * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(double, int, - * java.lang.String) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(double, int, java.lang.String) */ public ASTNodeValue compile(double mantissa, int exponent, String units) { if (exponent == 0) { @@ -489,113 +429,78 @@ .format(mantissa), "E", exponent).toString(), this); } - /* - * (non-Javadoc) - * - * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(double, - * java.lang.String) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(double, java.lang.String) */ public ASTNodeValue compile(double real, String units) { return new ASTNodeValue(toString(Locale.ENGLISH, real), this); } - /* - * (non-Javadoc) - * - * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(int, - * java.lang.String) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(int, java.lang.String) */ public ASTNodeValue compile(int integer, String units) { return new ASTNodeValue(integer, this); } - /* - * (non-Javadoc) + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(org.sbml.jsbml.CallableSBase) */ public ASTNodeValue compile(CallableSBase variable) { return new ASTNodeValue(variable.getId(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(java.lang.String) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#compile(java.lang.String) */ public ASTNodeValue compile(String name) { return new ASTNodeValue(name, this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#cos(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cos(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cos(ASTNode node) throws SBMLException { return function("cos", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#cosh(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cosh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cosh(ASTNode node) throws SBMLException { return function("cosh", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#cot(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cot(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cot(ASTNode node) throws SBMLException { return function("cot", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#coth(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#coth(org.sbml.jsbml.ASTNode) */ public ASTNodeValue coth(ASTNode node) throws SBMLException { return function("coth", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#csc(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#csc(org.sbml.jsbml.ASTNode) */ public ASTNodeValue csc(ASTNode node) throws SBMLException { return function("csc", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#csch(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#csch(org.sbml.jsbml.ASTNode) */ public ASTNodeValue csch(ASTNode node) throws SBMLException { return function("csch", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#delay(java.lang.String, - * org.sbml.jsbml.ASTNode, double, java.lang.String) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#delay(java.lang.String, org.sbml.jsbml.ASTNode, double, java.lang.String) */ public ASTNodeValue delay(String delayName, ASTNode x, ASTNode y, String timeUnits) throws SBMLException { @@ -603,33 +508,22 @@ y.compile(this), ")").toString(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#eq(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#eq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue eq(ASTNode left, ASTNode right) throws SBMLException { return new ASTNodeValue(relation(left, " == ", right), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#exp(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#exp(org.sbml.jsbml.ASTNode) */ public ASTNodeValue exp(ASTNode node) throws SBMLException { return function("exp", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#factorial(org.sbml.jsbml - * .ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#factorial(org.sbml.jsbml.ASTNode) */ public ASTNodeValue factorial(ASTNode node) { return new ASTNodeValue(append(brackets(node), Character.valueOf('!')) @@ -638,32 +532,25 @@ /* * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#floor(org.sbml.jsbml.ASTNode - * ) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#floor(org.sbml.jsbml.ASTNode) */ public ASTNodeValue floor(ASTNode node) throws SBMLException { return function("floor", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#frac(org.sbml.jsbml.ASTNode - * , org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#frac(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue frac(ASTNode numerator, ASTNode denominator) throws SBMLException { - return new ASTNodeValue(concat(checkBrackets(numerator), - Character.valueOf('/'), checkDenominatorBrackets(denominator)) - .toString(), this); + return new ASTNodeValue( + concat(checkBrackets(numerator), + Character.valueOf('/'), + checkDenominatorBrackets(denominator)).toString(), + this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#frac(int, int) */ public ASTNodeValue frac(int numerator, int denominator) { @@ -675,12 +562,8 @@ : compile(denominator, null)).toString(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#function(org.sbml.jsbml - * .FunctionDefinition, java.util.List) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#function(org.sbml.jsbml.FunctionDefinition, java.util.List) */ public ASTNodeValue function(FunctionDefinition func, List<ASTNode> nodes) throws SBMLException { @@ -718,96 +601,70 @@ .toString(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#geq(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#geq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue geq(ASTNode left, ASTNode right) throws SBMLException { return new ASTNodeValue(relation(left, " >= ", right), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#getConstantAvogadro(java - * .lang.String) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#getConstantAvogadro(java.lang.String) */ public ASTNodeValue getConstantAvogadro(String name) { return new ASTNodeValue("avogadro", this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#getConstantE() */ public ASTNodeValue getConstantE() { return new ASTNodeValue(Character.toString('e'), this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#getConstantFalse() */ public ASTNodeValue getConstantFalse() { return new ASTNodeValue(false, this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#getConstantPi() */ public ASTNodeValue getConstantPi() { return new ASTNodeValue("pi", this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#getConstantTrue() */ public ASTNodeValue getConstantTrue() { return new ASTNodeValue(true, this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#getNegativeInfinity() */ public ASTNodeValue getNegativeInfinity() { return new ASTNodeValue(Double.NEGATIVE_INFINITY, this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#getPositiveInfinity() */ public ASTNodeValue getPositiveInfinity() { return new ASTNodeValue(Double.POSITIVE_INFINITY, this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#gt(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#gt(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue gt(ASTNode left, ASTNode right) throws SBMLException { return new ASTNodeValue(relation(left, " > ", right), this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#lambda(java.util.List) */ public ASTNodeValue lambda(List<ASTNode> nodes) throws SBMLException { @@ -835,43 +692,29 @@ return lambda.toString(); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#leq(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#leq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue leq(ASTNode left, ASTNode right) throws SBMLException { return new ASTNodeValue(relation(left, " <= ", right), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#ln(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#ln(org.sbml.jsbml.ASTNode) */ public ASTNodeValue ln(ASTNode node) throws SBMLException { return function("log", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode) */ public ASTNodeValue log(ASTNode node) throws SBMLException { return function("log10", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue log(ASTNode left, ASTNode right) throws SBMLException { return function("log", left, right); @@ -904,20 +747,14 @@ return new ASTNodeValue(value.toString(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#lt(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#lt(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue lt(ASTNode left, ASTNode right) throws SBMLException { return new ASTNodeValue(relation(left, " < ", right), this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#minus(java.util.List) */ public ASTNodeValue minus(List<ASTNode> nodes) throws SBMLException { @@ -939,49 +776,35 @@ } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#neq(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#neq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue neq(ASTNode left, ASTNode right) throws SBMLException { return new ASTNodeValue(relation(left, " != ", right), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#not(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#not(org.sbml.jsbml.ASTNode) */ public ASTNodeValue not(ASTNode node) throws SBMLException { return function("not", node); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#or(java.util.List) */ public ASTNodeValue or(List<ASTNode> nodes) throws SBMLException { return logicalOperation(" or ", nodes); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#piecewise(java.util.List) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#piecewise(java.util.List) */ public ASTNodeValue piecewise(List<ASTNode> nodes) throws SBMLException { return function("piecewise", nodes); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#plus(java.util.List) */ public ASTNodeValue plus(List<ASTNode> nodes) throws SBMLException { @@ -1002,26 +825,11 @@ } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#pow(org.sbml.jsbml.ASTNode, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#pow(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue pow(ASTNode left, ASTNode right) throws SBMLException { - - // Adding brackets all the time for the exponent/right ASTNode - - if (left.getChildCount() < 2) { - return new ASTNodeValue(StringTools.concat(left.compile(this), "^", "(", - right.compile(this), ")").toString(), this); - } else { - return new ASTNodeValue(StringTools.concat(Character.valueOf('('), - left.compile(this), Character.valueOf(')'), "^", "(", - right.compile(this), ")").toString(), this); - } - + return new ASTNodeValue(pow(left.compile(this), right.compile(this)).toString(), this); } /** @@ -1039,12 +847,8 @@ (right.isRelational()) ? brackets(right) : right).toString(); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#root(org.sbml.jsbml.ASTNode - * , org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#root(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue root(ASTNode rootExponent, ASTNode radiant) throws SBMLException @@ -1057,15 +861,11 @@ rootExponent.compile(this), "))").toString(), this); } - /* - * (non-Javadoc) - * - * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#root(double, - * org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#root(double, org.sbml.jsbml.ASTNode) */ public ASTNodeValue root(double rootExponent, ASTNode radiant) - throws SBMLException - { + throws SBMLException { // Writing the root function as '(radiant)^(1/rootExponent)' return new ASTNodeValue(StringTools.concat(Character.valueOf('('), @@ -1073,95 +873,64 @@ rootExponent, ")").toString(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#sec(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sec(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sec(ASTNode node) throws SBMLException { return function("sec", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#sech(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sech(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sech(ASTNode node) throws SBMLException { return function("sech", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#sin(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sin(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sin(ASTNode node) throws SBMLException { return function("sin", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#sinh(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sinh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sinh(ASTNode node) throws SBMLException { return function("sinh", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#sqrt(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sqrt(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sqrt(ASTNode node) throws SBMLException { return new ASTNodeValue(StringTools.concat(Character.valueOf('('), node.compile(this), Character.valueOf(')'), "^", "(0.5)").toString(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#symbolTime(java.lang.String - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#symbolTime(java.lang.String) */ public ASTNodeValue symbolTime(String time) { return new ASTNodeValue(time, this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#tan(org.sbml.jsbml.ASTNode) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#tan(org.sbml.jsbml.ASTNode) */ public ASTNodeValue tan(ASTNode node) throws SBMLException { return function("tan", node); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#tanh(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#tanh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue tanh(ASTNode node) throws SBMLException { return function("tanh", node); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#times(java.util.List) */ public ASTNodeValue times(List<ASTNode> nodes) throws SBMLException { @@ -1173,21 +942,15 @@ return new ASTNodeValue(times(n).toString(), this); } - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#uMinus(org.sbml.jsbml.ASTNode - * ) + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#uMinus(org.sbml.jsbml.ASTNode) */ public ASTNodeValue uMinus(ASTNode node) throws SBMLException { return new ASTNodeValue(concat(Character.valueOf('-'), checkBrackets(node)).toString(), this); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#unknownValue() */ public ASTNodeValue unknownValue() throws SBMLException { @@ -1195,12 +958,11 @@ "cannot write unknown syntax tree nodes to a formula String"); } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#xor(java.util.List) */ public ASTNodeValue xor(List<ASTNode> nodes) throws SBMLException { return logicalOperation(" xor ", nodes); } + } Modified: trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompilerNoPiecewise.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompilerNoPiecewise.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/util/compilers/FormulaCompilerNoPiecewise.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -55,14 +55,11 @@ * */ private String orReplacement = " | "; - - - /* - * (non-Javadoc) - * - * @see - * org.sbml.jsbml.util.compilers.ASTNodeCompiler#piecewise(java.util.List) + + /* (non-Javadoc) + * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#piecewise(java.util.List) */ + @Override public ASTNodeValue piecewise(List<ASTNode> nodes) throws SBMLException { // create the piecewise output with if/then/else Modified: trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -145,7 +145,7 @@ SBase sbase = astNode.getParentSBMLObject(); - if (sbase != null && sbase.getLevel() < 3) { + if ((sbase != null) && (sbase.getLevel() < 3)) { return false; } Modified: trunk/core/src/org/sbml/jsbml/util/filters/NameFilter.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/filters/NameFilter.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/core/src/org/sbml/jsbml/util/filters/NameFilter.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -67,9 +67,7 @@ this.name = name; } - /* - * (non-Javadoc) - * + /* (non-Javadoc) * @see org.sbml.jsbml.util.Filter#fulfilsProperty(java.lang.Object) */ public boolean accepts(Object o) { Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CompartmentGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CompartmentGlyph.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CompartmentGlyph.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -108,7 +108,7 @@ */ @Override public Compartment getNamedSBaseInstance() { - return (Compartment) getNamedSBaseInstance(); + return (Compartment) super.getNamedSBaseInstance(); } /** Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ExtendedLayoutModel.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ExtendedLayoutModel.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ExtendedLayoutModel.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -55,26 +55,6 @@ /** * - */ - public ExtendedLayoutModel(Model model) { - super(model); - - this.model = model; - createListOfLayout(); - } - - /** - * Creates a new list of layout - */ - private void createListOfLayout() { - listOfLayouts = new ListOf<Layout>(); - listOfLayouts.addNamespace(LayoutConstant.namespaceURI); - listOfLayouts.setSBaseListType(ListOf.Type.other); - model.registerChild(listOfLayouts); - } - - /** - * * @param elm */ public ExtendedLayoutModel(ExtendedLayoutModel elm) { @@ -84,7 +64,16 @@ } } + /** + * + */ + public ExtendedLayoutModel(Model model) { + super(model); + this.model = model; + createListOfLayout(); + } + /** * * @param layout @@ -111,8 +100,36 @@ return new ExtendedLayoutModel(this); } - /* - * (non-Javadoc) + /** + * Creates a new layout and adds it to the current list of layouts. + * @return new layout. + */ + public Layout createLayout() { + return createLayout(null); + } + + /** + * + * @param id + * @return + */ + public Layout createLayout(String id) { + Layout layout = new Layout(id, model.getLevel(), model.getVersion()); + addLayout(layout); + return layout; + } + + /** + * Creates a new list of layout + */ + private void createListOfLayout() { + listOfLayouts = new ListOf<Layout>(); + listOfLayouts.addNamespace(LayoutConstant.namespaceURI); + listOfLayouts.setSBaseListType(ListOf.Type.other); + model.registerChild(listOfLayouts); + } + + /* (non-Javadoc) * @see org.sbml.jsbml.Model#equals(java.lang.Object) */ @Override @@ -131,16 +148,15 @@ } return equals; } - + /* (non-Javadoc) * @see javax.swing.tree.TreeNode#getAllowsChildren() */ public boolean getAllowsChildren() { return true; } - - /* - * (non-Javadoc) + + /* (non-Javadoc) * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) */ public SBase getChildAt(int index) { @@ -149,9 +165,9 @@ } return null; } - - /* - * (non-Javadoc) + + + /* (non-Javadoc) * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() */ public int getChildCount() { @@ -162,6 +178,7 @@ return count; } + /** * * @param i @@ -170,8 +187,7 @@ public Layout getLayout(int i) { return listOfLayouts.get(i); } - - + /** * * @return @@ -182,12 +198,19 @@ } return listOfLayouts; } - - + + /** + * + * @return + */ + public Model getModel() { + return (Model) extendedSBase; + } + public Model getParent() { return model; } - + public Model getParentSBMLObject() { return model; } @@ -223,8 +246,7 @@ model.registerChild(listOfLayouts); } - /* - * (non-Javadoc) + /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override @@ -233,7 +255,7 @@ return null; } - /** + /** * Removes the {@link #listOfLayouts} from this {@link Model} and notifies * all registered instances of {@link TreeNodeChangeListener}. * @@ -249,33 +271,12 @@ } return false; } - - /* - * (non-Javadoc) + + /* (non-Javadoc) * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() */ public Map<String, String> writeXMLAttributes() { return null; } - - /** - * - * @return - */ - public Model getModel() { - return (Model) extendedSBase; - } - - - /** - * Creates a new layout and adds it to the current list of layouts. - * @return new layout. - */ - public Layout createLayout() { - Layout layout = new Layout(model.getLevel(), model.getVersion()); - addLayout(layout); - return layout; - } - } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -54,11 +54,11 @@ /** * */ - private ListOf<GraphicalObject> listOfAdditionalGraphicalObjects = new ListOf<GraphicalObject>(); + private Dimensions dimensions; /** * */ - private Dimensions dimensions; + private ListOf<GraphicalObject> listOfAdditionalGraphicalObjects = new ListOf<GraphicalObject>(); /** * */ @@ -94,7 +94,8 @@ initDefault(); } - /** + + /** * @param layout * */ @@ -121,8 +122,20 @@ } } + /** * + * @param id + * @param level + * @param version + */ + public Layout(String id, int level, int version) { + super(id, level, version); + initDefault(); + } + + /** + * * @param reactionGlyph */ public void add(ReactionGlyph reactionGlyph) { @@ -202,6 +215,49 @@ } /** + * + * @param compartment + * @return + */ + public boolean containsGlyph(Compartment compartment) { + return containsGlyph(listOfCompartmentGlyphs, compartment); + } + + /** + * + * @param listOfGlyphs + * @param nsb + * @return + */ + private <T extends NamedSBaseGlyph> boolean containsGlyph(ListOf<T> listOfGlyphs, + NamedSBase nsb) { + if ((nsb != null) && (listOfGlyphs != null) && !listOfGlyphs.isEmpty()) { + NamedSBaseReferenceFilter filter = new NamedSBaseReferenceFilter(nsb.getId()); + filter.setFilterForReference(true); + return listOfGlyphs.firstHit(filter) != null; + } + return false; + } + + /** + * + * @param reaction + * @return + */ + public boolean containsGlyph(Reaction reaction) { + return containsGlyph(listOfReactionGlyphs, reaction); + } + + /** + * + * @param species + * @return + */ + public boolean containsGlyph(Species species) { + return containsGlyph(listOfSpeciesGlyphs, species); + } + + /** * Creates and adds a new {@link CompartmentGlyph}. * @param compartment {@link Compartment} ID. * @return new {@link CompartmentGlyph}. @@ -241,7 +297,7 @@ addReactionGlyph(glyph); return glyph; } - + /** * Creates and adds a new {@link SpeciesGlyph}. * @param species {@link Species} ID. @@ -293,7 +349,7 @@ } return new ArrayList<T>(0); } - + /** * Searches all instances of {@link ReactionGlyph} within this {@link Layout} that * refer to the {@link Reaction} with the given id. @@ -317,7 +373,7 @@ public List<SpeciesGlyph> findSpeciesGlyphs(String speciesID) { return findGlyphs(listOfSpeciesGlyphs, speciesID); } - + /** * * @param i @@ -330,7 +386,7 @@ } return null; } - + /* (non-Javadoc) * @see org.sbml.jsbml.AbstractSBase#getChildAt(int) */ @@ -383,7 +439,7 @@ throw new IndexOutOfBoundsException(String.format("Index %d >= %d", index, +((int) Math.min(pos, 0)))); } - + /* (non-Javadoc) * @see org.sbml.jsbml.AbstractSBase#getChildCount() */ @@ -423,7 +479,7 @@ } return null; } - + /** * * @param id @@ -435,7 +491,7 @@ } return null; } - + /** * * @return @@ -451,7 +507,7 @@ public ListOf<GraphicalObject> getListOfAdditionalGraphicalObjects() { return listOfAdditionalGraphicalObjects; } - + /** * * @return @@ -465,7 +521,8 @@ } return listOfCompartmentGlyphs; } - + + /** * * @return @@ -479,7 +536,7 @@ } return listOfReactionGlyphs; } - + /** * * @return @@ -493,7 +550,7 @@ } return listOfSpeciesGlyphs; } - + /** * * @return @@ -507,7 +564,7 @@ } return listOfTextGlyphs; } - + /** * * @param i @@ -520,7 +577,6 @@ } return null; } - /** * @@ -533,7 +589,7 @@ } return null; } - + /** * * @param i @@ -560,32 +616,34 @@ } return null; } - + + /** + * + */ private void initDefault() { - addNamespace(LayoutConstant.namespaceURI); + addNamespace(LayoutConstant.namespaceURI); - listOfCompartmentGlyphs.addNamespace(LayoutConstant.namespaceURI); - listOfCompartmentGlyphs.setSBaseListType(ListOf.Type.other); - registerChild(listOfCompartmentGlyphs); - - listOfSpeciesGlyphs.addNamespace(LayoutConstant.namespaceURI); - listOfSpeciesGlyphs.setSBaseListType(ListOf.Type.other); - registerChild(listOfSpeciesGlyphs); + listOfCompartmentGlyphs.addNamespace(LayoutConstant.namespaceURI); + listOfCompartmentGlyphs.setSBaseListType(ListOf.Type.other); + registerChild(listOfCompartmentGlyphs); - listOfReactionGlyphs.addNamespace(LayoutConstant.namespaceURI); - listOfReactionGlyphs.setSBaseListType(ListOf.Type.other); - registerChild(listOfReactionGlyphs); + listOfSpeciesGlyphs.addNamespace(LayoutConstant.namespaceURI); + listOfSpeciesGlyphs.setSBaseListType(ListOf.Type.other); + registerChild(listOfSpeciesGlyphs); - listOfTextGlyphs.addNamespace(LayoutConstant.namespaceURI); - listOfTextGlyphs.setSBaseListType(ListOf.Type.other); - registerChild(listOfTextGlyphs); + listOfReactionGlyphs.addNamespace(LayoutConstant.namespaceURI); + listOfReactionGlyphs.setSBaseListType(ListOf.Type.other); + registerChild(listOfReactionGlyphs); - listOfAdditionalGraphicalObjects.addNamespace(LayoutConstant.namespaceURI); - listOfAdditionalGraphicalObjects.setSBaseListType(ListOf.Type.other); - registerChild(listOfAdditionalGraphicalObjects); + listOfTextGlyphs.addNamespace(LayoutConstant.namespaceURI); + listOfTextGlyphs.setSBaseListType(ListOf.Type.other); + registerChild(listOfTextGlyphs); -} - + listOfAdditionalGraphicalObjects.addNamespace(LayoutConstant.namespaceURI); + listOfAdditionalGraphicalObjects.setSBaseListType(ListOf.Type.other); + registerChild(listOfAdditionalGraphicalObjects); + } + /* (non-Javadoc) * @see org.sbml.jsbml.NamedSBase#isIdMandatory() */ @@ -600,14 +658,14 @@ public boolean isSetAddGraphicalObjects() { return (listOfAdditionalGraphicalObjects != null) && (listOfAdditionalGraphicalObjects.size() > 0); } - + /** * @return */ public boolean isSetDimensions() { return dimensions != null; } - + /** * @return */ @@ -628,7 +686,7 @@ public boolean isSetListOfReactionGlyphs() { return (listOfReactionGlyphs != null) && (listOfReactionGlyphs.size() > 0); } - + /** * * @return @@ -643,7 +701,7 @@ public boolean isSetListOfTextGlyphs() { return (listOfTextGlyphs != null) && (listOfTextGlyphs.size() > 0); } - + /** * @param attributeName * @param prefix @@ -657,49 +715,6 @@ value); return isAttributeRead; } - - /** - * - * @param compartment - * @return - */ - public boolean containsGlyph(Compartment compartment) { - return containsGlyph(listOfCompartmentGlyphs, compartment); - } - - /** - * - * @param listOfGlyphs - * @param nsb - * @return - */ - private <T extends NamedSBaseGlyph> boolean containsGlyph(ListOf<T> listOfGlyphs, - NamedSBase nsb) { - if ((nsb != null) && (listOfGlyphs != null) && !listOfGlyphs.isEmpty()) { - NamedSBaseReferenceFilter filter = new NamedSBaseReferenceFilter(nsb.getId()); - filter.setFilterForReference(true); - return listOfGlyphs.firstHit(filter) != null; - } - return false; - } - - /** - * - * @param reaction - * @return - */ - public boolean containsGlyph(Reaction reaction) { - return containsGlyph(listOfReactionGlyphs, reaction); - } - - /** - * - * @param species - * @return - */ - public boolean containsGlyph(Species species) { - return containsGlyph(listOfSpeciesGlyphs, species); - } /** * Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -210,7 +210,7 @@ */ @Override public Reaction getNamedSBaseInstance() { - return (Reaction) getNamedSBaseInstance(); + return (Reaction) super.getNamedSBaseInstance(); } /** Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesGlyph.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesGlyph.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -93,7 +93,7 @@ */ @Override public Species getNamedSBaseInstance() { - return (Species) getNamedSBaseInstance(); + return (Species) super.getNamedSBaseInstance(); } /** @@ -111,7 +111,7 @@ public Species getSpeciesInstance() { return getNamedSBaseInstance(); } - + /** * @return the {@link #speciesId} */ Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -184,7 +184,7 @@ */ @Override public SimpleSpeciesReference getNamedSBaseInstance() { - return (SimpleSpeciesReference) getNamedSBaseInstance(); + return (SimpleSpeciesReference) super.getNamedSBaseInstance(); } /** Modified: trunk/modules/celldesigner/src/org/sbml/jsbml/cdplugin/PluginChangeListener.java =================================================================== --- trunk/modules/celldesigner/src/org/sbml/jsbml/cdplugin/PluginChangeListener.java 2012-05-14 12:02:32 UTC (rev 1256) +++ trunk/modules/celldesigner/src/org/sbml/jsbml/cdplugin/PluginChangeListener.java 2012-05-15 07:43:01 UTC (rev 1257) @@ -17,6 +17,7 @@ package org.sbml.jsbml.cdplugin; import java.beans.PropertyChangeEvent; +import java.text.MessageFormat; import java.util.Enumeration; import javax.swing.tree.TreeNode; @@ -498,7 +499,7 @@ pKlaw.setTimeUnits(klaw.getTimeUnits()); plugin.notifySBaseChanged(pKlaw); } else if (eventsource instanceof Model){ - logger.log(Level.DEBUG, String.format("Changing %s in the Model only supported with SBML version > 3.", eventsource.getClass().getSimpleName())); + logger.log(Level.DEBUG, MessageFormat.format("Changing {0} in the Model only supported with SBML version > 3.", eventsource.getClass().getSimpleName())); } } else if (prop.equals(TreeNodeChangeEvent.type)) { ASTNode n = (ASTNode) eventsource; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2012-05-14 12:02:43
|
Revision: 1256 http://jsbml.svn.sourceforge.net/jsbml/?rev=1256&view=rev Author: enetz Date: 2012-05-14 12:02:32 +0000 (Mon, 14 May 2012) Log Message: ----------- Render Extension: Class hierarchy repaired. Modified Paths: -------------- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java Added Paths: ----------- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/package.html trunk/extensions/render/src/org/sbml/jsbml/xml/ trunk/extensions/render/src/org/sbml/jsbml/xml/parsers/ Removed Paths: ------------- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA @@ -37,64 +37,6 @@ * @since 1.0 * @date 08.05.2012 */ -public class ColorDefinition extends AbstractSBasePlugin { +public class ColorDefinition extends AbstractSBase { - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() - */ - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() - */ - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) - */ - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() - */ - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() - */ - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -0,0 +1,114 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2012 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ListOf; +import org.sbml.jsbml.Model; +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; +import org.sbml.jsbml.ext.layout.Layout; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 14.05.2012 + */ +public class ExtendedRenderModel extends AbstractSBasePlugin { + /** + * + */ + protected ListOf<LocalRenderInformation> listOfLocalRenderInformation; + protected ListOf<GlobalRenderInformation> listOfGlobalRenderInformation; + + /** + * + */ + private Model model; + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() + */ + + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() + */ + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) + */ + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() + */ + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() + */ + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ExtendedRenderModel.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2012 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import org.sbml.jsbml.PropertyUndefinedError; + + +/** + * @author ??? + * @version $Rev$ + * @since 1.0 + * @date 14.05.2012 + */ +public class GlobalStyle extends Style { + + } Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalStyle.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA @@ -37,64 +37,5 @@ * @since 1.0 * @date 08.05.2012 */ -public class GradientBase extends AbstractSBasePlugin { - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() - */ - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() - */ - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) - */ - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() - */ - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() - */ - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } +public class GradientBase extends AbstractSBase { } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA @@ -37,64 +37,5 @@ * @since 1.0 * @date 08.05.2012 */ -public class GradientStop extends AbstractSBasePlugin { - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() - */ - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() - */ - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) - */ - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() - */ - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() - */ - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } +public class GradientStop extends AbstractSBase { } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Deleted: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -1,100 +0,0 @@ -/* - * $Id$ - * $URL$ - * - * ---------------------------------------------------------------------------- - * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> - * for the latest version of JSBML and more information about SBML. - * - * Copyright (C) 2009-2011 jointly by the following organizations: - * 1. The University of Tuebingen, Germany - * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK - * 3. The California Institute of Technology, Pasadena, CA, USA - * - * 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. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as <http://sbml.org/Software/JSBML/License>. - * ---------------------------------------------------------------------------- - */ -package org.sbml.jsbml.ext.render; - -import java.util.Map; - -import javax.swing.tree.TreeNode; - -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - -/** - * @author Eugen Netz - * @author Alexander Diamantikos - * @author Jakob Matthes - * @author Jan Rudolph - * @version $Rev$ - * @since 1.0 - * @date 08.05.2012 - */ -public class ListOfElements extends AbstractSBasePlugin { - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() - */ - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() - */ - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) - */ - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() - */ - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() - */ - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } -} Deleted: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -1,77 +0,0 @@ -/* - * $Id$ - * $URL$ - * - * ---------------------------------------------------------------------------- - * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> - * for the latest version of JSBML and more information about SBML. - * - * Copyright (C) 2009-2011 jointly by the following organizations: - * 1. The University of Tuebingen, Germany - * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK - * 3. The California Institute of Technology, Pasadena, CA, USA - * - * 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. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as <http://sbml.org/Software/JSBML/License>. - * ---------------------------------------------------------------------------- - */ -package org.sbml.jsbml.ext.render; - -import java.util.Map; - -import javax.swing.tree.TreeNode; - -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - -/** - * @author Eugen Netz - * @author Alexander Diamantikos - * @author Jakob Matthes - * @author Jan Rudolph - * @version $Rev$ - * @since 1.0 - * @date 08.05.2012 - */ -public class ListOfGlobalRenderInformation extends AbstractSBasePlugin { - - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } - -} Deleted: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -1,79 +0,0 @@ -/* - * $Id$ - * $URL$ - * - * ---------------------------------------------------------------------------- - * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> - * for the latest version of JSBML and more information about SBML. - * - * Copyright (C) 2009-2011 jointly by the following organizations: - * 1. The University of Tuebingen, Germany - * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK - * 3. The California Institute of Technology, Pasadena, CA, USA - * - * 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. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as <http://sbml.org/Software/JSBML/License>. - * ---------------------------------------------------------------------------- - */ -package org.sbml.jsbml.ext.render; - -import java.util.Map; - -import javax.swing.tree.TreeNode; - -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - -/** - * @author Eugen Netz - * @author Alexander Diamantikos - * @author Jakob Matthes - * @author Jan Rudolph - * @version $Rev$ - * @since 1.0 - * @date 05.05.2012 - */ -public class ListOfLocalRenderInformation extends AbstractSBasePlugin { - - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } - - -} Deleted: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -1,79 +0,0 @@ -/* - * $Id$ - * $URL$ - * - * ---------------------------------------------------------------------------- - * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> - * for the latest version of JSBML and more information about SBML. - * - * Copyright (C) 2009-2011 jointly by the following organizations: - * 1. The University of Tuebingen, Germany - * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK - * 3. The California Institute of Technology, Pasadena, CA, USA - * - * 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. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as <http://sbml.org/Software/JSBML/License>. - * ---------------------------------------------------------------------------- - */ -package org.sbml.jsbml.ext.render; - -import java.util.Map; - -import javax.swing.tree.TreeNode; - -import org.sbml.jsbml.ext.AbstractSBasePlugin; -import org.sbml.jsbml.ext.SBasePlugin; - - -/** - * @author Eugen Netz - * @author Alexander Diamantikos - * @author Jakob Matthes - * @author Jan Rudolph - * @version $Rev$ - * @since 1.0 - * @date 08.05.2012 - */ -public class ListOfLocalStyles extends AbstractSBasePlugin { - - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } - - -} Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA @@ -24,6 +24,7 @@ import javax.swing.tree.TreeNode; +import org.sbml.jsbml.AbstractSBase; import org.sbml.jsbml.ext.AbstractSBasePlugin; import org.sbml.jsbml.ext.SBasePlugin; @@ -36,42 +37,5 @@ * @since 1.0 * @date 04.05.2012 */ -public class RenderInformationBase extends AbstractSBasePlugin { - - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } - +public class RenderInformationBase extends AbstractSBase { } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA @@ -37,64 +37,5 @@ * @since 1.0 * @date 08.05.2012 */ -public class RenderPoint extends AbstractSBasePlugin { - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() - */ - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() - */ - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) - */ - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() - */ - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() - */ - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } +public class RenderPoint extends AbstractSBase { } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA @@ -36,42 +36,5 @@ * @since 1.0 * @date 08.05.2012 */ -public class Style extends AbstractSBasePlugin { - - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } - +public class Style extends AbstractSBase { } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA @@ -37,64 +37,5 @@ * @since 1.0 * @date 08.05.2012 */ -public class Transformation extends AbstractSBasePlugin { - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() - */ - @Override - public SBasePlugin clone() { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() - */ - @Override - public boolean getAllowsChildren() { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) - */ - @Override - public TreeNode getChildAt(int childIndex) { - // TODO Auto-generated method stub - return null; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() - */ - @Override - public int getChildCount() { - // TODO Auto-generated method stub - return 0; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public boolean readAttribute(String attributeName, String prefix, String value) { - // TODO Auto-generated method stub - return false; - } - - - /* (non-Javadoc) - * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() - */ - @Override - public Map<String, String> writeXMLAttributes() { - // TODO Auto-generated method stub - return null; - } +public class Transformation extends AbstractSBase { } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java 2012-05-10 13:25:36 UTC (rev 1255) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java 2012-05-14 12:02:32 UTC (rev 1256) @@ -6,7 +6,7 @@ * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> * for the latest version of JSBML and more information about SBML. * - * Copyright (C) 2009-2011 jointly by the following organizations: + * Copyright (C) 2009-2012 jointly by the following organizations: * 1. The University of Tuebingen, Germany * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK * 3. The California Institute of Technology, Pasadena, CA, USA Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/package.html =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/package.html (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/package.html 2012-05-14 12:02:32 UTC (rev 1256) @@ -0,0 +1,6 @@ +<body> +<p> +Provides classes for the render package + +</p> +</body> \ No newline at end of file Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/package.html ___________________________________________________________________ Added: svn:keywords + Rev Id URL This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2012-05-10 13:25:43
|
Revision: 1255 http://jsbml.svn.sourceforge.net/jsbml/?rev=1255&view=rev Author: niko-rodrigue Date: 2012-05-10 13:25:36 +0000 (Thu, 10 May 2012) Log Message: ----------- merged revision 1253 and 1254 Revision Links: -------------- http://jsbml.svn.sourceforge.net/jsbml/?rev=1253&view=rev Modified Paths: -------------- branches/jsbml-0.8/src/org/sbml/jsbml/ASTNode.java branches/jsbml-0.8/src/org/sbml/jsbml/Model.java branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java Property Changed: ---------------- branches/jsbml-0.8/src/org/sbml/jsbml/Model.java Modified: branches/jsbml-0.8/src/org/sbml/jsbml/ASTNode.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/ASTNode.java 2012-05-10 12:37:34 UTC (rev 1254) +++ branches/jsbml-0.8/src/org/sbml/jsbml/ASTNode.java 2012-05-10 13:25:36 UTC (rev 1255) @@ -1508,6 +1508,7 @@ swap.name = name; swap.numerator = numerator; swap.variable = variable; + swap.unitId = unitId; swapChildren(swap); setType(operator); if (operator == Type.FUNCTION_ROOT) { Modified: branches/jsbml-0.8/src/org/sbml/jsbml/Model.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/Model.java 2012-05-10 12:37:34 UTC (rev 1254) +++ branches/jsbml-0.8/src/org/sbml/jsbml/Model.java 2012-05-10 13:25:36 UTC (rev 1255) @@ -3302,14 +3302,12 @@ * @param delete * @return <code>true</code> in case of success, otherwise <code>false</code>. */ - private boolean registerId(KineticLaw kl, LocalParameter lp, boolean delete) { - // Register local parameter within its kinetic law first. - if (kl.registerLocalParameter(lp, delete)) { - /* - * If this works, register the local parameter and its reaction also - * in the model. This is necessary because of the restriction that the - * ids local parameters may not override the ids of UnitDefinitions. - */ + private boolean registerId(KineticLaw kl, LocalParameter lp, boolean delete, boolean alreadyRegisteredInKL) { + if (!alreadyRegisteredInKL) { + // Register local parameter within its kinetic law first. + kl.registerLocalParameter(lp, delete); + } + if (lp.isSetId()) { Reaction r = kl.getParentSBMLObject(); String pId = lp.getId(); if ((r != null) && r.isSetId()) { @@ -3469,30 +3467,36 @@ */ boolean registerIds(SBase parent, SBase newElem, boolean recursively, boolean delete) { - if (newElem instanceof NamedSBase) { + boolean success = true; + + if (newElem instanceof NamedSBase) { NamedSBase newNsb = (NamedSBase) newElem; if (newNsb.isSetId()) { if (newNsb instanceof UniqueNamedSBase) { - return registerId((UniqueNamedSBase) newNsb, recursively, delete); + success &= registerId((UniqueNamedSBase) newNsb, recursively, delete); } else if ((newNsb instanceof LocalParameter) && (parent.getParent() != null)) { - return registerId((KineticLaw) parent.getParent(), - (LocalParameter) newNsb, delete); - } else { - // must be UnitDefinition..! - return registerId((UnitDefinition) newNsb, !delete); - } + success &= registerId((KineticLaw) parent.getParent(), + (LocalParameter) newNsb, delete, false); + } else if (newNsb instanceof UnitDefinition) { + success &= registerId((UnitDefinition) newNsb, !delete); + } else { + // in L3 packages we might have different id namespaces + logger.error("registerIds : the object " + newNsb.getClass().getCanonicalName() + " is neither " + + "a UniqueNamedSBase, a LocalParameter or a UnitDefinition so it's id will not be registered in the Model."); + } } else if (!newNsb.isIdMandatory()) { - return true; + // do nothing } } if (recursively) { - boolean success = true; for (int i=0; i<newElem.getChildCount() && success; i++) { TreeNode child = newElem.getChildAt(i); if (child instanceof SBase) { if ((parent instanceof KineticLaw) && (child instanceof LocalParameter)) { - success &= registerId((KineticLaw) parent, (LocalParameter) child, delete); + // The local parameter have already been registered in the KineticLaw in this case + success &= registerId((KineticLaw) parent, (LocalParameter) child, delete, true); + // TODO : we still need to register recursively the children of a LocalParameter } else { success &= registerIds(newElem, (SBase) child, recursively, delete); } @@ -3505,7 +3509,7 @@ * not NamedSBase when the recursive boolean is set to false (happen with listOf objects for example). * For these, the AbstractSBase.registerChild(SBase) method was throwing an exception although there was no problem. */ - return true; + return success; } /** Property changes on: branches/jsbml-0.8/src/org/sbml/jsbml/Model.java ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/core/src/org/sbml/jsbml/Model.java:1179,1187 /trunk/src/org/sbml/jsbml/Model.java:5-67,832-833,876-877,900,910,912-913,923,926-927,930,1028,1034,1043,1052-1053,1067-1071,1077-1079,1099-1102,1115,1126,1144 + /trunk/core/src/org/sbml/jsbml/Model.java:1179,1187,1254 /trunk/src/org/sbml/jsbml/Model.java:5-67,832-833,876-877,900,910,912-913,923,926-927,930,1028,1034,1043,1052-1053,1067-1071,1077-1079,1099-1102,1115,1126,1144 Modified: branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java 2012-05-10 12:37:34 UTC (rev 1254) +++ branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java 2012-05-10 13:25:36 UTC (rev 1255) @@ -55,6 +55,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#abs(org.sbml.jsbml.ASTNode) */ public ASTNodeValue abs(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -62,6 +63,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#and(java.util.List) */ public ASTNodeValue and(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -69,6 +73,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccos(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccos(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -76,6 +81,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccosh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccosh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -83,6 +89,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccot(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccot(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -90,6 +97,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccoth(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccoth(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -97,6 +105,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsc(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccsc(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -104,6 +113,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsch(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccsch(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -111,6 +121,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsec(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsec(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -118,6 +129,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsech(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsech(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -125,6 +137,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsin(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsin(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -132,6 +145,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsinh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsinh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -139,6 +153,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctan(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arctan(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -146,6 +161,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctanh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arctanh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -153,6 +169,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#ceiling(org.sbml.jsbml.ASTNode) */ public ASTNodeValue ceiling(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -220,6 +237,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cos(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cos(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -227,6 +245,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cosh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cosh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -234,6 +253,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cot(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cot(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -241,6 +261,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#coth(org.sbml.jsbml.ASTNode) */ public ASTNodeValue coth(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -248,6 +269,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#csc(org.sbml.jsbml.ASTNode) */ public ASTNodeValue csc(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -255,6 +277,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#csch(org.sbml.jsbml.ASTNode) */ public ASTNodeValue csch(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -266,6 +289,8 @@ // TODO : to check but I don't think that units are allowed in this case. // There are allowed only on the cn elements. + x.compile(this); + delay.compile(this); return dummyValue; } @@ -274,6 +299,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#eq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue eq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -281,6 +308,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#exp(org.sbml.jsbml.ASTNode) */ public ASTNodeValue exp(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -288,6 +316,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#factorial(org.sbml.jsbml.ASTNode) */ public ASTNodeValue factorial(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -295,6 +324,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#floor(org.sbml.jsbml.ASTNode) */ public ASTNodeValue floor(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -303,6 +333,8 @@ */ public ASTNodeValue frac(ASTNode numerator, ASTNode denominator) throws SBMLException { + numerator.compile(this); + denominator.compile(this); return dummyValue; } @@ -319,6 +351,9 @@ */ public ASTNodeValue function(FunctionDefinition functionDefinition, List<ASTNode> args) throws SBMLException { + for (ASTNode value : args) { + value.compile(this); + } return dummyValue; } @@ -327,6 +362,9 @@ */ public ASTNodeValue function(String functionDefinitionName, List<ASTNode> args) throws SBMLException { + for (ASTNode value : args) { + value.compile(this); + } return dummyValue; } @@ -334,6 +372,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#geq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue geq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -390,6 +430,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#gt(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue gt(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -397,6 +439,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#lambda(java.util.List) */ public ASTNodeValue lambda(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -404,6 +449,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#leq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue leq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -411,6 +458,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#ln(org.sbml.jsbml.ASTNode) */ public ASTNodeValue ln(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -418,6 +466,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode) */ public ASTNodeValue log(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -425,6 +474,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue log(ASTNode base, ASTNode value) throws SBMLException { + value.compile(this); + base.compile(this); return dummyValue; } @@ -432,6 +483,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#lt(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue lt(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -439,6 +492,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#minus(java.util.List) */ public ASTNodeValue minus(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -446,6 +502,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#neq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue neq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -453,6 +511,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#not(org.sbml.jsbml.ASTNode) */ public ASTNodeValue not(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -460,6 +519,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#or(java.util.List) */ public ASTNodeValue or(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -467,6 +529,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#piecewise(java.util.List) */ public ASTNodeValue piecewise(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -474,6 +539,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#plus(java.util.List) */ public ASTNodeValue plus(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -482,6 +550,8 @@ */ public ASTNodeValue pow(ASTNode base, ASTNode exponent) throws SBMLException { + base.compile(this); + exponent.compile(this); return dummyValue; } @@ -490,6 +560,8 @@ */ public ASTNodeValue root(ASTNode rootExponent, ASTNode radiant) throws SBMLException { + rootExponent.compile(this); + radiant.compile(this); return dummyValue; } @@ -498,6 +570,7 @@ */ public ASTNodeValue root(double rootExponent, ASTNode radiant) throws SBMLException { + radiant.compile(this); return dummyValue; } @@ -505,6 +578,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sec(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sec(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -512,6 +586,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sech(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sech(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -519,6 +594,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sin(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sin(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -526,6 +602,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sinh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sinh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -533,6 +610,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sqrt(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sqrt(ASTNode radiant) throws SBMLException { + radiant.compile(this); return dummyValue; } @@ -547,6 +625,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#tan(org.sbml.jsbml.ASTNode) */ public ASTNodeValue tan(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -554,6 +633,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#tanh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue tanh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -561,6 +641,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#times(java.util.List) */ public ASTNodeValue times(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -568,6 +651,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#uMinus(org.sbml.jsbml.ASTNode) */ public ASTNodeValue uMinus(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -582,6 +666,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#xor(java.util.List) */ public ASTNodeValue xor(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2012-05-10 12:37:44
|
Revision: 1254 http://jsbml.svn.sourceforge.net/jsbml/?rev=1254&view=rev Author: niko-rodrigue Date: 2012-05-10 12:37:34 +0000 (Thu, 10 May 2012) Log Message: ----------- fixed the methods to register ids in the model to be able to deal properly with NamedSBase that can have children Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/Model.java Modified: trunk/core/src/org/sbml/jsbml/Model.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Model.java 2012-05-10 12:29:37 UTC (rev 1253) +++ trunk/core/src/org/sbml/jsbml/Model.java 2012-05-10 12:37:34 UTC (rev 1254) @@ -3751,14 +3751,12 @@ * @param delete * @return <code>true</code> in case of success, otherwise <code>false</code>. */ - private boolean registerId(KineticLaw kl, LocalParameter lp, boolean delete) { - // Register local parameter within its kinetic law first. - if (kl.registerLocalParameter(lp, delete)) { - /* - * If this works, register the local parameter and its reaction also - * in the model. This is necessary because of the restriction that the - * ids local parameters may not override the ids of UnitDefinitions. - */ + private boolean registerId(KineticLaw kl, LocalParameter lp, boolean delete, boolean alreadyRegisteredInKL) { + if (!alreadyRegisteredInKL) { + // Register local parameter within its kinetic law first. + kl.registerLocalParameter(lp, delete); + } + if (lp.isSetId()) { Reaction r = kl.getParentSBMLObject(); String pId = lp.getId(); if ((r != null) && r.isSetId()) { @@ -3917,32 +3915,35 @@ * <code>false</code> otherwise. */ boolean registerIds(SBase parent, SBase newElem, boolean recursively, boolean delete) { - if (newElem instanceof NamedSBase) { + boolean success = true; + + if (newElem instanceof NamedSBase) { NamedSBase newNsb = (NamedSBase) newElem; if (newNsb.isSetId()) { if (newNsb instanceof UniqueNamedSBase) { - return registerId((UniqueNamedSBase) newNsb, recursively, delete); + success &= registerId((UniqueNamedSBase) newNsb, recursively, delete); } else if ((newNsb instanceof LocalParameter) && (parent.getParent() != null)) { - return registerId((KineticLaw) parent.getParent(), - (LocalParameter) newNsb, delete); + success &= registerId((KineticLaw) parent.getParent(), + (LocalParameter) newNsb, delete, false); } else if (newNsb instanceof UnitDefinition) { - return registerId((UnitDefinition) newNsb, !delete); + success &= registerId((UnitDefinition) newNsb, !delete); } else { // in L3 packages we might have different id namespaces logger.error("registerIds : the object " + newNsb.getClass().getCanonicalName() + " is neither " + "a UniqueNamedSBase, a LocalParameter or a UnitDefinition so it's id will not be registered in the Model."); } } else if (!newNsb.isIdMandatory()) { - return true; + // do nothing } } if (recursively) { - boolean success = true; for (int i = 0; (i < newElem.getChildCount()) && success; i++) { TreeNode child = newElem.getChildAt(i); if (child instanceof SBase) { if ((parent instanceof KineticLaw) && (child instanceof LocalParameter)) { - success &= registerId((KineticLaw) parent, (LocalParameter) child, delete); + // The local parameter have already been registered in the KineticLaw in this case + success &= registerId((KineticLaw) parent, (LocalParameter) child, delete, true); + // TODO : we still need to register recursively the children of a LocalParameter } else { success &= registerIds(newElem, (SBase) child, recursively, delete); } @@ -3955,7 +3956,7 @@ * not NamedSBase when the recursive boolean is set to false (happen with listOf objects for example). * For these, the AbstractSBase.registerChild(SBase) method was throwing an exception although there was no problem. */ - return true; + return success; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2012-05-10 12:29:44
|
Revision: 1253 http://jsbml.svn.sourceforge.net/jsbml/?rev=1253&view=rev Author: niko-rodrigue Date: 2012-05-10 12:29:37 +0000 (Thu, 10 May 2012) Log Message: ----------- fixed the FindUnitsCompiler to be able to go through the whole ASTNode tree + fixed ASTNode.arithmethicOperation(Type, ASTNode) Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/ASTNode.java trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java Modified: trunk/core/src/org/sbml/jsbml/ASTNode.java =================================================================== --- trunk/core/src/org/sbml/jsbml/ASTNode.java 2012-05-08 12:03:50 UTC (rev 1252) +++ trunk/core/src/org/sbml/jsbml/ASTNode.java 2012-05-10 12:29:37 UTC (rev 1253) @@ -1508,6 +1508,7 @@ swap.name = name; swap.numerator = numerator; swap.variable = variable; + swap.unitId = unitId; swapChildren(swap); setType(operator); if (operator == Type.FUNCTION_ROOT) { Modified: trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java 2012-05-08 12:03:50 UTC (rev 1252) +++ trunk/core/src/org/sbml/jsbml/util/compilers/FindUnitsCompiler.java 2012-05-10 12:29:37 UTC (rev 1253) @@ -55,6 +55,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#abs(org.sbml.jsbml.ASTNode) */ public ASTNodeValue abs(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -62,6 +63,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#and(java.util.List) */ public ASTNodeValue and(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -69,6 +73,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccos(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccos(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -76,6 +81,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccosh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccosh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -83,6 +89,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccot(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccot(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -90,6 +97,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccoth(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccoth(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -97,6 +105,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsc(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccsc(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -104,6 +113,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arccsch(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arccsch(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -111,6 +121,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsec(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsec(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -118,6 +129,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsech(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsech(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -125,6 +137,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsin(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsin(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -132,6 +145,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arcsinh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arcsinh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -139,6 +153,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctan(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arctan(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -146,6 +161,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#arctanh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue arctanh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -153,6 +169,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#ceiling(org.sbml.jsbml.ASTNode) */ public ASTNodeValue ceiling(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -220,6 +237,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cos(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cos(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -227,6 +245,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cosh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cosh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -234,6 +253,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#cot(org.sbml.jsbml.ASTNode) */ public ASTNodeValue cot(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -241,6 +261,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#coth(org.sbml.jsbml.ASTNode) */ public ASTNodeValue coth(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -248,6 +269,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#csc(org.sbml.jsbml.ASTNode) */ public ASTNodeValue csc(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -255,6 +277,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#csch(org.sbml.jsbml.ASTNode) */ public ASTNodeValue csch(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -266,6 +289,8 @@ // TODO : to check but I don't think that units are allowed in this case. // There are allowed only on the cn elements. + x.compile(this); + delay.compile(this); return dummyValue; } @@ -274,6 +299,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#eq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue eq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -281,6 +308,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#exp(org.sbml.jsbml.ASTNode) */ public ASTNodeValue exp(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -288,6 +316,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#factorial(org.sbml.jsbml.ASTNode) */ public ASTNodeValue factorial(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -295,6 +324,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#floor(org.sbml.jsbml.ASTNode) */ public ASTNodeValue floor(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -303,6 +333,8 @@ */ public ASTNodeValue frac(ASTNode numerator, ASTNode denominator) throws SBMLException { + numerator.compile(this); + denominator.compile(this); return dummyValue; } @@ -319,6 +351,9 @@ */ public ASTNodeValue function(FunctionDefinition functionDefinition, List<ASTNode> args) throws SBMLException { + for (ASTNode value : args) { + value.compile(this); + } return dummyValue; } @@ -327,6 +362,9 @@ */ public ASTNodeValue function(String functionDefinitionName, List<ASTNode> args) throws SBMLException { + for (ASTNode value : args) { + value.compile(this); + } return dummyValue; } @@ -334,6 +372,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#geq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue geq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -390,6 +430,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#gt(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue gt(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -397,6 +439,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#lambda(java.util.List) */ public ASTNodeValue lambda(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -404,6 +449,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#leq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue leq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -411,6 +458,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#ln(org.sbml.jsbml.ASTNode) */ public ASTNodeValue ln(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -418,6 +466,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode) */ public ASTNodeValue log(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -425,6 +474,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#log(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue log(ASTNode base, ASTNode value) throws SBMLException { + value.compile(this); + base.compile(this); return dummyValue; } @@ -432,6 +483,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#lt(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue lt(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -439,6 +492,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#minus(java.util.List) */ public ASTNodeValue minus(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -446,6 +502,8 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#neq(org.sbml.jsbml.ASTNode, org.sbml.jsbml.ASTNode) */ public ASTNodeValue neq(ASTNode left, ASTNode right) throws SBMLException { + left.compile(this); + right.compile(this); return dummyValue; } @@ -453,6 +511,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#not(org.sbml.jsbml.ASTNode) */ public ASTNodeValue not(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -460,6 +519,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#or(java.util.List) */ public ASTNodeValue or(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -467,6 +529,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#piecewise(java.util.List) */ public ASTNodeValue piecewise(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -474,6 +539,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#plus(java.util.List) */ public ASTNodeValue plus(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -482,6 +550,8 @@ */ public ASTNodeValue pow(ASTNode base, ASTNode exponent) throws SBMLException { + base.compile(this); + exponent.compile(this); return dummyValue; } @@ -490,6 +560,8 @@ */ public ASTNodeValue root(ASTNode rootExponent, ASTNode radiant) throws SBMLException { + rootExponent.compile(this); + radiant.compile(this); return dummyValue; } @@ -498,6 +570,7 @@ */ public ASTNodeValue root(double rootExponent, ASTNode radiant) throws SBMLException { + radiant.compile(this); return dummyValue; } @@ -505,6 +578,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sec(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sec(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -512,6 +586,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sech(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sech(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -519,6 +594,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sin(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sin(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -526,6 +602,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sinh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sinh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -533,6 +610,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#sqrt(org.sbml.jsbml.ASTNode) */ public ASTNodeValue sqrt(ASTNode radiant) throws SBMLException { + radiant.compile(this); return dummyValue; } @@ -547,6 +625,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#tan(org.sbml.jsbml.ASTNode) */ public ASTNodeValue tan(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -554,6 +633,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#tanh(org.sbml.jsbml.ASTNode) */ public ASTNodeValue tanh(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -561,6 +641,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#times(java.util.List) */ public ASTNodeValue times(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } @@ -568,6 +651,7 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#uMinus(org.sbml.jsbml.ASTNode) */ public ASTNodeValue uMinus(ASTNode value) throws SBMLException { + value.compile(this); return dummyValue; } @@ -582,6 +666,9 @@ * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#xor(java.util.List) */ public ASTNodeValue xor(List<ASTNode> values) throws SBMLException { + for (ASTNode value : values) { + value.compile(this); + } return dummyValue; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2012-05-08 12:03:58
|
Revision: 1252 http://jsbml.svn.sourceforge.net/jsbml/?rev=1252&view=rev Author: enetz Date: 2012-05-08 12:03:50 +0000 (Tue, 08 May 2012) Log Message: ----------- Render Extension: Empty classes for render extension created. Added Paths: ----------- trunk/extensions/render/ trunk/extensions/render/src/ trunk/extensions/render/src/org/ trunk/extensions/render/src/org/sbml/ trunk/extensions/render/src/org/sbml/jsbml/ trunk/extensions/render/src/org/sbml/jsbml/ext/ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Text.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/Transformation2D.java Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,100 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class ColorDefinition extends AbstractSBasePlugin { + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() + */ + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() + */ + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) + */ + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() + */ + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() + */ + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ColorDefinition.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class Curve extends GraphicalPrimitive1D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Curve.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class Ellipse extends GraphicalPrimitive2D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Ellipse.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class GlobalRenderInformation extends RenderInformationBase { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,100 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class GradientBase extends AbstractSBasePlugin { + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() + */ + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() + */ + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) + */ + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() + */ + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() + */ + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,100 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class GradientStop extends AbstractSBasePlugin { + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() + */ + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() + */ + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) + */ + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() + */ + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() + */ + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class GraphicalPrimitive1D extends Transformation2D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive1D.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class GraphicalPrimitive2D extends GraphicalPrimitive1D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GraphicalPrimitive2D.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class Group extends GraphicalPrimitive2D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Group.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class Image extends Transformation2D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class LineEnding extends GraphicalPrimitive2D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class LinearGradient extends GradientBase { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,100 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class ListOfElements extends AbstractSBasePlugin { + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() + */ + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() + */ + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) + */ + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() + */ + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() + */ + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfElements.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,77 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class ListOfGlobalRenderInformation extends AbstractSBasePlugin { + + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } + +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfGlobalRenderInformation.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,79 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 05.05.2012 + */ +public class ListOfLocalRenderInformation extends AbstractSBasePlugin { + + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } + + +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalRenderInformation.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,79 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class ListOfLocalStyles extends AbstractSBasePlugin { + + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } + + +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/ListOfLocalStyles.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class LocalRenderInformation extends RenderInformationBase { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class LocalStyle extends Style { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalStyle.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class Polygon extends GraphicalPrimitive2D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class RadialGradient extends GradientBase { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RadialGradient.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class Rectangle extends GraphicalPrimitive2D { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,34 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class RenderCubicBezier extends RenderPoint { +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,77 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 04.05.2012 + */ +public class RenderInformationBase extends AbstractSBasePlugin { + + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } + +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,100 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class RenderPoint extends AbstractSBasePlugin { + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.AbstractSBasePlugin#clone() + */ + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getAllowsChildren() + */ + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildAt(int) + */ + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#getChildCount() + */ + @Override + public int getChildCount() { + // TODO Auto-generated method stub + return 0; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#readAttribute(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean readAttribute(String attributeName, String prefix, String value) { + // TODO Auto-generated method stub + return false; + } + + + /* (non-Javadoc) + * @see org.sbml.jsbml.ext.SBasePlugin#writeXMLAttributes() + */ + @Override + public Map<String, String> writeXMLAttributes() { + // TODO Auto-generated method stub + return null; + } +} Property changes on: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java ___________________________________________________________________ Added: svn:keywords + Rev Id URL Added: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java (rev 0) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2012-05-08 12:03:50 UTC (rev 1252) @@ -0,0 +1,77 @@ +/* + * $Id$ + * $URL$ + * + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * + * Copyright (C) 2009-2011 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * + * 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. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +package org.sbml.jsbml.ext.render; + +import java.util.Map; + +import javax.swing.tree.TreeNode; + +import org.sbml.jsbml.ext.AbstractSBasePlugin; +import org.sbml.jsbml.ext.SBasePlugin; + +/** + * @author Eugen Netz + * @author Alexander Diamantikos + * @author Jakob Matthes + * @author Jan Rudolph + * @version $Rev$ + * @since 1.0 + * @date 08.05.2012 + */ +public class Style extends AbstractSBasePlugin { + + @Override + public SBasePlugin clone() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getAllowsChildren() { + // TODO Auto-generated method stub + return false; + } + + @Override + public TreeNode getChildAt(int childIndex) { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getChildCount() { + // TODO Auto-generated method stub... [truncated message content] |
From: <and...@us...> - 2012-05-08 09:29:31
|
Revision: 1251 http://jsbml.svn.sourceforge.net/jsbml/?rev=1251&view=rev Author: andreas-draeger Date: 2012-05-08 09:29:22 +0000 (Tue, 08 May 2012) Log Message: ----------- Added a new method needed for a better SBGN support. Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/SBO.java Modified: trunk/core/src/org/sbml/jsbml/SBO.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SBO.java 2012-05-08 08:08:32 UTC (rev 1250) +++ trunk/core/src/org/sbml/jsbml/SBO.java 2012-05-08 09:29:22 UTC (rev 1251) @@ -779,11 +779,13 @@ public static int getDrug() { return convertAlias2SBO("DRUG"); } - - /** - * - * @return - */ + + /** + * Empty set is used to represent the source of a creation process or the + * result of a degradation process. + * + * @return + */ public static int getEmptySet() { return convertAlias2SBO("DEGRADED"); } @@ -837,7 +839,14 @@ } /** + * A gene is an informational molecule segment. * + * The Nucleic acid feature construct in SBGN is meant to represent a fragment + * of a macro- molecule carrying genetic information. A common use for this + * construct is to represent a gene or transcript. The label of this EPN and + * its units of information are often important for making the purpose clear + * to the reader of a map. + * * @return */ public static int getGene() { @@ -973,6 +982,14 @@ } /** + * + * @return + */ + public static int getNonCovalentComplex() { + return 253; + } + + /** * * @return */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2012-05-08 08:08:44
|
Revision: 1250 http://jsbml.svn.sourceforge.net/jsbml/?rev=1250&view=rev Author: andreas-draeger Date: 2012-05-08 08:08:32 +0000 (Tue, 08 May 2012) Log Message: ----------- Corrected problems of un-registering elements from SBMLDocument and Model (via id or metaid). Previously, it was possible that cloned elements or elements that were removed from the model at ealier states, could interfere with the register/unregister procedure causing that links to elements were deleted mistakenly. Example: The element sbase was registered using its id in the model and using its metaid in the SBMLDocument. In Model: id -> sbase In SBMLDocument: metaid -> sbase Now, a clone sbase' is created, sbase is removed from the model and the clone is registered. Note that now sbase' is part of the model and the pointers from the id will point to sbase'. However, sbase still has a pointer to its previous parent (which is important). If we now remove any sub-element from sbase, pointers in Model and SBMLDocument from the ids/metaids to the sub-elements of sbase' will be deleted! Hence, a check was mounted to ensure that only correct elements will be unregistered. The other changes are minor code/comment changes. Modified Paths: -------------- branches/jsbml-0.8/NEWS.txt branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo branches/jsbml-0.8/src/org/sbml/jsbml/AbstractSBase.java branches/jsbml-0.8/src/org/sbml/jsbml/AbstractTreeNode.java branches/jsbml-0.8/src/org/sbml/jsbml/ListOf.java branches/jsbml-0.8/src/org/sbml/jsbml/Model.java branches/jsbml-0.8/src/org/sbml/jsbml/SBMLDocument.java branches/jsbml-0.8/src/org/sbml/jsbml/UnitDefinition.java branches/jsbml-0.8/src/org/sbml/jsbml/util/TreeNodeAdapter.java branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/LaTeXCompiler.java branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/UnitsCompiler.java Modified: branches/jsbml-0.8/NEWS.txt =================================================================== --- branches/jsbml-0.8/NEWS.txt 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/NEWS.txt 2012-05-08 08:08:32 UTC (rev 1250) @@ -11,6 +11,11 @@ be done if the logarithm to the base 10 of the multiplier is nearly an integer number. Nearly means that the distance to the next integer is not larger than the ensured double precision. + + - It was sometimes possible to unregister elements from a model that were + the result of cloning, removal of the original entry and linking the clone + to the model. When altering the previous element, pointers were deleted + in SBMLDocument and Model. ====================================================================== Version 0.8-rc2 (xx-xx-2012) Modified: branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo =================================================================== --- branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo 2012-05-08 08:08:32 UTC (rev 1250) @@ -1,5 +1,5 @@ format-version: 1.2 -date: 04:04:2012 07:00 +date: 08:05:2012 07:00 data-version: 30:03:2012 11:02 saved-by: SBO community auto-generated-by: SBO Browser (http://www.ebi.ac.uk/sbo/) Modified: branches/jsbml-0.8/src/org/sbml/jsbml/AbstractSBase.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/AbstractSBase.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/AbstractSBase.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -1307,14 +1307,29 @@ throw new PropertyNotAvailableException(TreeNodeChangeEvent.metaId, this); } SBMLDocument doc = getSBMLDocument(); - if ((doc != null) && doc.containsMetaId(metaId)) { - throw new IdentifierException(this, metaId); - } String oldMetaId = this.metaId; - this.metaId = metaId; if (doc != null) { - doc.registerMetaId(this, true); + // We have to first remove the pointer from the old metaId to this SBase + if (oldMetaId != null) { + doc.registerMetaId(this, false); + } + // Now we can register the new metaId if necessary. + if (metaId != null) { + this.metaId = metaId; + if (!doc.registerMetaId(this, true)) { + // register failed. Revert the change and throw an exception: + this.metaId = oldMetaId; + throw new IdentifierException(this, metaId); + } + } + } else { + // If the document is null, we don't have to register anything. Simply change: + this.metaId = metaId; } + if (isSetAnnotation()) { + // Propagate the change also to the annotation: + getAnnotation().setAbout('#' + metaId); + } firePropertyChange(TreeNodeChangeEvent.metaId, oldMetaId, metaId); } Modified: branches/jsbml-0.8/src/org/sbml/jsbml/AbstractTreeNode.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/AbstractTreeNode.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/AbstractTreeNode.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -145,8 +145,8 @@ Enumeration<TreeNode> children = children(); while (children.hasMoreElements()) { TreeNode node = children.nextElement(); - if (node instanceof AbstractTreeNode) { - success &= ((AbstractTreeNode) node) + if (node instanceof TreeNodeWithChangeSupport) { + success &= ((TreeNodeWithChangeSupport) node) .addAllChangeListeners(listeners); } } @@ -165,8 +165,8 @@ Enumeration<TreeNode> children = children(); while (children.hasMoreElements()) { TreeNode node = children.nextElement(); - if (node instanceof AbstractTreeNode) { - ((AbstractTreeNode) node).addTreeNodeChangeListener(listener); + if (node instanceof TreeNodeWithChangeSupport) { + ((TreeNodeWithChangeSupport) node).addTreeNodeChangeListener(listener); } } } @@ -294,12 +294,12 @@ changeType = 2; // real property change } if (-1 < changeType) { - boolean newValTreeNode = newValue instanceof AbstractTreeNode; - boolean oldValTreeNode = oldValue instanceof AbstractTreeNode; + boolean newValTreeNode = newValue instanceof TreeNodeWithChangeSupport; + boolean oldValTreeNode = oldValue instanceof TreeNodeWithChangeSupport; if ((changeType == 0) && newValTreeNode) { - ((AbstractTreeNode) newValue).fireNodeAddedEvent(); + ((TreeNodeWithChangeSupport) newValue).fireNodeAddedEvent(); } else if ((changeType == 1) && oldValTreeNode) { - ((AbstractTreeNode) oldValue).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) oldValue).fireNodeRemovedEvent(); } else { // TODO: check if notifying and updating the metaId is necessary // because of the method AbstractSBase.setThisAsParentSBMLObject @@ -454,8 +454,8 @@ Enumeration<TreeNode> children = children(); while (children.hasMoreElements()) { TreeNode node = children.nextElement(); - if (node instanceof AbstractTreeNode) { - ((AbstractTreeNode) node).removeTreeNodeChangeListener(l); + if (node instanceof TreeNodeWithChangeSupport) { + ((TreeNodeWithChangeSupport) node).removeTreeNodeChangeListener(l); } } } Modified: branches/jsbml-0.8/src/org/sbml/jsbml/ListOf.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/ListOf.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/ListOf.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -439,7 +439,7 @@ ArrayList<T> removedElements = listOf; listOf.clear(); for( T element : removedElements){ - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); } } @@ -718,7 +718,7 @@ */ public T remove(int index) { T t = listOf.remove(index); - ((AbstractTreeNode) t).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) t).fireNodeRemovedEvent(); return t; } @@ -763,7 +763,7 @@ } SBase sbase = (SBase) o; if (listOf.remove(sbase)) { - ((AbstractTreeNode) o).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) o).fireNodeRemovedEvent(); return true; } return false; @@ -791,7 +791,7 @@ } if (pos >= 0) { T element = listOf.remove(pos); - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); return (T) sbase; } } @@ -806,7 +806,7 @@ boolean success = listOf.removeAll(c); if(success){ for(Iterator<?> i = c.iterator(); i.hasNext();){ - AbstractTreeNode element = (AbstractTreeNode) i.next(); + TreeNodeWithChangeSupport element = (TreeNodeWithChangeSupport) i.next(); element.fireNodeRemovedEvent(); } } @@ -847,7 +847,7 @@ for(T element : listOf){ if (!c.contains(element)) { listOf.remove(element); - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); modified = true; } } @@ -863,7 +863,7 @@ // TODO: this should rather be a firePropertyChangedEvent, as the // element is first removed and then added again. But the method // setThisAsParentSBMLObject fires a NodeAddedEvent - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); setThisAsParentSBMLObject(element); return prevElem; } Modified: branches/jsbml-0.8/src/org/sbml/jsbml/Model.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/Model.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/Model.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -3314,15 +3314,23 @@ String pId = lp.getId(); if ((r != null) && r.isSetId()) { if (delete) { - if (mapOfLocalParameters != null) { - SortedSet<String> reactionSet = mapOfLocalParameters.get(pId); - if (reactionSet != null) { - reactionSet.remove(r.getId()); - if (reactionSet.isEmpty()) { - mapOfLocalParameters.remove(pId); - } - } - } + // Check if this method was called by some cloned object. + // In this case we must not delete the references to the objects + // within this model. + Reaction rTest = getReaction(r.getId()); + if ((rTest == null) || (rTest != r) || !rTest.isSetKineticLaw() + || (rTest.getKineticLaw().getLocalParameter(lp.getId()) == null)) { + return false; + } + if (mapOfLocalParameters != null) { + SortedSet<String> reactionSet = mapOfLocalParameters.get(pId); + if (reactionSet != null) { + reactionSet.remove(r.getId()); + if (reactionSet.isEmpty()) { + mapOfLocalParameters.remove(pId); + } + } + } return true; } else { // add new key or reaction for this local parameter. @@ -3350,6 +3358,8 @@ * If <code>true</code> the identifier of the given {@link NamedSBase} * will be registered in this {@link Model} Otherwise, the given * identifier will be removed from this {@link Model}'s hash. + * @return <code>true</code> if this operation was successfully performed, + * <code>false</code> otherwise. */ boolean registerId(NamedSBase nsb, boolean add) { return registerIds(nsb.getParentSBMLObject(), nsb, true, !add); @@ -3365,6 +3375,10 @@ private boolean registerId(UniqueNamedSBase unsb, boolean recursively, boolean delete) { String id = unsb.getId(); if (delete && (mapOfUniqueNamedSBases != null)) { + // Check if this method was called from some cloned element that is not part of this model: + if (mapOfUniqueNamedSBases.get(id) != unsb) { + return false; + } mapOfUniqueNamedSBases.remove(id); if (logger.isDebugEnabled()) { logger.debug(String.format("removed id=%s from model%s", @@ -3435,6 +3449,11 @@ if (add) { return mapOfUnitDefinitions.put(ud.getId(), ud) == null; } + // Check if the element to be removed is part of this model or maybe a clone: + UnitDefinition unitDef = mapOfUnitDefinitions.get(ud); + if ((unitDef != null) && (unitDef != ud)) { + return false; + } return mapOfUnitDefinitions.remove(ud.getId()) != null; } Modified: branches/jsbml-0.8/src/org/sbml/jsbml/SBMLDocument.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/SBMLDocument.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/SBMLDocument.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -786,12 +786,20 @@ */ boolean registerMetaId(SBase sbase, boolean add) { if (sbase.isSetMetaId()) { - if (add) { - return mappingFromMetaId2SBase.put(sbase.getMetaId(), sbase) == null; - } else { - return mappingFromMetaId2SBase.remove(sbase.getMetaId()) != null; - } - } return false; + if (add) { + return mappingFromMetaId2SBase.put(sbase.getMetaId(), sbase) == null; + } else { + SBase old = mappingFromMetaId2SBase.get(sbase.getMetaId()); + if ((old != null) && (old != sbase)) { + /* This check is needed because the given SBase might originate from a + * different Document or could be a clone of some other SBase registered + * here. + */ + return mappingFromMetaId2SBase.remove(sbase.getMetaId()) != null; + } + } + } + return false; } Modified: branches/jsbml-0.8/src/org/sbml/jsbml/UnitDefinition.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/UnitDefinition.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/UnitDefinition.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -622,6 +622,7 @@ + unit.getExponent()); } else { + unit.unsetMetaId(); addUnit(unit.clone()); } } @@ -1000,7 +1001,9 @@ } } else { - addUnit(unit.clone()); + Unit u = unit.clone(); + u.unsetMetaId(); + addUnit(u); } } } @@ -1164,6 +1167,14 @@ return this; } + /* (non-Javadoc) + * @see org.sbml.jsbml.AbstractNamedSBase#toString() + */ + @Override + public String toString() { + return isSetListOfUnits() ? printUnits(this, true) : super.toString(); + } + /** * Removes the {@link #listOfUnits} from this {@link UnitDefinition} and * notifies all registered instances of {@link TreeNodeChangeListener}. Modified: branches/jsbml-0.8/src/org/sbml/jsbml/util/TreeNodeAdapter.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/util/TreeNodeAdapter.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/util/TreeNodeAdapter.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -87,8 +87,8 @@ super(); this.userObject = userObject; this.parent = parent; - if (parent instanceof AbstractTreeNode) { - this.addAllChangeListeners(((AbstractTreeNode) parent) + if (parent instanceof TreeNodeWithChangeSupport) { + this.addAllChangeListeners(((TreeNodeWithChangeSupport) parent) .getListOfTreeNodeChangeListeners()); } } Modified: branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/LaTeXCompiler.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/LaTeXCompiler.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/LaTeXCompiler.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -1419,13 +1419,16 @@ throws SBMLException { StringBuilder value = new StringBuilder(); value.append(base.compile(this)); - if (!(base.getChildCount() < 2)) { - value = brackets(value); + String exp = exponent.compile(this).toString(); + if (!exp.equals("1")) { + if (!(base.getChildCount() < 2)) { + value = brackets(value); + } + value.append('^'); + value.append('{'); + value.append(exp); + value.append('}'); } - value.append('^'); - value.append('{'); - value.append(exponent.compile(this)); - value.append('}'); return new ASTNodeValue(value.toString(), this); } Modified: branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/UnitsCompiler.java =================================================================== --- branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/UnitsCompiler.java 2012-05-08 08:07:37 UTC (rev 1249) +++ branches/jsbml-0.8/src/org/sbml/jsbml/util/compilers/UnitsCompiler.java 2012-05-08 08:08:32 UTC (rev 1250) @@ -1234,10 +1234,9 @@ UnitDefinition ud = radiant.getUnits().clone(); for (Unit u : ud.getListOfUnits()) { if ((((u.getExponent() / rootExponent) % 1d) != 0d) && !u.isDimensionless() && !u.isInvalid()) { - throw new IllegalArgumentException( new UnitException(String.format( "Cannot perform power or root operation due to incompatibility with a unit exponent. Given are %s and %s.", - StringTools.toString(u.getExponent()), StringTools.toString(rootExponent)))); + StringTools.toString(u.getExponent()), StringTools.toString(rootExponent))); } if (!(u.isDimensionless() || u.isInvalid())) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2012-05-08 08:07:51
|
Revision: 1249 http://jsbml.svn.sourceforge.net/jsbml/?rev=1249&view=rev Author: andreas-draeger Date: 2012-05-08 08:07:37 +0000 (Tue, 08 May 2012) Log Message: ----------- Bug fixes: ========== Corrected problems of un-registering elements from SBMLDocument and Model (via id or metaid). Previously, it was possible that cloned elements or elements that were removed from the model at ealier states, could interfere with the register/unregister procedure causing that links to elements were deleted mistakenly. Example: The element sbase was registered using its id in the model and using its metaid in the SBMLDocument. In Model: id -> sbase In SBMLDocument: metaid -> sbase Now, a clone sbase' is created, sbase is removed from the model and the clone is registered. Note that now sbase' is part of the model and the pointers from the id will point to sbase'. However, sbase still has a pointer to its previous parent (which is important). If we now remove any sub-element from sbase, pointers in Model and SBMLDocument from the ids/metaids to the sub-elements of sbase' will be deleted! Hence, a check was mounted to ensure that only correct elements will be unregistered. The other changes are minor code/comment changes. New features: ============= The handling of user objects has been shifted to the interface TreeNodeWithChangeSupport and new methods were added for convenience. Modified Paths: -------------- trunk/core/NEWS.txt trunk/core/build.xml trunk/core/doc/publications/Bioinformatics2011ApplicationNote/document.pdf trunk/core/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java trunk/core/src/org/sbml/jsbml/AbstractSBase.java trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java trunk/core/src/org/sbml/jsbml/IdentifierException.java trunk/core/src/org/sbml/jsbml/KineticLaw.java trunk/core/src/org/sbml/jsbml/ListOf.java trunk/core/src/org/sbml/jsbml/Model.java trunk/core/src/org/sbml/jsbml/SBMLDocument.java trunk/core/src/org/sbml/jsbml/SBO.java trunk/core/src/org/sbml/jsbml/SBase.java trunk/core/src/org/sbml/jsbml/UnitDefinition.java trunk/core/src/org/sbml/jsbml/util/TreeNodeAdapter.java trunk/core/src/org/sbml/jsbml/util/TreeNodeWithChangeSupport.java trunk/core/src/org/sbml/jsbml/util/compilers/ASTNodeValue.java trunk/core/src/org/sbml/jsbml/util/compilers/LaTeXCompiler.java trunk/core/src/org/sbml/jsbml/util/compilers/UnitsCompiler.java trunk/core/src/org/sbml/jsbml/xml/stax/SBMLWriter.java trunk/extensions/layout/doc/img/type_hierarchy.dot Modified: trunk/core/NEWS.txt =================================================================== --- trunk/core/NEWS.txt 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/NEWS.txt 2012-05-08 08:07:37 UTC (rev 1249) @@ -43,9 +43,9 @@ of Units and UnitDefinitions works correctly. - The userObject in ASTNode has been replaced by a more general map - of userObjects that is located in AbstractTreeNode. In this way, any - JSBML object that is part of the SBML tree can now be attached with - user-defined additional objects for in-memory manipulation. These + of userObjects that is located in TreeNodeWithChangeSupport. In this + way, any JSBML object that is part of the SBML tree can now be attached + with user-defined additional objects for in-memory manipulation. These will not be written to SBML later on. - The new class NamedSBaeGlyph in the layout package supports accessing @@ -57,6 +57,11 @@ * Bug Fixes: + - It was sometimes possible to unregister elements from a model that were + the result of cloning, removal of the original entry and linking the clone + to the model. When altering the previous element, pointers were deleted + in SBMLDocument and Model. + - There is now a rounding correction for multipliers when merging units that tries to shift multipliers to the scale of a unit. This can only be done if the logarithm to the base 10 of the multiplier is nearly Modified: trunk/core/build.xml =================================================================== --- trunk/core/build.xml 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/build.xml 2012-05-08 08:07:37 UTC (rev 1249) @@ -215,8 +215,8 @@ </target> <!-- =================================================================== --> - <!-- Creates the class package and include all the dependencies jars --> - <!-- into a big jsbml jar file. --> + <!-- Creates the class package and include all the dependencies jars --> + <!-- into a big jsbml jar file. --> <!-- =================================================================== --> <target name="bigjar" depends="compile"> @@ -334,7 +334,6 @@ <get src="http://www.ebi.ac.uk/sbo/exports/Main/SBO_OBO.obo" dest="${basedir}/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo" verbose="on"/> - </target> <!-- =================================================================== --> @@ -423,7 +422,6 @@ </fileset> </copy> - <copy todir="${dist.dir}"> <fileset dir="${basedir}/" includes="LICENSE.txt NEWS.txt README AUTHORS.txt build.xml"> </fileset> @@ -448,7 +446,6 @@ <!-- Not generating a tar.gz a having only a zip file should be enough --> <!-- <tar basedir="${dist.root}" destfile="${dist.root}/${name}-${version}.tar.gz" includes="${name}-${version}/**" compression="gzip"/> --> - </target> @@ -457,7 +454,6 @@ <!-- =================================================================== --> <target name="module" depends="init"> - <ant dir="${cellDesigner.module.base.dir}" inheritAll="false" inheritRefs="false"> <target name="clean"/> <target name="jar"/> @@ -518,6 +514,7 @@ <delete dir="${dist.root}" includeEmptyDirs="true" quiet="yes"> </delete> </target> + </project> <!-- End of file --> Modified: trunk/core/doc/publications/Bioinformatics2011ApplicationNote/document.pdf =================================================================== (Binary files differ) Modified: trunk/core/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo =================================================================== --- trunk/core/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/resources/org/sbml/jsbml/resources/cfg/SBO_OBO.obo 2012-05-08 08:07:37 UTC (rev 1249) @@ -1,6 +1,6 @@ format-version: 1.2 -date: 27:02:2012 07:00 -data-version: 09:02:2012 16:47 +date: 05:05:2012 07:00 +data-version: 30:03:2012 11:02 saved-by: SBO community auto-generated-by: SBO Browser (http://www.ebi.ac.uk/sbo/) default-namespace: sbo @@ -3654,6 +3654,18 @@ def: "A conceptualisation of time which is intrinsic to a mathematical model\, and which can be used to describe other variables or parameters of the model." [src_code:NR] is_a: SBO:0000346 ! temporal measure +[Term] +id: SBO:0000587 +name: transcellular membrane influx reaction +def: "A transport reaction which results in the entry of the transported entity\, into the cell." [src_code:NR] +is_a: SBO:0000185 ! transport reaction + +[Term] +id: SBO:0000588 +name: transcellular membrane efflux reaction +def: "A transport reaction which results in the removal of the transported entity from the cell." [src_code:NR] +is_a: SBO:0000185 ! transport reaction + [Typedef] id: is_a name: is_a Modified: trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -186,13 +186,10 @@ } if (ud != null) { Model m = getModel(); - if (m != null) - for (UnitDefinition u : m.getListOfUnitDefinitions()) { - if (UnitDefinition.areEquivalent(u, ud)) { - ud = u; - break; - } - } + if (m != null) { + UnitDefinition u = m.findIdentical(ud); + return (u != null) ? u : ud; + } } else { ud = new UnitDefinition(getLevel(), getVersion()); ud.addUnit(ud.createUnit()); Modified: trunk/core/src/org/sbml/jsbml/AbstractSBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -1390,19 +1390,34 @@ * @see org.sbml.jsbml.SBase#setMetaId(java.lang.String) */ public void setMetaId(String metaId) { - if ((metaId != null) && (getLevel() == 1)) { - throw new PropertyNotAvailableException(TreeNodeChangeEvent.metaId, this); - } - SBMLDocument doc = getSBMLDocument(); - if ((doc != null) && doc.containsMetaId(metaId)) { - throw new IdentifierException(this, metaId); - } - String oldMetaId = this.metaId; - this.metaId = metaId; - if (doc != null) { - doc.registerMetaId(this, true); - } - firePropertyChange(TreeNodeChangeEvent.metaId, oldMetaId, metaId); + if ((metaId != null) && (getLevel() == 1)) { + throw new PropertyNotAvailableException(TreeNodeChangeEvent.metaId, this); + } + SBMLDocument doc = getSBMLDocument(); + String oldMetaId = this.metaId; + if (doc != null) { + // We have to first remove the pointer from the old metaId to this SBase + if (oldMetaId != null) { + doc.registerMetaId(this, false); + } + // Now we can register the new metaId if necessary. + if (metaId != null) { + this.metaId = metaId; + if (!doc.registerMetaId(this, true)) { + // register failed. Revert the change and throw an exception: + this.metaId = oldMetaId; + throw new IdentifierException(this, metaId); + } + } + } else { + // If the document is null, we don't have to register anything. Simply change: + this.metaId = metaId; + } + if (isSetAnnotation()) { + // Propagate the change also to the annotation: + getAnnotation().setAbout('#' + metaId); + } + firePropertyChange(TreeNodeChangeEvent.metaId, oldMetaId, metaId); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -27,6 +27,7 @@ import java.util.List; import java.util.Map; import java.util.NoSuchElementException; +import java.util.Set; import javax.swing.tree.TreeNode; @@ -163,8 +164,8 @@ Enumeration<TreeNode> children = children(); while (children.hasMoreElements()) { TreeNode node = children.nextElement(); - if (node instanceof AbstractTreeNode) { - success &= ((AbstractTreeNode) node) + if (node instanceof TreeNodeWithChangeSupport) { + success &= ((TreeNodeWithChangeSupport) node) .addAllChangeListeners(listeners); } } @@ -181,8 +182,8 @@ Enumeration<TreeNode> children = children(); while (children.hasMoreElements()) { TreeNode node = children.nextElement(); - if (node instanceof AbstractTreeNode) { - ((AbstractTreeNode) node).addTreeNodeChangeListener(listener); + if (node instanceof TreeNodeWithChangeSupport) { + ((TreeNodeWithChangeSupport) node).addTreeNodeChangeListener(listener); } } } @@ -222,10 +223,9 @@ }; } - /** - * Removes all of the mappings from the map of user objects (optional operation). The map - * will be empty after this call returns. - */ + /* (non-Javadoc) + * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#clearUserObjects() + */ public void clearUserObjects() { if (isSetUserObjects()) { userObjects.clear(); @@ -239,6 +239,13 @@ public abstract TreeNode clone(); /* (non-Javadoc) + * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#containsUserObjectKey(java.lang.Object) + */ + public boolean containsUserObjectKey(Object key) { + return userObjects.containsKey(key); + } + + /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -274,7 +281,7 @@ return equal; } return false; - } + } /* (non-Javadoc) * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#filter(org.sbml.jsbml.util.filters.Filter) @@ -341,12 +348,12 @@ changeType = 2; // real property change } if (-1 < changeType) { - boolean newValTreeNode = newValue instanceof AbstractTreeNode; - boolean oldValTreeNode = oldValue instanceof AbstractTreeNode; + boolean newValTreeNode = newValue instanceof TreeNodeWithChangeSupport; + boolean oldValTreeNode = oldValue instanceof TreeNodeWithChangeSupport; if ((changeType == 0) && newValTreeNode) { - ((AbstractTreeNode) newValue).fireNodeAddedEvent(); + ((TreeNodeWithChangeSupport) newValue).fireNodeAddedEvent(); } else if ((changeType == 1) && oldValTreeNode) { - ((AbstractTreeNode) oldValue).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) oldValue).fireNodeRemovedEvent(); } else { // TODO: check if notifying and updating the metaId is necessary // because of the method AbstractSBase.setThisAsParentSBMLObject @@ -369,7 +376,7 @@ } } } - + /* (non-Javadoc) * @see javax.swing.tree.TreeNode#getIndex(javax.swing.tree.TreeNode) */ @@ -383,7 +390,7 @@ public List<TreeNodeChangeListener> getListOfTreeNodeChangeListeners() { return listOfListeners; } - + /** * Returns the number of child elements of this {@link TreeNode}. * @@ -394,17 +401,17 @@ public int getNumChildren() { return getChildCount(); } - + /* (non-Javadoc) * @see javax.swing.tree.TreeNode#getParent() */ public TreeNode getParent() { return parent; } - - /** - * @return the userObject - */ + + /* (non-Javadoc) + * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#getUserObject(java.lang.Object) + */ public Object getUserObject(Object key) { if (userObjects == null) { userObjects = new HashMap<Object, Object>(); @@ -441,7 +448,7 @@ return hashCode; } - + /* (non-Javadoc) * @see javax.swing.tree.TreeNode#isLeaf() */ @@ -472,13 +479,9 @@ return parent != null; } - /** - * Checks whether any user-defined key-value pairs have been attached - * to this object. - * - * @return <code>true</code> if at least one user-defined key-value pair has - * been attached to this object. - */ + /* (non-Javadoc) + * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#isSetUserObjects() + */ public boolean isSetUserObjects() { return (userObjects != null) && !userObjects.isEmpty(); } @@ -496,12 +499,10 @@ protected void notifyChildChange(TreeNode oldChild, TreeNode newChild) { // default: empty body, nothing to do. } - - /** - * @param key some user-defined key under which the given userObject can be found. - * @param userObject - * the userObject to set - */ + + /* (non-Javadoc) + * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#putUserObject(java.lang.Object, java.lang.Object) + */ public void putUserObject(Object key, Object userObject) { if (userObjects == null) { userObjects = new HashMap<Object, Object>(); @@ -509,15 +510,15 @@ Object oldObject = userObjects.put(key, userObject); firePropertyChange(key.toString(), oldObject, userObject); } - + /* (non-Javadoc) * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#removeAllTreeNodeChangeListeners() */ public void removeAllTreeNodeChangeListeners() { listOfListeners.clear(); } - - /* (non-Javadoc) + + /* (non-Javadoc) * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#removeTreeNodeChangeListener(org.sbml.jsbml.util.TreeNodeChangeListener) */ public void removeTreeNodeChangeListener(TreeNodeChangeListener l) { @@ -525,16 +526,14 @@ Enumeration<TreeNode> children = children(); while (children.hasMoreElements()) { TreeNode node = children.nextElement(); - if (node instanceof AbstractTreeNode) { - ((AbstractTreeNode) node).removeTreeNodeChangeListener(l); + if (node instanceof TreeNodeWithChangeSupport) { + ((TreeNodeWithChangeSupport) node).removeTreeNodeChangeListener(l); } } } - /** - * - * @param key - * @return + /* (non-Javadoc) + * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#removeUserObject(java.lang.Object) */ public Object removeUserObject(Object key) { if (userObjects != null) { @@ -542,8 +541,8 @@ } return null; } - - /** + + /** * @param parent * the parent to set */ @@ -553,7 +552,7 @@ this.firePropertyChange(TreeNodeChangeEvent.parentSBMLObject, oldValue, this.parent); } - /* (non-Javadoc) + /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override @@ -561,4 +560,11 @@ return StringTools.firstLetterLowerCase(getClass().getSimpleName()); } + /* (non-Javadoc) + * @see org.sbml.jsbml.util.TreeNodeWithChangeSupport#userObjectKeySet() + */ + public Set<Object> userObjectKeySet() { + return userObjects.keySet(); + } + } Modified: trunk/core/src/org/sbml/jsbml/IdentifierException.java =================================================================== --- trunk/core/src/org/sbml/jsbml/IdentifierException.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/IdentifierException.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -20,6 +20,8 @@ */ package org.sbml.jsbml; +import java.text.MessageFormat; + import org.apache.log4j.Logger; /** @@ -45,7 +47,7 @@ /** * */ - public static final String DUPLICATE_IDENTIFIER_MSG = "Cannot set duplicate %sidentifier '%s' for %s."; + public static final String DUPLICATE_IDENTIFIER_MSG = "Cannot set duplicate {0}identifier {1} for {2}."; /** * @@ -53,9 +55,9 @@ * @param id */ public IdentifierException(NamedSBase sb, String id) { - super(String.format(DUPLICATE_IDENTIFIER_MSG, "", id, sb.getElementName())); - logger.error(String.format( - "An element with the id '%s' is already present in the SBML model. The identifier of %s will not be set to this value.", + super(MessageFormat.format(DUPLICATE_IDENTIFIER_MSG, "", id, sb.getElementName())); + logger.error(MessageFormat.format( + "An element with the id \"{0}\" is already present in the SBML model. The identifier of {1} will not be set to this value.", id, sb.getElementName())); } @@ -64,9 +66,9 @@ * @param metaId */ public IdentifierException(SBase sb, String metaId) { - super(String.format(DUPLICATE_IDENTIFIER_MSG, "meta ", metaId, sb.getElementName())); - logger.error(String.format( - "An element with the metaid '%s' is already present in the SBML document. The element %s will not be annotated with it.", + super(MessageFormat.format(DUPLICATE_IDENTIFIER_MSG, "meta ", metaId, sb.getElementName())); + logger.error(MessageFormat.format( + "An element with the metaid \"{0}\" is already present in the SBML document. The element {1} will not be annotated with it.", metaId, sb.getElementName())); } Modified: trunk/core/src/org/sbml/jsbml/KineticLaw.java =================================================================== --- trunk/core/src/org/sbml/jsbml/KineticLaw.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/KineticLaw.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -414,7 +414,7 @@ return m.getUnitDefinition(substanceUnitsID); } if (unitsID != null) { - UnitDefinition def = new UnitDefinition("substance", getLevel(), + UnitDefinition def = new UnitDefinition(UnitDefinition.SUBSTANCE, getLevel(), getVersion()); for (Unit unit : getUnitsInstance().getListOfUnits()) { if (unit.isVariantOfSubstance()) { @@ -448,7 +448,7 @@ return m.getUnitDefinition(timeUnitsID); } if (unitsID != null) { - UnitDefinition def = new UnitDefinition("time", getLevel(), getVersion()); + UnitDefinition def = new UnitDefinition(UnitDefinition.TIME, getLevel(), getVersion()); Unit time; for (Unit unit : getUnitsInstance().getListOfUnits()) { time = unit.clone(); Modified: trunk/core/src/org/sbml/jsbml/ListOf.java =================================================================== --- trunk/core/src/org/sbml/jsbml/ListOf.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/ListOf.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -432,8 +432,8 @@ public void clear() { List<T> removedElements = listOf; listOf.clear(); - for( T element : removedElements){ - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + for (T element : removedElements) { + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); } } @@ -684,8 +684,7 @@ */ @Override public boolean readAttribute(String attributeName, String prefix, - String value) - { + String value) { boolean isAttributeRead = super.readAttribute(attributeName, prefix, value); if (!isAttributeRead) { @@ -699,7 +698,7 @@ */ public T remove(int index) { T t = listOf.remove(index); - ((AbstractTreeNode) t).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) t).fireNodeRemovedEvent(); return t; } @@ -743,7 +742,7 @@ } SBase sbase = (SBase) o; if (listOf.remove(sbase)) { - ((AbstractTreeNode) o).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) o).fireNodeRemovedEvent(); return true; } return false; @@ -771,7 +770,7 @@ } if (pos >= 0) { T element = listOf.remove(pos); - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); return (T) sbase; } } @@ -785,7 +784,7 @@ boolean success = listOf.removeAll(c); if(success){ for(Iterator<?> i = c.iterator(); i.hasNext();){ - AbstractTreeNode element = (AbstractTreeNode) i.next(); + TreeNodeWithChangeSupport element = (TreeNodeWithChangeSupport) i.next(); element.fireNodeRemovedEvent(); } } @@ -825,7 +824,7 @@ for(T element : listOf){ if (!c.contains(element)) { listOf.remove(element); - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); modified = true; } } @@ -840,7 +839,7 @@ // TODO: this should rather be a firePropertyChangedEvent, as the // element is first removed and then added again. But the method // registerChild fires a NodeAddedEvent - ((AbstractTreeNode) element).fireNodeRemovedEvent(); + ((TreeNodeWithChangeSupport) element).fireNodeRemovedEvent(); registerChild(element); return prevElem; } Modified: trunk/core/src/org/sbml/jsbml/Model.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Model.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/Model.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -21,6 +21,7 @@ package org.sbml.jsbml; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -191,7 +192,7 @@ /** * Creates a Model instance. By default, all the listOfxxx and xxxUnitsID are - * null. + * <code>null</code>. */ public Model() { super(); @@ -276,7 +277,7 @@ /** * Creates a Model instance from an id, level and version. By default, all the - * listOfxxx and xxxUnitsID are null. + * listOfxxx and xxxUnitsID are <code>null</code>. * * @param id * @param level @@ -578,11 +579,11 @@ } /** - * Returns true if this model contains a reference to a {@link Compartment} + * Returns <code>true</code> if this model contains a reference to a {@link Compartment} * with the given identifier. * * @param id - * @return true if this model contains a reference to a {@link Compartment} + * @return <code>true</code> if this model contains a reference to a {@link Compartment} * with the given identifier. */ public boolean containsCompartment(String id) { @@ -590,11 +591,11 @@ } /** - * Returns true if this model contains a reference to a + * Returns <code>true</code> if this model contains a reference to a * {@link FunctionDefinition} with the given identifier. * * @param id - * @return true if this model contains a reference to a + * @return <code>true</code> if this model contains a reference to a * {@link FunctionDefinition} with the given identifier. */ public boolean containsFunctionDefinition(String id) { @@ -602,11 +603,11 @@ } /** - * Returns true if this model contains a reference to a {@link Parameter} with + * Returns <code>true</code> if this model contains a reference to a {@link Parameter} with * the given identifier. * * @param id - * @return true if this model contains a reference to a {@link Parameter} with + * @return <code>true</code> if this model contains a reference to a {@link Parameter} with * the given identifier. */ public boolean containsParameter(String id) { @@ -780,7 +781,7 @@ * created is not significant. It could have been created in a variety of * ways, for example by using createEvent(). If no {@link Event} object exists * in this {@link Model} object, a new {@link Delay} is <em>not</em> created - * and NULL is returned instead. + * and <code>null</code> is returned instead. * <p> * * @return the {@link Delay} object created @@ -820,7 +821,7 @@ * created is not significant. It could have been created in a variety of * ways, for example by using createEvent(). If no {@link Event} object exists * in this {@link Model} object, a new {@link EventAssignment} is <em>not</em> - * created and NULL is returned instead. + * created and <code>null</code> is returned instead. * <p> * * @return the {@link EventAssignment} object created @@ -897,7 +898,7 @@ * in a variety of ways, for example using createReaction(). If a * {@link Reaction} does not exist for this model, or a {@link Reaction} * exists but already has a {@link KineticLaw}, a new {@link KineticLaw} is - * <em>not</em> created and NULL is returned instead. + * <em>not</em> created and <code>null</code> is returned instead. * <p> * * @return the {@link KineticLaw} object created @@ -928,7 +929,7 @@ * Reaction.createKineticLaw() on the {@link Reaction} object created by a * createReaction(). If a {@link Reaction} does not exist for this model, or * the last {@link Reaction} does not contain a {@link KineticLaw} object, a - * new {@link LocalParameter} is <em>not</em> created and NULL is returned + * new {@link LocalParameter} is <em>not</em> created and <code>null</code> is returned * instead. * <p> * @@ -977,7 +978,7 @@ * added to this {@link Model} is not significant. It could have been created * in a variety of ways, for example using createReaction(). If a * {@link Reaction} does not exist for this model, a new - * {@link ModifierSpeciesReference} is <em>not</em> created and NULL is + * {@link ModifierSpeciesReference} is <em>not</em> created and <code>null</code> is * returned instead. * <p> * @@ -997,7 +998,9 @@ public ModifierSpeciesReference createModifier(String id) { Reaction lastReaction = (Reaction) getLastElementOf(listOfReactions); - if (lastReaction == null) { return null; } + if (lastReaction == null) { + return null; + } ModifierSpeciesReference modifier = lastReaction.createModifier(id); @@ -1037,7 +1040,7 @@ * added to this {@link Model} is not significant. It could have been created * in a variety of ways, for example using createReaction(). If a * {@link Reaction} does not exist for this model, a new - * {@link SpeciesReference} is <em>not</em> created and NULL is returned + * {@link SpeciesReference} is <em>not</em> created and <code>null</code> is returned * instead. * <p> * @@ -1092,7 +1095,7 @@ * added to this {@link Model} is not significant. It could have been created * in a variety of ways, for example using createReaction(). If a * {@link Reaction} does not exist for this model, a new - * {@link SpeciesReference} is <em>not</em> created and NULL is returned + * {@link SpeciesReference} is <em>not</em> created and <code>null</code> is returned * instead. * <p> * @@ -1244,7 +1247,7 @@ * created is not significant. It could have been created in a variety of * ways, for example by using createEvent(). If no {@link Event} object exists * in this {@link Model} object, a new {@link Trigger} is <em>not</em> created - * and NULL is returned instead. + * and <code>null</code> is returned instead. * <p> * * @return the {@link Trigger} object created @@ -1259,7 +1262,7 @@ * <p> * The mechanism by which the {@link UnitDefinition} was created is not * significant. If a {@link UnitDefinition} object does not exist in this - * model, a new {@link Unit} is <em>not</em> created and NULL is returned + * model, a new {@link Unit} is <em>not</em> created and <code>null</code> is returned * instead. * <p> * @@ -1365,12 +1368,12 @@ /** * Returns a {@link CallableSBase} element of the {@link Model} that has the - * given 'id' as identifier or null if no element is found. + * given 'id' as identifier or <code>null</code> if no element is found. * * @param id * an identifier indicating an element of the {@link Model}. * @return a {@link CallableSBase} element of the {@link Model} that has the - * given 'id' as id or null if no element is found. + * given 'id' as id or <code>null</code> if no element is found. */ public CallableSBase findCallableSBase(String id) { UniqueNamedSBase found = findUniqueNamedSBase(id); @@ -1407,7 +1410,7 @@ * @param id * @return A {@link List} of all {@link LocalParameter} instances with the * given name or identifier. This {@link List} can be empty, but never - * null. + * <code>null</code>. */ public List<LocalParameter> findLocalParameters(String id) { List<LocalParameter> list = new LinkedList<LocalParameter>(); @@ -1452,7 +1455,7 @@ /** * Returns a {@link NamedSBase} element of the model that has the given 'id' - * as id or null if no element is found. + * as id or <code>null</code> if no element is found. * * @param id * an id indicating an element of the model. @@ -1469,7 +1472,7 @@ /** * Returns a {@link NamedSBaseWithDerivedUnit} element of the {@link Model} - * that has the given 'id' as id or null if no element is found. It first + * that has the given 'id' as id or <code>null</code> if no element is found. It first * tries to find a {@link CallableSBase} with the given identifier and, if * this is not successful, it searches for an instance of {@link Event} with * the given id. @@ -1477,7 +1480,7 @@ * @param id * an id indicating an element of the {@link Model}. * @return a {@link NamedSBaseWithDerivedUnit} element of the {@link Model} - * that has the given 'id' as id or null if no element is found. + * that has the given 'id' as id or <code>null</code> if no element is found. * @see #findCallableSBase(String) */ public NamedSBaseWithDerivedUnit findNamedSBaseWithDerivedUnit(String id) { @@ -1603,7 +1606,7 @@ * {@link Parameter}s for the element with the given identifier. * * @param id - * @return a {@link Symbol} element with the given identifier or null if there + * @return a {@link Symbol} element with the given identifier or <code>null</code> if there * is no such element. */ public Symbol findSymbol(String id) { @@ -1834,7 +1837,7 @@ * * @param n * @return the nth {@link Compartment} instance of the listOfCompartments. - * Null if if the listOfCompartments is not set. + * <code>null</code> if if the listOfCompartments is not set. */ public Compartment getCompartment(int n) { return getListOfCompartments().get(n); @@ -1846,7 +1849,7 @@ * * @param id * @return the {@link Compartment} of the listOfCompartments which has 'id' as - * id (or name depending on the version and level). Null if if the + * id (or name depending on the version and level). <code>null</code> if if the * listOfCompartments is not set. */ public Compartment getCompartment(String id) { @@ -1871,7 +1874,7 @@ * * @param n * index - * @return the nth CompartmentType of this Model. Returns null if there are no + * @return the nth CompartmentType of this Model. Returns <code>null</code> if there are no * compartmentType defined or if the index n is too big or lower than * zero. * @deprecated Only valid in SBML Level 2 for Versions 2 through 4. @@ -1886,7 +1889,7 @@ * * @param id * @return the CompartmentType of the {@link #listOfCompartmentTypes} which has 'id' as - * id (or name depending on the level and version). Null if the + * id (or name depending on the level and version). <code>null</code> if the * {@link #listOfCompartmentTypes} is not set or the id is not found. * @deprecated Only valid in SBML Level 2 for Versions 2 through 4. */ @@ -1916,7 +1919,7 @@ * Gets the nth Constraint object in this Model. * * @param n - * @return the nth Constraint of this Model. Returns null if there are no + * @return the nth Constraint of this Model. Returns <code>null</code> if there are no * constraint defined or if the index n is too big or lower than zero. */ public Constraint getConstraint(int n) { @@ -1947,7 +1950,7 @@ * Model as id. * * @return the Parameter instance which has the conversionFactorID of this - * Model as id. Null if it doesn't exist + * Model as id. <code>null</code> if it doesn't exist */ public Parameter getConversionFactorInstance() { return getParameter(this.conversionFactorID); @@ -1972,7 +1975,7 @@ * Gets the nth Event object in this Model. * * @param n - * @return the nth Event of this Model. Returns null if there are no event + * @return the nth Event of this Model. Returns <code>null</code> if there are no event * defined or if the index n is too big or lower than zero. */ public Event getEvent(int n) { @@ -1984,7 +1987,7 @@ * * @param id * @return the {@link Event} of the {@link #listOfEvents} which has 'id' as id - * (or name depending on the level and version). Null if if the + * (or name depending on the level and version). <code>null</code> if if the * {@link #listOfEvents} is not set. */ public Event getEvent(String id) { @@ -2032,7 +2035,7 @@ * of this Model as id. * * @return the {@link UnitDefinition} instance which has the extent units ID - * of this Model as id. Null if it doesn't exist + * of this Model as id. <code>null</code> if it doesn't exist */ public UnitDefinition getExtentUnitsInstance() { return getUnitDefinition(getExtentUnits()); @@ -2044,7 +2047,7 @@ * * @param n * @return the nth {@link FunctionDefinition} instance of the - * listOfFunstionDefinitions. Null if if the listOfFunctionDefinitions + * listOfFunstionDefinitions. <code>null</code> if if the listOfFunctionDefinitions * is not set. */ public FunctionDefinition getFunctionDefinition(int n) { @@ -2058,7 +2061,7 @@ * @param id * @return the {@link FunctionDefinition} of the {@link #listOfFunctionDefinitions} * which has 'id' as id (or name depending on the level and version). - * Null if if the {@link #listOfFunctionDefinitions} is not set. + * <code>null</code> if if the {@link #listOfFunctionDefinitions} is not set. */ public FunctionDefinition getFunctionDefinition(String id) { UniqueNamedSBase found = findUniqueNamedSBase(id); @@ -2082,7 +2085,7 @@ * Gets the nth {@link InitialAssignment} object in this {@link Model}. * * @param n - * @return the nth {@link InitialAssignment} of this {@link Model}. Null if + * @return the nth {@link InitialAssignment} of this {@link Model}. <code>null</code> if * the listOfInitialAssignments is not set. */ public InitialAssignment getInitialAssignment(int n) { @@ -2101,7 +2104,7 @@ * @return the first {@link InitialAssignment} of the * {@link #listOfInitialAssignments}, whose {@link Variable} has the * <code>variable</code> as identifier (or name depending on the level - * and version). Null if it doesn't exist. + * and version). <code>null</code> if it doesn't exist. */ public InitialAssignment getInitialAssignment(String variable) { return getListOfInitialAssignments().firstHit( @@ -2137,7 +2140,7 @@ * Returns the last element added in the given list. * * @return the last element added in the model, corresponding to the last - * element of the list of these elements, or null is no element exist + * element of the list of these elements, or <code>null</code> is no element exist * for this type. */ private <T> T getLastElementOf(ListOf<? extends T> listOf) { @@ -2816,7 +2819,7 @@ * * @param id * @return the {@link Parameter} of the listOfParameters which has 'id' as id - * (or name depending on the level and version). Null if it doesn't + * (or name depending on the level and version). <code>null</code> if it doesn't * exist. */ public Parameter getParameter(String id) { @@ -2842,14 +2845,14 @@ /** * Returns a UnitDefinition representing one of the predefined units of SBML, - * returns null if the given unit kind is not a valid one for the SBML level + * returns <code>null</code> if the given unit kind is not a valid one for the SBML level * and version of this {@link Model}. * * @param unitKind * a unit kind for one of the predefined units from the SBML * Specifications * @return a UnitDefinition representing one of the predefined units of SBML, - * null if the unitKind is invalid. + * <code>null</code> if the unitKind is invalid. */ public UnitDefinition getPredefinedUnitDefinition(String unitKind) { // TODO: This might be more efficient than ALWAYS storing ALL base units in the listOfPredefinedUnits: @@ -2932,7 +2935,7 @@ * * @param n * an index - * @return the nth {@link Rule} of the listOfRules. Null if it doesn't exist. + * @return the nth {@link Rule} of the listOfRules. <code>null</code> if it doesn't exist. */ public Rule getRule(int n) { return getListOfRules().get(n); @@ -2944,7 +2947,7 @@ * the value passed to this method. * * @param variable - * @return Null if no element with the required property exists. + * @return <code>null</code> if no element with the required property exists. */ public ExplicitRule getRule(String variable) { Rule rule = listOfRules.firstHit(new AssignmentVariableFilter(variable)); @@ -3042,7 +3045,7 @@ * * @param n * index - * @return the nth {@link SpeciesType} of this Model. Returns null if there + * @return the nth {@link SpeciesType} of this Model. Returns <code>null</code> if there * are no speciesType defined or if the index n is too big or lower * than zero. * @deprecated Only valid in SBML Level 2 for Versions 2 through 4. @@ -3230,7 +3233,7 @@ * @param id * @return the {@link UnitDefinition} of the {@link #listOfUnitDefinitions}s * which has 'id' as id (or name depending on the level and version). - * Null if it doesn't exist. + * <code>null</code> if it doesn't exist. */ public UnitDefinition getUnitDefinition(String id) { UnitDefinition unitDefinition = mapOfUnitDefinitions != null ? mapOfUnitDefinitions.get(id) : null; @@ -3317,12 +3320,12 @@ } /** - * Returns true if this model has a reference to the unit with the given + * Returns <code>true</code> if this model has a reference to the unit with the given * identifier. * * @param id - * @return true if this model has a reference to the unit with the given - * identifier, false otherwise. + * @return <code>true</code> if this model has a reference to the unit with the given + * identifier, <code>false</code> otherwise. */ public boolean hasUnit(String id) { return getUnitDefinition(id) != null; @@ -3418,90 +3421,90 @@ } /** - * Returns true if the area units ID of this Model is not null. + * Returns <code>true</code> if the area units ID of this Model is not <code>null</code>. * - * @return true if the area units ID of this Model is not null. + * @return <code>true</code> if the area units ID of this Model is not <code>null</code>. */ public boolean isSetAreaUnits() { return this.areaUnitsID != null; } /** - * Returns true if the UnitDefinition which has the area units ID of this - * Model as id is not null. + * Returns <code>true</code> if the UnitDefinition which has the area units ID of this + * Model as id is not <code>null</code>. * - * @return true if the UnitDefinition which has the area units ID of this - * Model as id is not null. + * @return <code>true</code> if the UnitDefinition which has the area units ID of this + * Model as id is not <code>null</code>. */ public boolean isSetAreaUnitsInstance() { return getAreaUnitsInstance() != null; } /** - * Returns true if the conversionFactorID of this Model is not null. + * Returns <code>true</code> if the conversionFactorID of this Model is not <code>null</code>. * - * @return true if the conversionFactorID of this Model is not null. + * @return <code>true</code> if the conversionFactorID of this Model is not <code>null</code>. */ public boolean isSetConversionFactor() { return this.conversionFactorID != null; } /** - * Returns true if the Parameter which has the conversionFactorID of this - * Model as id is not null. + * Returns <code>true</code> if the Parameter which has the conversionFactorID of this + * Model as id is not <code>null</code>. * - * @return true if the Parameter which has the conversionFactorID of this - * Model as id is not null. + * @return <code>true</code> if the Parameter which has the conversionFactorID of this + * Model as id is not <code>null</code>. */ public boolean isSetConversionFactorInstance() { return getParameter(this.conversionFactorID) != null; } /** - * Returns true if the extentUnitsID of this Model is not null. + * Returns <code>true</code> if the extentUnitsID of this Model is not <code>null</code>. * - * @return true if the extentUnitsID of this Model is not null. + * @return <code>true</code> if the extentUnitsID of this Model is not <code>null</code>. */ public boolean isSetExtentUnits() { return this.extentUnitsID != null; } /** - * Returns true if the UnitDefinition which has the extentUnitsID of this - * Model as id is not null. + * Returns <code>true</code> if the UnitDefinition which has the extentUnitsID of this + * Model as id is not <code>null</code>. * - * @return true if the UnitDefinition which has the extentUnitsID of this - * Model as id is not null. + * @return <code>true</code> if the UnitDefinition which has the extentUnitsID of this + * Model as id is not <code>null</code>. */ public boolean isSetExtentUnitsInstance() { return getExtentUnitsInstance() != null; } /** - * Returns true if the lengthUnitsID of this Model is not null. + * Returns <code>true</code> if the lengthUnitsID of this Model is not <code>null</code>. * - * @return true if the lengthUnitsID of this Model is not null. + * @return <code>true</code> if the lengthUnitsID of this Model is not <code>null</code>. */ public boolean isSetLengthUnits() { return this.lengthUnitsID != null; } /** - * Returns true if the UnitDefinition which has the lengthUnitsID of this - * Model as id is not null. + * Returns <code>true</code> if the UnitDefinition which has the lengthUnitsID of this + * Model as id is not <code>null</code>. * - * @return true if the UnitDefinition which has the lengthUnitsID of this - * Model as id is not null. + * @return <code>true</code> if the UnitDefinition which has the lengthUnitsID of this + * Model as id is not <code>null</code>. */ public boolean isSetLengthUnitsInstance() { return getLengthUnitsInstance() != null; } /** - * Returns true if the listOfCompartments of this Model is not null and not + * Returns <code>true</code> if the listOfCompartments of this Model is not <code>null</code> and not * empty. * - * @return true if the listOfCompartments of this Model is not null and not + * @return <code>true</code> if the listOfCompartments of this Model is not <code>null</code> and not * empty. */ public boolean isSetListOfCompartments() { @@ -3509,10 +3512,10 @@ } /** - * Returns true if the listOfCompartmentTypes of this Model is not null and + * Returns <code>true</code> if the listOfCompartmentTypes of this Model is not <code>null</code> and * not empty. * - * @return true if the listOfCompartmentTypes of this Model is not null and + * @return <code>true</code> if the listOfCompartmentTypes of this Model is not <code>null</code> and * not empty. * @deprecated Only valid in SBML Level 2 for Versions 2 through 4. */ @@ -3523,10 +3526,10 @@ } /** - * Returns true if the listOfConstraints of this Model is not null and not + * Returns <code>true</code> if the listOfConstraints of this Model is not <code>null</code> and not * empty. * - * @return true if the listOfConstraints of this Model is not null and not + * @return <code>true</code> if the listOfConstraints of this Model is not <code>null</code> and not * empty. */ public boolean isSetListOfConstraints() { @@ -3534,19 +3537,19 @@ } /** - * Returns true if the listOfEvents of this Model is not null and not empty. + * Returns <code>true</code> if the listOfEvents of this Model is not <code>null</code> and not empty. * - * @return true if the listOfEvents of this Model is not null and not empty. + * @return <code>true</code> if the listOfEvents of this Model is not <code>null</code> and not empty. */ public boolean isSetListOfEvents() { return (listOfEvents != null) && (listOfEvents.size() > 0); } /** - * Returns true if the listOfFunctionDefinitions of this Model is not null and + * Returns <code>true</code> if the listOfFunctionDefinitions of this Model is not <code>null</code> and * not empty. * - * @return true if the listOfFunctionDefinitions of this Model is not null and + * @return <code>true</code> if the listOfFunctionDefinitions of this Model is not <code>null</code> and * not empty. */ public boolean isSetListOfFunctionDefinitions() { @@ -3555,10 +3558,10 @@ } /** - * Returns true if the listOfInitialAssignments of this Model is not null and + * Returns <code>true</code> if the listOfInitialAssignments of this Model is not <code>null</code> and * not empty. * - * @return true if the listOfInitialAssignments of this Model is not null and + * @return <code>true</code> if the listOfInitialAssignments of this Model is not <code>null</code> and * not empty. */ public boolean isSetListOfInitialAssignments() { @@ -3567,10 +3570,10 @@ } /** - * Returns true if the listOfParameters of this Model is not null and not + * Returns <code>true</code> if the listOfParameters of this Model is not <code>null</code> and not * empty. * - * @return true if the listOfParameters of this Model is not null and not + * @return <code>true</code> if the listOfParameters of this Model is not <code>null</code> and not * empty. */ public boolean isSetListOfParameters() { @@ -3578,10 +3581,10 @@ } /** - * Returns true if the listOfReactions of this Model is not null and not + * Returns <code>true</code> if the listOfReactions of this Model is not <code>null</code> and not * empty. * - * @return true if the listOfReactions of this Model is not null and not + * @return <code>true</code> if the listOfReactions of this Model is not <code>null</code> and not * empty. */ public boolean isSetListOfReactions() { @@ -3589,28 +3592,28 @@ } /** - * Returns true if the listOfRules of this Model is not null and not empty. + * Returns <code>true</code> if the listOfRules of this Model is not <code>null</code> and not empty. * - * @return true if the listOfRules of this Model is not null and not empty. + * @return <code>true</code> if the listOfRules of this Model is not <code>null</code> and not empty. */ public boolean isSetListOfRules() { return (listOfRules != null) && (listOfRules.size() > 0); } /** - * Returns true if the listOfSpecies of this Model is not null and not empty. + * Returns <code>true</code> if the listOfSpecies of this Model is not <code>null</code> and not empty. * - * @return true if the listOfSpecies of this Model is not null and not empty. + * @return <code>true</code> if the listOfSpecies of this Model is not <code>null</code> and not empty. */ public boolean isSetListOfSpecies() { return (listOfSpecies != null) && (listOfSpecies.size() > 0); } /** - * Returns true if the listOfSpeciesTypes of this Model is not null and not + * Returns <code>true</code> if the listOfSpeciesTypes of this Model is not <code>null</code> and not * empty. * - * @return true if the listOfSpeciesTypes of this Model is not null and not + * @return <code>true</code> if the listOfSpeciesTypes of this Model is not <code>null</code> and not * empty. * @deprecated Only valid in SBML Level 2 for Versions 2 through 4. */ @@ -3620,10 +3623,10 @@ } /** - * Returns true if the listOfUnitDefinitions of this Model is not null and not + * Returns <code>true</code> if the listOfUnitDefinitions of this Model is not <code>null</code> and not * empty. * - * @return true if the listOfUnitDefinitions of this Model is not null and not + * @return <code>true</code> if the listOfUnitDefinitions of this Model is not <code>null</code> and not * empty. */ public boolean isSetListOfUnitDefinitions() { @@ -3644,20 +3647,20 @@ } /** - * Returns true if the substanceUnitsID of this Model is not null. + * Returns <code>true</code> if the substanceUnitsID of this Model is not <code>null</code>. * - * @return true if the substanceUnitsID of this Model is not null. + * @return <code>true</code> if the substanceUnitsID of this Model is not <code>null</code>. */ public boolean isSetSubstanceUnits() { return this.substanceUnitsID != null; } /** - * Returns true if the UnitDefinition which has the substanceUnitsID of this - * Model as id is not null. + * Returns <code>true</code> if the UnitDefinition which has the substanceUnitsID of this + * Model as id is not <code>null</code>. * - * @return true if the UnitDefinition which has the substanceUnitsID of this - * Model as id is not null. + * @return <code>true</code> if the UnitDefinition which has the substanceUnitsID of this + * Model as id is not <code>null</code>. */ public boolean isSetSubstanceUnitsInstance() { return getSubstanceUnitsInstance() != null; @@ -3673,31 +3676,31 @@ } /** - * Returns true if the UnitsDefinition which has the timeUnistID of this Model - * as id is not null. + * Returns <code>true</code> if the UnitsDefinition which has the timeUnistID of this Model + * as id is not <code>null</code>. * - * @return true if the UnitsDefinition which has the timeUnistID of this Model - * as id is not null. + * @return <code>true</code> if the UnitsDefinition which has the timeUnistID of this Model + * as id is not <code>null</code>. */ public boolean isSetTimeUnitsInstance() { return getTimeUnitsInstance() != null; } /** - * Returns true if the volumeUnitsID of this Model is not null. + * Returns <code>true</code> if the volumeUnitsID of this Model is not <code>null</code>. * - * @return true if the volumeUnitsID of this Model is not null. + * @return <code>true</code> if the volumeUnitsID of this Model is not <code>null</code>. */ public boolean isSetVolumeUnits() { return this.volumeUnitsID != null; } /** - * Returns true if the UnitDefinition which has the volumeUnitsID of this - * Model as id is not null. + * Returns <code>true</code> if the UnitDefinition which has the volumeUnitsID of this + * Model as id is not <code>null</code>. * - * @return true if the UnitDefinition which has the volumeUnitsID of this - * Model as id is not null. + * @return <code>true</code> if the UnitDefinition which has the volumeUnitsID of this + * Model as id is not <code>null</code>. */ public boolean isSetVolumeUnitsInstance() { return getVolumeUnitsInstance() != null; @@ -3760,6 +3763,14 @@ String pId = lp.getId(); if ((r != null) && r.isSetId()) { if (delete) { + // Check if this method was called by some cloned object. + // In this case we must not delete the references to the objects + // within this model. + Reaction rTest = getReaction(r.getId()); + if ((rTest == null) || (rTest != r) || !rTest.isSetKineticLaw() + || (rTest.getKineticLaw().getLocalParameter(lp.getId()) == null)) { + return false; + } if (mapOfLocalParameters != null) { SortedSet<String> reactionSet = mapOfLocalParameters.get(pId); if (reactionSet != null) { @@ -3785,7 +3796,7 @@ } return false; } - + /** * Registers the identifier of a {@link NamedSBase} and its associated object * in this {@link Model}. @@ -3796,6 +3807,8 @@ * If <code>true</code> the identifier of the given {@link NamedSBase} * will be registered in this {@link Model} Otherwise, the given * identifier will be removed from this {@link Model}'s hash. + * @return <code>true</code> if this operation was successfully performed, + * <code>false</code> otherwise. */ boolean registerId(NamedSBase nsb, boolean add) { return registerIds(nsb.getParentSBMLObject(), nsb, true, !add); @@ -3811,9 +3824,13 @@ private boolean registerId(UniqueNamedSBase unsb, boolean recursively, boolean delete) { String id = unsb.getId(); if (delete && (mapOfUniqueNamedSBases != null)) { + // Check if this method was called from some cloned element that is not part of this model: + if (mapOfUniqueNamedSBases.get(id) != unsb) { + return false; + } mapOfUniqueNamedSBases.remove(id); if (logger.isDebugEnabled()) { - logger.debug(String.format("removed id=%s from model%s", + logger.debug(MessageFormat.format("removed id={0} from model{1}", id, (isSetId() ? " " + getId() : ""))); } } else if (unsb.isSetId()) { @@ -3881,6 +3898,11 @@ if (add) { return mapOfUnitDefinitions.put(ud.getId(), ud) == null; } + // Check if the element to be removed is part of this model or maybe a clone: + UnitDefinition unitDef = mapOfUnitDefinitions.get(ud); + if ((unitDef != null) && (unitDef != ud)) { + return false; + } return mapOfUnitDefinitions.remove(ud.getId()) != null; } @@ -3900,8 +3922,7 @@ if (newNsb.isSetId()) { if (newNsb instanceof UniqueNamedSBase) { return registerId((UniqueNamedSBase) newNsb, recursively, delete); - } else if ((newNsb instanceof LocalParameter) - && (parent.getParent() != null)) { + } else if ((newNsb instanceof LocalParameter) && (parent.getParent() != null)) { return registerId((KineticLaw) parent.getParent(), (LocalParameter) newNsb, delete); } else if (newNsb instanceof UnitDefinition) { @@ -4058,7 +4079,7 @@ * Removes the Parameter 'parameter' from this Model. * * @param parameter - * @return true if the {@link Parameter} was found and removed. + * @return <code>true</code> if the {@link Parameter} was found and removed. */ public boolean removeParameter(Parameter parameter) { return getListOfParameters().remove(parameter); @@ -4088,7 +4109,7 @@ * Removes a reaction from the model. * * @param reac - * @return true if the {@link Reaction} was found and removed. + * @return <code>true</code> if the {@link Reaction} was found and removed. */ public boolean removeReaction(Reaction reac) { return getListOfReactions().remove(reac); @@ -4140,7 +4161,7 @@ * Removes a species from the model. * * @param spec - * @return true if the {@link Species} was found and removed. + * @return <code>true</code> if the {@link Species} was found and removed. */ public boolean removeSpecies(Species spec) { return getListOfSpecies().remove(spec); @@ -4204,7 +4225,7 @@ * Removes a {@link UnitDefinition} of the {@link Model}. * * @param unitDefininition - * @return true if the UnitDefinition 'unitDefinition' has been removed from + * @return <code>true</code> if the UnitDefinition 'unitDefinition' has been removed from * the Model. */ public boolean removeUnitDefinition(UnitDefinition unitDefininition) { Modified: trunk/core/src/org/sbml/jsbml/SBMLDocument.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SBMLDocument.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/SBMLDocument.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -777,9 +777,17 @@ if (add) { return mappingFromMetaId2SBase.put(sbase.getMetaId(), sbase) == null; } else { - return mappingFromMetaId2SBase.remove(sbase.getMetaId()) != null; + SBase old = mappingFromMetaId2SBase.get(sbase.getMetaId()); + if ((old != null) && (old != sbase)) { + /* This check is needed because the given SBase might originate from a + * different Document or could be a clone of some other SBase registered + * here. + */ + return mappingFromMetaId2SBase.remove(sbase.getMetaId()) != null; + } } - } return false; + } + return false; } Modified: trunk/core/src/org/sbml/jsbml/SBO.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SBO.java 2012-04-27 15:43:04 UTC (rev 1248) +++ trunk/core/src/org/sbml/jsbml/SBO.java 2012-05-08 08:07:37 UTC (rev 1249) @@ -917,6 +917,14 @@ } /** + * Returns the SBO term id for macromolecule. + * @return + */ + public static int getMacromolecule() { + return 245; + } + + /** * * @return */ @@ -2165,6 +2173,6 @@ */ public static int stringToInt(String sboTerm) { return checkTerm(sboTerm) ? Integer.parseInt(sboTerm.substring(4)) : -1; - } + } } Modified: trunk/core/src/org/sbml/jsbml/SB... [truncated message content] |