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: <nik...@us...> - 2015-04-23 14:10:44
|
Revision: 2238 http://sourceforge.net/p/jsbml/code/2238 Author: niko-rodrigue Date: 2015-04-23 14:10:42 +0000 (Thu, 23 Apr 2015) Log Message: ----------- added a default load of the parsers for the two other methods that were missing it. Need to do a bit of cleanup and re-factoring once we checked that it worked + added the uncertml parser to the build files and ParserManager Modified Paths: -------------- trunk/build.xml trunk/core/build.xml trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java trunk/core/src/org/sbml/jsbml/xml/stax/SBMLReader.java Removed Paths: ------------- trunk/core/resources/META-INF/services/org.sbml.jsbml.xml.parsers.ReadingParser Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2015-04-23 13:21:16 UTC (rev 2237) +++ trunk/build.xml 2015-04-23 14:10:42 UTC (rev 2238) @@ -244,6 +244,7 @@ <provider classname="org.sbml.jsbml.xml.parsers.RenderParser" /> <provider classname="org.sbml.jsbml.xml.parsers.ReqParser" /> <provider classname="org.sbml.jsbml.xml.parsers.SpatialParser" /> + <provider classname="org.sbml.jsbml.xml.parsers.UncertMLXMLNodeReader" /> </service> </jar> @@ -313,6 +314,7 @@ <provider classname="org.sbml.jsbml.xml.parsers.RenderParser" /> <provider classname="org.sbml.jsbml.xml.parsers.ReqParser" /> <provider classname="org.sbml.jsbml.xml.parsers.SpatialParser" /> + <provider classname="org.sbml.jsbml.xml.parsers.UncertMLXMLNodeReader" /> </service> </jar> </target> Modified: trunk/core/build.xml =================================================================== --- trunk/core/build.xml 2015-04-23 13:21:16 UTC (rev 2237) +++ trunk/core/build.xml 2015-04-23 14:10:42 UTC (rev 2238) @@ -348,6 +348,7 @@ <provider classname="org.sbml.jsbml.xml.parsers.RenderParser" /> <provider classname="org.sbml.jsbml.xml.parsers.ReqParser" /> <provider classname="org.sbml.jsbml.xml.parsers.SpatialParser" /> + <provider classname="org.sbml.jsbml.xml.parsers.UncertMLXMLNodeReader" /> </service> </jar> </target> Deleted: trunk/core/resources/META-INF/services/org.sbml.jsbml.xml.parsers.ReadingParser =================================================================== --- trunk/core/resources/META-INF/services/org.sbml.jsbml.xml.parsers.ReadingParser 2015-04-23 13:21:16 UTC (rev 2237) +++ trunk/core/resources/META-INF/services/org.sbml.jsbml.xml.parsers.ReadingParser 2015-04-23 14:10:42 UTC (rev 2238) @@ -1,5 +0,0 @@ -# Generated by org.mangosdk.spi.processor.SpiProcessor (0.2.4) -# Mon, 17 Mar 2014 11:36:19 +0000 -org.sbml.jsbml.xml.parsers.MathMLStaxParser -org.sbml.jsbml.xml.parsers.SBMLCoreParser -org.sbml.jsbml.xml.parsers.XMLNodeReader Modified: trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java =================================================================== --- trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java 2015-04-23 13:21:16 UTC (rev 2237) +++ trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java 2015-04-23 14:10:42 UTC (rev 2238) @@ -68,6 +68,14 @@ */ private Logger logger = Logger.getLogger(ParserManager.class); + private String[] parserDefaults = {"org.sbml.jsbml.xml.parsers.UncertMLXMLNodeReader", + "org.sbml.jsbml.xml.parsers.MathMLStaxParser", "org.sbml.jsbml.xml.parsers.ArraysParser", "org.sbml.jsbml.xml.parsers.CompParser", + "org.sbml.jsbml.xml.parsers.DistribParser", "org.sbml.jsbml.xml.parsers.DynParser", "org.sbml.jsbml.xml.parsers.FBCParser", + "org.sbml.jsbml.xml.parsers.GroupsParser", "org.sbml.jsbml.xml.parsers.L3LayoutParser", "org.sbml.jsbml.xml.parsers.LayoutParser", + "org.sbml.jsbml.xml.parsers.MultiParser", "org.sbml.jsbml.xml.parsers.QualParser", "org.sbml.jsbml.xml.parsers.RenderParser", + "org.sbml.jsbml.xml.parsers.ReqParser", "org.sbml.jsbml.xml.parsers.SpatialParser", "org.sbml.jsbml.xml.parsers.XMLNodeReader", "org.sbml.jsbml.xml.parsers.SBMLCoreParser"}; + + /** * Private constructor to make sure that we have only one {@link ParserManager} per JVM. */ @@ -161,13 +169,6 @@ // prevent problems when developers are not setting properly eclipse, when jar // files are not generated with - String[] parserDefaults = {"org.sbml.jsbml.xml.parsers.SBMLCoreParser", "org.sbml.jsbml.xml.parsers.XMLNodeReader", - "org.sbml.jsbml.xml.parsers.MathMLStaxParser", "org.sbml.jsbml.xml.parsers.ArraysParser", "org.sbml.jsbml.xml.parsers.CompParser", - "org.sbml.jsbml.xml.parsers.DistribParser", "org.sbml.jsbml.xml.parsers.DynParser", "org.sbml.jsbml.xml.parsers.FBCParser", - "org.sbml.jsbml.xml.parsers.GroupsParser", "org.sbml.jsbml.xml.parsers.L3LayoutParser", "org.sbml.jsbml.xml.parsers.LayoutParser", - "org.sbml.jsbml.xml.parsers.MultiParser", "org.sbml.jsbml.xml.parsers.QualParser", "org.sbml.jsbml.xml.parsers.RenderParser", - "org.sbml.jsbml.xml.parsers.ReqParser", "org.sbml.jsbml.xml.parsers.SpatialParser"}; - for (String parserClassName : parserDefaults) { if (! classNames.contains(parserClassName)) { System.out.println("###DEBUG### adding parser '" + parserClassName + "' by hand"); @@ -179,7 +180,6 @@ ReadingParser readingParser = (ReadingParser) newInstance; String packageName = "core"; - classNames.add(readingParser.getClass().getName()); System.out.println("###DEBUG####; class name = " + readingParser.getClass().getName()); if (readingParser instanceof PackageParser) { @@ -197,12 +197,12 @@ } } } - else if (newInstance instanceof WritingParser) + + if (newInstance instanceof WritingParser) { WritingParser writingParser = (WritingParser) newInstance; String packageName = "core"; - classNames.add(writingParser.getClass().getName()); System.out.println("###DEBUG####; writer class name = " + writingParser.getClass().getName()); if (writingParser instanceof PackageParser) { @@ -309,6 +309,7 @@ public Map<String, ReadingParser> getReadingParsers() { Map<String, ReadingParser> clonedMap = new HashMap<String, ReadingParser>(); + List<String> classNames = new ArrayList<String>(); Iterator<ReadingParser> readingParserList = ServiceLoader.load(ReadingParser.class).iterator(); @@ -318,6 +319,8 @@ if (readingParser != null) { + classNames.add(readingParser.getClass().getName()); + for (String namespaceURI : readingParser.getNamespaces()) { clonedMap.put(namespaceURI, readingParser); } @@ -327,7 +330,42 @@ // No need to print the message again, it is printed once in the init() method } } + + for (String parserClassName : parserDefaults) { + if (! classNames.contains(parserClassName)) { + System.out.println("###DEBUG### getReadingParsers - adding parser '" + parserClassName + "' by hand"); + + try { + Object newInstance = Class.forName(parserClassName).newInstance(); + + if (newInstance instanceof ReadingParser) { + ReadingParser readingParser = (ReadingParser) newInstance; + + System.out.println("###DEBUG#### getReadingParsers - class name = " + readingParser.getClass().getName()); + + for (String namespaceURI : readingParser.getNamespaces()) { + clonedMap.put(namespaceURI, readingParser); + } + } + } catch (ClassNotFoundException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + catch (InstantiationException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + catch (IllegalAccessException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + } + } + return clonedMap; } @@ -339,6 +377,7 @@ public Map<String, WritingParser> getWritingParsers() { Map<String, WritingParser> clonedMap = new HashMap<String, WritingParser>(); + List<String> classNames = new ArrayList<String>(); Iterator<ReadingParser> readingParserList = ServiceLoader.load(ReadingParser.class).iterator(); @@ -348,6 +387,8 @@ if (readingParser != null && readingParser instanceof WritingParser) { + classNames.add(readingParser.getClass().getName()); + for (String namespaceURI : readingParser.getNamespaces()) { clonedMap.put(namespaceURI, (WritingParser) readingParser); } @@ -366,6 +407,8 @@ if (writingParser != null) { + classNames.add(writingParser.getClass().getName()); + for (String namespaceURI : writingParser.getNamespaces()) { clonedMap.put(namespaceURI, writingParser); } @@ -376,6 +419,39 @@ } } + for (String parserClassName : parserDefaults) { + if (! classNames.contains(parserClassName)) { + System.out.println("###DEBUG### getWritingParsers - adding parser '" + parserClassName + "' by hand"); + + try { + Object newInstance = Class.forName(parserClassName).newInstance(); + + if (newInstance instanceof WritingParser) { + WritingParser readingParser = (WritingParser) newInstance; + + System.out.println("###DEBUG#### getWritingParsers - class name = " + readingParser.getClass().getName()); + + for (String namespaceURI : readingParser.getNamespaces()) { + clonedMap.put(namespaceURI, readingParser); + } + } + } catch (ClassNotFoundException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + catch (InstantiationException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + catch (IllegalAccessException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + } + } return clonedMap; } Modified: trunk/core/src/org/sbml/jsbml/xml/stax/SBMLReader.java =================================================================== --- trunk/core/src/org/sbml/jsbml/xml/stax/SBMLReader.java 2015-04-23 13:21:16 UTC (rev 2237) +++ trunk/core/src/org/sbml/jsbml/xml/stax/SBMLReader.java 2015-04-23 14:10:42 UTC (rev 2238) @@ -692,7 +692,7 @@ if (!characters.isWhiteSpace()) { isText = true; // the characters are not only 'white spaces' } - if ((sbmlElements.peek() instanceof XMLNode) || isInsideNotes || isInsideAnnotation) { + if ((!sbmlElements.isEmpty() && (sbmlElements.peek() instanceof XMLNode)) || isInsideNotes || isInsideAnnotation) { isText = true; // We want to keep the whitespace/formatting when reading html block } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 13:21:24
|
Revision: 2237 http://sourceforge.net/p/jsbml/code/2237 Author: pdp10 Date: 2015-04-23 13:21:16 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package to v0.90 - added pointIndex Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java 2015-04-23 12:53:24 UTC (rev 2236) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java 2015-04-23 13:21:16 UTC (rev 2237) @@ -52,6 +52,10 @@ /** * */ + private String pointIndex; + /** + * + */ private Integer pointIndexLength; /** * @@ -85,6 +89,9 @@ if (po.isSetCompression()) { setCompression(po.getCompression()); } + if (po.isSetPointIndex()) { + setPointIndex(po.getPointIndex()); + } if (po.isSetPointIndexLength()) { setPointIndexLength(po.getPointIndexLength()); } @@ -138,6 +145,10 @@ if (equal && isSetCompression()) { equal &= po.getCompression().equals(getCompression()); } + equal &= po.isSetPointIndex() == isSetPointIndex(); + if (equal && isSetPointIndex()) { + equal &= po.getPointIndex() == getPointIndex(); + } equal &= po.isSetPointIndexLength() == isSetPointIndexLength(); if (equal && isSetPointIndexLength()) { equal &= po.getPointIndexLength() == getPointIndexLength(); @@ -323,13 +334,81 @@ /** + * Returns the value of {@link #pointIndex}. + * + * @return the value of {@link #pointIndex}. + */ + public String getPointIndex() { + if (isSetPointIndex()) { + return pointIndex; + } + // This is necessary if we cannot return null here. For variables of type String return an empty String if no value is defined. + throw new PropertyUndefinedError(SpatialConstants.pointIndex, this); + } + + + /** + * Returns whether {@link #pointIndex} is set. + * + * @return whether {@link #pointIndex} is set. + */ + public boolean isSetPointIndex() { + return this.pointIndex != null; + } + + + /** + * Sets the value of pointIndex + * + * @param pointIndex the value of pointIndex to be set. + */ + public void setPointIndex(String pointIndex) { + String oldPointIndex = this.pointIndex; + this.pointIndex = pointIndex; + firePropertyChange(SpatialConstants.pointIndex, oldPointIndex, this.pointIndex); + } + + + /** + * Unsets the variable pointIndex. + * + * @return {@code true} if pointIndex was set before, otherwise {@code false}. + */ + public boolean unsetPointIndex() { + if (isSetPointIndex()) { + String oldPointIndex = this.pointIndex; + this.pointIndex = null; + this.pointIndexLength = null; + firePropertyChange(SpatialConstants.pointIndex, oldPointIndex, this.pointIndex); + return true; + } + return false; + } + + /** + * Appends the variable data to pointIndex. + * @return {@code true} if data was appended to pointIndex, otherwise {@code false}. + */ + public boolean append(String data) { + if (data == null) { return false; } + if (isSetPointIndex()) { + String oldPointIndex = this.pointIndex; + this.pointIndex = this.pointIndex + data; + firePropertyChange(SpatialConstants.pointIndex, oldPointIndex, this.pointIndex); + } else { + setPointIndex(data); + } + return true; + } + + /** * Returns the value of pointIndexLength. * * @return the value of pointIndexLength. */ public int getPointIndexLength() { if (isSetPointIndexLength()) { - return pointIndexLength.intValue(); + return pointIndexLength; } // This is necessary if we cannot return null here. For variables of type String return an empty String if no value is defined. throw new PropertyUndefinedError(SpatialConstants.pointIndexLength, this); @@ -447,6 +526,9 @@ if (isSetCompression()) { hashCode += prime * getCompression().hashCode(); } + if (isSetPointIndex()) { + hashCode += prime * getPointIndex().hashCode(); + } if (isSetPointIndexLength()) { hashCode += prime * getPointIndexLength(); } @@ -551,6 +633,8 @@ builder.append(domainType); builder.append(", compression="); builder.append(compression); + builder.append(", pointIndex="); + builder.append(pointIndex); builder.append(", pointIndexLength="); builder.append(pointIndexLength); builder.append(", dataType="); Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java 2015-04-23 12:53:24 UTC (rev 2236) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java 2015-04-23 13:21:16 UTC (rev 2237) @@ -233,7 +233,6 @@ public void setArrayData(String arrayData) { String oldArrayData = this.arrayData; this.arrayData = arrayData; - arrayDataLength = 1; firePropertyChange(SpatialConstants.arrayData, oldArrayData, this.arrayData); } @@ -247,7 +246,7 @@ if (isSetArrayData()) { String oldArrayData = this.arrayData; this.arrayData = null; - arrayDataLength = null; + this.arrayDataLength = null; firePropertyChange(SpatialConstants.arrayData, oldArrayData, this.arrayData); return true; } @@ -259,18 +258,15 @@ * @return {@code true} if data was appended to arrayData, otherwise {@code false}. */ public boolean append(String data) { + if (data == null) { return false; } if (isSetArrayData()) { String oldArrayData = this.arrayData; - if(compression == CompressionKind.UNCOMPRESSED) { - this.arrayData = this.arrayData + "; " + data; - } else { // data is compressed - this.arrayData = this.arrayData + " " + data; - } - arrayDataLength++; + this.arrayData = this.arrayData + data; firePropertyChange(SpatialConstants.arrayData, oldArrayData, this.arrayData); - return true; + } else { + setArrayData(data); } - return false; + return true; } /** @@ -280,7 +276,7 @@ */ public int getArrayDataLength() { if (isSetArrayDataLength()) { - return arrayDataLength.intValue(); + return arrayDataLength; } // This is necessary if we cannot return null here. For variables of type String return an empty String if no value is defined. throw new PropertyUndefinedError(SpatialConstants.arrayDataLength, this); @@ -417,11 +413,6 @@ attributes.put(SpatialConstants.shortLabel + ":arrayDataLength", String.valueOf(getArrayDataLength())); } - if (isSetArrayData()) { - attributes.remove("arrayData"); - attributes.put(SpatialConstants.shortLabel + ":arrayData", - getArrayData()); - } if (isSetDataType()) { attributes.remove("dataType"); attributes.put(SpatialConstants.shortLabel + ":dataType", @@ -450,13 +441,6 @@ MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.arrayDataLength); } } - else if (attributeName.equals(SpatialConstants.arrayData)) { - try { - setArrayData(value); - } catch (Exception e) { - MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.arrayData); - } - } else if (attributeName.equals(SpatialConstants.dataType)) { try { setDataType(value); Modified: trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java 2015-04-23 12:53:24 UTC (rev 2236) +++ trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java 2015-04-23 13:21:16 UTC (rev 2237) @@ -86,19 +86,28 @@ // TODO - check that it is properly updated to the 0.90 draft specs + /** + * A {@link Logger} for this class. + */ + private Logger logger = Logger.getLogger(SpatialParser.class); + + /** + * The name space of required elements. + */ + public static final String namespaceURIrequired = "http://www.sbml.org/sbml/level3/version1/req/version1"; + + + @Override public void processCharactersOf(String elementName, String characters, Object contextObject) { if (contextObject instanceof SpatialPoints) { SpatialPoints spatialPoints = (SpatialPoints) contextObject; - if(!spatialPoints.isSetArrayData()) { - spatialPoints.setArrayData(characters); - } else { - spatialPoints.append(characters); - } + spatialPoints.append(characters); } if (contextObject instanceof ParametricObject) { ParametricObject parametricObject = (ParametricObject) contextObject; + parametricObject.append(characters); } } @@ -108,17 +117,7 @@ // TODO Auto-generated method stub super.writeCharacters(xmlObject, sbmlElementToWrite); } - - /** - * A {@link Logger} for this class. - */ - private Logger logger = Logger.getLogger(SpatialParser.class); - - /** - * The name space of required elements. - */ - public static final String namespaceURIrequired = "http://www.sbml.org/sbml/level3/version1/req/version1"; - + /* (non-Javadoc) * @see org.sbml.jsbml.xml.parsers.AbstractReaderWriter#getShortLabel() */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 12:53:32
|
Revision: 2236 http://sourceforge.net/p/jsbml/code/2236 Author: pdp10 Date: 2015-04-23 12:53:24 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package to v0.90 - added arrayData to SpatialPoints. Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java 2015-04-23 12:52:36 UTC (rev 2235) +++ trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java 2015-04-23 12:53:24 UTC (rev 2236) @@ -84,8 +84,31 @@ @ProviderFor(ReadingParser.class) public class SpatialParser extends AbstractReaderWriter implements PackageParser { - // TODO - check that it is properly updated to the 0.88 draft specs + // TODO - check that it is properly updated to the 0.90 draft specs + @Override + public void processCharactersOf(String elementName, String characters, + Object contextObject) { + if (contextObject instanceof SpatialPoints) { + SpatialPoints spatialPoints = (SpatialPoints) contextObject; + if(!spatialPoints.isSetArrayData()) { + spatialPoints.setArrayData(characters); + } else { + spatialPoints.append(characters); + } + } + if (contextObject instanceof ParametricObject) { + ParametricObject parametricObject = (ParametricObject) contextObject; + } + } + + @Override + public void writeCharacters(SBMLObjectForXML xmlObject, + Object sbmlElementToWrite) { + // TODO Auto-generated method stub + super.writeCharacters(xmlObject, sbmlElementToWrite); + } + /** * A {@link Logger} for this class. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 12:52:44
|
Revision: 2235 http://sourceforge.net/p/jsbml/code/2235 Author: pdp10 Date: 2015-04-23 12:52:36 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package to v0.90 - added arrayData to SpatialPoints. Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialConstants.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java 2015-04-23 12:13:02 UTC (rev 2234) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java 2015-04-23 12:52:36 UTC (rev 2235) @@ -514,21 +514,21 @@ try { setCompression(value); } catch (Exception e) { - MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.polygonType); + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.compression); } } else if (attributeName.equals(SpatialConstants.pointIndexLength)) { try { setPointIndexLength(StringTools.parseSBMLInt(value)); } catch (Exception e) { - MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.polygonType); + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.pointIndexLength); } } else if (attributeName.equals(SpatialConstants.dataType)) { try { setDataType(value); } catch (Exception e) { - MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.polygonType); + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.dataType); } } else { Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialConstants.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialConstants.java 2015-04-23 12:13:02 UTC (rev 2234) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialConstants.java 2015-04-23 12:52:36 UTC (rev 2235) @@ -515,6 +515,11 @@ /** * */ + public static final String arrayData = "arrayData"; + + /** + * + */ public static final String arrayDataLength = "arrayDataLength"; /** Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java 2015-04-23 12:13:02 UTC (rev 2234) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java 2015-04-23 12:52:36 UTC (rev 2235) @@ -54,7 +54,10 @@ * */ private DataKind dataType; - + /** + * + */ + private String arrayData; @@ -91,6 +94,9 @@ if (sp.isSetDataType()) { setDataType(sp.getDataType()); } + if (sp.isSetArrayData()) { + setArrayData(sp.getArrayData()); + } } @@ -111,6 +117,10 @@ if (equal && isSetCompression()) { equal &= sp.getCompression().equals(getCompression()); } + equal &= sp.isSetArrayData() == isSetArrayData(); + if (equal && isSetArrayData()) { + equal &= sp.getArrayData() == getArrayData(); + } equal &= sp.isSetArrayDataLength() == isSetArrayDataLength(); if (equal && isSetArrayDataLength()) { equal &= sp.getArrayDataLength() == getArrayDataLength(); @@ -192,6 +202,78 @@ /** + * Returns the value of {@link #arrayData}. + * + * @return the value of {@link #arrayData}. + */ + public String getArrayData() { + if (isSetArrayData()) { + return arrayData; + } + // This is necessary if we cannot return null here. For variables of type String return an empty String if no value is defined. + throw new PropertyUndefinedError(SpatialConstants.arrayData, this); + } + + + /** + * Returns whether {@link #arrayData} is set. + * + * @return whether {@link #arrayData} is set. + */ + public boolean isSetArrayData() { + return this.arrayData != null; + } + + + /** + * Sets the value of arrayData + * + * @param arrayData the value of arrayData to be set. + */ + public void setArrayData(String arrayData) { + String oldArrayData = this.arrayData; + this.arrayData = arrayData; + arrayDataLength = 1; + firePropertyChange(SpatialConstants.arrayData, oldArrayData, this.arrayData); + } + + + /** + * Unsets the variable arrayData. + * + * @return {@code true} if arrayData was set before, otherwise {@code false}. + */ + public boolean unsetArrayData() { + if (isSetArrayData()) { + String oldArrayData = this.arrayData; + this.arrayData = null; + arrayDataLength = null; + firePropertyChange(SpatialConstants.arrayData, oldArrayData, this.arrayData); + return true; + } + return false; + } + + /** + * Appends the variable data to arrayData. + * @return {@code true} if data was appended to arrayData, otherwise {@code false}. + */ + public boolean append(String data) { + if (isSetArrayData()) { + String oldArrayData = this.arrayData; + if(compression == CompressionKind.UNCOMPRESSED) { + this.arrayData = this.arrayData + "; " + data; + } else { // data is compressed + this.arrayData = this.arrayData + " " + data; + } + arrayDataLength++; + firePropertyChange(SpatialConstants.arrayData, oldArrayData, this.arrayData); + return true; + } + return false; + } + + /** * Returns the value of arrayDataLength. * * @return the value of arrayDataLength. @@ -313,6 +395,9 @@ if (isSetArrayDataLength()) { hashCode += prime * getArrayDataLength(); } + if (isSetArrayData()) { + hashCode += prime * getArrayData().hashCode(); + } if (isSetDataType()) { hashCode += prime * getDataType().hashCode(); } @@ -332,6 +417,11 @@ attributes.put(SpatialConstants.shortLabel + ":arrayDataLength", String.valueOf(getArrayDataLength())); } + if (isSetArrayData()) { + attributes.remove("arrayData"); + attributes.put(SpatialConstants.shortLabel + ":arrayData", + getArrayData()); + } if (isSetDataType()) { attributes.remove("dataType"); attributes.put(SpatialConstants.shortLabel + ":dataType", @@ -350,21 +440,28 @@ try { setCompression(value); } catch (Exception e) { - MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.polygonType); + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.compression); } } else if (attributeName.equals(SpatialConstants.arrayDataLength)) { try { setArrayDataLength(StringTools.parseSBMLInt(value)); } catch (Exception e) { - MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.polygonType); + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.arrayDataLength); } } + else if (attributeName.equals(SpatialConstants.arrayData)) { + try { + setArrayData(value); + } catch (Exception e) { + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.arrayData); + } + } else if (attributeName.equals(SpatialConstants.dataType)) { try { setDataType(value); } catch (Exception e) { - MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.polygonType); + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.dataType); } } else { @@ -382,6 +479,8 @@ StringBuilder builder = new StringBuilder(); builder.append("ParametricObject [compression="); builder.append(compression); + builder.append(", arrayData="); + builder.append(arrayData); builder.append(", arrayDataLength="); builder.append(arrayDataLength); builder.append(", dataType="); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2015-04-23 12:13:09
|
Revision: 2234 http://sourceforge.net/p/jsbml/code/2234 Author: niko-rodrigue Date: 2015-04-23 12:13:02 +0000 (Thu, 23 Apr 2015) Log Message: ----------- corrected to be valid 1.6 code Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java Modified: trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java =================================================================== --- trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java 2015-04-23 12:08:16 UTC (rev 2233) +++ trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java 2015-04-23 12:13:02 UTC (rev 2234) @@ -215,16 +215,25 @@ namespaceToNameMap.put(namespaceURI, packageName); } } - } catch (InstantiationException | IllegalAccessException - | ClassNotFoundException e) + } catch (ClassNotFoundException e) { System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); // e.printStackTrace(); } + catch (InstantiationException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + catch (IllegalAccessException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } } } - + } // <br /><dependency><br /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2015-04-23 12:08:18
|
Revision: 2233 http://sourceforge.net/p/jsbml/code/2233 Author: niko-rodrigue Date: 2015-04-23 12:08:16 +0000 (Thu, 23 Apr 2015) Log Message: ----------- added a default load of the parsers for environment not setup properly for it (eclipse, matlab dynamic path, OSGi, ...) Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java Modified: trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java =================================================================== --- trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java 2015-04-23 11:25:34 UTC (rev 2232) +++ trunk/core/src/org/sbml/jsbml/xml/parsers/ParserManager.java 2015-04-23 12:08:16 UTC (rev 2233) @@ -21,8 +21,10 @@ */ package org.sbml.jsbml.xml.parsers; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.ServiceConfigurationError; import java.util.ServiceLoader; @@ -91,7 +93,8 @@ private void init() { // loading the ReadingParsers Iterator<ReadingParser> readingParserList = ServiceLoader.load(ReadingParser.class).iterator(); - + List<String> classNames = new ArrayList<String>(); + // TODO - each time we add one HashMap entry, check that it was not defined already // so that we notice problems as early as possible if two packages declared to take care of the same namespace @@ -102,7 +105,9 @@ if (readingParser != null) { String packageName = "core"; - + classNames.add(readingParser.getClass().getName()); + System.out.println("###DEBUG####; class name = " + readingParser.getClass().getName()); + if (readingParser instanceof PackageParser) { packageName = ((PackageParser) readingParser).getPackageName(); packageParsers.put(packageName, (PackageParser) readingParser); @@ -133,6 +138,8 @@ if (writingParser != null) { String packageName = "core"; + classNames.add(writingParser.getClass().getName()); + System.out.println("###DEBUG####; writer class name = " + writingParser.getClass().getName()); if (writingParser instanceof PackageParser) { packageName = ((PackageParser) writingParser).getPackageName(); @@ -149,7 +156,75 @@ } } + + // TODO - check the maps and add the parsers by hand if they are not present. + // prevent problems when developers are not setting properly eclipse, when jar + // files are not generated with + + String[] parserDefaults = {"org.sbml.jsbml.xml.parsers.SBMLCoreParser", "org.sbml.jsbml.xml.parsers.XMLNodeReader", + "org.sbml.jsbml.xml.parsers.MathMLStaxParser", "org.sbml.jsbml.xml.parsers.ArraysParser", "org.sbml.jsbml.xml.parsers.CompParser", + "org.sbml.jsbml.xml.parsers.DistribParser", "org.sbml.jsbml.xml.parsers.DynParser", "org.sbml.jsbml.xml.parsers.FBCParser", + "org.sbml.jsbml.xml.parsers.GroupsParser", "org.sbml.jsbml.xml.parsers.L3LayoutParser", "org.sbml.jsbml.xml.parsers.LayoutParser", + "org.sbml.jsbml.xml.parsers.MultiParser", "org.sbml.jsbml.xml.parsers.QualParser", "org.sbml.jsbml.xml.parsers.RenderParser", + "org.sbml.jsbml.xml.parsers.ReqParser", "org.sbml.jsbml.xml.parsers.SpatialParser"}; + for (String parserClassName : parserDefaults) { + if (! classNames.contains(parserClassName)) { + System.out.println("###DEBUG### adding parser '" + parserClassName + "' by hand"); + + try { + Object newInstance = Class.forName(parserClassName).newInstance(); + + if (newInstance instanceof ReadingParser) { + ReadingParser readingParser = (ReadingParser) newInstance; + + String packageName = "core"; + classNames.add(readingParser.getClass().getName()); + System.out.println("###DEBUG####; class name = " + readingParser.getClass().getName()); + + if (readingParser instanceof PackageParser) { + packageName = ((PackageParser) readingParser).getPackageName(); + packageParsers.put(packageName, (PackageParser) readingParser); + } + for (String namespaceURI : readingParser.getNamespaces()) { + readingParsers.put(namespaceURI, readingParser); + namespaceToNameMap.put(namespaceURI, packageName); + } + + if (readingParser instanceof WritingParser) { + for (String namespaceURI : readingParser.getNamespaces()) { + writingParsers.put(namespaceURI, (WritingParser) readingParser); + } + } + } + else if (newInstance instanceof WritingParser) + { + WritingParser writingParser = (WritingParser) newInstance; + + String packageName = "core"; + classNames.add(writingParser.getClass().getName()); + System.out.println("###DEBUG####; writer class name = " + writingParser.getClass().getName()); + + if (writingParser instanceof PackageParser) { + packageName = ((PackageParser) writingParser).getPackageName(); + packageParsers.put(packageName, (PackageParser) writingParser); + } + + for (String namespaceURI : writingParser.getNamespaces()) { + writingParsers.put(namespaceURI, writingParser); + namespaceToNameMap.put(namespaceURI, packageName); + } + } + } catch (InstantiationException | IllegalAccessException + | ClassNotFoundException e) + { + System.out.println("###DEBUG### problem loading class '" + parserClassName + "': " + e.getMessage()); + // e.printStackTrace(); + } + } + } + + } // <br /><dependency><br /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2015-04-23 11:25:47
|
Revision: 2232 http://sourceforge.net/p/jsbml/code/2232 Author: andreas-draeger Date: 2015-04-23 11:25:34 +0000 (Thu, 23 Apr 2015) Log Message: ----------- Extracted several user messages into a resource file for later localization support. Modified Paths: -------------- trunk/core/resources/org/sbml/jsbml/resources/Messages.xml trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java trunk/core/src/org/sbml/jsbml/AbstractNamedSBase.java trunk/core/src/org/sbml/jsbml/AbstractSBase.java trunk/core/src/org/sbml/jsbml/Annotation.java trunk/core/src/org/sbml/jsbml/Constraint.java trunk/core/src/org/sbml/jsbml/Event.java trunk/core/src/org/sbml/jsbml/History.java trunk/core/src/org/sbml/jsbml/KineticLaw.java trunk/core/src/org/sbml/jsbml/Model.java trunk/core/src/org/sbml/jsbml/Reaction.java trunk/core/src/org/sbml/jsbml/SBMLDocument.java trunk/core/src/org/sbml/jsbml/SpeciesReference.java trunk/core/src/org/sbml/jsbml/UnitDefinition.java trunk/core/src/org/sbml/jsbml/util/TreeNodeAdapter.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/Uncertainty.java trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynCompartmentPlugin.java trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynEventPlugin.java trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCModelPlugin.java trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCReactionPlugin.java trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCSpeciesPlugin.java trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProteinAssociation.java trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/LogicalOperator.java trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/Objective.java trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/Group.java trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/GroupsModelPlugin.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LayoutModelPlugin.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiCompartmentPlugin.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSimpleSpeciesReferencePlugin.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesReferencePlugin.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeature.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesTypeComponentMapInProduct.java trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.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/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/Polygon.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/RenderGroup.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderLayoutPlugin.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderListOfLayoutsPlugin.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/req/src/org/sbml/jsbml/ext/req/ReqSBasePlugin.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticGeometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGHomogeneousTransformation.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGObject.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGTransformation.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CoordinateComponent.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Domain.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/MixedGeometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricGeometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialCompartmentPlugin.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialModelPlugin.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialParameterPlugin.java Modified: trunk/core/resources/org/sbml/jsbml/resources/Messages.xml =================================================================== --- trunk/core/resources/org/sbml/jsbml/resources/Messages.xml 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/resources/org/sbml/jsbml/resources/Messages.xml 2015-04-23 11:25:34 UTC (rev 2232) @@ -30,7 +30,28 @@ </comment> <entry key="IndexExceedsBoundsException">Index {0,number,integer} >= {1,number,integer}</entry> + <entry key="IndexExceedsBoundsException2">Node {0} has no children.</entry> + <entry key="AbstractMathContainer.toFormula">Could not create infix formula from syntax tree.</entry> + <entry key="AbstractMathContainer.inclusion">{0} in {1}</entry> + <entry key="AbstractMathContainer.getDerivedUnitDefinition">Could not derive unit from syntax tree of {0}: {1}</entry> + + <entry key="AbstractNamedSBase.checkIdentifier">\"{0}\" is not a valid identifier for this {1}.</entry> + + <entry key="AbstractSBase.appendNotes">There was a problem adding the given XMLNode: ''{0}'' to the ''body'' XMLNode.</entry> + <entry key="AbstractSBase.createPlugin">The package namespace or name ''{0}'' is unknown!</entry> + <entry key="AbstractSBase.enablePackage">Package not enabled, could not find the SBMLDocument.</entry> + <entry key="AbstractSBase.fireNodeRemovedEvent">fireNodeRemovedEvent called on {0} (parent = {1})</entry> + <entry key="AbstractSBase.getCVTerm">No such controlled vocabulary term with index {0,number,integer}.</entry> + <entry key="AbstractSBase.registerChild1">Trying to register {0} ''{1}'', which is already registered under {2} ''{3}''.</entry> + <entry key="AbstractSBase.registerChild2">{0} ''{1}'' is associated to the different parent ''{2}''. Please remove it there before adding it to this ''{3}'' or add a clone of it to this element.</entry> + <entry key="AbstractSBase.registerChild3">Cannot register {0}.</entry> + <entry key="AbstractSBase.setMetaId">\"{0}\" is not a valid meta-identifier for this {1}.</entry> + <entry key="AbstractSBase.setSBOTerm">Cannot set invalid SBO term {0,number,integer} because it must not be smaller than zero or larger than 9999999.</entry> + <entry key="AbstractSBase.unregisterChild1">unregister called! {0} {1}</entry> + <entry key="AbstractSBase.unregisterChild2">Cannot unregister {0}.</entry> + <entry key="AbstractSBase.unregisterChild3">AbstractSBase - #unregisterChild(SBasePlugin) - called on ''{0}''</entry> + <entry key="AbstractSBase.addDeclaredNamespace">The only allowed prefix for a namespace is 'xmlns:'.</entry> <entry key="AbstractSBase.addExtensionExc">The package namespace or name ''{0}'' is unknown!</entry> <entry key="AbstractSBase.setNamespaceExc">An SBase element cannot belong to two different namespaces! Current namespace = ''{0}'', new namespace = ''{1}''</entry> Modified: trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -150,7 +150,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } @@ -180,12 +180,14 @@ name = getElementName(); SBase parent = getParentSBMLObject(); if ((parent != null) && (parent instanceof NamedSBase)) { - name += " in " + parent.toString(); + name = MessageFormat.format( + resourceBundle.getString("AbstractMathContainer.inclusion"), + name, parent.toString()); } } logger.warn(MessageFormat.format( - "Could not derive unit from syntax tree of {0}: {1}", name, - exc.getLocalizedMessage())); + resourceBundle.getString("AbstractMathContainer.getDerivedUnitDefinition"), + name, exc.getLocalizedMessage())); logger.debug(exc.getLocalizedMessage(), exc); } } @@ -233,8 +235,8 @@ public String getFormula() { try { return isSetMath() ? getMath().toFormula() : ""; - } catch (Throwable e) { - logger.warn("Could not create infix formula from syntax tree.", e); + } catch (Throwable exc) { + logger.warn(resourceBundle.getString("AbstractMathContainer.toFormula"), exc); return "invalid"; } } @@ -352,4 +354,5 @@ } return attributes; } + } Modified: trunk/core/src/org/sbml/jsbml/AbstractNamedSBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractNamedSBase.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/AbstractNamedSBase.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -162,7 +162,8 @@ boolean checkIdentifier(String sID) { if ((sID == null) || !SyntaxChecker.isValidId(sID, getLevel(), getVersion())) { throw new IllegalArgumentException(MessageFormat.format( - "\"{0}\" is not a valid identifier for this {1}.", sID, getElementName())); + resourceBundle.getString("AbstractNamedSBase.checkIdentifier"), + sID, getElementName())); } return true; } Modified: trunk/core/src/org/sbml/jsbml/AbstractSBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -689,7 +689,9 @@ for (i=0; i < addedNotes.getChildCount(); i++) { if (curBody.addChild(addedNotes.getChildAt(i)) < 0) { - logger.warn("There was a problem adding the given XMLNode: '" + SBMLtools.toXML(addedNotes.getChildAt(i)) + "' to the 'body' XMLNode."); + logger.warn(MessageFormat.format( + resourceBundle.getString("AbstractSBase.appendNotes"), + SBMLtools.toXML(addedNotes.getChildAt(i)))); return; } } @@ -731,7 +733,9 @@ for (i = 0; i < addedNotes.getChildCount(); i++) { if (curNotes.addChild(addedNotes.getChildAt(i)) < 0) { - logger.warn("There was a problem adding the given XMLNode: '" + SBMLtools.toXML(addedNotes.getChildAt(i)) + "' to the 'body' XMLNode."); + logger.warn(MessageFormat.format( + resourceBundle.getString("AbstractSBase.appendNotes"), + SBMLtools.toXML(addedNotes.getChildAt(i)))); return; } } @@ -760,7 +764,7 @@ * Level/Version combination than this current {@link SBase}, an * {@link LevelVersionError} is thrown. This method is only * package-wide visible because it is not intended to be a - * "real" check, rather than to indicate potential errors. + * <i>real</i> check, rather than to indicate potential errors. */ protected boolean checkLevelAndVersionCompatibility(SBase sbase) { if (sbase.getLevelAndVersion().equals(getLevelAndVersion())) { @@ -812,7 +816,7 @@ } throw new IllegalArgumentException(MessageFormat.format( - "The package namespace or name ''{0}'' is unknown!", + resourceBundle.getString("AbstractSBase.createPlugin"), nameOrUri)); } @@ -843,13 +847,12 @@ */ @Override public void enablePackage(String packageURIOrName, boolean enabled) { - SBMLDocument doc = getSBMLDocument(); if (doc != null) { doc.enablePackage(packageURIOrName, enabled); - } else { - logger.debug("Package not enabled, could not find the SBMLDocument."); + } else if (logger.isDebugEnabled()) { + logger.debug(resourceBundle.getString("AbstractSBase.enablePackage")); } } @@ -998,7 +1001,9 @@ TreeNode parent = getParent(); if (logger.isDebugEnabled()) { - logger.debug("fireNodeRemovedEvent called on " + this + " (parent = " + parent + ")"); + logger.debug(MessageFormat.format( + resourceBundle.getString("AbstractSBase.fireNodeRemovedEvent"), + this, parent)); } if ((parent != null) && (parent instanceof SBase)) { @@ -1076,10 +1081,10 @@ } } - throw new IndexOutOfBoundsException(isLeaf() ? MessageFormat.format( - "Node {0} has no children.", getElementName()) : MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", - childIndex, Math.min(pos, 0))); + throw new IndexOutOfBoundsException(isLeaf() ? + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException2"), getElementName()) : + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), + childIndex, Math.min(pos, 0))); } /* (non-Javadoc) @@ -1111,7 +1116,7 @@ return annotation.getCVTerm(index); } throw new IndexOutOfBoundsException(MessageFormat.format( - "No such controlled vocabulary term with index {0,number,integer}.", index)); + resourceBundle.getString("AbstractSBase.getCVTerm"), index)); } /* (non-Javadoc) @@ -1154,16 +1159,15 @@ */ @Override public SBasePlugin getExtension(String nameOrUri) { - // use always the package name in the map PackageParser packageParser = ParserManager.getManager().getPackageParser(nameOrUri); if (packageParser != null) { - return extensions.get(packageParser.getPackageName()); } - throw new IllegalArgumentException(MessageFormat.format("The package namespace or name ''{0}'' is unknown!", nameOrUri)); + throw new IllegalArgumentException(MessageFormat.format( + resourceBundle.getString("AbstractSBase.createPlugin"), nameOrUri)); } /* (non-Javadoc) @@ -1383,7 +1387,8 @@ } } - throw new IllegalArgumentException(MessageFormat.format("The package namespace or name ''{0}'' is unknown!", nameOrUri)); + throw new IllegalArgumentException(MessageFormat.format( + resourceBundle.getString("AbstractSBase.createPlugin"), nameOrUri)); } /* (non-Javadoc) @@ -1616,7 +1621,8 @@ // return false; } - throw new IllegalArgumentException(MessageFormat.format("The package namespace or name ''{0}'' is unknown!", nameOrUri)); + throw new IllegalArgumentException(MessageFormat.format( + resourceBundle.getString("AbstractSBase.createPlugin"), nameOrUri)); } /* (non-Javadoc) @@ -1691,11 +1697,11 @@ if ((sbase != null) && (sbase.getParent() != null)) { if (sbase.getParent() == this) { logger.warn(MessageFormat.format( - "Trying to register {0} ''{1}'', which is already registered under {2} ''{3}''.", + resourceBundle.getString("AbstractSBase.registerChild1"), sbase.getElementName(), sbase, getElementName(), this)); } else { logger.warn(MessageFormat.format( - "{0} ''{1}'' is associated to the different parent ''{2}''. Please remove it there before adding it to this ''{3}'' or add a clone of it to this element.", + resourceBundle.getString("AbstractSBase.registerChild2"), sbase.getClass().getSimpleName(), sbase, sbase.getParent(), this)); } return false; @@ -1743,7 +1749,8 @@ sbase.addAllChangeListeners(listeners); throw new IllegalArgumentException(MessageFormat.format( - "Cannot register {0}.", sbase.getElementName())); + resourceBundle.getString("AbstractSBase.registerChild3"), + sbase.getElementName())); } // TODO - set package version and namespace if needed @@ -1918,7 +1925,7 @@ throw new PropertyNotAvailableException(TreeNodeChangeEvent.metaId, this); } else if (!SyntaxChecker.isValidMetaId(metaId)) { throw new IllegalArgumentException(MessageFormat.format( - "\"{0}\" is not a valid meta-identifier for this {1}.", + resourceBundle.getString("AbstractSBase.setMetaId"), metaId, getElementName())); } } @@ -2031,7 +2038,7 @@ } if (!SBO.checkTerm(term)) { throw new IllegalArgumentException(MessageFormat.format( - "Cannot set invalid SBO term {0,number,integer} because it must not be smaller than zero or larger than 9999999.", + resourceBundle.getString("AbstractSBase.setSBOTerm"), term)); } Integer oldTerm = Integer.valueOf(sboTerm); @@ -2086,8 +2093,10 @@ public void unregisterChild(SBase sbase) { if (logger.isDebugEnabled()) { - logger.debug("unregister called! " + sbase.getElementName() + " " - + (sbase instanceof NamedSBase ? ((NamedSBase) sbase).getId() : "")); + logger.debug(MessageFormat.format( + resourceBundle.getString("AbstractSBase.unregisterChild1"), + sbase.getElementName(), + (sbase instanceof NamedSBase ? ((NamedSBase) sbase).getId() : ""))); } if ((sbase != null)) { @@ -2103,7 +2112,8 @@ // If possible, recursively unregister all ids of the SBase in our model: if ((idManager != null) && !idManager.unregister(sbase)) { - throw new IllegalArgumentException(MessageFormat.format("Cannot unregister {0}.", + throw new IllegalArgumentException(MessageFormat.format( + resourceBundle.getString("AbstractSBase.unregisterChild2"), sbase.getElementName())); } @@ -2125,7 +2135,9 @@ private void unregisterChild(SBasePlugin sbasePlugin) { if (logger.isDebugEnabled()) { - logger.debug("AbstractSBase - #unregisterChild(SBasePlugin) - called on '" + sbasePlugin + "'"); + logger.debug(MessageFormat.format( + resourceBundle.getString("AbstractSBase.unregisterChild3"), + sbasePlugin)); } int childCount = sbasePlugin.getChildCount(); @@ -2223,7 +2235,9 @@ return; } - throw new IllegalArgumentException(MessageFormat.format("The package namespace or name ''{0}'' is unknown!", nameOrUri)); + throw new IllegalArgumentException(MessageFormat.format( + resourceBundle.getString("AbstractSBase.createPlugin"), + nameOrUri)); } @Override Modified: trunk/core/src/org/sbml/jsbml/Annotation.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Annotation.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/Annotation.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -399,7 +399,7 @@ // pos++; // } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/Constraint.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Constraint.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/Constraint.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -125,7 +125,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/Event.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Event.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/Event.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -404,7 +404,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/History.java =================================================================== --- trunk/core/src/org/sbml/jsbml/History.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/History.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -184,7 +184,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/KineticLaw.java =================================================================== --- trunk/core/src/org/sbml/jsbml/KineticLaw.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/KineticLaw.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -288,7 +288,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/Model.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Model.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/Model.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -1876,7 +1876,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/Reaction.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Reaction.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/Reaction.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -511,7 +511,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/SBMLDocument.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SBMLDocument.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/SBMLDocument.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -662,7 +662,7 @@ return getModel(); } } - throw new IndexOutOfBoundsException(MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + throw new IndexOutOfBoundsException(MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/SpeciesReference.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SpeciesReference.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/SpeciesReference.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -279,7 +279,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/UnitDefinition.java =================================================================== --- trunk/core/src/org/sbml/jsbml/UnitDefinition.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/UnitDefinition.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -697,7 +697,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, + Math.min(pos, 0))); } Modified: trunk/core/src/org/sbml/jsbml/util/TreeNodeAdapter.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/TreeNodeAdapter.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/core/src/org/sbml/jsbml/util/TreeNodeAdapter.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -176,7 +176,7 @@ } } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, getChildCount())); } Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -272,7 +272,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -600,7 +600,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -535,7 +535,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -485,7 +485,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -615,7 +615,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java =================================================================== --- trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -177,7 +177,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java =================================================================== --- trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -185,7 +185,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java =================================================================== --- trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -479,7 +479,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/Uncertainty.java =================================================================== --- trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/Uncertainty.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/Uncertainty.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -236,7 +236,7 @@ } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynCompartmentPlugin.java =================================================================== --- trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynCompartmentPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynCompartmentPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -267,7 +267,7 @@ public TreeNode getChildAt(int childIndex) { if (childIndex < 0 || childIndex >= 1) { throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, +Math.min(getChildCount(), 0))); } Modified: trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynEventPlugin.java =================================================================== --- trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynEventPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/dyn/src/org/sbml/jsbml/ext/dyn/DynEventPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -293,7 +293,7 @@ public TreeNode getChildAt(int childIndex) { if (childIndex < 0 || childIndex >= 1) { throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, +Math.min(getChildCount(), 0))); } Modified: trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCModelPlugin.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCModelPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCModelPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -259,7 +259,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCReactionPlugin.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCReactionPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCReactionPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -179,7 +179,7 @@ } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCSpeciesPlugin.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCSpeciesPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/FBCSpeciesPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -166,7 +166,7 @@ } int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, + Math.min(pos, 0))); } Modified: trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProteinAssociation.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProteinAssociation.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProteinAssociation.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -158,7 +158,7 @@ pos++; } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/LogicalOperator.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/LogicalOperator.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/LogicalOperator.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -223,7 +223,7 @@ return getListOfAssociations().get(index); } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/Objective.java =================================================================== --- trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/Objective.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/fbc/src/org/sbml/jsbml/ext/fbc/Objective.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -312,7 +312,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/Group.java =================================================================== --- trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/Group.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/Group.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -198,7 +198,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", index, + resourceBundle.getString("IndexExceedsBoundsException"), index, +Math.min(position, 0))); } Modified: trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/GroupsModelPlugin.java =================================================================== --- trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/GroupsModelPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/groups/src/org/sbml/jsbml/ext/groups/GroupsModelPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -287,7 +287,7 @@ public SBase getChildAt(int childIndex) { if (childIndex < 0 || childIndex >= 1) { throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, +Math.min(getChildCount(), 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -229,7 +229,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -237,7 +237,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -171,7 +171,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -525,7 +525,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -249,7 +249,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -622,7 +622,7 @@ } } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LayoutModelPlugin.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LayoutModelPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LayoutModelPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -215,7 +215,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, pos)); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -218,7 +218,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -227,7 +227,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -179,7 +179,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -178,7 +178,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiCompartmentPlugin.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiCompartmentPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiCompartmentPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -531,7 +531,7 @@ } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -289,7 +289,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSimpleSpeciesReferencePlugin.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSimpleSpeciesReferencePlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSimpleSpeciesReferencePlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -268,7 +268,7 @@ @Override public TreeNode getChildAt(int index) { throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(index, 0))); } } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -621,7 +621,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesReferencePlugin.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesReferencePlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesReferencePlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -371,7 +371,7 @@ } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeature.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeature.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeature.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -627,7 +627,7 @@ } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -525,7 +525,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -1297,7 +1297,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesTypeComponentMapInProduct.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesTypeComponentMapInProduct.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesTypeComponentMapInProduct.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -618,7 +618,7 @@ } throw new IndexOutOfBoundsException( - MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", + MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java =================================================================== --- trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -190,7 +190,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.java =================================================================== --- trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -390,7 +390,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", + resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -311,7 +311,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -155,7 +155,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -186,7 +186,7 @@ } int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -285,7 +285,7 @@ } int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -121,7 +121,7 @@ } int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -213,7 +213,7 @@ } int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -303,7 +303,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -107,7 +107,7 @@ pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2015-04-23 11:25:34 UTC (rev 2232) @@ -793,7 +793,7 @@ } int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, + resourceBundle.getString("IndexExceedsBoundsException"), childIndex, Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2015-04-23 09:46:58 UTC (rev 2231) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2015-04-23 11:25:34 UTC (rev 2232)... [truncated message content] |
From: <pd...@us...> - 2015-04-23 09:47:05
|
Revision: 2231 http://sourceforge.net/p/jsbml/code/2231 Author: pdp10 Date: 2015-04-23 09:46:58 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package v0.90 - extraction of primitive types Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java 2015-04-23 09:44:25 UTC (rev 2230) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java 2015-04-23 09:46:58 UTC (rev 2231) @@ -44,27 +44,6 @@ public class CSGSetOperator extends CSGNode { /** - * @author Alex Thomas - * @version $Rev$ - * @since 1.0 - * @date 10.12.2014 - */ - public static enum SetOperation { - /** - * - */ - UNION, - /** - * - */ - INTERSECTION, - /** - * - */ - RELATIVECOMPONENT; - } - - /** * */ private static final long serialVersionUID = 3448308755493169761L; Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java 2015-04-23 09:44:25 UTC (rev 2230) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java 2015-04-23 09:46:58 UTC (rev 2231) @@ -43,19 +43,6 @@ */ public class Geometry extends AbstractSpatialNamedSBase { - /** - * - * @author Alex Thomas - * @version $Rev$ - * @since 0.8 - */ - public static enum GeometryKind { - /** - * cartesian - */ - CARTESIAN; - } - /** * Generated serial version identifier. */ Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java 2015-04-23 09:44:25 UTC (rev 2230) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java 2015-04-23 09:46:58 UTC (rev 2231) @@ -41,74 +41,6 @@ */ public class SampledField extends AbstractSpatialNamedSBase { - /** - * @author Alex Thomas - * @author Andreas Dräger - * @version $Rev$ - * @since 1.0 - */ - public enum DataKind { - /** - * - */ - DOUBLE, - /** - * - */ - FLOAT, - /** - * - */ - UINT8, - /** - * - */ - UINT16, - /** - * - */ - UINT32; - } - - /** - * @author Alex Thomas - * @author Andreas Dräger - * @author Piero Dalle Pezze - * @version $Rev$ - * @since 1.0 - */ - public enum CompressionKind { - /** - * - */ - UNCOMPRESSED, - /** - * - */ - DEFLATED, - /** - * - */ - BASE64; - } - - /** - * @author Alex Thomas - * @author Andreas Dräger - * @version $Rev$ - * @since 1.0 - */ - public enum InterpolationKind { - /** - * - */ - NEARESTNEIGHBOR, - /** - * - */ - LINEAR; - } - /** * Generated serial version identifier. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 09:44:33
|
Revision: 2230 http://sourceforge.net/p/jsbml/code/2230 Author: pdp10 Date: 2015-04-23 09:44:25 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package v0.90 - extraction of primitive types Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionCoefficient.java Added Paths: ----------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionKind.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/FunctionKind.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/GeometryKind.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/InterpolationKind.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionCoefficient.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionCoefficient.java 2015-04-23 09:43:42 UTC (rev 2229) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionCoefficient.java 2015-04-23 09:44:25 UTC (rev 2230) @@ -37,28 +37,7 @@ /** * - * @author - * @version - * @since */ - public static enum DiffusionKind { - /** - * Isotropic - */ - ISOTROPIC, - /** - * Tensor - */ - TENSOR, - /** - * Anisotropic - */ - ANISOTROPIC; - } - - /** - * - */ private DiffusionKind diffusionKind; /** * Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionKind.java 2015-04-23 09:44:25 UTC (rev 2230) @@ -0,0 +1,44 @@ +/* + * $Id: DiffusionKind.java 2109 2015-01-05 04:50:45Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DiffusionKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Piero Dalle Pezze + * @version $Rev$ + * @since 1.0 + * @date 23 Apr 2015 + */ +public enum DiffusionKind { + /** + * Isotropic + */ + ISOTROPIC, + /** + * Tensor + */ + TENSOR, + /** + * Anisotropic + */ + ANISOTROPIC; +} \ No newline at end of file Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/FunctionKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/FunctionKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/FunctionKind.java 2015-04-23 09:44:25 UTC (rev 2230) @@ -0,0 +1,42 @@ +/* + * $Id: BoundaryConditionKind.java 2109 2015-01-05 04:50:45Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/FunctionKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Alex Thomas + * @author Andreas Dräger + * @version $Rev: 2205 $ + * @since 1.0 + * @date 10.12.2014 + */ +public enum FunctionKind { + /** + * Math child element contains an inequality + */ + LAYERED, + // /** + // * Shape is represented by a real-valued function whose sign + // * indicates coverage by the shape + // */ + // R_FUNCTION; +} \ No newline at end of file Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/GeometryKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/GeometryKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/GeometryKind.java 2015-04-23 09:44:25 UTC (rev 2230) @@ -0,0 +1,36 @@ +/* + * $Id: GeometryKind.java 2109 2015-01-05 04:50:45Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/GeometryKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Alex Thomas + * @author Piero Dalle Pezze + * @version $Rev: 2206 $ + * @since 0.8 + */ +public enum GeometryKind { + /** + * cartesian + */ + CARTESIAN; +} \ No newline at end of file Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/InterpolationKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/InterpolationKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/InterpolationKind.java 2015-04-23 09:44:25 UTC (rev 2230) @@ -0,0 +1,41 @@ +/* + * $Id: InterpolationKind.java 2109 2015-01-05 04:50:45Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/InterpolationKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Alex Thomas + * @author Andreas Dräger + * @author Piero Dalle Pezze + * @version $Rev: 2216 $ + * @since 1.0 + */ +public enum InterpolationKind { + /** + * + */ + NEARESTNEIGHBOR, + /** + * + */ + LINEAR; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 09:43:44
|
Revision: 2229 http://sourceforge.net/p/jsbml/code/2229 Author: pdp10 Date: 2015-04-23 09:43:42 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package v0.90 - extraction of primitive types Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java Added Paths: ----------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PolygonKind.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PrimitiveKind.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SetOperation.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java 2015-04-23 09:42:41 UTC (rev 2228) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricObject.java 2015-04-23 09:43:42 UTC (rev 2229) @@ -38,54 +38,6 @@ public class ParametricObject extends AbstractSpatialNamedSBase { /** - * @author Alex Thomas - * @author Andreas Dräger - * @version $Rev$ - * @since 1.0 - */ - public enum PolygonKind { - /** - * - */ - TRIANGLE, - - /** - * - */ - QUADRILATERAL; - } - - public enum CompressionKind { - /** - * - */ - UNCOMPRESSED, - /** - * - */ - DEFLATED, - /** - * - */ - BASE64; - } - - public enum DataKind { - /** - * - */ - UINT8, - /** - * - */ - UINT16, - /** - * - */ - UINT32; - } - - /** * */ private PolygonKind polygonType; Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PolygonKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PolygonKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PolygonKind.java 2015-04-23 09:43:42 UTC (rev 2229) @@ -0,0 +1,42 @@ +/* + * $Id: PolygonKind.java 2206 2015-04-23 09:57:59Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PolygonKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Alex Thomas + * @author Andreas Dräger + * @author Piero Dalle Pezze + * @version $Rev: 2209 $ + * @since 1.0 + */ +public enum PolygonKind { + /** + * + */ + TRIANGLE, + + /** + * + */ + QUADRILATERAL; +} \ No newline at end of file Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PrimitiveKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PrimitiveKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/PrimitiveKind.java 2015-04-23 09:43:42 UTC (rev 2229) @@ -0,0 +1,62 @@ +/* + * $Id: CompressionKind.java 2206 2015-04-23 09:57:59Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CompressionKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Alex Thomas + * @author Piero Dalle Pezze + * @version $Rev: 2203 $ + * @since 1.0 + * @date 10.12.2014 + */ +public enum PrimitiveKind { + /** + * sphere + */ + SPHERE, + /** + * cube + */ + CUBE, + /** + * cylinder + */ + CYLINDER, + /** + * cone + */ + CONE, + /** + * circle + */ + CIRCLE, + /** + * square + */ + SQUARE, + /** + * rightTriangle + */ + RIGHTTRIANGLE; + +} \ No newline at end of file Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SetOperation.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SetOperation.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SetOperation.java 2015-04-23 09:43:42 UTC (rev 2229) @@ -0,0 +1,45 @@ +/* + * $Id: CompressionKind.java 2206 2015-04-23 09:57:59Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CompressionKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Alex Thomas + * @author Piero Dalle Pezze + * @version $Rev: 2203 $ + * @since 1.0 + * @date 10.12.2014 + */ +public enum SetOperation { + /** + * + */ + UNION, + /** + * + */ + INTERSECTION, + /** + * + */ + RELATIVECOMPONENT; +} \ No newline at end of file Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java 2015-04-23 09:42:41 UTC (rev 2228) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialPoints.java 2015-04-23 09:43:42 UTC (rev 2229) @@ -42,44 +42,6 @@ private static final long serialVersionUID = -3467717442431545263L; - public enum CompressionKind { - /** - * - */ - UNCOMPRESSED, - /** - * - */ - DEFLATED, - /** - * - */ - BASE64; - } - - public enum DataKind { - /** - * - */ - UINT8, - /** - * - */ - UINT16, - /** - * - */ - UINT32, - /** - * - */ - FLOAT, - /** - * - */ - DOUBLE; - } - /** * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 09:42:48
|
Revision: 2228 http://sourceforge.net/p/jsbml/code/2228 Author: pdp10 Date: 2015-04-23 09:42:41 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package v0.90 - extraction of primitive types Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticVolume.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryCondition.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGPrimitive.java Added Paths: ----------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryConditionKind.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticVolume.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticVolume.java 2015-04-23 09:21:12 UTC (rev 2227) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticVolume.java 2015-04-23 09:42:41 UTC (rev 2228) @@ -43,25 +43,6 @@ public class AnalyticVolume extends AbstractMathContainer implements SpatialNamedSBase{ /** - * @author Alex Thomas - * @author Andreas Dräger - * @version $Rev$ - * @since 1.0 - * @date 10.12.2014 - */ - public static enum FunctionKind { - /** - * Math child element contains an inequality - */ - LAYERED, - // /** - // * Shape is represented by a real-valued function whose sign - // * indicates coverage by the shape - // */ - // R_FUNCTION; - } - - /** * */ String spatialId; Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryCondition.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryCondition.java 2015-04-23 09:21:12 UTC (rev 2227) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryCondition.java 2015-04-23 09:42:41 UTC (rev 2228) @@ -37,35 +37,6 @@ public class BoundaryCondition extends ParameterType { /** - * - * @author Andreas Dräger - * @version $Rev$ - * @since 0.8 - */ - public static enum BoundaryKind { - /** - * Neumann - */ - NEUMANN, - /** - * Dirichlet - */ - DIRICHLET, - /** - * Robin value coefficient - */ - ROBIN_VALUECOEFFICIENT, - /** - * Robin inward normal gradient coefficient - */ - ROBIN_INWARDNORMALGRADIENTCOEFFICIENT, - /** - * Robin sum - */ - ROBIN_SUM; - } - - /** * Generated serial version identifier. */ private static final long serialVersionUID = -6986768113234565819L; @@ -83,7 +54,7 @@ /** * */ - private BoundaryKind type; + private BoundaryConditionKind type; /** * @@ -168,7 +139,7 @@ * * @return the value of type */ - public BoundaryKind getType() { + public BoundaryConditionKind getType() { if (isSetType()) { return type; } @@ -191,8 +162,8 @@ * Sets the value of type * @param type */ - public void setType(BoundaryKind type) { - BoundaryKind oldType = this.type; + public void setType(BoundaryConditionKind type) { + BoundaryConditionKind oldType = this.type; this.type = type; firePropertyChange(SpatialConstants.type, oldType, this.type); } @@ -204,7 +175,7 @@ if (!Pattern.matches("[a-z]*", type)) { throw new SBMLException("The value is not all lower-case."); } - setType(BoundaryKind.valueOf(type.toUpperCase())); + setType(BoundaryConditionKind.valueOf(type.toUpperCase())); } /** @@ -215,7 +186,7 @@ */ public boolean unsetType() { if (isSetType()) { - BoundaryKind oldType = type; + BoundaryConditionKind oldType = type; type = null; firePropertyChange(SpatialConstants.type, oldType, type); return true; Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryConditionKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryConditionKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryConditionKind.java 2015-04-23 09:42:41 UTC (rev 2228) @@ -0,0 +1,52 @@ +/* + * $Id: BoundaryConditionKind.java 2109 2015-01-05 04:50:45Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/BoundaryConditionKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Piero Dalle Pezze + * @version $Rev$ + * @since 1.0 + * @date 23 Apr 2015 + */ +public enum BoundaryConditionKind { + /** + * Neumann + */ + NEUMANN, + /** + * Dirichlet + */ + DIRICHLET, + /** + * Robin value coefficient + */ + ROBIN_VALUECOEFFICIENT, + /** + * Robin inward normal gradient coefficient + */ + ROBIN_INWARDNORMALGRADIENTCOEFFICIENT, + /** + * Robin sum + */ + ROBIN_SUM; +} \ No newline at end of file Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGPrimitive.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGPrimitive.java 2015-04-23 09:21:12 UTC (rev 2227) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGPrimitive.java 2015-04-23 09:42:41 UTC (rev 2228) @@ -37,44 +37,6 @@ public class CSGPrimitive extends CSGNode{ /** - * @author Alex Thomas - * @version $Rev$ - * @since 1.0 - * @date 10.12.2014 - */ - public enum PrimitiveKind { - /** - * sphere - */ - SPHERE, - /** - * cube - */ - CUBE, - /** - * cylinder - */ - CYLINDER, - /** - * cone - */ - CONE, - /** - * circle - */ - CIRCLE, - /** - * square - */ - SQUARE, - /** - * rightTriangle - */ - RIGHTTRIANGLE; - - } - - /** * */ private static final long serialVersionUID = -6783804853380306509L; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2015-04-23 09:21:16
|
Revision: 2227 http://sourceforge.net/p/jsbml/code/2227 Author: andreas-draeger Date: 2015-04-23 09:21:12 +0000 (Thu, 23 Apr 2015) Log Message: ----------- * Removed unnecessary "+" symbol in getChildAt methods * Added alternative constructors to the MathMLStaxCompiler * Added more convenient methods to Annotation * Smaller changes (such as removing unused imports) Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java trunk/core/src/org/sbml/jsbml/AbstractSBase.java trunk/core/src/org/sbml/jsbml/Annotation.java trunk/core/src/org/sbml/jsbml/CVTerm.java trunk/core/src/org/sbml/jsbml/Constraint.java trunk/core/src/org/sbml/jsbml/Event.java trunk/core/src/org/sbml/jsbml/KineticLaw.java trunk/core/src/org/sbml/jsbml/Model.java trunk/core/src/org/sbml/jsbml/Reaction.java trunk/core/src/org/sbml/jsbml/SBMLDocument.java trunk/core/src/org/sbml/jsbml/SpeciesReference.java trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.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/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/Polygon.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/RenderGroup.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderLayoutPlugin.java trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderListOfLayoutsPlugin.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/req/src/org/sbml/jsbml/ext/req/ReqSBasePlugin.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticGeometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGHomogeneousTransformation.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGObject.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGTransformation.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CoordinateComponent.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Domain.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/MixedGeometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java trunk/modules/celldesigner/src/org/sbml/jsbml/celldesigner/SBMLLayoutVisualizer.java Modified: trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/AbstractMathContainer.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -151,7 +151,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/AbstractSBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -397,7 +397,7 @@ } /* (non-Javadoc) - * @see org.sbml.jlibsbml.SBase#appendNotes(java.lang.String) + * @see org.sbml.jsbml.SBase#appendNotes(java.lang.String) */ @Override public void appendNotes(String notes) throws XMLStreamException { Modified: trunk/core/src/org/sbml/jsbml/Annotation.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Annotation.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/Annotation.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -577,6 +577,14 @@ return getNonRDFannotation(); } + /** + * + * @param nonRDFannotation + */ + public void setXMLNode(XMLNode nonRDFannotation) { + setNonRDFAnnotation(nonRDFannotation); + } + /* (non-Javadoc) * @see org.sbml.jsbml.AbstractTreeNode#hashCode() */ Modified: trunk/core/src/org/sbml/jsbml/CVTerm.java =================================================================== --- trunk/core/src/org/sbml/jsbml/CVTerm.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/CVTerm.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -29,7 +29,6 @@ import java.util.regex.Pattern; import javax.swing.tree.TreeNode; -import javax.xml.stream.XMLStreamException; import org.sbml.jsbml.util.StringTools; import org.sbml.jsbml.util.TreeNodeAdapter; Modified: trunk/core/src/org/sbml/jsbml/Constraint.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Constraint.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/Constraint.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -126,7 +126,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/Event.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Event.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/Event.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -405,7 +405,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/KineticLaw.java =================================================================== --- trunk/core/src/org/sbml/jsbml/KineticLaw.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/KineticLaw.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -289,7 +289,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/Model.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Model.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/Model.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -1877,7 +1877,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/Reaction.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Reaction.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/Reaction.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -512,7 +512,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/SBMLDocument.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SBMLDocument.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/SBMLDocument.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -663,7 +663,7 @@ } } throw new IndexOutOfBoundsException(MessageFormat.format("Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/SpeciesReference.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SpeciesReference.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/SpeciesReference.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -280,7 +280,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java =================================================================== --- trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/core/src/org/sbml/jsbml/util/compilers/MathMLXMLStreamCompiler.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -114,6 +114,25 @@ } /** + * + * @param indent + * @throws XMLStreamException + */ + public MathMLXMLStreamCompiler(String indent) throws XMLStreamException { + SMOutputFactory smFactory = new SMOutputFactory(XMLOutputFactory.newInstance()); + writer = smFactory.createStax2Writer(new StringWriter()); + this.indent = indent; + } + + /** + * @throws XMLStreamException + * + */ + public MathMLXMLStreamCompiler() throws XMLStreamException { + this(""); + } + + /** * Writes an {@link ASTNode} the mathML. * * @param astNode the {@link ASTNode} to serialize as mathML Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompModelPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -273,7 +273,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - childIndex, +Math.min(pos, 0))); + childIndex, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBMLDocumentPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -601,7 +601,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - childIndex, +Math.min(pos, 0))); + childIndex, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/CompSBasePlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -536,7 +536,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/SBaseRef.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -486,7 +486,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java =================================================================== --- trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/comp/src/org/sbml/jsbml/ext/comp/Submodel.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -616,7 +616,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java =================================================================== --- trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribFunctionDefinitionPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -178,7 +178,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } @Override Modified: trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java =================================================================== --- trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DistribSBasePlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -186,7 +186,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } @Override Modified: trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java =================================================================== --- trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/distrib/src/org/sbml/jsbml/ext/distrib/DrawFromDistribution.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -480,7 +480,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/BoundingBox.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -230,7 +230,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/CubicBezier.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -238,7 +238,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Curve.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -172,7 +172,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GeneralGlyph.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -526,7 +526,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/GraphicalObject.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -250,7 +250,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/Layout.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -623,7 +623,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/LineSegment.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -219,7 +219,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReactionGlyph.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -228,7 +228,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/ReferenceGlyph.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -180,7 +180,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java =================================================================== --- trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/layout/src/org/sbml/jsbml/ext/layout/SpeciesReferenceGlyph.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -179,7 +179,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiModelPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -290,7 +290,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - childIndex, +Math.min(pos, 0))); + childIndex, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/MultiSpeciesPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -622,7 +622,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - childIndex, +Math.min(pos, 0))); + childIndex, Math.min(pos, 0))); } @Override Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesFeatureType.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -526,7 +526,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } Modified: trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java =================================================================== --- trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/multi/src/org/sbml/jsbml/ext/multi/SpeciesType.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -1298,7 +1298,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } Modified: trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java =================================================================== --- trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/QualModelPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -191,7 +191,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - childIndex, +Math.min(pos, 0))); + childIndex, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.java =================================================================== --- trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/qual/src/org/sbml/jsbml/ext/qual/Transition.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -391,7 +391,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - index, +Math.min(pos, 0))); + index, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GlobalRenderInformation.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -312,7 +312,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientBase.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -156,7 +156,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /** Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/GradientStop.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -187,7 +187,7 @@ int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Image.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -286,7 +286,7 @@ int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /** Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LineEnding.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -122,7 +122,7 @@ int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /** Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LinearGradient.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -214,7 +214,7 @@ int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /** Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/LocalRenderInformation.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -304,7 +304,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Polygon.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -108,7 +108,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Rectangle.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -794,7 +794,7 @@ int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderCubicBezier.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -146,7 +146,7 @@ int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderGroup.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderGroup.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderGroup.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -379,7 +379,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderInformationBase.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -700,7 +700,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderLayoutPlugin.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderLayoutPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderLayoutPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -119,7 +119,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /** Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderListOfLayoutsPlugin.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderListOfLayoutsPlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderListOfLayoutsPlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -131,7 +131,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/RenderPoint.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -119,7 +119,7 @@ int pos = 0; throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", childIndex, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java =================================================================== --- trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/render/src/org/sbml/jsbml/ext/render/Style.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -172,7 +172,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* Modified: trunk/extensions/req/src/org/sbml/jsbml/ext/req/ReqSBasePlugin.java =================================================================== --- trunk/extensions/req/src/org/sbml/jsbml/ext/req/ReqSBasePlugin.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/req/src/org/sbml/jsbml/ext/req/ReqSBasePlugin.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -332,7 +332,7 @@ throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } // TODO - support the old attributes from the first draft specs ?? Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticGeometry.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticGeometry.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/AnalyticGeometry.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -265,7 +265,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGHomogeneousTransformation.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGHomogeneousTransformation.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGHomogeneousTransformation.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -281,7 +281,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGObject.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGObject.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGObject.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -397,7 +397,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGSetOperator.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -631,7 +631,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGTransformation.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGTransformation.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CSGTransformation.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -188,7 +188,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CoordinateComponent.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CoordinateComponent.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CoordinateComponent.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -344,7 +344,7 @@ } throw new IndexOutOfBoundsException(isLeaf() ? MessageFormat.format( "Node {0} has no children.", getElementName()) : MessageFormat.format( - "Index {0,number,integer} >= {1,number,integer}", childIndex, +Math.min(pos, 0))); + "Index {0,number,integer} >= {1,number,integer}", childIndex, Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Domain.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Domain.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Domain.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -349,7 +349,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/Geometry.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -1359,7 +1359,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/MixedGeometry.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/MixedGeometry.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/MixedGeometry.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -525,7 +525,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -729,7 +729,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -364,7 +364,7 @@ } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", index, - +Math.min(pos, 0))); + Math.min(pos, 0))); } /* (non-Javadoc) Modified: trunk/modules/celldesigner/src/org/sbml/jsbml/celldesigner/SBMLLayoutVisualizer.java =================================================================== --- trunk/modules/celldesigner/src/org/sbml/jsbml/celldesigner/SBMLLayoutVisualizer.java 2015-04-23 08:49:20 UTC (rev 2226) +++ trunk/modules/celldesigner/src/org/sbml/jsbml/celldesigner/SBMLLayoutVisualizer.java 2015-04-23 09:21:12 UTC (rev 2227) @@ -114,7 +114,7 @@ public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(new File(System .getProperties().getProperty("user.home") + "/Desktop")); - SBMLFileFilter fileFilter=new SBMLFileFilter(); + SBMLFileFilter fileFilter = new SBMLFileFilter(); chooser.setFileFilter(fileFilter); int retrival = chooser.showSaveDialog(null); if (retrival == JFileChooser.APPROVE_OPTION) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 08:49:28
|
Revision: 2226 http://sourceforge.net/p/jsbml/code/2226 Author: pdp10 Date: 2015-04-23 08:49:20 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package v0.90 Added Paths: ----------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CompressionKind.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DataKind.java Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CompressionKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CompressionKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CompressionKind.java 2015-04-23 08:49:20 UTC (rev 2226) @@ -0,0 +1,44 @@ +/* + * $Id: CompressionKind.java 2206 2015-04-23 09:57:59Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/CompressionKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Piero Dalle Pezze + * @version $Rev$ + * @since 1.0 + * @date 23 Apr 2015 + */ +public enum CompressionKind { + /** + * If no compression is used + */ + UNCOMPRESSED, + /** + * If the deflation algorithm was used to compress the text version of the data + */ + DEFLATED, + /** + * If the base 64 algorithm was used to transform the binary form of the actual members into text + */ + BASE64; +} \ No newline at end of file Added: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DataKind.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DataKind.java (rev 0) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DataKind.java 2015-04-23 08:49:20 UTC (rev 2226) @@ -0,0 +1,53 @@ +/* + * $Id: DataKind.java 2206 2015-04-23 09:57:59Z pdp10 $ + * $URL: svn+ssh://pd...@sv.../p/jsbml/code/trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/DataKind.java $ + * ---------------------------------------------------------------------------- + * 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-2015 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 + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * + * 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.spatial; + + +/** + * This enum type was created following the specifications defined in Spatial Package v0.90. + * @author Piero Dalle Pezze + * @version $Rev$ + * @since 1.0 + * @date 23 Apr 2015 + */ +public enum DataKind { + /** + * To indicate 8-bit unsigned integer + */ + UINT8, + /** + * To indicate 16-bit unsigned integer + */ + UINT16, + /** + * To indicate 32-bit unsigned integer + */ + UINT32, + /** + * To indicate single-precision (32-bit) floating point values + */ + FLOAT, + /** + * To indicate double-precision (64-bit) floating point values + */ + DOUBLE; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 08:22:18
|
Revision: 2225 http://sourceforge.net/p/jsbml/code/2225 Author: pdp10 Date: 2015-04-23 08:22:16 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package v0.90 - use of spatialPoints instead of listOfSpatialPoints. Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java 2015-04-23 08:19:04 UTC (rev 2224) +++ trunk/extensions/spatial/src/org/sbml/jsbml/xml/parsers/SpatialParser.java 2015-04-23 08:22:16 UTC (rev 2225) @@ -378,9 +378,9 @@ } } else if (contextObject instanceof ParametricGeometry) { ParametricGeometry pg = (ParametricGeometry) contextObject; - if (elementName.equals(SpatialConstants.listOfSpatialPoints)){ - ListOf<SpatialPoints> listOfSpatialPoints = pg.getListOfSpatialPoints(); - return listOfSpatialPoints; + if (elementName.equals(SpatialConstants.spatialPoints)){ + SpatialPoints spatialPoints = pg.getSpatialPoints(); + return spatialPoints; } else if (elementName.equals(SpatialConstants.listOfParametricObjects)){ ListOf<ParametricObject> listOfParametricObjects = pg.getListOfParametricObjects(); return listOfParametricObjects; @@ -497,7 +497,7 @@ } else if (elementName.equals(SpatialConstants.spatialPoints)) { ParametricGeometry pg = (ParametricGeometry) listOf.getParentSBMLObject(); SpatialPoints elem = new SpatialPoints(); - pg.addSpatialPoints(elem); + pg.setSpatialPoints(elem); return elem; } else if (elementName.equals(SpatialConstants.parametricObject)) { ParametricGeometry pg = (ParametricGeometry) listOf.getParentSBMLObject(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-23 08:19:07
|
Revision: 2224 http://sourceforge.net/p/jsbml/code/2224 Author: pdp10 Date: 2015-04-23 08:19:04 +0000 (Thu, 23 Apr 2015) Log Message: ----------- update spatial package v0.90 - changed attribute listOfSpatialPoints to spatialPoints Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricGeometry.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricGeometry.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricGeometry.java 2015-04-22 15:58:22 UTC (rev 2223) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/ParametricGeometry.java 2015-04-23 08:19:04 UTC (rev 2224) @@ -28,6 +28,7 @@ import javax.swing.tree.TreeNode; import org.sbml.jsbml.ListOf; +import org.sbml.jsbml.PropertyUndefinedError; /** * @author Alex Thomas @@ -41,7 +42,7 @@ /** * */ - ListOf<SpatialPoints> listOfSpatialPoints; + SpatialPoints spatialPoints; /** * */ @@ -69,8 +70,8 @@ setListOfParametricObjects(pg.getListOfParametricObjects().clone()); } - if (pg.isSetListOfSpatialPoints()) { - setListOfSpatialPoints(pg.getListOfSpatialPoints().clone()); + if (pg.isSetSpatialPoints()) { + setSpatialPoints(pg.getSpatialPoints().clone()); } } @@ -113,9 +114,9 @@ equal &= pg.getListOfParametricObjects().equals(getListOfParametricObjects()); } - equal &= pg.isSetListOfSpatialPoints() == isSetListOfSpatialPoints(); - if (equal && isSetListOfSpatialPoints()) { - equal &= pg.getListOfSpatialPoints().equals(getListOfSpatialPoints()); + equal &= pg.isSetSpatialPoints() == isSetSpatialPoints(); + if (equal && isSetSpatialPoints()) { + equal &= pg.getSpatialPoints().equals(getSpatialPoints()); } } @@ -129,8 +130,8 @@ if (isSetListOfParametricObjects()) { hashCode += prime * getListOfParametricObjects().hashCode(); } - if (isSetListOfSpatialPoints()) { - hashCode += prime * getListOfSpatialPoints().hashCode(); + if (isSetSpatialPoints()) { + hashCode += prime * getSpatialPoints().hashCode(); } return hashCode; } @@ -251,7 +252,7 @@ //} /** * Creates a new ParametricObject element and adds it to the ListOfParametricObjects list - * @return + * @return a new {@link ParametricObject} element */ public ParametricObject createParametricObject() { return createParametricObject(null); @@ -270,146 +271,60 @@ return parametricObject; } - /** - * - */ - + /** - * Returns {@code true}, if listOfSpatialPoints contains at least one element. + * Returns the value of {@link #spatialPoints}. * - * @return {@code true}, if listOfSpatialPoints contains at least one element, - * otherwise {@code false} + * @return the value of {@link #spatialPoints}. */ - public boolean isSetListOfSpatialPoints() { - if ((listOfSpatialPoints == null) || listOfSpatialPoints.isEmpty()) { - return false; + public SpatialPoints getSpatialPoints() { + if (isSetSpatialPoints()) { + return spatialPoints; } - return true; + // This is necessary if we cannot return null here. For variables of type String return an empty String if no value is defined. + throw new PropertyUndefinedError(SpatialConstants.spatialPoints, this); } /** - * Returns the listOfSpatialPoints. Creates it if it is not already existing. + * Returns whether {@link #spatialPoints} is set. * - * @return the listOfSpatialPoints + * @return whether {@link #spatialPoints} is set. */ - public ListOf<SpatialPoints> getListOfSpatialPoints() { - if (!isSetListOfSpatialPoints()) { - listOfSpatialPoints = new ListOf<SpatialPoints>(getLevel(), - getVersion()); - listOfSpatialPoints.setNamespace(SpatialConstants.namespaceURI); - listOfSpatialPoints.setSBaseListType(ListOf.Type.other); - registerChild(listOfSpatialPoints); - } - return listOfSpatialPoints; + public boolean isSetSpatialPoints() { + return this.spatialPoints != null; } /** - * Sets the given {@code ListOf<SpatialPoint>}. If listOfSpatialPoints - * was defined before and contains some elements, they are all unset. + * Sets the value of spatialPoints * - * @param listOfSpatialPoints + * @param spatialPoints the value of spatialPoints to be set. */ - public void setListOfSpatialPoints(ListOf<SpatialPoints> listOfSpatialPoints) { - unsetListOfSpatialPoints(); - this.listOfSpatialPoints = listOfSpatialPoints; - registerChild(this.listOfSpatialPoints); + public void setSpatialPoints(SpatialPoints spatialPoints) { + SpatialPoints oldSpatialPoints = this.spatialPoints; + this.spatialPoints = spatialPoints; + firePropertyChange(SpatialConstants.spatialPoints, oldSpatialPoints, this.spatialPoints); } /** - * Returns {@code true}, if listOfSpatialPoints contain at least one element, - * otherwise {@code false} + * Unsets the variable spatialPoints. * - * @return {@code true}, if listOfSpatialPoints contain at least one element, - * otherwise {@code false} + * @return {@code true} if spatialPoints was set before, otherwise {@code false}. */ - public boolean unsetListOfSpatialPoints() { - if (isSetListOfSpatialPoints()) { - ListOf<SpatialPoints> oldSpatialPoints = listOfSpatialPoints; - listOfSpatialPoints = null; - oldSpatialPoints.fireNodeRemovedEvent(); + public boolean unsetSpatialPoints() { + if (isSetSpatialPoints()) { + SpatialPoints oldSpatialPoints = this.spatialPoints; + this.spatialPoints = null; + firePropertyChange(SpatialConstants.spatialPoints, oldSpatialPoints, this.spatialPoints); return true; } return false; } - /** - * Adds a new {@link SpatialPoints} to the listOfSpatialPoints. - * <p>The listOfSpatialPoints is initialized if necessary. - * - * @param spatialPoints the element to add to the list - * @return true (as specified by {@link Collection#add}) - */ - public boolean addSpatialPoints(SpatialPoints spatialPoints) { - return getListOfSpatialPoints().add(spatialPoints); - } - - - /** - * Removes an element from the listOfSpatialPoints. - * - * @param spatialPoints the element to be removed from the list - * @return true if the list contained the specified element - * @see List#remove(Object) - */ - public boolean removeSpatialPoints(SpatialPoints spatialPoints) { - if (isSetListOfSpatialPoints()) { - return getListOfSpatialPoints().remove(spatialPoints); - } - return false; - } - - - /** - * Removes an element from the listOfSpatialPoints at the given index. - * - * @param i the index where to remove the {@link SpatialPoint} - * @throws IndexOutOfBoundsException if the listOf is not set or - * if the index is out of bound (index < 0 || index > list.size) - */ - public void removeSpatialPoints(int i) { - if (!isSetListOfSpatialPoints()) { - throw new IndexOutOfBoundsException(Integer.toString(i)); - } - // if (getListOfSpatialPoints().size() == 1) { - // throw new SBMLException("There must be at least one SpatialPoint defined for this list"); - // } - getListOfSpatialPoints().remove(i); - } - - - /* - * TODO: if the ID is mandatory for SpatialPoints objects, - * one should also add this methods - */ - //public void removeSpatialPoints(String id) { - // getListOfSpatialPoints().removeFirst(new NameFilter(id)); - //} - /** - * Creates a new SpatialPoints element and adds it to the ListOfSpatialPoints list - * @return - */ - public SpatialPoints createSpatialPoints() { - return createSpatialPoints(null); - } - - - /** - * Creates a new {@link SpatialPoints} element and adds it to the ListOfSpatialPoints list - * @param id - * - * @return a new {@link SpatialPoints} element - */ - public SpatialPoints createSpatialPoints(String id) { - SpatialPoints spatialPoints = new SpatialPoints(getLevel(), getVersion()); - addSpatialPoints(spatialPoints); - return spatialPoints; - } - /* (non-Javadoc) * @see org.sbml.jsbml.ext.spatial.AbstractSpatialNamedSBase#getAllowsChildren() */ @@ -427,7 +342,7 @@ if (isSetListOfParametricObjects()) { count++; } - if (isSetListOfSpatialPoints()) { + if (isSetSpatialPoints()) { count++; } return count; @@ -453,9 +368,9 @@ } pos++; } - if (isSetListOfSpatialPoints()) { + if (isSetSpatialPoints()) { if (pos == index) { - return getListOfSpatialPoints(); + return getSpatialPoints(); } pos++; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2015-04-22 15:58:31
|
Revision: 2223 http://sourceforge.net/p/jsbml/code/2223 Author: niko-rodrigue Date: 2015-04-22 15:58:22 +0000 (Wed, 22 Apr 2015) Log Message: ----------- added a small utility method to ASTNode to help debug and see the structure of an ASTNode Modified Paths: -------------- branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java Modified: branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java =================================================================== --- branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java 2015-04-22 15:57:10 UTC (rev 2222) +++ branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java 2015-04-22 15:58:22 UTC (rev 2223) @@ -4357,4 +4357,25 @@ // pointer to whatever they are referencing. } + /** + * Returns a simple tree view of the ASTNode internal, including mainly + * node type and hierarchy. + * + * @param n + * @param tree + * @param indent + * @return a simple tree view of the ASTNode internal + */ + public static String astNodeToTree(ASTNode n, String tree, String indent) { + tree = tree + indent + n.getType() + " " + + (n.isInteger() ? n.getInteger() : "") + (n.isReal() ? n.getReal() : "") + "\n"; + + for (ASTNode child : n.getChildren()) { + tree = astNodeToTree(child, tree, indent + " "); + } + + return tree; + } + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2015-04-22 15:57:18
|
Revision: 2222 http://sourceforge.net/p/jsbml/code/2222 Author: andreas-draeger Date: 2015-04-22 15:57:10 +0000 (Wed, 22 Apr 2015) Log Message: ----------- Implemented a new constructor for CVTerm that reads the content of XMLNode objects. This needs more testing, but it should work in principle. Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/CVTerm.java trunk/core/src/org/sbml/jsbml/xml/XMLAttributes.java Modified: trunk/core/src/org/sbml/jsbml/CVTerm.java =================================================================== --- trunk/core/src/org/sbml/jsbml/CVTerm.java 2015-04-22 15:54:01 UTC (rev 2221) +++ trunk/core/src/org/sbml/jsbml/CVTerm.java 2015-04-22 15:57:10 UTC (rev 2222) @@ -29,10 +29,13 @@ import java.util.regex.Pattern; import javax.swing.tree.TreeNode; +import javax.xml.stream.XMLStreamException; import org.sbml.jsbml.util.StringTools; import org.sbml.jsbml.util.TreeNodeAdapter; import org.sbml.jsbml.util.TreeNodeChangeEvent; +import org.sbml.jsbml.xml.XMLAttributes; +import org.sbml.jsbml.xml.XMLNode; /** * Contains all the MIRIAM URIs for a MIRIAM qualifier in the annotation element @@ -507,6 +510,42 @@ } /** + * + * @param miriam + */ + public CVTerm(XMLNode miriam) { + this(); + if (miriam.getName().equals("annotation")) { + miriam = miriam.getChildAt(0); + } + if (miriam.getName().equals("RDF")) { + miriam = miriam.getChildAt(0); + } + if (miriam.getName().equals("Description")) { + miriam = miriam.getChildAt(0); + } + if (miriam.getURI().equals("http://biomodels.net/biology-qualifiers/")) { + if (miriam.getPrefix().equals("bqbiol")) { + setQualifier(Qualifier.getBiologicalQualifierFor(miriam.getName())); + } else { + setQualifier(Qualifier.getModelQualifierFor(miriam.getName())); + } + miriam = miriam.getChildAt(0); + } + if (miriam.getName().equals("Bag")) { + for (int j = 0; j < miriam.getChildCount(); j++) { + XMLNode child = miriam.getChildAt(j); + if (child.getName().equals("li")) { + XMLAttributes attributes = child.getAttributes(); + for (int i = 0; i < attributes.size(); i++) { + addResource(attributes.getValue(i)); + } + } + } + } + } + + /** * Creates a {@link CVTerm} instance from a given {@link CVTerm}. * * @param term the {@link CVTerm} to clone Modified: trunk/core/src/org/sbml/jsbml/xml/XMLAttributes.java =================================================================== --- trunk/core/src/org/sbml/jsbml/xml/XMLAttributes.java 2015-04-22 15:54:01 UTC (rev 2221) +++ trunk/core/src/org/sbml/jsbml/xml/XMLAttributes.java 2015-04-22 15:57:10 UTC (rev 2222) @@ -510,11 +510,18 @@ * @return the number of attributes in this {@link XMLAttributes} set. */ public int getLength() { + return attributeNames.size(); + } + /** + * + * @return + * @see #getLength() + */ + public int size() { return attributeNames.size(); } - /** * Returns the local name of an attribute in this {@link XMLAttributes} set (by position). * <p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2015-04-22 15:54:08
|
Revision: 2221 http://sourceforge.net/p/jsbml/code/2221 Author: niko-rodrigue Date: 2015-04-22 15:54:01 +0000 (Wed, 22 Apr 2015) Log Message: ----------- removed a non junit tests class Modified Paths: -------------- branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java Modified: branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java =================================================================== --- branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java 2015-04-22 15:23:14 UTC (rev 2220) +++ branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java 2015-04-22 15:54:01 UTC (rev 2221) @@ -30,7 +30,6 @@ import org.sbml.jsbml.ext.dyn.test.TestL3Dyn; import org.sbml.jsbml.ext.layout.test.LayoutJUnitTests; import org.sbml.jsbml.ext.render.test.RenderJUnitTests; -import org.sbml.jsbml.math.test.RecursionTest; import org.sbml.jsbml.xml.test.ASTNode2Tests; import org.sbml.jsbml.xml.test.LibsbmlCompatibilityTests; import org.sbml.jsbml.xml.test.Tests; @@ -45,7 +44,7 @@ @RunWith(value=Suite.class) @SuiteClasses(value={Tests.class, LibsbmlCompatibilityTests.class, LayoutJUnitTests.class, RenderJUnitTests.class, UnregisterPackageTests.class, ArraysJUnitTests.class, DisablePackageTests.class, ASTNode2Tests.class, TestL3Dyn.class, - PackageVersionTests.class, RecursionTest.class}) + PackageVersionTests.class}) public class AllTests { /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-22 15:23:16
|
Revision: 2220 http://sourceforge.net/p/jsbml/code/2220 Author: pdp10 Date: 2015-04-22 15:23:14 +0000 (Wed, 22 Apr 2015) Log Message: ----------- update spatial package to v0.90 Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialModelPlugin.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialReactionPlugin.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/TransformationComponent.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialModelPlugin.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialModelPlugin.java 2015-04-22 15:16:16 UTC (rev 2219) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialModelPlugin.java 2015-04-22 15:23:14 UTC (rev 2220) @@ -330,5 +330,34 @@ return success; } + + /* + * (non-Javadoc) + * @see org.sbml.jsbml.ext.AbstractSBasePlugin#hashCode() + */ + @Override + public int hashCode() { + final int prime = 2039; + int hashCode = super.hashCode(); + if (isSetGeometry()) { + hashCode += prime * getGeometry().hashCode(); + } + return hashCode; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("SpatialModelPlugin [geometry="); + builder.append(geometry); + builder.append(", spatialIdMap="); + builder.append(spatialIdMap); + builder.append("]"); + return builder.toString(); + } + } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialReactionPlugin.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialReactionPlugin.java 2015-04-22 15:16:16 UTC (rev 2219) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SpatialReactionPlugin.java 2015-04-22 15:23:14 UTC (rev 2220) @@ -197,7 +197,7 @@ */ @Override public int hashCode() { - final int prime = 983;//Change this prime number + final int prime = 2039; int hashCode = super.hashCode(); if (isSetIsLocal()) { hashCode += prime * isLocal.hashCode(); Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/TransformationComponent.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/TransformationComponent.java 2015-04-22 15:16:16 UTC (rev 2219) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/TransformationComponent.java 2015-04-22 15:23:14 UTC (rev 2220) @@ -29,7 +29,6 @@ import org.sbml.jsbml.AbstractSBase; import org.sbml.jsbml.PropertyUndefinedError; import org.sbml.jsbml.util.StringTools; -import org.sbml.jsbml.util.TreeNodeChangeEvent; /** * @author Alex Thomas @@ -112,6 +111,9 @@ if (equal && isSetComponents()) { equal &= tc.getComponents().equals(getComponents()); } + if (equal && isSetComponentsLength()) { + equal &= tc.getComponentsLength() == getComponentsLength(); + } } return equal; } @@ -178,7 +180,7 @@ */ public int getComponentsLength() { if (isSetComponentsLength()) { - return componentsLength; + return componentsLength.intValue(); } // This is necessary if we cannot return null here. throw new PropertyUndefinedError(SpatialConstants.componentsLength, this); @@ -204,6 +206,9 @@ if (isSetComponents()) { hashCode += prime * getComponents().hashCode(); } + if (isSetComponentsLength()) { + hashCode += prime * getComponentsLength(); + } return hashCode; } @@ -223,15 +228,6 @@ attributes.put(SpatialConstants.shortLabel + ":componentsLength", String.valueOf(getComponentsLength())); } - - if (isSetSBOTerm()) { - attributes.remove(TreeNodeChangeEvent.sboTerm); - attributes.put(SpatialConstants.shortLabel + ":" + TreeNodeChangeEvent.sboTerm, getSBOTermID()); - } - if (isSetMetaId()) { - attributes.remove(TreeNodeChangeEvent.metaId); - attributes.put(SpatialConstants.shortLabel + ":" + TreeNodeChangeEvent.metaId, getMetaId()); - } return attributes; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2015-04-22 15:16:23
|
Revision: 2219 http://sourceforge.net/p/jsbml/code/2219 Author: andreas-draeger Date: 2015-04-22 15:16:16 +0000 (Wed, 22 Apr 2015) Log Message: ----------- Added a new method to directly set a non-RDF annotation on SBase. Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/AbstractSBase.java trunk/core/src/org/sbml/jsbml/SBase.java Modified: trunk/core/src/org/sbml/jsbml/AbstractSBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-22 15:11:23 UTC (rev 2218) +++ trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-22 15:16:16 UTC (rev 2219) @@ -1839,6 +1839,14 @@ } /* (non-Javadoc) + * @see org.sbml.jsbml.SBase#setAnnotation(java.lang.String) + */ + @Override + public void setAnnotation(String nonRDFAnnotation) throws XMLStreamException { + setAnnotation(XMLNode.convertStringToXMLNode(StringTools.toXMLAnnotationString(nonRDFAnnotation))); + } + + /* (non-Javadoc) * @see org.sbml.jsbml.SBase#setHistory(org.sbml.jsbml.History) */ @Override Modified: trunk/core/src/org/sbml/jsbml/SBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SBase.java 2015-04-22 15:11:23 UTC (rev 2218) +++ trunk/core/src/org/sbml/jsbml/SBase.java 2015-04-22 15:16:16 UTC (rev 2219) @@ -864,6 +864,13 @@ public void setAnnotation(XMLNode nonRDFAnnotation); /** + * + * @param nonRDFAnnotation + * @throws XMLStreamException + */ + public void setAnnotation(String nonRDFAnnotation) throws XMLStreamException; + + /** * Sets the history. * * @param history the history of this {@link SBase} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2015-04-22 15:11:31
|
Revision: 2218 http://sourceforge.net/p/jsbml/code/2218 Author: andreas-draeger Date: 2015-04-22 15:11:23 +0000 (Wed, 22 Apr 2015) Log Message: ----------- * Started to extract user messages from AbstractSBase to an XML file. * Implemented a new method to set the non-RDF annotation on SBase for libSBML compliance. Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/AbstractSBase.java trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java trunk/core/src/org/sbml/jsbml/SBase.java Added Paths: ----------- trunk/core/resources/org/sbml/jsbml/resources/Messages.xml Added: trunk/core/resources/org/sbml/jsbml/resources/Messages.xml =================================================================== --- trunk/core/resources/org/sbml/jsbml/resources/Messages.xml (rev 0) +++ trunk/core/resources/org/sbml/jsbml/resources/Messages.xml 2015-04-22 15:11:23 UTC (rev 2218) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> + <comment> + $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-2015 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 + 4. The University of California, San Diego, La Jolla, CA, USA + 5. The Babraham Institute, Cambridge, UK + + 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. + ---------------------------------------------------------------------------- + + A collection of text messages to be presented to uses upon certain events. + + Author: Andreas Dräger + Version: $Rev$ + Since: 1.1 + </comment> + + <entry key="IndexExceedsBoundsException">Index {0,number,integer} >= {1,number,integer}</entry> + + <entry key="AbstractSBase.addDeclaredNamespace">The only allowed prefix for a namespace is 'xmlns:'.</entry> + <entry key="AbstractSBase.addExtensionExc">The package namespace or name ''{0}'' is unknown!</entry> + <entry key="AbstractSBase.setNamespaceExc">An SBase element cannot belong to two different namespaces! Current namespace = ''{0}'', new namespace = ''{1}''</entry> + <entry key="AbstractSBase.emptyNotes">The notes to append are empty!</entry> + <entry key="AbstractSBase.invalidNotesStructure">The given 'notes' String does not have the proper structure, excepting the children 'head' and 'body' to the 'html' element.</entry> + <entry key="AbstractSBase.problemAddingXMLNode">There was a problem adding the given XMLNode: ''{0}'' to the ''body'' XMLNode.</entry> + +</properties> \ No newline at end of file Property changes on: trunk/core/resources/org/sbml/jsbml/resources/Messages.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id URL Rev \ No newline at end of property Modified: trunk/core/src/org/sbml/jsbml/AbstractSBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-22 15:01:44 UTC (rev 2217) +++ trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-04-22 15:11:23 UTC (rev 2218) @@ -318,10 +318,9 @@ */ @Override public void addDeclaredNamespace(String prefix, String namespace) { - if ((!prefix.startsWith("xmlns:")) && (!prefix.equals("xmlns"))) { if (prefix.indexOf(":") != -1) { - throw new IllegalArgumentException("The only allowed prefix for a namespace is 'xmlns:'."); + throw new IllegalArgumentException(resourceBundle.getString("AbstractSBase.addDeclaredNamespace")); } prefix = "xmlns:" + prefix; } @@ -360,7 +359,7 @@ firePropertyChange(TreeNodeChangeEvent.addExtension, null, sbasePlugin); } else { throw new IllegalArgumentException(MessageFormat.format( - "The package namespace or name ''{0}'' is unknown!", nameOrUri)); + resourceBundle.getString("AbstractSBase.addExtensionExc"), nameOrUri)); } } @@ -384,12 +383,12 @@ * @param namespace the XML namespace to which this {@link SBase} belong. */ public void setNamespace(String namespace) { - if ((elementNamespace != null) && (!elementNamespace.equals(namespace))) { // if we implement proper conversion some days, we need to unset the namespace before changing it. - logger.error(MessageFormat.format("An SBase element cannot belong to two different namespaces! Current namespace = ''{0}'', new namespace = ''{1}''", elementNamespace, namespace)); - // throw new IllegalArgumentException(MessageFormat.format("An SBase element cannot belong to two different namespaces ! " - // + "Current namespace = '{0}', new namespace = '{1}' ", elementNamespace, namespace)); + logger.error(MessageFormat.format( + resourceBundle.getString("AbstractSBase.setNamespaceExc"), + elementNamespace, namespace)); + // throw new IllegalArgumentException(MessageFormat.format(resourceBundle.getString("AbstractSBase.setNamespaceExc"), elementNamespace, namespace)); } String old = elementNamespace; elementNamespace = namespace; @@ -496,7 +495,7 @@ else { // the given notes is empty - logger.info("The notes to append are empty !!"); + logger.info(resourceBundle.getString("AbstractSBase.emptyNotes")); return; } } @@ -533,7 +532,7 @@ // The given notes node needs to be added to a parent node // if the node is neither "html" nor "body" element because the // children of addedNotes will be added to the current notes later if the - // node is neither "html" nor "body" (i.e. any XHTML element that + // node is neither "html" nor "body" (i.e., any XHTML element that // would be permitted within a "body" element) addedNotes.addChild(notes); addedNotesType = NOTES_TYPE.NotesAny; @@ -569,7 +568,7 @@ if (!headFound || !bodyFound || otherElementFound) { // TODO - throw an exception as well - logger.warn("The given 'notes' String does not have the proper structure, excepting the children 'head' and 'body' to the 'html' element."); + logger.warn(resourceBundle.getString("AbstractSBase.invalidNotesStructure")); return; } } @@ -639,7 +638,9 @@ for (i=0; i < addedBody.getChildCount(); i++) { if (curBody.addChild(addedBody.getChildAt(i)) < 0) { - logger.warn("There was a problem adding the given XMLNode: '" + SBMLtools.toXML(addedBody.getChildAt(i)) + "' to the 'body' XMLNode."); + logger.warn(MessageFormat.format( + resourceBundle.getString("AbstractSBase.problemAddingXMLNode"), + SBMLtools.toXML(addedBody.getChildAt(i)))); return; } } @@ -650,10 +651,12 @@ // adds the given body or other tag (permitted in the body) to the current // html tag - for (i=0; i < addedNotes.getChildCount(); i++) + for (i = 0; i < addedNotes.getChildCount(); i++) { if (curBody.addChild(addedNotes.getChildAt(i)) < 0) { - logger.warn("There was a problem adding the given XMLNode: '" + SBMLtools.toXML(addedNotes.getChildAt(i)) + "' to the 'body' XMLNode."); + logger.warn(MessageFormat.format( + resourceBundle.getString("AbstractSBase.problemAddingXMLNode"), + SBMLtools.toXML(addedNotes.getChildAt(i)))); return; } } @@ -1775,7 +1778,7 @@ // Could/Should be used by the method #firePropertyChange // TODO - set package version and namespace if needed - + int childCount = sbasePlugin.getChildCount(); if (childCount > 0) { @@ -1828,6 +1831,14 @@ } /* (non-Javadoc) + * @see org.sbml.jsbml.SBase#setAnnotation(org.sbml.jsbml.xml.XMLNode) + */ + @Override + public void setAnnotation(XMLNode nonRDFAnnotation) { + getAnnotation().setNonRDFAnnotation(nonRDFAnnotation); + } + + /* (non-Javadoc) * @see org.sbml.jsbml.SBase#setHistory(org.sbml.jsbml.History) */ @Override @@ -2204,7 +2215,7 @@ return; } - throw new IllegalArgumentException(MessageFormat.format("The package namespace or name ''{0}'' is unknown!!", nameOrUri)); + throw new IllegalArgumentException(MessageFormat.format("The package namespace or name ''{0}'' is unknown!", nameOrUri)); } @Override Modified: trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java 2015-04-22 15:01:44 UTC (rev 2217) +++ trunk/core/src/org/sbml/jsbml/AbstractTreeNode.java 2015-04-22 15:11:23 UTC (rev 2218) @@ -32,11 +32,13 @@ import java.util.List; import java.util.Map; import java.util.NoSuchElementException; +import java.util.ResourceBundle; import java.util.Set; import javax.swing.tree.TreeNode; import org.apache.log4j.Logger; +import org.sbml.jsbml.util.ResourceManager; import org.sbml.jsbml.util.StringTools; import org.sbml.jsbml.util.TreeNodeChangeEvent; import org.sbml.jsbml.util.TreeNodeChangeListener; @@ -60,6 +62,11 @@ private static final long serialVersionUID = 8629109724566600238L; /** + * Localization support. + */ + protected static final transient ResourceBundle resourceBundle = ResourceManager.getBundle("org.sbml.jsbml.resources.Messages"); + + /** * */ public static final String UNKNOWN_ATTRIBUTES = "unknown.attributes"; //$NON-NLS-1$ Modified: trunk/core/src/org/sbml/jsbml/SBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/SBase.java 2015-04-22 15:01:44 UTC (rev 2217) +++ trunk/core/src/org/sbml/jsbml/SBase.java 2015-04-22 15:11:23 UTC (rev 2218) @@ -503,15 +503,15 @@ public int getCVTermCount(); /** - * Returns the name of the SBML Level 3 package in which this element is defined, as + * Returns the name of the SBML Level 3 package in which this element is defined, as * defined in <a href="http://sbml.org/Community/Wiki"> the sbml.org community wiki</a>. * - * <p> For example, the string "core" will be returned if this element is defined in SBML Level 3 Core. + * <p> For example, the string "core" will be returned if this element is defined in SBML Level 3 Core. * * @return the name of the SBML Level 3 package in which this element is defined. */ public String getPackageName(); - + /** * Returns the version of the SBML Level 3 package to which this element belongs. * @@ -522,7 +522,7 @@ * @return the version of the SBML Level 3 package to which this element belongs. */ public int getPackageVersion(); - + /** * Returns the parent of this {@link SBase}. * @@ -584,16 +584,16 @@ /** * Returns the namespace to which this {@link SBase} belong to. Same as {@link #getNamespace()}. * - * <p>For example, all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core + * <p>For example, all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core * must have the URI 'http://www.sbml.org/sbml/level3/version1/layout/version1'. * <p>The elements that belong to SBML core might return null. * * @return the namespace to which this {@link SBase} belong to. * @see SBase#getNamespace() - * @libsbml.deprecated + * @libsbml.deprecated */ public String getURI(); - + /** * Returns the Version within the SBML Level of the overall SBML document. * Return -1 if it is not set. @@ -858,6 +858,12 @@ public void setAnnotation(Annotation annotation); /** + * + * @param nonRDFAnnotation + */ + public void setAnnotation(XMLNode nonRDFAnnotation); + + /** * Sets the history. * * @param history the history of this {@link SBase} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2015-04-22 15:01:47
|
Revision: 2217 http://sourceforge.net/p/jsbml/code/2217 Author: andreas-draeger Date: 2015-04-22 15:01:44 +0000 (Wed, 22 Apr 2015) Log Message: ----------- Added a constructor that takes XMLNode as argument (for libSBML compliance) and a new method to return XMLNode (as alternative to getNonRDFAnnotation(), also for libSBML compliance). Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/Annotation.java Modified: trunk/core/src/org/sbml/jsbml/Annotation.java =================================================================== --- trunk/core/src/org/sbml/jsbml/Annotation.java 2015-04-22 14:53:42 UTC (rev 2216) +++ trunk/core/src/org/sbml/jsbml/Annotation.java 2015-04-22 15:01:44 UTC (rev 2217) @@ -157,9 +157,8 @@ * */ public Annotation(String annotation) throws XMLStreamException { - this(); // parse the String as an XMLNode - nonRDFannotation = XMLNode.convertStringToXMLNode(annotation); + this(XMLNode.convertStringToXMLNode(annotation)); } /** @@ -182,6 +181,15 @@ } /** + * + * @param annotation + */ + public Annotation(XMLNode annotation) { + this(); + nonRDFannotation = annotation; + } + + /** * Adds a {@link CVTerm}. * * @param cvTerm @@ -201,6 +209,23 @@ } /** + * Adds an additional namespace to the set of declared namespaces of this + * {@link SBase}. + * + * @param prefix the prefix of the namespace to add + * @param uri the namespace uri + * + */ + public void addDeclaredNamespace(String prefix, String uri) + { + if (!isSetNonRDFannotation()) { + nonRDFannotation = new XMLNode(new XMLTriple("annotation", null, null), new XMLAttributes()); + } + + nonRDFannotation.addNamespace(uri, prefix); + } + + /** * Appends some 'annotation' to the non RDF annotation {@link XMLNode} of this object. * * @param annotation some non RDF annotations. @@ -246,6 +271,18 @@ return new Annotation(this); } + /** + * @see org.sbml.jsbml.SBase#getHistory() + * @return + */ + private History createHistory() { + history = new History(); + history.parent = this; + history.addAllChangeListeners(getListOfTreeNodeChangeListeners()); + + return history; + } + /* (non-Javadoc) * @see org.sbml.jsbml.AbstractTreeNode#equals(java.lang.Object) */ @@ -301,6 +338,7 @@ return l; } + /** * Returns the about String of this object. * @@ -310,6 +348,7 @@ return about == null ? "" : about; } + /* (non-Javadoc) * @see javax.swing.tree.TreeNode#getAllowsChildren() */ @@ -318,7 +357,6 @@ return true; } - /** * Returns the {@link XMLNode} representing non RDF annotations. * @@ -330,58 +368,6 @@ return nonRDFannotation; } - - /** - * - * - * @return - */ - public XMLNode getFullAnnotation() { - - XMLNode nonRdfAnnotationClone = null; - - if (isSetNonRDFannotation()) { - nonRdfAnnotationClone = nonRDFannotation.clone(); - } - - // TODO - get the list of AnnotationWriter from the manager - List<AnnotationWriter> annotationParsers = new ArrayList<AnnotationWriter>(); - // hack to delete - annotationParsers.add(new SBMLRDFAnnotationParser()); - - // calling the annotation parsers so that they update the XMLNode before returning it to the user - for (AnnotationWriter annoWriter : annotationParsers) { - nonRdfAnnotationClone = annoWriter.writeAnnotation((SBase) getParent(), nonRdfAnnotationClone); - } - - return nonRdfAnnotationClone; - } - - /** - * - * - * @return - */ - public String getFullAnnotationString() { - - XMLNode fullAnnotation = getFullAnnotation(); - - // System.out.println("getFullAnnotationString - " + fullAnnotation); - - if (fullAnnotation != null) { - try { - return fullAnnotation.toXMLString(); - } catch (XMLStreamException e) { - Logger logger = Logger.getLogger(Annotation.class); - if (logger.isDebugEnabled()) { - e.printStackTrace(); - } - } - } - - return ""; - } - /* (non-Javadoc) * @see javax.swing.tree.TreeNode#getChildAt(int) */ @@ -414,7 +400,7 @@ // } throw new IndexOutOfBoundsException(MessageFormat.format( "Index {0,number,integer} >= {1,number,integer}", - childIndex, +Math.min(pos, 0))); + childIndex, Math.min(pos, 0))); } /* (non-Javadoc) @@ -447,27 +433,84 @@ /** - * Returns the {@link History} of the Annotation. + * Gives the number of {@link CVTerm}s in this {@link Annotation}. * - * @return the {@link History} of the Annotation. + * @return the number of controlled vocabulary terms in this {@link Annotation}. */ - public History getHistory() { - if (!isSetHistory()) { - createHistory(); + public int getCVTermCount() { + return isSetListOfCVTerms() ? listOfCVTerms.size() : 0; + } + + /** + * + * @return + */ + public XMLNamespaces getDeclaredNamespaces() { + return isSetNonRDFannotation() ? nonRDFannotation.getNamespaces() : null; + } + + /** + * + * + * @return + */ + public XMLNode getFullAnnotation() { + + XMLNode nonRdfAnnotationClone = null; + + if (isSetNonRDFannotation()) { + nonRdfAnnotationClone = nonRDFannotation.clone(); } - return history; + // TODO - get the list of AnnotationWriter from the manager + List<AnnotationWriter> annotationParsers = new ArrayList<AnnotationWriter>(); + // hack to delete + annotationParsers.add(new SBMLRDFAnnotationParser()); + + // calling the annotation parsers so that they update the XMLNode before returning it to the user + for (AnnotationWriter annoWriter : annotationParsers) { + nonRdfAnnotationClone = annoWriter.writeAnnotation((SBase) getParent(), nonRdfAnnotationClone); + } + + return nonRdfAnnotationClone; } + /** - * @see org.sbml.jsbml.SBase#getHistory() + * + * * @return */ - private History createHistory() { - history = new History(); - history.parent = this; - history.addAllChangeListeners(getListOfTreeNodeChangeListeners()); + public String getFullAnnotationString() { + XMLNode fullAnnotation = getFullAnnotation(); + + // System.out.println("getFullAnnotationString - " + fullAnnotation); + + if (fullAnnotation != null) { + try { + return fullAnnotation.toXMLString(); + } catch (XMLStreamException e) { + Logger logger = Logger.getLogger(Annotation.class); + if (logger.isDebugEnabled()) { + e.printStackTrace(); + } + } + } + + return ""; + } + + /** + * Returns the {@link History} of the Annotation. + * + * @return the {@link History} of the Annotation. + */ + public History getHistory() { + if (!isSetHistory()) { + createHistory(); + } + return history; } @@ -483,6 +526,19 @@ return listOfCVTerms; } + /** + * Returns the {@link XMLNode} containing annotations other than + * the official RDF annotation, as defined in the SBML specifications. + * + * @return the {@link XMLNode} containing annotations other than RDF + * annotation. Return null if there are none. + */ + public XMLNode getNonRDFannotation() { + if (nonRDFannotation != null) { + return nonRDFannotation; + } + return null; + } /** * Returns the String containing annotations other than RDF @@ -503,21 +559,6 @@ } /** - * Returns the {@link XMLNode} containing annotations other than - * the official RDF annotation, as defined in the SBML specifications. - * - * @return the {@link XMLNode} containing annotations other than RDF - * annotation. Return null if there are none. - */ - public XMLNode getNonRDFannotation() { - if (nonRDFannotation != null) { - return nonRDFannotation; - } - return null; - } - - - /** * Gives the number of {@link CVTerm}s in this {@link Annotation}. * * @return the number of controlled vocabulary terms in this {@link Annotation}. @@ -527,13 +568,13 @@ return getCVTermCount(); } + /** - * Gives the number of {@link CVTerm}s in this {@link Annotation}. * - * @return the number of controlled vocabulary terms in this {@link Annotation}. + * @return */ - public int getCVTermCount() { - return isSetListOfCVTerms() ? listOfCVTerms.size() : 0; + public XMLNode getXMLNode() { + return getNonRDFannotation(); } /* (non-Javadoc) @@ -552,7 +593,6 @@ return hashCode; } - /** * * @return @@ -572,6 +612,7 @@ return about != null; } + /** * Checks if the {@link Annotation} is initialized. * @@ -613,7 +654,6 @@ return history != null && !history.isEmpty(); } - /** * Checks if the list of {@link CVTerm} is not empty. * @@ -653,6 +693,7 @@ return isSetNonRDFannotation(); } + /** * Checks if the RDF part of the Annotation is initialized. * @@ -699,7 +740,6 @@ return false; } - /** * Removes the given {@link CVTerm}. * @@ -718,6 +758,8 @@ return success; } + + /** * Removes the {@link CVTerm} at the given index. * @@ -748,8 +790,6 @@ firePropertyChange(TreeNodeChangeEvent.about, oldAbout, this.about); } - - /** * Changes the {@link History} instance to 'history' * @@ -766,6 +806,18 @@ /** * Sets the value of the non RDF annotations * + * @param nonRDFAnnotationStr + * @throws XMLStreamException + */ + public void setNonRDFAnnotation(String nonRDFAnnotationStr) throws XMLStreamException { + if (nonRDFAnnotationStr != null) { + setNonRDFAnnotation(XMLNode.convertStringToXMLNode(StringTools.toXMLAnnotationString(nonRDFAnnotationStr))); + } + } + + /** + * Sets the value of the non RDF annotations + * * @param nonRDFAnnotation */ public void setNonRDFAnnotation(XMLNode nonRDFAnnotation) { @@ -791,18 +843,6 @@ } /** - * Sets the value of the non RDF annotations - * - * @param nonRDFAnnotationStr - * @throws XMLStreamException - */ - public void setNonRDFAnnotation(String nonRDFAnnotationStr) throws XMLStreamException { - if (nonRDFAnnotationStr != null) { - setNonRDFAnnotation(XMLNode.convertStringToXMLNode(StringTools.toXMLAnnotationString(nonRDFAnnotationStr))); - } - } - - /** * Clears the {@link List} of {@link CVTerm}s. */ public void unsetCVTerms() { @@ -841,29 +881,4 @@ } } - /** - * Adds an additional namespace to the set of declared namespaces of this - * {@link SBase}. - * - * @param prefix the prefix of the namespace to add - * @param uri the namespace uri - * - */ - public void addDeclaredNamespace(String prefix, String uri) - { - if (!isSetNonRDFannotation()) { - nonRDFannotation = new XMLNode(new XMLTriple("annotation", null, null), new XMLAttributes()); - } - - nonRDFannotation.addNamespace(uri, prefix); - } - - /** - * - * @return - */ - public XMLNamespaces getDeclaredNamespaces() { - return isSetNonRDFannotation() ? nonRDFannotation.getNamespaces() : null; - } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pd...@us...> - 2015-04-22 14:53:50
|
Revision: 2216 http://sourceforge.net/p/jsbml/code/2216 Author: pdp10 Date: 2015-04-22 14:53:42 +0000 (Wed, 22 Apr 2015) Log Message: ----------- update spatial package v0.90 Modified Paths: -------------- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledVolume.java Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java 2015-04-22 14:36:58 UTC (rev 2215) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledField.java 2015-04-22 14:53:42 UTC (rev 2216) @@ -34,7 +34,8 @@ /** * @author Alex Thomas - * @author Andreas Dräger + * @author Andreas Dräger + * @author Piero Dalle Pezze * @since 1.0 * @version $Rev$ */ @@ -72,6 +73,7 @@ /** * @author Alex Thomas * @author Andreas Dräger + * @author Piero Dalle Pezze * @version $Rev$ * @since 1.0 */ @@ -83,7 +85,11 @@ /** * */ - DEFLATED; + DEFLATED, + /** + * + */ + BASE64; } /** @@ -111,10 +117,6 @@ /** * */ - private DataKind dataType; - /** - * - */ private Integer numSamples1; /** * @@ -135,6 +137,14 @@ /** * */ + private Integer samplesLength; + /** + * + */ + private DataKind dataType; + /** + * + */ private XMLNode data; /** @@ -164,6 +174,9 @@ if (sf.isSetCompression()) { setCompression(sf.getCompression()); } + if (sf.isSetSamplesLength()) { + setSamplesLength(sf.getSamplesLength()); + } if (sf.isSetInterpolation()) { setInterpolation(sf.getInterpolation()); } @@ -223,6 +236,10 @@ if (equal && isSetInterpolation()) { equal &= sf.getInterpolation().equals(getInterpolation()); } + equal &= sf.isSetSamplesLength() == isSetSamplesLength(); + if (equal && isSetSamplesLength()) { + equal &= sf.getSamplesLength() == getSamplesLength(); + } equal &= sf.isSetDataType() == isSetDataType(); if (equal && isSetDataType()) { equal &= sf.getDataType().equals(getDataType()); @@ -543,6 +560,67 @@ } +/** + * Returns the value of {@link #samplesLength}. + * + * @return the value of {@link #samplesLength}. + */ +public int getSamplesLength() { + if (isSetSamplesLength()) { + return samplesLength; + } + // This is necessary if we cannot return null here. For variables of type String return an empty String if no value is defined. + throw new PropertyUndefinedError(SpatialConstants.samplesLength, this); +} + + +/** + * Returns whether {@link #samplesLength} is set. + * + * @return whether {@link #samplesLength} is set. + */ +public boolean isSetSamplesLength() { + return this.samplesLength != null; +} + +/** + * Sets the value of samplesLength + * + * @param samplesLength the value of samplesLength to be set. + */ +public void setSamplesLength(String samplesLength) { + Integer oldSamplesLength = this.samplesLength; + this.samplesLength = StringTools.parseSBMLInt(samplesLength); + firePropertyChange(SpatialConstants.samplesLength, oldSamplesLength, this.samplesLength); +} + +/** + * Sets the value of samplesLength + * + * @param samplesLength the value of samplesLength to be set. + */ +public void setSamplesLength(int samplesLength) { + Integer oldSamplesLength = this.samplesLength; + this.samplesLength = samplesLength; + firePropertyChange(SpatialConstants.samplesLength, oldSamplesLength, this.samplesLength); +} + + +/** + * Unsets the variable samplesLength. + * + * @return {@code true} if samplesLength was set before, otherwise {@code false}. + */ +public boolean unsetSamplesLength() { + if (isSetSamplesLength()) { + Integer oldSamplesLength = this.samplesLength; + this.samplesLength = null; + firePropertyChange(SpatialConstants.samplesLength, oldSamplesLength, this.samplesLength); + return true; + } + return false; +} + /** * Returns the value of data * @@ -657,7 +735,7 @@ @Override public int hashCode() { - final int prime = 983;//Change this prime number + final int prime = 1997; int hashCode = super.hashCode(); if (isSetNumSamples1()) { hashCode += prime * getNumSamples1(); @@ -678,6 +756,10 @@ if (isSetCompression()) { hashCode += prime * getCompression().hashCode(); } + + if (isSetSamplesLength()) { + hashCode += prime * getSamplesLength(); + } if (isSetInterpolation()) { hashCode += prime * getInterpolation().hashCode(); @@ -767,6 +849,13 @@ MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.compression); } } + else if (attributeName.equals(SpatialConstants.samplesLength)) { + try { + setSamplesLength(String.valueOf(value)); + } catch (Exception e) { + MessageFormat.format(SpatialConstants.bundle.getString("COULD_NOT_READ"), value, SpatialConstants.samplesLength); + } + } else if (attributeName.equals(SpatialConstants.dataType)) { try { setDataType(DataKind.valueOf(value)); @@ -800,6 +889,8 @@ builder.append(interpolation); builder.append(", compression="); builder.append(compression); + builder.append(", samplesLength="); + builder.append(samplesLength); builder.append(", data="); builder.append(data); builder.append("]"); Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java 2015-04-22 14:36:58 UTC (rev 2215) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledFieldGeometry.java 2015-04-22 14:53:42 UTC (rev 2216) @@ -70,7 +70,7 @@ super(sampledFieldGeometry); if (sampledFieldGeometry.isSetSampledField()) { - sampledField = new String(sampledFieldGeometry.getSampledField()); + setSampledField(sampledFieldGeometry.getSampledField()); } if (isSetListOfSampledVolumes()) { @@ -372,11 +372,14 @@ */ @Override public int hashCode() { - final int prime = 983;//Change this prime number + final int prime = 1951; int hashCode = super.hashCode(); if (isSetSampledField()) { hashCode += prime * getSampledField().hashCode(); } + if (isSetListOfSampledVolumes()) { + hashCode += prime * getListOfSampledVolumes().hashCode(); + } return hashCode; } @@ -416,5 +419,17 @@ } return isAttributeRead; } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("SampledFieldGeometry [sampledField="); + builder.append(sampledField); + builder.append("]"); + return builder.toString(); + } } Modified: trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledVolume.java =================================================================== --- trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledVolume.java 2015-04-22 14:36:58 UTC (rev 2215) +++ trunk/extensions/spatial/src/org/sbml/jsbml/ext/spatial/SampledVolume.java 2015-04-22 14:53:42 UTC (rev 2216) @@ -31,7 +31,8 @@ /** * @author Alex Thomas - * @author Andreas Dräger + * @author Andreas Dräger + * @author Piero Dalle Pezze * @since 1.0 * @version $Rev$ */ @@ -78,16 +79,16 @@ public SampledVolume(SampledVolume sv) { super(sv); if (sv.isSetDomainType()) { - domainType = new String(sv.getDomainType()); + setDomainType(sv.getDomainType()); } if (sv.isSetSampledValue()) { - sampledValue = new Double(sv.getSampledValue()); + setSampledValue(sv.getSampledValue()); } if (sv.isSetMinValue()) { - minValue = new Double(sv.getMinValue()); + setMinValue(sv.getMinValue()); } if (sv.isSetMaxValue()) { - maxValue = new Double(sv.getMaxValue()); + setMaxValue(sv.getMaxValue()); } } @@ -193,7 +194,7 @@ */ public double getSampledValue() { if (isSetSampledValue()) { - return sampledValue; + return sampledValue.doubleValue(); } // This is necessary if we cannot return null here. throw new PropertyUndefinedError(SpatialConstants.sampledValue, this); @@ -213,7 +214,7 @@ * @param sampledValue */ public void setSampledValue(double sampledValue) { - double oldSampledValue = this.sampledValue; + Double oldSampledValue = this.sampledValue; this.sampledValue = sampledValue; firePropertyChange(SpatialConstants.sampledValue, oldSampledValue, this.sampledValue); } @@ -227,7 +228,7 @@ */ public boolean unsetSampledValue() { if (isSetSampledValue()) { - double oldSampledValue = sampledValue; + Double oldSampledValue = sampledValue; sampledValue = null; firePropertyChange(SpatialConstants.sampledValue, oldSampledValue, sampledValue); return true; @@ -243,7 +244,7 @@ */ public double getMinValue() { if (isSetMinValue()) { - return minValue; + return minValue.doubleValue(); } // This is necessary if we cannot return null here. throw new PropertyUndefinedError(SpatialConstants.minValue, this); @@ -293,7 +294,7 @@ */ public double getMaxValue() { if (isSetMaxValue()) { - return maxValue; + return maxValue.doubleValue(); } throw new PropertyUndefinedError(SpatialConstants.maxValue, this); } @@ -339,7 +340,7 @@ @Override public int hashCode() { - final int prime = 983;//Change this prime number + final int prime = 1949; int hashCode = super.hashCode(); if (isSetSampledValue()) { hashCode += prime * getSampledValue(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2015-04-22 14:37:10
|
Revision: 2215 http://sourceforge.net/p/jsbml/code/2215 Author: niko-rodrigue Date: 2015-04-22 14:36:58 +0000 (Wed, 22 Apr 2015) Log Message: ----------- added more comments or TODO in the FormulaParserLL3.jj + set the type for piecewise to try to debug some tests Modified Paths: -------------- branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.java branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.jj Modified: branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.java =================================================================== --- branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.java 2015-04-22 14:34:56 UTC (rev 2214) +++ branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.java 2015-04-22 14:36:58 UTC (rev 2215) @@ -626,7 +626,7 @@ type = ASTNode.Type.LOGICAL_XOR; } - node = new ASTNode(type); + node = new ASTNode(type); // TODO - those elements can have more children node.addChild(leftChild); node.addChild(rightChild); leftChild = node; @@ -680,7 +680,7 @@ { type = ASTNode.Type.RELATIONAL_LEQ; } - node = new ASTNode(type); + node = new ASTNode(type); // TODO - those elements can have more children node.addChild(leftChild); node.addChild(rightChild); leftChild = node; @@ -932,9 +932,10 @@ checkSize(arguments, 0); // TODO - we need to set the type for all those if-then-else cases node.addChild(child); } - else if (s.equals("lambda")) + else if (s.equals("lambda")) // TODO - lamdba is present in ASTNodeToken.xml so this will never be called. Remove or update the xml if we need to do + // something specific here. { - node.addChild(child); + node.addChild(child); // TODO - write all the children here and create the BVAR and other new node ? } else if (s.equals("modulo") || s.equals("mod")) { @@ -944,27 +945,28 @@ node = createModulo(child, rightChild); {if (true) return node;} } - else if (s.equals("not")) + else if (s.equals("not")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 0); node.addChild(child); } else if (s.equals("piecewise")) { - node.addChild(child); + node.setType(ASTNode.Type.FUNCTION_PIECEWISE); // TODO - we don't create the CONSTRUCTOR_PIECE node in this .jj, I think + node.addChild(child); // TODO - write all the children here and create the CONSTRUCTOR_PIECE and other new node ? } - else if (s.equals("pow") || s.equals("power")) + else if (s.equals("pow") || s.equals("power")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 1); node.addChild(child); } - else if (s.equals("sqr")) + else if (s.equals("sqr")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 0); node.addChild(child); node.addChild(new ASTNode(2)); } - else if (s.equals("sqrt")) + else if (s.equals("sqrt")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 0); node.addChild(new ASTNode(2)); @@ -1155,11 +1157,6 @@ finally { jj_save(2, xla); } } - private boolean jj_3R_37() { - if (jj_scan_token(STRING)) return true; - return false; - } - private boolean jj_3R_17() { if (jj_3R_19()) return true; Token xsp; @@ -1208,11 +1205,6 @@ return false; } - private boolean jj_3R_28() { - if (jj_scan_token(MODULO)) return true; - return false; - } - private boolean jj_3_2() { if (jj_scan_token(STRING)) return true; Token xsp; @@ -1224,13 +1216,13 @@ return false; } - private boolean jj_3R_22() { - if (jj_scan_token(MINUS)) return true; + private boolean jj_3R_28() { + if (jj_scan_token(MODULO)) return true; return false; } - private boolean jj_3R_31() { - if (jj_scan_token(POWER)) return true; + private boolean jj_3R_22() { + if (jj_scan_token(MINUS)) return true; return false; } @@ -1240,6 +1232,11 @@ return false; } + private boolean jj_3R_31() { + if (jj_scan_token(POWER)) return true; + return false; + } + private boolean jj_3R_14() { if (jj_scan_token(BOOLEAN_LOGIC)) return true; return false; @@ -1325,6 +1322,12 @@ return false; } + private boolean jj_3_3() { + if (jj_scan_token(LEFT_BRACES)) return true; + if (jj_3R_12()) return true; + return false; + } + private boolean jj_3R_10() { Token xsp; xsp = jj_scanpos; @@ -1371,9 +1374,8 @@ return false; } - private boolean jj_3_3() { - if (jj_scan_token(LEFT_BRACES)) return true; - if (jj_3R_12()) return true; + private boolean jj_3R_37() { + if (jj_scan_token(STRING)) return true; return false; } Modified: branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.jj =================================================================== --- branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.jj 2015-04-22 14:34:56 UTC (rev 2214) +++ branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/text/parser/FormulaParserLL3.jj 2015-04-22 14:36:58 UTC (rev 2215) @@ -832,7 +832,7 @@ type = ASTNode.Type.LOGICAL_XOR; } - node = new ASTNode(type); + node = new ASTNode(type); // TODO - those elements can have more children node.addChild(leftChild); node.addChild(rightChild); leftChild = node; @@ -882,7 +882,7 @@ { type = ASTNode.Type.RELATIONAL_LEQ; } - node = new ASTNode(type); + node = new ASTNode(type); // TODO - those elements can have more children node.addChild(leftChild); node.addChild(rightChild); leftChild = node; @@ -1085,9 +1085,10 @@ checkSize(arguments, 0); // TODO - we need to set the type for all those if-then-else cases node.addChild(child); } - else if (s.equals("lambda")) + else if (s.equals("lambda")) // TODO - lamdba is present in ASTNodeToken.xml so this will never be called. Remove or update the xml if we need to do + // something specific here. { - node.addChild(child); + node.addChild(child); // TODO - write all the children here and create the BVAR and other new node ? } else if (s.equals("modulo") || s.equals("mod")) { @@ -1097,27 +1098,28 @@ node = createModulo(child, rightChild); return node; } - else if (s.equals("not")) + else if (s.equals("not")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 0); node.addChild(child); } else if (s.equals("piecewise")) { - node.addChild(child); + node.setType(ASTNode.Type.FUNCTION_PIECEWISE); // TODO - we don't create the CONSTRUCTOR_PIECE node in this .jj, I think + node.addChild(child); // TODO - write all the children here and create the CONSTRUCTOR_PIECE and other new node ? } - else if (s.equals("pow") || s.equals("power")) + else if (s.equals("pow") || s.equals("power")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 1); node.addChild(child); } - else if (s.equals("sqr")) + else if (s.equals("sqr")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 0); node.addChild(child); node.addChild(new ASTNode(2)); } - else if (s.equals("sqrt")) + else if (s.equals("sqrt")) // TODO - present in ASTNodeToken.xml so this will never be called. { checkSize(arguments, 0); node.addChild(new ASTNode(2)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2015-04-22 14:34:59
|
Revision: 2214 http://sourceforge.net/p/jsbml/code/2214 Author: niko-rodrigue Date: 2015-04-22 14:34:56 +0000 (Wed, 22 Apr 2015) Log Message: ----------- fixed AStNode.isVector + corrected few junit tests Modified Paths: -------------- branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java branches/astnode2-merging-alternate/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/MathTest.java branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java Modified: branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java =================================================================== --- branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java 2015-04-22 13:50:09 UTC (rev 2213) +++ branches/astnode2-merging-alternate/core/src/org/sbml/jsbml/ASTNode.java 2015-04-22 14:34:56 UTC (rev 2214) @@ -2031,6 +2031,9 @@ value.setUIFlag(getChildCount() <= 1); break; default : // UNKNOWN: + if (logger.isDebugEnabled()) { + logger.debug("setType, reached the default case block. type = " + getType()); + } value = compiler.unknownValue(); break; } @@ -3384,7 +3387,7 @@ * {@code false} otherwise. */ public boolean isVector() { - return astnode2 instanceof ASTFunction; + return astnode2 instanceof ASTFunction && astnode2.getType().equals(Type.VECTOR); } /** Modified: branches/astnode2-merging-alternate/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/MathTest.java =================================================================== --- branches/astnode2-merging-alternate/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/MathTest.java 2015-04-22 13:50:09 UTC (rev 2213) +++ branches/astnode2-merging-alternate/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/MathTest.java 2015-04-22 14:34:56 UTC (rev 2214) @@ -29,8 +29,8 @@ import org.junit.Test; import org.sbml.jsbml.ASTNode; +import org.sbml.jsbml.text.parser.FormulaParser; import org.sbml.jsbml.text.parser.FormulaParserLL3; -import org.sbml.jsbml.text.parser.FormulaParser; import org.sbml.jsbml.text.parser.ParseException; /** @@ -354,11 +354,15 @@ ASTNode n = null; String formula = "y[i+(3*6)-sin(x)]"; - FormulaParser parser = new FormulaParser(new StringReader(formula)); + FormulaParserLL3 parser = new FormulaParserLL3(new StringReader(formula)); try { n = parser.parse(); assertTrue(n.getType() == ASTNode.Type.FUNCTION_SELECTOR); - assertTrue(n.equals(ASTNode.parseFormula("selector(y,i+(3*6)-sin(x))"))); + assertTrue(n.getChildCount() == 2); + ASTNode n2 = ASTNode.parseFormula("selector(y,i+(3*6)-sin(x))"); + assertTrue(n2.getChildCount() == 2); + assertTrue(n2.getType() == ASTNode.Type.FUNCTION_SELECTOR); + assertTrue(n.equals(n2)); } catch (ParseException e) { e.printStackTrace(); assertTrue(false); @@ -393,7 +397,7 @@ ASTNode n = null; String formula = "{sin(x), 96+21, 6^2, boo}"; - FormulaParser parser = new FormulaParser(new StringReader(formula)); + FormulaParserLL3 parser = new FormulaParserLL3(new StringReader(formula)); try { n = parser.parse(); assertTrue(n.getType() == ASTNode.Type.VECTOR); Modified: branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java =================================================================== --- branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java 2015-04-22 13:50:09 UTC (rev 2213) +++ branches/astnode2-merging-alternate/test/org/sbml/jsbml/test/AllTests.java 2015-04-22 14:34:56 UTC (rev 2214) @@ -30,6 +30,7 @@ import org.sbml.jsbml.ext.dyn.test.TestL3Dyn; import org.sbml.jsbml.ext.layout.test.LayoutJUnitTests; import org.sbml.jsbml.ext.render.test.RenderJUnitTests; +import org.sbml.jsbml.math.test.RecursionTest; import org.sbml.jsbml.xml.test.ASTNode2Tests; import org.sbml.jsbml.xml.test.LibsbmlCompatibilityTests; import org.sbml.jsbml.xml.test.Tests; @@ -44,7 +45,7 @@ @RunWith(value=Suite.class) @SuiteClasses(value={Tests.class, LibsbmlCompatibilityTests.class, LayoutJUnitTests.class, RenderJUnitTests.class, UnregisterPackageTests.class, ArraysJUnitTests.class, DisablePackageTests.class, ASTNode2Tests.class, TestL3Dyn.class, - PackageVersionTests.class}) + PackageVersionTests.class, RecursionTest.class}) public class AllTests { /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |