|
From: <sar...@us...> - 2013-07-30 10:28:49
|
Revision: 18275
http://sourceforge.net/p/sbml/code/18275
Author: sarahkeating
Date: 2013-07-30 10:28:45 +0000 (Tue, 30 Jul 2013)
Log Message:
-----------
adding validation to layout
Modified Paths:
--------------
trunk/libsbml/src/sbml/packages/layout/sbml/BoundingBox.cpp
trunk/libsbml/src/sbml/packages/layout/sbml/Dimensions.cpp
trunk/libsbml/src/sbml/packages/layout/sbml/Point.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/6021202-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021202-pass-00-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021203-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021203-fail-01-02.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021203-fail-01-03.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021203-pass-00-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021204-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021204-fail-01-02.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021204-fail-01-03.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021302-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021302-pass-00-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021304-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021702-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021702-pass-00-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021703-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021703-fail-01-02.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021703-fail-01-03.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021703-pass-00-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021704-fail-01-01.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021704-fail-01-02.xml
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021704-fail-01-03.xml
Removed Paths:
-------------
trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/layout-spec-example-l3v1.xml
Modified: trunk/libsbml/src/sbml/packages/layout/sbml/BoundingBox.cpp
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/sbml/BoundingBox.cpp 2013-07-30 09:48:19 UTC (rev 18274)
+++ trunk/libsbml/src/sbml/packages/layout/sbml/BoundingBox.cpp 2013-07-30 10:28:45 UTC (rev 18275)
@@ -65,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
@@ -632,17 +633,60 @@
void BoundingBox::readAttributes (const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes)
{
- SBase::readAttributes(attributes,expectedAttributes);
+ const unsigned int sbmlLevel = getLevel ();
+ const unsigned int sbmlVersion = getVersion();
- const unsigned int sbmlLevel = getLevel ();
- const unsigned int sbmlVersion = getVersion();
+ unsigned int numErrs;
- bool assigned = attributes.readInto("id", mId, getErrorLog(), false, getLine(), getColumn());
- if (assigned && mId.empty())
- {
- logEmptyString(mId, sbmlLevel, sbmlVersion, "<boundingBox>");
- }
- if (!SyntaxChecker::isValidInternalSId(mId)) logError(InvalidIdSyntax);
+ 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", LayoutBBoxAllowedAttributes,
+ 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",
+ LayoutBBoxAllowedCoreAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ }
+ }
+
+ bool assigned = false;
+
+ //
+ // id SId ( use = "optional" )
+ //
+ assigned = attributes.readInto("id", mId);
+
+ if (assigned == true && getErrorLog() != NULL)
+ {
+ // check string is not empty and correct syntax
+
+ if (mId.empty() == true)
+ {
+ logEmptyString(mId, getLevel(), getVersion(), "<BoundingBox>");
+ }
+ else if (SyntaxChecker::isValidSBMLSId(mId) == false)
+ {
+ getErrorLog()->logPackageError("layout", LayoutSIdSyntax,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ }
}
/** @endcond */
Modified: trunk/libsbml/src/sbml/packages/layout/sbml/Dimensions.cpp
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/sbml/Dimensions.cpp 2013-07-30 09:48:19 UTC (rev 18274)
+++ trunk/libsbml/src/sbml/packages/layout/sbml/Dimensions.cpp 2013-07-30 10:28:45 UTC (rev 18275)
@@ -65,6 +65,7 @@
#include <sbml/xml/XMLOutputStream.h>
#include <sbml/packages/layout/extension/LayoutExtension.h>
+#include <sbml/packages/layout/validator/LayoutSBMLError.h>
LIBSBML_CPP_NAMESPACE_BEGIN
@@ -434,28 +435,137 @@
void Dimensions::readAttributes (const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes)
{
- SBase::readAttributes(attributes,expectedAttributes);
+ const unsigned int sbmlLevel = getLevel ();
+ const unsigned int sbmlVersion = getVersion();
- const unsigned int sbmlLevel = getLevel ();
- const unsigned int sbmlVersion = getVersion();
+ unsigned int numErrs;
- bool assigned = attributes.readInto("id", mId, getErrorLog(), false, getLine(), getColumn());
- if (assigned && mId.empty())
- {
- logEmptyString(mId, sbmlLevel, sbmlVersion, "<dimension>");
- }
- if (!SyntaxChecker::isValidInternalSId(mId)) logError(InvalidIdSyntax);
+ SBase::readAttributes(attributes, expectedAttributes);
- attributes.readInto(std::string("width"), mW, getErrorLog(),true, getLine(), getColumn());
- attributes.readInto(std::string("height"), mH, getErrorLog(),true, getLine(), getColumn());
+ // 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", LayoutDimsAllowedAttributes,
+ 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",
+ LayoutDimsAllowedCoreAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ }
+ }
- //
- // (TODO) default value should be allowd in package of Level 3?
- //
- if(!attributes.readInto("depth", mD, getErrorLog(), false, getLine(), getColumn()))
- {
- this->mD=0.0;
- }
+ bool assigned = false;
+
+ //
+ // id SId ( use = "optional" )
+ //
+ assigned = attributes.readInto("id", mId);
+
+ if (assigned == true && getErrorLog() != NULL)
+ {
+ // check string is not empty and correct syntax
+
+ if (mId.empty() == true)
+ {
+ logEmptyString(mId, getLevel(), getVersion(), "<Dimensions>");
+ }
+ else if (SyntaxChecker::isValidSBMLSId(mId) == false)
+ {
+ getErrorLog()->logPackageError("layout", LayoutSIdSyntax,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ }
+
+ //
+ // width double ( use = "required" )
+ //
+ numErrs = getErrorLog() != NULL ? getErrorLog()->getNumErrors() : 0;
+ assigned = attributes.readInto("width", mW);
+
+ if (assigned == false)
+ {
+ if (getErrorLog() != NULL)
+ {
+ if (getErrorLog()->getNumErrors() == numErrs + 1 &&
+ getErrorLog()->contains(XMLAttributeTypeMismatch))
+ {
+ getErrorLog()->remove(XMLAttributeTypeMismatch);
+ getErrorLog()->logPackageError("layout",
+ LayoutDimsAttributesMustBeDouble,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ else
+ {
+ std::string message = "Layout attribute 'width' is missing.";
+ getErrorLog()->logPackageError("layout", LayoutDimsAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, message);
+ }
+ }
+ }
+
+ //
+ // height double ( use = "required" )
+ //
+ numErrs = getErrorLog() != NULL ? getErrorLog()->getNumErrors() : 0;
+ assigned = attributes.readInto("height", mH);
+
+ if (assigned == false)
+ {
+ if (getErrorLog() != NULL)
+ {
+ if (getErrorLog()->getNumErrors() == numErrs + 1 &&
+ getErrorLog()->contains(XMLAttributeTypeMismatch))
+ {
+ getErrorLog()->remove(XMLAttributeTypeMismatch);
+ getErrorLog()->logPackageError("layout",
+ LayoutDimsAttributesMustBeDouble,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ else
+ {
+ std::string message = "Layout attribute 'height' is missing.";
+ getErrorLog()->logPackageError("layout", LayoutDimsAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, message);
+ }
+ }
+ }
+
+ //
+ // depth double ( use = "optional" )
+ //
+ numErrs = getErrorLog() != NULL ? getErrorLog()->getNumErrors() : 0;
+ assigned = attributes.readInto("depth", mD);
+
+ if (assigned == false)
+ {
+ mD = 0.0;
+ if (getErrorLog() != NULL)
+ {
+ if (getErrorLog()->getNumErrors() == numErrs + 1 &&
+ getErrorLog()->contains(XMLAttributeTypeMismatch))
+ {
+ getErrorLog()->remove(XMLAttributeTypeMismatch);
+ getErrorLog()->logPackageError("layout",
+ LayoutDimsAttributesMustBeDouble,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ }
+ }
+
}
/** @endcond */
Modified: trunk/libsbml/src/sbml/packages/layout/sbml/Point.cpp
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/sbml/Point.cpp 2013-07-30 09:48:19 UTC (rev 18274)
+++ trunk/libsbml/src/sbml/packages/layout/sbml/Point.cpp 2013-07-30 10:28:45 UTC (rev 18275)
@@ -64,6 +64,7 @@
#include <sbml/xml/XMLOutputStream.h>
#include <sbml/packages/layout/extension/LayoutExtension.h>
+#include <sbml/packages/layout/validator/LayoutSBMLError.h>
LIBSBML_CPP_NAMESPACE_BEGIN
@@ -508,24 +509,136 @@
void Point::readAttributes (const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes)
{
- SBase::readAttributes(attributes,expectedAttributes);
+ const unsigned int sbmlLevel = getLevel ();
+ const unsigned int sbmlVersion = getVersion();
- const unsigned int sbmlLevel = getLevel ();
- const unsigned int sbmlVersion = getVersion();
+ unsigned int numErrs;
- bool assigned = attributes.readInto("id", mId, getErrorLog(), false, getLine(), getColumn());
- if (assigned && mId.empty())
- {
- logEmptyString(mId, sbmlLevel, sbmlVersion, "<point>");
- }
- if (!SyntaxChecker::isValidInternalSId(mId)) logError(InvalidIdSyntax);
+ SBase::readAttributes(attributes, expectedAttributes);
- attributes.readInto("x", mXOffset,getErrorLog(),true, getLine(), getColumn());
- attributes.readInto("y", mYOffset,getErrorLog(),true, getLine(), getColumn());
- if(!attributes.readInto("z", mZOffset, getErrorLog(), false, getLine(), getColumn()))
- {
- this->mZOffset=0.0;
- }
+ // 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", LayoutPointAllowedAttributes,
+ 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",
+ LayoutPointAllowedCoreAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, details);
+ }
+ }
+ }
+
+ bool assigned = false;
+
+ //
+ // id SId ( use = "optional" )
+ //
+ assigned = attributes.readInto("id", mId);
+
+ if (assigned == true && getErrorLog() != NULL)
+ {
+ // check string is not empty and correct syntax
+
+ if (mId.empty() == true)
+ {
+ logEmptyString(mId, getLevel(), getVersion(), "<Point>");
+ }
+ else if (SyntaxChecker::isValidSBMLSId(mId) == false)
+ {
+ getErrorLog()->logPackageError("layout", LayoutSIdSyntax,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ }
+
+ //
+ // x double ( use = "required" )
+ //
+ numErrs = getErrorLog() != NULL ? getErrorLog()->getNumErrors() : 0;
+ assigned = attributes.readInto("x", mXOffset);
+
+ if (assigned == false)
+ {
+ if (getErrorLog() != NULL)
+ {
+ if (getErrorLog()->getNumErrors() == numErrs + 1 &&
+ getErrorLog()->contains(XMLAttributeTypeMismatch))
+ {
+ getErrorLog()->remove(XMLAttributeTypeMismatch);
+ getErrorLog()->logPackageError("layout",
+ LayoutPointAttributesMustBeDouble,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ else
+ {
+ std::string message = "Layout attribute 'x' is missing.";
+ getErrorLog()->logPackageError("layout", LayoutPointAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, message);
+ }
+ }
+ }
+
+ //
+ // y double ( use = "required" )
+ //
+ numErrs = getErrorLog() != NULL ? getErrorLog()->getNumErrors() : 0;
+ assigned = attributes.readInto("y", mYOffset);
+
+ if (assigned == false)
+ {
+ if (getErrorLog() != NULL)
+ {
+ if (getErrorLog()->getNumErrors() == numErrs + 1 &&
+ getErrorLog()->contains(XMLAttributeTypeMismatch))
+ {
+ getErrorLog()->remove(XMLAttributeTypeMismatch);
+ getErrorLog()->logPackageError("layout",
+ LayoutPointAttributesMustBeDouble,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ else
+ {
+ std::string message = "Layout attribute 'y' is missing.";
+ getErrorLog()->logPackageError("layout", LayoutPointAllowedAttributes,
+ getPackageVersion(), sbmlLevel, sbmlVersion, message);
+ }
+ }
+ }
+
+ //
+ // z double ( use = "optional" )
+ //
+ numErrs = getErrorLog() != NULL ? getErrorLog()->getNumErrors() : 0;
+ assigned = attributes.readInto("z", mZOffset);
+
+ if (assigned == false)
+ {
+ mZOffset = 0.0;
+ if (getErrorLog() != NULL)
+ {
+ if (getErrorLog()->getNumErrors() == numErrs + 1 &&
+ getErrorLog()->contains(XMLAttributeTypeMismatch))
+ {
+ getErrorLog()->remove(XMLAttributeTypeMismatch);
+ getErrorLog()->logPackageError("layout",
+ LayoutPointAttributesMustBeDouble,
+ getPackageVersion(), sbmlLevel, sbmlVersion);
+ }
+ }
+ }
}
/** @endcond */
Modified: trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLError.h
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLError.h 2013-07-30 09:48:19 UTC (rev 18274)
+++ trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLError.h 2013-07-30 10:28:45 UTC (rev 18275)
@@ -130,7 +130,6 @@
, LayoutTGGraphicalObjectSyntax = 6020910
, LayoutTGGraphicalObjectMustRefObject = 6020911
, LayoutTGTextMustBeString = 6020912
-
, LayoutSRGAllowedCoreElements = 6021001
, LayoutSRGAllowedCoreAttributes = 6021002
, LayoutSRGAllowedElements = 6021003
@@ -144,7 +143,6 @@
, LayoutSRGSpeciesGlyphMustRefObject = 6021011
, LayoutSRGRoleSyntax = 6021012
, LayoutSRGRoleMustBeSRGRoleValue = 6021013
-
, LayoutREFGAllowedCoreElements = 6021101
, LayoutREFGAllowedCoreAttributes = 6021102
, LayoutREFGAllowedElements = 6021103
@@ -158,7 +156,43 @@
, LayoutREFGGlyphMustRefObject = 6021111
, LayoutREFGRoleSyntax = 6021112
+ , LayoutPointAllowedCoreElements = 6021201
+ , LayoutPointAllowedCoreAttributes = 6021202
+ , LayoutPointAllowedAttributes = 6021203
+ , LayoutPointAttributesMustBeDouble = 6021204
+ , LayoutBBoxAllowedCoreElements = 6021301
+ , LayoutBBoxAllowedCoreAttributes = 6021302
+ , LayoutBBoxAllowedElements = 6021303
+ , LayoutBBoxAllowedAttributes = 6021304
+ , LayoutBBoxConsistent3DDefinition = 6021305
+
+ , LayoutCurveAllowedCoreElements = 6021401
+ , LayoutCurveAllowedCoreAttributes = 6021402
+ , LayoutCurveAllowedElements = 6021403
+ , LayoutLOCurveSegsAllowedAttributes = 6021404
+ , LayoutLOCurveSegsAllowedElements = 6021405
+ , LayoutLOCurveSegsNotEmpty = 6021406
+
+ , LayoutLSegAllowedCoreElements = 6021501
+ , LayoutLSegAllowedCoreAttributes = 6021502
+ , LayoutLSegAllowedElements = 6021503
+ , LayoutLSegAllowedAttributes = 6021504
+ , LayoutLSegTypeSyntax = 6021505
+ , LayoutLSegTypeMustBeLineSegment = 6021506
+
+ , LayoutCBezAllowedCoreElements = 6021601
+ , LayoutCBezAllowedCoreAttributes = 6021602
+ , LayoutCBezAllowedElements = 6021603
+ , LayoutCBezAllowedAttributes = 6021604
+ , LayoutCBezTypeSyntax = 6021605
+ , LayoutCBezTypeMustBeCubicBezier = 6021606
+
+ , LayoutDimsAllowedCoreElements = 6021701
+ , LayoutDimsAllowedCoreAttributes = 6021702
+ , LayoutDimsAllowedAttributes = 6021703
+ , LayoutDimsAttributesMustBeDouble = 6021704
+
} LayoutSBMLErrorCode_t;
END_C_DECLS
Modified: trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLErrorTable.h
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLErrorTable.h 2013-07-30 09:48:19 UTC (rev 18274)
+++ trunk/libsbml/src/sbml/packages/layout/validator/LayoutSBMLErrorTable.h 2013-07-30 10:28:45 UTC (rev 18275)
@@ -1442,12 +1442,377 @@
}
},
+ // 6021201
+ { LayoutPointAllowedCoreElements,
+ "Core elements allowed on <point>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <point> object may have the optional SBML Level 3 Core "
+ "subobjects for notes and annotations. No other elements from the SBML "
+ "Level 3 Core namespace are permitted on a <point>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021202
+ { LayoutPointAllowedCoreAttributes,
+ "Core attributes allowed on <point>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <point> object may have the optional SBML Level 3 Core "
+ "attributes 'metaid' and 'sboTerm'. No other attributes from the SBML "
+ "Level 3 Core namespace are permitted on a <point>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021203
+ { LayoutPointAllowedAttributes,
+ "Layout attributes allowed on <point>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <point> object must have the required attributes 'layout:x' and "
+ "'layout:y' and may have the optional attributes 'layout:id', "
+ "and 'layout:z'. "
+ "No other attributes from the Layout namespace "
+ "are permitted on a <point>. ",
+ { "L3V1 Layout V1 Section 3.4.1"
+ }
+ },
+ // 6021204
+ { LayoutPointAttributesMustBeDouble,
+ "Layout 'x', 'y' and 'z' must be double.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "The attributes 'layout:x', 'layout:y' and 'layout:z' of a <point> "
+ "element must be of the data type 'double'.",
+ { "L3V1 Layout V1 Section 3.4.1"
+ }
+ },
+ // 6021301
+ { LayoutBBoxAllowedCoreElements,
+ "Core elements allowed on <boundingBox>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <boundingBox> object may have the optional SBML Level 3 Core "
+ "subobjects for notes and annotations. No other elements from the SBML "
+ "Level 3 Core namespace are permitted on a <boundingBox>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021302
+ { LayoutBBoxAllowedCoreAttributes,
+ "Core attributes allowed on <boundingBox>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <boundingBox> object may have the optional SBML Level 3 Core "
+ "attributes 'metaid' and 'sboTerm'. No other attributes from the SBML "
+ "Level 3 Core namespace are permitted on a <boundingBox>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021303
+ { LayoutBBoxAllowedElements,
+ "Layout elements allowed on <boundingBox>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "There must be exactly one instance of a <point> and a <dimensions> "
+ "object on a <boundingBox>. "
+ "No other elements from "
+ "the Layout namespace are permitted on a <boundingBox>. ",
+ { "L3V1 Layout V1 Section 3.4.3"
+ }
+ },
+
+ // 6021304
+ { LayoutBBoxAllowedAttributes,
+ "Layout attributes allowed on <boundingBox>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <boundingBox> object may have the optional attributes 'layout:id'. "
+ "No other attributes from the Layout namespace "
+ "are permitted on a <boundingBox>. ",
+ { "L3V1 Layout V1 Section 3.4.3"
+ }
+ },
+ // 6021305
+ { LayoutBBoxConsistent3DDefinition,
+ "Layout consistent dimensions on a <boundingBox>",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "If the 'layout:z' attribute on a <point> element of a <boundingBox> "
+ "is not specified, the attribute 'layout:depth' must not be specified.",
+ { "L3V1 Layout V1 Section 3.7"
+ }
+ },
+ // 6021401
+ { LayoutCurveAllowedCoreElements,
+ "Core elements allowed on <curve>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <curve> object may have the optional SBML Level 3 Core "
+ "subobjects for notes and annotations. No other elements from the SBML "
+ "Level 3 Core namespace are permitted on a <curve>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021402
+ { LayoutCurveAllowedCoreAttributes,
+ "Core attributes allowed on <curve>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <curve> object may have the optional SBML Level 3 Core "
+ "attributes 'metaid' and 'sboTerm'. No other attributes from the SBML "
+ "Level 3 Core namespace are permitted on a <curve>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021403
+ { LayoutCurveAllowedElements,
+ "Layout elements allowed on <curve>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "There must be exactly one instance of a <listOfCurveSegments> "
+ "object on a <curve>. "
+ "No other elements from "
+ "the Layout namespace are permitted on a <curve>. ",
+ { "L3V1 Layout V1 Section 3.4.4"
+ }
+ },
+
+ // 6021404
+ { LayoutLOCurveSegsAllowedAttributes,
+ "Allowed attributes on ListOfCurveSegments",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <listOfCurveSegments> object may have the optional "
+ "attributes 'metaid' "
+ "and 'sboTerm' defined by SBML Level~3 Core. No other attributes from "
+ "the SBML Level 3 Core namespace or the Layout "
+ "namespace are permitted on a <listOfCurveSegments> object. ",
+ { "L3V1 Layout V1 Section 3.4.4"
+ }
+ },
+ // 6021405
+ { LayoutLOCurveSegsAllowedElements,
+ "Allowed elements on ListOfCurveSegments",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "Apart from the general notes and annotation subobjects permitted on "
+ "all SBML objects, a <listOfCurveSegments> container object "
+ "may only contain <referenceGlyph> objects.",
+ { "L3V1 Layout V1 Section 3.4.4"
+ }
+ },
+ // 6021406
+ { LayoutLOCurveSegsNotEmpty,
+ "No empty ListOfCurveSegments",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <listOfCurveSegments> container object may not be empty.",
+ { "L3V1 Layout V1 Section 3.4.4"
+ }
+ },
+
+ // 6021501
+ { LayoutLSegAllowedCoreElements,
+ "Core elements allowed on <lineSegment>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <lineSegment> object may have the optional SBML Level 3 Core "
+ "subobjects for notes and annotations. No other elements from the SBML "
+ "Level 3 Core namespace are permitted on a <lineSegment>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021502
+ { LayoutLSegAllowedCoreAttributes,
+ "Core attributes allowed on <lineSegment>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <lineSegment> object may have the optional SBML Level 3 Core "
+ "attributes 'metaid' and 'sboTerm'. No other attributes from the SBML "
+ "Level 3 Core namespace are permitted on a <lineSegment>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021503
+ { LayoutLSegAllowedElements,
+ "Layout elements allowed on <lineSegment>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <lineSegment> must specify two <point> elements 'start' "
+ "and 'end'. "
+ "No other elements from "
+ "the Layout namespace are permitted on a <lineSegment>. ",
+ { "L3V1 Layout V1 Section 3.4.5"
+ }
+ },
+
+ // 6021504
+ { LayoutLSegAllowedAttributes,
+ "Layout attributes allowed on <lineSegment>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <lineSegment> object must have the required attribute 'xsi:type'. "
+ "No other attributes from the Layout namespace "
+ "are permitted on a <lineSegment>. ",
+ { "L3V1 Layout V1 Section 3.4.5"
+ }
+ },
+
+ // 6021505
+ { LayoutLSegTypeSyntax,
+ "Layout LineSegment xsi:type must be string",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "The attribute 'xsi:type' on a <lineSegment> must be of data type "
+ "'string'.",
+ { "L3V1 Layout V1 Section 3.4.5"
+ }
+ },
+
+ // 6021506
+ { LayoutLSegTypeMustBeLineSegment,
+ "Layout LineSegment xsi:type must be 'LineSegment'",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "The attribute 'xsi:type' on a <lineSegment> must be 'LineSegment'.",
+ { "L3V1 Layout V1 Section 3.4.5"
+ }
+ },
+
+ // 6021601
+ { LayoutCBezAllowedCoreElements,
+ "Core elements allowed on <cubicBezier>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <cubicBezier> object may have the optional SBML Level 3 Core "
+ "subobjects for notes and annotations. No other elements from the SBML "
+ "Level 3 Core namespace are permitted on a <cubicBezier>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021602
+ { LayoutCBezAllowedCoreAttributes,
+ "Core attributes allowed on <cubicBezier>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <cubicBezier> object may have the optional SBML Level 3 Core "
+ "attributes 'metaid' and 'sboTerm'. No other attributes from the SBML "
+ "Level 3 Core namespace are permitted on a <cubicBezier>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021603
+ { LayoutCBezAllowedElements,
+ "Layout elements allowed on <cubicBezier>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <cubicBezier> must specify four <point> elements 'start' "
+ "'basePoint1', 'basePoint2' and 'end'. "
+ "No other elements from "
+ "the Layout namespace are permitted on a <cubicBezier>. ",
+ { "L3V1 Layout V1 Section 3.4.6"
+ }
+ },
+
+ // 6021604
+ { LayoutCBezAllowedAttributes,
+ "Layout attributes allowed on <cubicBezier>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <cubicBezier> object must have the required attribute 'xsi:type'. "
+ "No other attributes from the Layout namespace "
+ "are permitted on a <cubicBezier>. ",
+ { "L3V1 Layout V1 Section 3.4.6"
+ }
+ },
+
+ // 6021605
+ { LayoutCBezTypeSyntax,
+ "Layout CubicBezier xsi:type must be string",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "The attribute 'xsi:type' on a <cubicBezier> must be of data type "
+ "'string'.",
+ { "L3V1 Layout V1 Section 3.4.6"
+ }
+ },
+
+ // 6021606
+ { LayoutCBezTypeMustBeCubicBezier,
+ "Layout CubicBezier xsi:type must be 'CubicBezier'",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "The attribute 'xsi:type' on a <cubicBezier> must be 'CubicBezier'.",
+ { "L3V1 Layout V1 Section 3.4.6"
+ }
+ },
+
+ // 6021701
+ { LayoutDimsAllowedCoreElements,
+ "Core elements allowed on <dimensions>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <dimensions> object may have the optional SBML Level 3 Core "
+ "subobjects for notes and annotations. No other elements from the SBML "
+ "Level 3 Core namespace are permitted on a <dimensions>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021702
+ { LayoutDimsAllowedCoreAttributes,
+ "Core attributes allowed on <dimensions>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <dimensions> object may have the optional SBML Level 3 Core "
+ "attributes 'metaid' and 'sboTerm'. No other attributes from the SBML "
+ "Level 3 Core namespace are permitted on a <dimensions>. ",
+ { "L3V1 Core Section 3.2"
+ }
+ },
+
+ // 6021703
+ { LayoutDimsAllowedAttributes,
+ "Layout attributes allowed on <dimensions>.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "A <dimensions> object must have the required attributes 'layout:width' "
+ "and 'layout:height' and may have the optional attributes 'layout:id', "
+ "and 'layout:depth'. "
+ "No other attributes from the Layout namespace "
+ "are permitted on a <dimensions>. ",
+ { "L3V1 Layout V1 Section 3.4.2"
+ }
+ },
+
+ // 6021704
+ { LayoutDimsAttributesMustBeDouble,
+ "Layout 'width', 'height' and 'depth' must be double.",
+ LIBSBML_CAT_GENERAL_CONSISTENCY,
+ LIBSBML_SEV_ERROR,
+ "The attributes 'layout:width', 'layout:height' and 'layout:depth' "
+ "of a <dimensions> "
+ "element must be of the data type 'double'.",
+ { "L3V1 Layout V1 Section 3.4.2"
+ }
+ }
};
Added: trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021202-fail-01-01.xml
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021202-fail-01-01.xml (rev 0)
+++ trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021202-fail-01-01.xml 2013-07-30 10:28:45 UTC (rev 18275)
@@ -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" metaid="_yy" sboTerm="SBO:0000001" compartment="C"/>
+ <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: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/6021202-pass-00-01.xml
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021202-pass-00-01.xml (rev 0)
+++ trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021202-pass-00-01.xml 2013-07-30 10:28:45 UTC (rev 18275)
@@ -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" metaid="_yy" sboTerm="SBO:0000001"/>
+ <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: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/6021203-fail-01-01.xml
===================================================================
--- trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021203-fail-01-01.xml (rev 0)
+++ trunk/libsbml/src/sbml/packages/layout/validator/test/test-data/general-constraints/6021203-fail-01-01.xml 2013-07-30 10:28:45 UTC (rev 18275)
@@ -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...
[truncated message content] |