|
From: <sar...@us...> - 2013-07-30 11:52:08
|
Revision: 18276
http://sourceforge.net/p/sbml/code/18276
Author: sarahkeating
Date: 2013-07-30 11:52:05 +0000 (Tue, 30 Jul 2013)
Log Message:
-----------
adding validation to layout
Modified Paths:
--------------
trunk/libsbml/src/sbml/packages/layout/sbml/Curve.cpp
trunk/libsbml/src/sbml/packages/layout/sbml/LineSegment.cpp
trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLError.h
trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLErrorTable.h
Added Paths:
-----------
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021402-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021403-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021404-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021405-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021405-fail-01-02.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021405-pass-00-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021502-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021502-pass-00-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021602-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021602-pass-00-01.xml
Modified: trunk/libsbml/src/sbml/packages/layout/sbml/Curve.cpp
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/sbml/Curve.cpp 2013-07-30 10:28:45 UTC (rev 18275)
+++ trunk/libsbml/src/sbml/packages/layout/sbml/Curve.cpp 2013-07-30 11:52:05 UTC (rev 18276)
@@ -69,6 +69,7 @@
#include <sbml/util/ElementFilter.h>
#include <sbml/packages/layout/extension/LayoutExtension.h>
+#include <sbml/packages/layout/validator/LayoutSBMLError.h>
LIBSBML_CPP_NAMESPACE_BEGIN
@@ -432,6 +433,12 @@
if (name == "listOfCurveSegments")
{
+ if (mCurveSegments.size() != 0)
+ {
+ getErrorLog()->logPackageError("layout", LayoutCurveAllowedElements,
+ getPackageVersion(), getLevel(), getVersion());
+ }
+
object = &mCurveSegments;
}
@@ -451,7 +458,38 @@
void Curve::readAttributes (const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes)
{
- SBase::readAttributes(attributes,expectedAttributes);
+ const unsigned int sbmlLevel = getLevel ();
+ const unsigned int sbmlVersion = getVersion();
+
+ unsigned int numErrs;
+
+ SBase::readAttributes(attributes, expectedAttributes);
+
+ // look to see whether an unknown attribute error was logged
+ if (getErrorLog() != NULL)
+ {
+ numErrs = getErrorLog()->getNumErrors();
+ for (int n = numErrs-1; n >= 0; n--)
+ {
+ if (getErrorLog()->getError(n)->getErrorId() == UnknownPackageAttribute)
+ {
+ const std::string details =
+ getErrorLog()->getError(n)->getMessage();
+ getErrorLog()->remove(UnknownPackageAttribute);
+ getErrorLog()->logPackageError("layout", LayoutCurveAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ else if (getErrorLog()->getError(n)->getErrorId() == UnknownCoreAttribute)
+ {
+ const std::string details =
+ getErrorLog()->getError(n)->getMessage();
+ getErrorLog()->remove(UnknownCoreAttribute);
+ getErrorLog()->logPackageError("layout",
+ LayoutCurveAllowedCoreAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ }
+ }
}
/** @endcond */
@@ -575,11 +613,18 @@
if (!stream.peek().getAttributes().readInto(triple, type))
{
- //std::cout << "[DEBUG] ListOfLineSegments::createObject () : Failed to read xsi:type" << std::endl;
+ //std::cout << "[DEBUG] ListOfLineSegments::createObject () :
+ // Failed to read xsi:type" << std::endl;
+ getErrorLog()->logPackageError("layout",
+ LayoutLSegAllowedAttributes,
+ getPackageVersion(), getLevel(), getVersion());
+
return object;
}
- //std::cout << "[DEBUG] ListOfLineSegments::createObject () : type " << type << std::endl;
+ //std::cout << "[DEBUG] ListOfLineSegments::createObject () : type "
+ // << type << std::endl;
+
LAYOUT_CREATE_NS(layoutns,this->getSBMLNamespaces());
if(type=="LineSegment")
{
@@ -589,6 +634,12 @@
{
object = new CubicBezier(layoutns);
}
+ else
+ {
+ getErrorLog()->logPackageError("layout",
+ LayoutLSegTypeMustBeLineSegment,
+ getPackageVersion(), getLevel(), getVersion());
+ }
}
if(object) appendAndOwn(object);
Modified: trunk/libsbml/src/sbml/packages/layout/sbml/LineSegment.cpp
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/sbml/LineSegment.cpp 2013-07-30 10:28:45 UTC (rev 18275)
+++ trunk/libsbml/src/sbml/packages/layout/sbml/LineSegment.cpp 2013-07-30 11:52:05 UTC (rev 18276)
@@ -53,6 +53,7 @@
#include <sbml/packages/layout/sbml/LineSegment.h>
+#include <sbml/packages/layout/sbml/Curve.h>
#include <sbml/packages/layout/util/LayoutUtilities.h>
#include <sbml/SBMLVisitor.h>
#include <sbml/xml/XMLNode.h>
@@ -64,6 +65,7 @@
#include <sbml/util/ElementFilter.h>
#include <sbml/packages/layout/extension/LayoutExtension.h>
+#include <sbml/packages/layout/validator/LayoutSBMLError.h>
LIBSBML_CPP_NAMESPACE_BEGIN
@@ -440,8 +442,110 @@
void LineSegment::readAttributes (const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes)
{
- SBase::readAttributes(attributes,expectedAttributes);
+ const unsigned int sbmlLevel = getLevel ();
+ const unsigned int sbmlVersion = getVersion();
+ unsigned int numErrs;
+
+ /* look to see whether an unknown attribute error was logged
+ * during the read of the listOfLineSegments - which will have
+ * happened immediately prior to this read
+ */
+
+ if (getErrorLog() != NULL &&
+ static_cast<ListOfLineSegments*>(getParentSBMLObject())->size() < 2)
+ {
+ numErrs = getErrorLog()->getNumErrors();
+ for (int n = numErrs-1; n >= 0; n--)
+ {
+ if (getErrorLog()->getError(n)->getErrorId() == UnknownPackageAttribute)
+ {
+ const std::string details =
+ getErrorLog()->getError(n)->getMessage();
+ getErrorLog()->remove(UnknownPackageAttribute);
+ getErrorLog()->logPackageError("layout",
+ LayoutLOCurveSegsAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ else if (getErrorLog()->getError(n)->getErrorId() == UnknownCoreAttribute)
+ {
+ const std::string details =
+ getErrorLog()->getError(n)->getMessage();
+ getErrorLog()->remove(UnknownCoreAttribute);
+ getErrorLog()->logPackageError("layout",
+ LayoutLOCurveSegsAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ }
+ }
+
+ SBase::readAttributes(attributes, expectedAttributes);
+
+ // look to see whether an unknown attribute error was logged
+ if (getErrorLog() != NULL)
+ {
+ numErrs = getErrorLog()->getNumErrors();
+ for (int n = numErrs-1; n >= 0; n--)
+ {
+ if (getErrorLog()->getError(n)->getErrorId() == UnknownPackageAttribute)
+ {
+ const std::string details =
+ getErrorLog()->getError(n)->getMessage();
+ getErrorLog()->remove(UnknownPackageAttribute);
+ if (this->getTypeCode() == SBML_LAYOUT_LINESEGMENT)
+ {
+ getErrorLog()->logPackageError("layout", LayoutLSegAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ else
+ {
+ getErrorLog()->logPackageError("layout", LayoutCBezAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ }
+ else if (getErrorLog()->getError(n)->getErrorId() == UnknownCoreAttribute)
+ {
+ const std::string details =
+ getErrorLog()->getError(n)->getMessage();
+ getErrorLog()->remove(UnknownCoreAttribute);
+ if (this->getTypeCode() == SBML_LAYOUT_LINESEGMENT)
+ {
+ getErrorLog()->logPackageError("layout",
+ LayoutLSegAllowedCoreAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ else
+ {
+ getErrorLog()->logPackageError("layout",
+ LayoutCBezAllowedCoreAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ }
+ }
+ }
+
+ //bool assigned = false;
+
+ ////
+ //// xsi:type string ( use = "required" )
+ ////
+ //assigned = attributes.readInto("xsi:type", mXsi:type);
+
+ //if (assigned == true)
+ //{
+ // // check string is not empty
+
+ // if (mXsi:type.empty() == true)
+ // {
+ // logEmptyString(mXsi:type, getLevel(), getVersion(), "<LineSegment>");
+ // }
+ //}
+ //else
+ //{
+ // std::string message = "Layout attribute 'xsi:type' is missing.";
+ // getErrorLog()->logPackageError("layout", LayoutUnknownError,
+ // getPackageVersion(), sbmlLevel, sbmlVersion, message);
+ //}
}
void
Modified: trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLError.h
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLError.h 2013-07-30 10:28:45 UTC (rev 18275)
+++ trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLError.h 2013-07-30 11:52:05 UTC (rev 18276)
@@ -170,9 +170,10 @@
, LayoutCurveAllowedCoreElements = 6021401
, LayoutCurveAllowedCoreAttributes = 6021402
, LayoutCurveAllowedElements = 6021403
- , LayoutLOCurveSegsAllowedAttributes = 6021404
- , LayoutLOCurveSegsAllowedElements = 6021405
- , LayoutLOCurveSegsNotEmpty = 6021406
+ , LayoutCurveAllowedAttributes = 6021404
+ , LayoutLOCurveSegsAllowedAttributes = 6021405
+ , LayoutLOCurveSegsAllowedElements = 6021406
+ , LayoutLOCurveSegsNotEmpty = 6021407
, LayoutLSegAllowedCoreElements = 6021501
, LayoutLSegAllowedCoreAttributes = 6021502
Modified: trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLErrorTable.h
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLErrorTable.h 2013-07-30 10:28:45 UTC (rev 18275)
+++ trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLErrorTable.h 2013-07-30 11:52:05 UTC (rev 18276)
@@ -1589,6 +1589,17 @@
},
// 6021404
+ { LayoutCurveAllowedAttributes,
+ "Layout attributes allowed on <curve>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "No attributes from the Layout namespace "
+ "are permitted on a <curve>. ",
+ { "L3V1 Layout V1 Section 3.4.4"
+ }
+ },
+
+ // 6021405
{ LayoutLOCurveSegsAllowedAttributes,
"Allowed attributes on ListOfCurveSegments",
LIBSBML_CAT_GENERAL_CONSISTENCY,
@@ -1602,7 +1613,7 @@
}
},
- // 6021405
+ // 6021406
{ LayoutLOCurveSegsAllowedElements,
"Allowed elements on ListOfCurveSegments",
LIBSBML_CAT_GENERAL_CONSISTENCY,
@@ -1614,7 +1625,7 @@
}
},
- // 6021406
+ // 6021407
{ LayoutLOCurveSegsNotEmpty,
"No empty ListOfCurveSegments",
LIBSBML_CAT_GENERAL_CONSISTENCY,
Added: trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021402-fail-01-01.xml
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021402-fail-01-01.xml (rev 0)
+++ trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021402-fail-01-01.xml 2013-07-30 11:52:05 UTC (rev 18276)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1"
+ level="3" version="1" layout:required="false" >
+ <model id="TestModel_with_modifiers" timeUnits="time">
+
+ <listOfCompartments>
+ <compartment id="Yeast" spatialDimensions="3" units="volume" constant="true"/>
+ </listOfCompartments>
+ <listOfSpecies>
+ <species id="Glucose" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="G6P" name="Glucose-6-phosphate" compartment="Yeast"
+ substanceUnits="substance" hasOnlySubstanceUnits="false"
+ boundaryCondition="false" constant="false"/>
+ <species id="ATP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="ADP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="Pi" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ </listOfSpecies>
+ <listOfReactions>
+ <reaction id="Hexokinase" reversible="false" fast="false">
+ <listOfReactants>
+ <speciesReference id="SpeciesReference_Glucose" species="Glucose"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ATP" species="ATP"
+ stoichiometry="1" constant="true"/>
+ </listOfReactants>
+ <listOfProducts>
+ <speciesReference id="SpeciesReference_G6P" species="G6P"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ADP" species="ADP"
+ stoichiometry="1" constant="true"/>
+ </listOfProducts>
+ <listOfModifiers>
+ <modifierSpeciesReference id="ModifierSpeciesReference_G6P" species="G6P"/>
+ <modifierSpeciesReference id="ModifierSpeciesReference_Pi" species="Pi"/>
+ </listOfModifiers>
+ </reaction>
+ </listOfReactions>
+ <layout:listOfLayouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1">
+ <layout:layout layout:id="Layout_1">
+ <layout:dimensions layout:width="400" layout:height="230"/>
+ <layout:listOfCompartmentGlyphs>
+ <layout:compartmentGlyph layout:id="CompartmentGlyph_1" layout:compartment="Yeast">
+ <layout:boundingBox layout:id="bb1">
+ <layout:position layout:x="5" layout:y="5"/>
+ <layout:dimensions layout:width="390" layout:height="220"/>
+ </layout:boundingBox>
+ </layout:compartmentGlyph>
+ </layout:listOfCompartmentGlyphs>
+ <layout:listOfSpeciesGlyphs>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Glucose" layout:species="Glucose">
+ <layout:boundingBox layout:id="bb2">
+ <layout:position layout:x="105" layout:y="20"/>
+ <layout:dimensions layout:width="130" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_G6P" layout:species="G6P">
+ <layout:boundingBox layout:id="bb5">
+ <layout:position layout:x="50" layout:y="190"/>
+ <layout:dimensions layout:width="270" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_ATP" layout:species="ATP">
+ <layout:boundingBox layout:id="bb3">
+ <layout:position layout:x="270" layout:y="70"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="glyph_ADP" layout:species="ADP">
+ <layout:boundingBox layout:id="bb4">
+ <layout:position layout:x="270" layout:y="140"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Pi" layout:species="Pi">
+ <layout:boundingBox layout:id="bb6">
+ <layout:position layout:x="50" layout:y="100"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ </layout:listOfSpeciesGlyphs>
+ <layout:listOfReactionGlyphs>
+ <layout:reactionGlyph layout:id="glyph_Hexokinase" layout:reaction="Hexokinase">
+ <layout:curve metaid="_c" sboTerm="SBO:0000001" id="w">
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="130"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ <layout:listOfSpeciesReferenceGlyphs>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_Glucose"
+ layout:speciesReference="SpeciesReference_Glucose"
+ layout:speciesGlyph="SpeciesGlyph_Glucose"
+ layout:role="substrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="50"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ATP"
+ layout:speciesReference="SpeciesReference_ATP"
+ layout:speciesGlyph="SpeciesGlyph_ATP"
+ layout:role="sidesubstrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="260" layout:y="80"/>
+ <layout:basePoint1 layout:x="170" layout:y="80"/>
+ <layout:basePoint2 layout:x="170" layout:y="80"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_1"
+ layout:speciesReference="SpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+ layout:role="product">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="170" layout:y="180"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ADP"
+ layout:speciesReference="SpeciesReference_ADP"
+ layout:speciesGlyph="glyph_ADP"
+ layout:role="sideproduct">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="260" layout:y="150"/>
+ <layout:basePoint1 layout:x="170" layout:y="150"/>
+ <layout:basePoint2 layout:x="170" layout:y="150"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_2"
+ layout:speciesReference="ModifierSpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+ layout:role="inhibitor">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="45" layout:y="200"/>
+ <layout:end layout:x="165" layout:y="120"/>
+ <layout:basePoint1 layout:x="0" layout:y="200"/>
+ <layout:basePoint2 layout:x="0" layout:y="120"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_PI"
+ layout:speciesReference="ModifierSpeciesReference_Pi"
+ layout:speciesGlyph="SpeciesGlyph_Pi"
+ layout:role="activator">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="115" layout:y="110"/>
+ <layout:end layout:x="165" layout:y="110"/>
+ <layout:basePoint1 layout:x="140" layout:y="110"/>
+ <layout:basePoint2 layout:x="140" layout:y="110"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ </layout:listOfSpeciesReferenceGlyphs>
+ </layout:reactionGlyph>
+ </layout:listOfReactionGlyphs>
+ <layout:listOfTextGlyphs>
+ <layout:textGlyph layout:id="TextGlyph_Glucose"
+ layout:originOfText="Glucose"
+ layout:graphicalObject="SpeciesGlyph_Glucose">
+ <layout:boundingBox layout:id="bbA">
+ <layout:position layout:x="115" layout:y="20"/>
+ <layout:dimensions layout:width="110" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_G6P"
+ layout:originOfText="G6P"
+ layout:graphicalObject="SpeciesGlyph_G6P">
+ <layout:boundingBox layout:id="bbD">
+ <layout:position layout:x="60" layout:y="190"/>
+ <layout:dimensions layout:width="250" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_ATP"
+ layout:originOfText="ATP"
+ layout:graphicalObject="SpeciesGlyph_ATP">
+ <layout:boundingBox layout:id="bbB">
+ <layout:position layout:x="280" layout:y="70"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_ADP"
+ layout:originOfText="ADP"
+ layout:graphicalObject="glyph_ADP">
+ <layout:boundingBox layout:id="bbC">
+ <layout:position layout:x="280" layout:y="140"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_PI"
+ layout:originOfText="Pi"
+ layout:graphicalObject="SpeciesGlyph_Pi">
+ <layout:boundingBox layout:id="bbE">
+ <layout:position layout:x="60" layout:y="100"/>
+ <layout:dimensions layout:width="40" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ </layout:listOfTextGlyphs>
+ </layout:layout>
+ </layout:listOfLayouts>
+ </model>
+</sbml>
Added: trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021403-fail-01-01.xml
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021403-fail-01-01.xml (rev 0)
+++ trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021403-fail-01-01.xml 2013-07-30 11:52:05 UTC (rev 18276)
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1"
+ level="3" version="1" layout:required="false" >
+ <model id="TestModel_with_modifiers" timeUnits="time">
+
+ <listOfCompartments>
+ <compartment id="Yeast" spatialDimensions="3" units="volume" constant="true"/>
+ </listOfCompartments>
+ <listOfSpecies>
+ <species id="Glucose" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="G6P" name="Glucose-6-phosphate" compartment="Yeast"
+ substanceUnits="substance" hasOnlySubstanceUnits="false"
+ boundaryCondition="false" constant="false"/>
+ <species id="ATP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="ADP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="Pi" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ </listOfSpecies>
+ <listOfReactions>
+ <reaction id="Hexokinase" reversible="false" fast="false">
+ <listOfReactants>
+ <speciesReference id="SpeciesReference_Glucose" species="Glucose"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ATP" species="ATP"
+ stoichiometry="1" constant="true"/>
+ </listOfReactants>
+ <listOfProducts>
+ <speciesReference id="SpeciesReference_G6P" species="G6P"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ADP" species="ADP"
+ stoichiometry="1" constant="true"/>
+ </listOfProducts>
+ <listOfModifiers>
+ <modifierSpeciesReference id="ModifierSpeciesReference_G6P" species="G6P"/>
+ <modifierSpeciesReference id="ModifierSpeciesReference_Pi" species="Pi"/>
+ </listOfModifiers>
+ </reaction>
+ </listOfReactions>
+ <layout:listOfLayouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1">
+ <layout:layout layout:id="Layout_1">
+ <layout:dimensions layout:width="400" layout:height="230"/>
+ <layout:listOfCompartmentGlyphs>
+ <layout:compartmentGlyph layout:id="CompartmentGlyph_1" layout:compartment="Yeast">
+ <layout:boundingBox layout:id="bb1">
+ <layout:position layout:x="5" layout:y="5"/>
+ <layout:dimensions layout:width="390" layout:height="220"/>
+ </layout:boundingBox>
+ </layout:compartmentGlyph>
+ </layout:listOfCompartmentGlyphs>
+ <layout:listOfSpeciesGlyphs>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Glucose" layout:species="Glucose">
+ <layout:boundingBox layout:id="bb2">
+ <layout:position layout:x="105" layout:y="20"/>
+ <layout:dimensions layout:width="130" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_G6P" layout:species="G6P">
+ <layout:boundingBox layout:id="bb5">
+ <layout:position layout:x="50" layout:y="190"/>
+ <layout:dimensions layout:width="270" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_ATP" layout:species="ATP">
+ <layout:boundingBox layout:id="bb3">
+ <layout:position layout:x="270" layout:y="70"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="glyph_ADP" layout:species="ADP">
+ <layout:boundingBox layout:id="bb4">
+ <layout:position layout:x="270" layout:y="140"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Pi" layout:species="Pi">
+ <layout:boundingBox layout:id="bb6">
+ <layout:position layout:x="50" layout:y="100"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ </layout:listOfSpeciesGlyphs>
+ <layout:listOfReactionGlyphs>
+ <layout:reactionGlyph layout:id="glyph_Hexokinase" layout:reaction="Hexokinase">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="130"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="130"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments> </layout:curve>
+ <layout:listOfSpeciesReferenceGlyphs>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_Glucose"
+ layout:speciesReference="SpeciesReference_Glucose"
+ layout:speciesGlyph="SpeciesGlyph_Glucose"
+ layout:role="substrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="50"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ATP"
+ layout:speciesReference="SpeciesReference_ATP"
+ layout:speciesGlyph="SpeciesGlyph_ATP"
+ layout:role="sidesubstrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="260" layout:y="80"/>
+ <layout:basePoint1 layout:x="170" layout:y="80"/>
+ <layout:basePoint2 layout:x="170" layout:y="80"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_1"
+ layout:speciesReference="SpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+ layout:role="product">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="170" layout:y="180"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ADP"
+ layout:speciesReference="SpeciesReference_ADP"
+ layout:speciesGlyph="glyph_ADP"
+ layout:role="sideproduct">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="260" layout:y="150"/>
+ <layout:basePoint1 layout:x="170" layout:y="150"/>
+ <layout:basePoint2 layout:x="170" layout:y="150"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_2"
+ layout:speciesReference="ModifierSpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+ layout:role="inhibitor">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="45" layout:y="200"/>
+ <layout:end layout:x="165" layout:y="120"/>
+ <layout:basePoint1 layout:x="0" layout:y="200"/>
+ <layout:basePoint2 layout:x="0" layout:y="120"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_PI"
+ layout:speciesReference="ModifierSpeciesReference_Pi"
+ layout:speciesGlyph="SpeciesGlyph_Pi"
+ layout:role="activator">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="115" layout:y="110"/>
+ <layout:end layout:x="165" layout:y="110"/>
+ <layout:basePoint1 layout:x="140" layout:y="110"/>
+ <layout:basePoint2 layout:x="140" layout:y="110"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ </layout:listOfSpeciesReferenceGlyphs>
+ </layout:reactionGlyph>
+ </layout:listOfReactionGlyphs>
+ <layout:listOfTextGlyphs>
+ <layout:textGlyph layout:id="TextGlyph_Glucose"
+ layout:originOfText="Glucose"
+ layout:graphicalObject="SpeciesGlyph_Glucose">
+ <layout:boundingBox layout:id="bbA">
+ <layout:position layout:x="115" layout:y="20"/>
+ <layout:dimensions layout:width="110" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_G6P"
+ layout:originOfText="G6P"
+ layout:graphicalObject="SpeciesGlyph_G6P">
+ <layout:boundingBox layout:id="bbD">
+ <layout:position layout:x="60" layout:y="190"/>
+ <layout:dimensions layout:width="250" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_ATP"
+ layout:originOfText="ATP"
+ layout:graphicalObject="SpeciesGlyph_ATP">
+ <layout:boundingBox layout:id="bbB">
+ <layout:position layout:x="280" layout:y="70"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_ADP"
+ layout:originOfText="ADP"
+ layout:graphicalObject="glyph_ADP">
+ <layout:boundingBox layout:id="bbC">
+ <layout:position layout:x="280" layout:y="140"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_PI"
+ layout:originOfText="Pi"
+ layout:graphicalObject="SpeciesGlyph_Pi">
+ <layout:boundingBox layout:id="bbE">
+ <layout:position layout:x="60" layout:y="100"/>
+ <layout:dimensions layout:width="40" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ </layout:listOfTextGlyphs>
+ </layout:layout>
+ </layout:listOfLayouts>
+ </model>
+</sbml>
Added: trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021404-fail-01-01.xml
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021404-fail-01-01.xml (rev 0)
+++ trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021404-fail-01-01.xml 2013-07-30 11:52:05 UTC (rev 18276)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1"
+ level="3" version="1" layout:required="false" >
+ <model id="TestModel_with_modifiers" timeUnits="time">
+
+ <listOfCompartments>
+ <compartment id="Yeast" spatialDimensions="3" units="volume" constant="true"/>
+ </listOfCompartments>
+ <listOfSpecies>
+ <species id="Glucose" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="G6P" name="Glucose-6-phosphate" compartment="Yeast"
+ substanceUnits="substance" hasOnlySubstanceUnits="false"
+ boundaryCondition="false" constant="false"/>
+ <species id="ATP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="ADP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="Pi" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ </listOfSpecies>
+ <listOfReactions>
+ <reaction id="Hexokinase" reversible="false" fast="false">
+ <listOfReactants>
+ <speciesReference id="SpeciesReference_Glucose" species="Glucose"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ATP" species="ATP"
+ stoichiometry="1" constant="true"/>
+ </listOfReactants>
+ <listOfProducts>
+ <speciesReference id="SpeciesReference_G6P" species="G6P"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ADP" species="ADP"
+ stoichiometry="1" constant="true"/>
+ </listOfProducts>
+ <listOfModifiers>
+ <modifierSpeciesReference id="ModifierSpeciesReference_G6P" species="G6P"/>
+ <modifierSpeciesReference id="ModifierSpeciesReference_Pi" species="Pi"/>
+ </listOfModifiers>
+ </reaction>
+ </listOfReactions>
+ <layout:listOfLayouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1">
+ <layout:layout layout:id="Layout_1">
+ <layout:dimensions layout:width="400" layout:height="230"/>
+ <layout:listOfCompartmentGlyphs>
+ <layout:compartmentGlyph layout:id="CompartmentGlyph_1" layout:compartment="Yeast">
+ <layout:boundingBox layout:id="bb1">
+ <layout:position layout:x="5" layout:y="5"/>
+ <layout:dimensions layout:width="390" layout:height="220"/>
+ </layout:boundingBox>
+ </layout:compartmentGlyph>
+ </layout:listOfCompartmentGlyphs>
+ <layout:listOfSpeciesGlyphs>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Glucose" layout:species="Glucose">
+ <layout:boundingBox layout:id="bb2">
+ <layout:position layout:x="105" layout:y="20"/>
+ <layout:dimensions layout:width="130" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_G6P" layout:species="G6P">
+ <layout:boundingBox layout:id="bb5">
+ <layout:position layout:x="50" layout:y="190"/>
+ <layout:dimensions layout:width="270" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_ATP" layout:species="ATP">
+ <layout:boundingBox layout:id="bb3">
+ <layout:position layout:x="270" layout:y="70"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="glyph_ADP" layout:species="ADP">
+ <layout:boundingBox layout:id="bb4">
+ <layout:position layout:x="270" layout:y="140"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Pi" layout:species="Pi">
+ <layout:boundingBox layout:id="bb6">
+ <layout:position layout:x="50" layout:y="100"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ </layout:listOfSpeciesGlyphs>
+ <layout:listOfReactionGlyphs>
+ <layout:reactionGlyph layout:id="glyph_Hexokinase" layout:reaction="Hexokinase">
+ <layout:curve layout:id="ww">
+ <layout:listOfCurveSegments metaid="_v" sboTerm="SBO:0000001">
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="130"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ <layout:listOfSpeciesReferenceGlyphs>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_Glucose"
+ layout:speciesReference="SpeciesReference_Glucose"
+ layout:speciesGlyph="SpeciesGlyph_Glucose"
+ layout:role="substrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="50"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ATP"
+ layout:speciesReference="SpeciesReference_ATP"
+ layout:speciesGlyph="SpeciesGlyph_ATP"
+ layout:role="sidesubstrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="260" layout:y="80"/>
+ <layout:basePoint1 layout:x="170" layout:y="80"/>
+ <layout:basePoint2 layout:x="170" layout:y="80"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_1"
+ layout:speciesReference="SpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+ layout:role="product">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="170" layout:y="180"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ADP"
+ layout:speciesReference="SpeciesReference_ADP"
+ layout:speciesGlyph="glyph_ADP"
+ layout:role="sideproduct">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="260" layout:y="150"/>
+ <layout:basePoint1 layout:x="170" layout:y="150"/>
+ <layout:basePoint2 layout:x="170" layout:y="150"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_2"
+ layout:speciesReference="ModifierSpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+ layout:role="inhibitor">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="45" layout:y="200"/>
+ <layout:end layout:x="165" layout:y="120"/>
+ <layout:basePoint1 layout:x="0" layout:y="200"/>
+ <layout:basePoint2 layout:x="0" layout:y="120"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_PI"
+ layout:speciesReference="ModifierSpeciesReference_Pi"
+ layout:speciesGlyph="SpeciesGlyph_Pi"
+ layout:role="activator">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="115" layout:y="110"/>
+ <layout:end layout:x="165" layout:y="110"/>
+ <layout:basePoint1 layout:x="140" layout:y="110"/>
+ <layout:basePoint2 layout:x="140" layout:y="110"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ </layout:listOfSpeciesReferenceGlyphs>
+ </layout:reactionGlyph>
+ </layout:listOfReactionGlyphs>
+ <layout:listOfTextGlyphs>
+ <layout:textGlyph layout:id="TextGlyph_Glucose"
+ layout:originOfText="Glucose"
+ layout:graphicalObject="SpeciesGlyph_Glucose">
+ <layout:boundingBox layout:id="bbA">
+ <layout:position layout:x="115" layout:y="20"/>
+ <layout:dimensions layout:width="110" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_G6P"
+ layout:originOfText="G6P"
+ layout:graphicalObject="SpeciesGlyph_G6P">
+ <layout:boundingBox layout:id="bbD">
+ <layout:position layout:x="60" layout:y="190"/>
+ <layout:dimensions layout:width="250" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_ATP"
+ layout:originOfText="ATP"
+ layout:graphicalObject="SpeciesGlyph_ATP">
+ <layout:boundingBox layout:id="bbB">
+ <layout:position layout:x="280" layout:y="70"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_ADP"
+ layout:originOfText="ADP"
+ layout:graphicalObject="glyph_ADP">
+ <layout:boundingBox layout:id="bbC">
+ <layout:position layout:x="280" layout:y="140"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ <layout:textGlyph layout:id="TextGlyph_PI"
+ layout:originOfText="Pi"
+ layout:graphicalObject="SpeciesGlyph_Pi">
+ <layout:boundingBox layout:id="bbE">
+ <layout:position layout:x="60" layout:y="100"/>
+ <layout:dimensions layout:width="40" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:textGlyph>
+ </layout:listOfTextGlyphs>
+ </layout:layout>
+ </layout:listOfLayouts>
+ </model>
+</sbml>
Added: trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021405-fail-01-01.xml
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021405-fail-01-01.xml (rev 0)
+++ trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021405-fail-01-01.xml 2013-07-30 11:52:05 UTC (rev 18276)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1"
+ level="3" version="1" layout:required="false" >
+ <model id="TestModel_with_modifiers" timeUnits="time">
+
+ <listOfCompartments>
+ <compartment id="Yeast" spatialDimensions="3" units="volume" constant="true"/>
+ </listOfCompartments>
+ <listOfSpecies>
+ <species id="Glucose" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="G6P" name="Glucose-6-phosphate" compartment="Yeast"
+ substanceUnits="substance" hasOnlySubstanceUnits="false"
+ boundaryCondition="false" constant="false"/>
+ <species id="ATP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="ADP" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ <species id="Pi" compartment="Yeast" substanceUnits="substance"
+ hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
+ </listOfSpecies>
+ <listOfReactions>
+ <reaction id="Hexokinase" reversible="false" fast="false">
+ <listOfReactants>
+ <speciesReference id="SpeciesReference_Glucose" species="Glucose"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ATP" species="ATP"
+ stoichiometry="1" constant="true"/>
+ </listOfReactants>
+ <listOfProducts>
+ <speciesReference id="SpeciesReference_G6P" species="G6P"
+ stoichiometry="1" constant="true"/>
+ <speciesReference id="SpeciesReference_ADP" species="ADP"
+ stoichiometry="1" constant="true"/>
+ </listOfProducts>
+ <listOfModifiers>
+ <modifierSpeciesReference id="ModifierSpeciesReference_G6P" species="G6P"/>
+ <modifierSpeciesReference id="ModifierSpeciesReference_Pi" species="Pi"/>
+ </listOfModifiers>
+ </reaction>
+ </listOfReactions>
+ <layout:listOfLayouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1">
+ <layout:layout layout:id="Layout_1">
+ <layout:dimensions layout:width="400" layout:height="230"/>
+ <layout:listOfCompartmentGlyphs>
+ <layout:compartmentGlyph layout:id="CompartmentGlyph_1" layout:compartment="Yeast">
+ <layout:boundingBox layout:id="bb1">
+ <layout:position layout:x="5" layout:y="5"/>
+ <layout:dimensions layout:width="390" layout:height="220"/>
+ </layout:boundingBox>
+ </layout:compartmentGlyph>
+ </layout:listOfCompartmentGlyphs>
+ <layout:listOfSpeciesGlyphs>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Glucose" layout:species="Glucose">
+ <layout:boundingBox layout:id="bb2">
+ <layout:position layout:x="105" layout:y="20"/>
+ <layout:dimensions layout:width="130" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_G6P" layout:species="G6P">
+ <layout:boundingBox layout:id="bb5">
+ <layout:position layout:x="50" layout:y="190"/>
+ <layout:dimensions layout:width="270" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_ATP" layout:species="ATP">
+ <layout:boundingBox layout:id="bb3">
+ <layout:position layout:x="270" layout:y="70"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="glyph_ADP" layout:species="ADP">
+ <layout:boundingBox layout:id="bb4">
+ <layout:position layout:x="270" layout:y="140"/>
+ <layout:dimensions layout:width="80" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ <layout:speciesGlyph layout:id="SpeciesGlyph_Pi" layout:species="Pi">
+ <layout:boundingBox layout:id="bb6">
+ <layout:position layout:x="50" layout:y="100"/>
+ <layout:dimensions layout:width="60" layout:height="20"/>
+ </layout:boundingBox>
+ </layout:speciesGlyph>
+ </layout:listOfSpeciesGlyphs>
+ <layout:listOfReactionGlyphs>
+ <layout:reactionGlyph layout:id="glyph_Hexokinase" layout:reaction="Hexokinase">
+ <layout:curve>
+ <layout:listOfCurveSegments metaid="_v" sboTerm="SBO:0000001" species="w">
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="130"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ <layout:listOfSpeciesReferenceGlyphs>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_Glucose"
+ layout:speciesReference="SpeciesReference_Glucose"
+ layout:speciesGlyph="SpeciesGlyph_Glucose"
+ layout:role="substrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="170" layout:y="50"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ATP"
+ layout:speciesReference="SpeciesReference_ATP"
+ layout:speciesGlyph="SpeciesGlyph_ATP"
+ layout:role="sidesubstrate">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="100"/>
+ <layout:end layout:x="260" layout:y="80"/>
+ <layout:basePoint1 layout:x="170" layout:y="80"/>
+ <layout:basePoint2 layout:x="170" layout:y="80"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_1"
+ layout:speciesReference="SpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+ layout:role="product">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="LineSegment">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="170" layout:y="180"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_ADP"
+ layout:speciesReference="SpeciesReference_ADP"
+ layout:speciesGlyph="glyph_ADP"
+ layout:role="sideproduct">
+ <layout:curve>
+ <layout:listOfCurveSegments>
+ <layout:curveSegment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="CubicBezier">
+ <layout:start layout:x="170" layout:y="130"/>
+ <layout:end layout:x="260" layout:y="150"/>
+ <layout:basePoint1 layout:x="170" layout:y="150"/>
+ <layout:basePoint2 layout:x="170" layout:y="150"/>
+ </layout:curveSegment>
+ </layout:listOfCurveSegments>
+ </layout:curve>
+ </layout:speciesReferenceGlyph>
+ <layout:speciesReferenceGlyph layout:id="SpeciesReferenceGlyph_G6P_2"
+ layout:speciesReference="ModifierSpeciesReference_G6P"
+ layout:speciesGlyph="SpeciesGlyph_G6P"
+...
[truncated message content] |