summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrautenberg <rautenberg@in-silico.ch>2016-08-19 16:24:44 +0200
committerrautenberg <rautenberg@in-silico.ch>2016-08-19 16:24:44 +0200
commitc05766e3e87319dde06bace83c5aac5620d76be7 (patch)
tree2cef8f5226bc25e943b02f43c004e452d789b89d
iniitial commit
-rw-r--r--.gitignore2
-rw-r--r--.yardopts4
-rw-r--r--ChangeLog3
-rw-r--r--Gemfile3
-rw-r--r--LICENSE340
-rw-r--r--README.md32
-rw-r--r--VERSION1
-rw-r--r--lib/qmrf-report.rb140
-rw-r--r--lib/template/qmrf.xml146
-rw-r--r--lib/template/qmrf.xsd2018
-rw-r--r--qmrf-report.gemspec21
-rw-r--r--test/data/qmrf_t4.xml146
-rw-r--r--test/data/qmrf_t7.xml146
-rw-r--r--test/data/qmrf_t8.xml146
-rw-r--r--test/report.rb74
-rw-r--r--test/setup.rb7
16 files changed, 3229 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1931eb9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.*~
+*~
diff --git a/.yardopts b/.yardopts
new file mode 100644
index 0000000..f4a7b90
--- /dev/null
+++ b/.yardopts
@@ -0,0 +1,4 @@
+--readme README.md
+--title 'QMRF reporting class for opentox'
+--charset utf-8
+yardoc lib/*.rb - README.md ChangeLog VERSION LICENSE
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..7b71772
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,3 @@
+v0.0.1
+* initial version
+
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..6109aa6
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+gemspec
+gem "nokogiri" \ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8cdb845
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {description}
+ Copyright (C) {year} {fullname}
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ {signature of Ty Coon}, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..47483bc
--- /dev/null
+++ b/README.md
@@ -0,0 +1,32 @@
+# lazar-report
+QMRF reporting extension to OpenTox ruby modules and lazar
+## About
+Class for QMRF reporting.
+Provides a ruby OpenTox class to prepare an initial version of a QMRF report.
+The XML output is in QMRF version 1.3 and can be finalized with the QMRF editor 2.0 (https://sourceforge.net/projects/qmrf/)
+
+
+
+## Usage
+create a new report, add some content and show output:
+```ruby
+require ""
+
+# create a new report
+report = OpenTox::QMRFReport.new
+
+# add a title
+report.change_qmrf_tag "QSAR_title", "My QSAR Title"
+
+# add a publication to the publication catalog
+report.change_catalog :publications_catalog, :publications_catalog_1, {:title => "MyName M (2016) My Publication Title, QSAR News, 10, 14-22", :url => "http://myqsarnewsmag.dom"}
+
+# link/reference the publication to the report bibliography
+report.ref_catalog :bibliography, :publications_catalog, :publications_catalog_1
+
+# output
+puts report.to_xml
+
+# validate a report (as created above) against qmrf.xsd
+report.validate
+```
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..8a9ecc2
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.0.1 \ No newline at end of file
diff --git a/lib/qmrf-report.rb b/lib/qmrf-report.rb
new file mode 100644
index 0000000..fdce433
--- /dev/null
+++ b/lib/qmrf-report.rb
@@ -0,0 +1,140 @@
+require "nokogiri"
+
+# OpenTox module
+module OpenTox
+
+ #Class for QMRF reporting.
+ #
+ #Provides a ruby OpenTox class to prepare an initial version of a QMRF report.
+ #The XML output is in QMRF version 1.3 and can be finalized with the QMRF editor 2.0 (https://sourceforge.net/projects/qmrf/)
+ #@example Report
+ # require ""
+ # report = OpenTox::QMRFReport.new
+ # report.change_qmrf_tag "QSAR_title", "My QSAR Title"
+ # report.change_catalog :publications_catalog, :publications_catalog_1, {:title => "MyName M (2016) My Publication Title, QSAR News, 10, 14-22", :url => "http://myqsarnewsmag.dom"}
+ # report.ref_catalog :bibliography, :publications_catalog, :publications_catalog_1
+ # puts report.to_xml
+
+ class QMRFReport
+ # QMRF XML Schema file
+ SCHEMA_FILE = File.join(File.dirname(__FILE__),"template/qmrf.xsd")
+ # QMRF XML Template file
+ TEMPLATE_FILE = File.join(File.dirname(__FILE__),"template/qmrf.xml")
+
+ attr_accessor :xml, :report
+
+ # Open an existing QMRF xml report
+ # @param [String] file Name of the file
+ def open file
+ xml = File.read("#{file}")
+ @report = Nokogiri.XML(xml)
+ end
+
+ # Initialize a new report instance from qmrf template
+ def initialize
+ xml = File.read(TEMPLATE_FILE)
+ @report = Nokogiri.XML(xml)
+ end
+
+ # returns XML representation (QMRF XML report) of report instance
+ # @return [String] returns XML
+ def to_xml
+ @report.to_xml
+ end
+
+ # Change a value
+ # e.G.: <QSAR_title chapter="1.1" help="" name="QSAR identifier (title)">Title of My QSAR</QSAR_title>
+ # @param [String] key Name of the node
+ # @param [String] value Value to change
+ # @return [Error] returns Error message if fails
+ def change_qmrf_tag key, value
+ raise "Can not edit attribute #{key} directly. Edit the catalog with 'report.change_catalog(catalog, key, value)'." if ["QSAR_software","QSAR_Algorithm", ""].include? key
+ t = @report.at_css key
+ t.content = value
+ end
+
+ # Change a catalog
+ # @param [String] catalog Name of the catalog - One of "software_catalog", "algorithms_catalog", "descriptors_catalog", "endpoints_catalog", "publications_catalog", "authors_catalog" in QMRF v1.3
+ # @param [String] id Single entry node in the catalog e.G.: "<software contact='mycontact@mydomain.dom' description="My QSAR Software " id="software_catalog_2" name="MySoftware" number="" url="https://mydomain.dom"/>
+ # @param [Hash] valuehash Key-Value Hash with attributes for a single catalog node
+ # @return [Error] returns Error message if fails
+ def change_catalog catalog, id, valuehash
+ catalog_exists? catalog
+ if @report.at_css("#{catalog}").at("//*[@id='#{id}']")
+ valuehash.each do |key, value|
+ @report.at_css("#{catalog}").at("//*[@id='#{id}']")["#{key}"]= value
+ end
+ else
+ cat = @report.at_css("#{catalog}")
+ newentry = Nokogiri::XML::Node.new("#{catalog.to_s.gsub(/s?_catalog/,'')}", self.report)
+ newentry["id"] = id
+ valuehash.each do |key, value|
+ newentry["#{key}"] = value
+ end
+ cat << newentry
+ end
+ end
+
+ # Set reference to a catalog entry.
+ # e.g.: reference an author entry from authors_catalog to Chapter 2.2 QMRF authors
+ #@example ref_catalog
+ # report.ref_catalog 'qmrf_authors', 'authors_catalog', 'firstauthor'
+ # @param [String] chapter Name of the chapter to add the catalog reference. e.g.: qmrf_authors, model_authors, QSAR_software, ...
+ # @param [String] catalog Name of the catalog
+ # @param [String] id entry node in the catalog
+ def ref_catalog chapter, catalog, id
+ catalog_exists? catalog
+ if @report.at_css("#{catalog}").at("//*[@id='#{id}']")
+ chap = @report.at_css("#{chapter}")
+ if chap.at("//*[@idref='#{id}']").nil?
+ newentry = Nokogiri::XML::Node.new("#{catalog.to_s.gsub(/s?_catalog/,'_ref')}", self.report)
+ newentry["idref"] = id
+ chap << newentry
+ end
+ else
+ raise "catalog entry with id: #{id} do not exist."
+ end
+ end
+
+ # get value of a QMRF node
+ # @param [String] key Nodename e.g.: "QSAR_title"
+ # @return [String] returns value
+ def get_qmrf_tag key
+ t = @report.at_css key
+ t.content
+ end
+
+ # get an attribute from a catalog entry
+ # @param [String] catalog Name of the catalog
+ # @param [String] id entry id in the catalog
+ # @param [String] key returns value of a key in a catalog node
+ # @return [String, false] returns value of a key in a catalog node or false if catalog entry do not exists.
+ def get_catalog_value catalog, id, key
+ catalog_exists? catalog
+ if @report.at_css("#{catalog}").at("//*[@id='#{id}']")
+ @report.at_css("#{catalog}").at("//*[@id='#{id}']")["#{key}"]
+ else
+ return false
+ end
+ end
+
+ # Check if a catalog exists in this QMRF version
+ # @param [String] catalog Catalog
+ # @return [Error, true] returns true or Error if a catalog do not exists
+ def catalog_exists? catalog
+ raise "Unknown catalog: #{catalog}" unless ["software_catalog", "algorithms_catalog", "descriptors_catalog", "endpoints_catalog", "publications_catalog", "authors_catalog"].include? catalog.to_s
+ true
+ end
+
+ # Validates a report instance against qmrf.xsd (XML Structure Definition)
+ def validate
+ xsd = Nokogiri::XML::Schema(File.read(SCHEMA_FILE))
+ out = ""
+ xsd.validate(@report).each do |error|
+ out << error.message unless error.message == "Element 'algorithm', attribute 'publication_ref': '' is not a valid value of the atomic type 'xs:IDREF'." || error.message == "Element 'descriptor', attribute 'publication_ref': '' is not a valid value of the atomic type 'xs:IDREF'."
+ end
+ return out
+ end
+
+ end
+end \ No newline at end of file
diff --git a/lib/template/qmrf.xml b/lib/template/qmrf.xml
new file mode 100644
index 0000000..56dee5e
--- /dev/null
+++ b/lib/template/qmrf.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE QMRF PUBLIC "http://qmrf.sourceforge.net/qmrf.dtd" "qmrf.dtd">
+<QMRF author="Joint Research Centre, European Commission" contact="Joint Research Centre, European Commission" date="July 2007" email="JRC-IHCP-COMPUTOX@ec.europa.eu" name="(Q)SAR Model Reporting Format" schema_version="1.0" url="http://ihcp.jrc.ec.europa.eu/" version="1.3">
+<QMRF_chapters>
+<QSAR_identifier chapter="1" help="" name="QSAR identifier">
+<QSAR_title chapter="1.1" help="" name="QSAR identifier (title)"/>
+<QSAR_models chapter="1.2" help="" name="Other related models"/>
+<QSAR_software chapter="1.3" help="" name="Software coding the model">
+
+ <software_ref idref="firstsoftware"/>
+</QSAR_software>
+</QSAR_identifier>
+<QSAR_General_information chapter="2" help="" name="General information">
+<qmrf_date chapter="2.1" help="" name="Date of QMRF"/>
+<qmrf_authors chapter="2.2" help="" name="QMRF author(s) and contact details">
+
+ <author_ref idref="firstauthor"/>
+</qmrf_authors>
+<qmrf_date_revision chapter="2.3" help="" name="Date of QMRF update(s)"/>
+<qmrf_revision chapter="2.4" help="" name="QMRF update(s)"/>
+<model_authors chapter="2.5" help="" name="Model developer(s) and contact details">
+
+ <author_ref idref="modelauthor"/>
+</model_authors>
+<model_date chapter="2.6" help="" name="Date of model development and/or publication"/>
+<references chapter="2.7" help="" name="Reference(s) to main scientific papers and/or software package">
+
+ </references>
+<info_availability chapter="2.8" help="" name="Availability of information about the model"/>
+<related_models chapter="2.9" help="" name="Availability of another QMRF for exactly the same model"/>
+</QSAR_General_information>
+<QSAR_Endpoint chapter="3" help="" name="Defining the endpoint - OECD Principle 1">
+<model_species chapter="3.1" help="" name="Species"/>
+<model_endpoint chapter="3.2" help="" name="Endpoint">
+
+ </model_endpoint>
+<endpoint_comments chapter="3.3" help="" name="Comment on endpoint"/>
+<endpoint_units chapter="3.4" help="" name="Endpoint units"/>
+<endpoint_variable chapter="3.5" help="" name="Dependent variable"/>
+<endpoint_protocol chapter="3.6" help="" name="Experimental protocol"/>
+<endpoint_data_quality chapter="3.7" help="" name="Endpoint data quality and variability"/>
+</QSAR_Endpoint>
+<QSAR_Algorithm chapter="4" help="" name="Defining the algorithm - OECD Principle 2">
+<algorithm_type chapter="4.1" help="" name="Type of model"/>
+<algorithm_explicit chapter="4.2" help="" name="Explicit algorithm">
+<algorithm_ref idref="algorithms_catalog_1"/>
+<equation/>
+</algorithm_explicit>
+<algorithms_descriptors chapter="4.3" help="" name="Descriptors in the model">
+
+ <descriptor_ref idref="descriptors_catalog_1"/>
+</algorithms_descriptors>
+<descriptors_selection chapter="4.4" help="" name="Descriptor selection"/>
+<descriptors_generation chapter="4.5" help="" name="Algorithm and descriptor generation"/>
+<descriptors_generation_software chapter="4.6" help="" name="Software name and version for descriptor generation" options="">
+
+ <software_ref idref="software_catalog_2"/>
+</descriptors_generation_software>
+<descriptors_chemicals_ratio chapter="4.7" help="" name="Chemicals/Descriptors ratio"/>
+</QSAR_Algorithm>
+<QSAR_Applicability_domain chapter="5" help="" name="Defining the applicability domain - OECD Principle 3">
+<app_domain_description chapter="5.1" help="" name="Description of the applicability domain of the model"/>
+<app_domain_method chapter="5.2" help="" name="Method used to assess the applicability domain"/>
+<app_domain_software chapter="5.3" help="" name="Software name and version for applicability domain assessment">
+
+ <software_ref idref="software_catalog_3"/>
+</app_domain_software>
+<applicability_limits chapter="5.4" help="" name="Limits of applicability"/>
+</QSAR_Applicability_domain>
+<QSAR_Robustness chapter="6" help="" name="Internal validation - OECD Principle 4">
+<training_set_availability answer="Yes" chapter="6.1" help="" name="Availability of the training set"/>
+<training_set_data cas="Yes" chapter="6.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the training set" smiles="Yes"/>
+<training_set_descriptors answer="All" chapter="6.3" help="" name="Data for each descriptor variable for the training set"/>
+<dependent_var_availability answer="All" chapter="6.4" help="" name="Data for the dependent variable for the training set"/>
+<other_info chapter="6.5" help="" name="Other information about the training set"/>
+<preprocessing chapter="6.6" help="" name="Pre-processing of data before modelling"/>
+<goodness_of_fit chapter="6.7" help="" name="Statistics for goodness-of-fit"/>
+<loo chapter="6.8" help="" name="Robustness - Statistics obtained by leave-one-out cross-validation"/>
+<lmo chapter="6.9" help="" name="Robustness - Statistics obtained by leave-many-out cross-validation"/>
+<yscrambling chapter="6.10" help="" name="Robustness - Statistics obtained by Y-scrambling"/>
+<bootstrap chapter="6.11" help="" name="Robustness - Statistics obtained by bootstrap"/>
+<other_statistics chapter="6.12" help="" name="Robustness - Statistics obtained by other methods"/>
+</QSAR_Robustness>
+<QSAR_Predictivity chapter="7" help="" name="External validation - OECD Principle 4">
+<validation_set_availability answer="Yes" chapter="7.1" help="" name="Availability of the external validation set"/>
+<validation_set_data cas="Yes" chapter="7.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the external validation set" smiles="Yes"/>
+<validation_set_descriptors answer="All" chapter="7.3" help="" name="Data for each descriptor variable for the external validation set"/>
+<validation_dependent_var_availability answer="All" chapter="7.4" help="" name="Data for the dependent variable for the external validation set"/>
+<validation_other_info chapter="7.5" help="" name="Other information about the external validation set"/>
+<experimental_design chapter="7.6" help="" name="Experimental design of test set"/>
+<validation_predictivity chapter="7.7" help="" name="Predictivity - Statistics obtained by external validation"/>
+<validation_assessment chapter="7.8" help="" name="Predictivity - Assessment of the external validation set"/>
+<validation_comments chapter="7.9" help="" name="Comments on the external validation of the model"/>
+</QSAR_Predictivity>
+<QSAR_Interpretation chapter="8" help="" name="Providing a mechanistic interpretation - OECD Principle 5">
+<mechanistic_basis chapter="8.1" help="" name="Mechanistic basis of the model"/>
+<mechanistic_basis_comments chapter="8.2" help="" name="A priori or a posteriori mechanistic interpretation"/>
+<mechanistic_basis_info chapter="8.3" help="" name="Other information about the mechanistic interpretation"/>
+</QSAR_Interpretation>
+<QSAR_Miscelaneous chapter="9" help="" name="Miscellaneous information">
+<comments chapter="9.1" help="" name="Comments"/>
+<bibliography chapter="9.2" help="" name="Bibliography">
+
+ <publication_ref idref="publications_catalog_1"/>
+</bibliography>
+<attachments chapter="9.3" help="" name="Supporting information">
+
+
+
+
+
+
+ <attachment_training_data/>
+<attachment_validation_data/>
+<attachment_documents/>
+</attachments>
+</QSAR_Miscelaneous>
+<QMRF_Summary chapter="10" help="" name="Summary (JRC QSAR Model Database)">
+<QMRF_number chapter="10.1" help="" name="QMRF number">To be entered by JRC</QMRF_number>
+<date_publication chapter="10.2" help="" name="Publication date">To be entered by JRC</date_publication>
+<keywords chapter="10.3" help="" name="Keywords">To be entered by JRC</keywords>
+<summary_comments chapter="10.4" help="" name="Comments">To be entered by JRC</summary_comments>
+</QMRF_Summary>
+</QMRF_chapters>
+<Catalogs>
+<software_catalog>
+<software contact="" description="" id="firstsoftware" name="" number="" url=""/>
+<software contact="" description="" id="software_catalog_2" name="" number="" url=""/>
+<software contact="" description="" id="software_catalog_3" name="" number="" url=""/>
+</software_catalog>
+<algorithms_catalog>
+<algorithm definition="" description="" id="algorithms_catalog_1" publication_ref=""/>
+</algorithms_catalog>
+<descriptors_catalog>
+<descriptor description="" id="descriptors_catalog_1" name="" publication_ref="" units=""/>
+</descriptors_catalog>
+<endpoints_catalog/>
+<publications_catalog>
+<publication id="publications_catalog_1" title="" url=""/>
+</publications_catalog>
+<authors_catalog>
+<author affiliation="" contact="" email="" id="firstauthor" name="" number="" url=""/>
+<author affiliation="" contact="" email="" id="modelauthor" name="" number="" url=""/>
+</authors_catalog>
+</Catalogs>
+</QMRF>
diff --git a/lib/template/qmrf.xsd b/lib/template/qmrf.xsd
new file mode 100644
index 0000000..4dd8fa1
--- /dev/null
+++ b/lib/template/qmrf.xsd
@@ -0,0 +1,2018 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- QMRF DTD -->
+<!-- DOCTYPE QMRF SYSTEM "qmrf.dtd" -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="QMRF">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="QMRF_chapters"/>
+ <xs:element ref="Catalogs"/>
+ </xs:sequence>
+ <xs:attribute name="schema_version" default="1.0">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="1.0"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="version" default="1.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="1.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="(Q)SAR Model Reporting Format">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="(Q)SAR Model Reporting Format"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="author" default="Joint Research Centre, European Commission">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Joint Research Centre, European Commission"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="date" default="July 2007">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="July 2007"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="contact" default="Joint Research Centre, European Commission">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Joint Research Centre, European Commission"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="email" default="JRC-IHCP-COMPUTOX@ec.europa.eu">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="JRC-IHCP-COMPUTOX@ec.europa.eu"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="url" default="http://ihcp.jrc.ec.europa.eu/">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="http://ihcp.jrc.ec.europa.eu/"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="QMRF_chapters">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="QSAR_identifier"/>
+ <xs:element ref="QSAR_General_information"/>
+ <xs:element ref="QSAR_Endpoint"/>
+ <xs:element ref="QSAR_Algorithm"/>
+ <xs:element maxOccurs="unbounded" ref="QSAR_Applicability_domain"/>
+ <xs:element ref="QSAR_Robustness"/>
+ <xs:element maxOccurs="unbounded" ref="QSAR_Predictivity"/>
+ <xs:element ref="QSAR_Interpretation"/>
+ <xs:element ref="QSAR_Miscelaneous"/>
+ <xs:element ref="QMRF_Summary"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 1 -->
+ <xs:element name="QSAR_identifier">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="QSAR_title"/>
+ <xs:element ref="QSAR_models"/>
+ <xs:element ref="QSAR_software"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="QSAR identifier">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="QSAR identifier"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="QSAR_title">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="1.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="1.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="QSAR identifier (title)">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="QSAR identifier (title)"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="QSAR_models">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="1.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="1.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Other related models">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Other related models"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="QSAR_software">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="software_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="1.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="1.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Software coding the model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Software coding the model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Reference to Software_catalog -->
+ <!-- Chapter 2 -->
+ <xs:element name="QSAR_General_information">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="qmrf_date"/>
+ <xs:element ref="qmrf_authors"/>
+ <xs:element ref="qmrf_date_revision"/>
+ <xs:element ref="qmrf_revision"/>
+ <xs:element ref="model_authors"/>
+ <xs:element ref="model_date"/>
+ <xs:element ref="references"/>
+ <xs:element ref="info_availability"/>
+ <xs:element ref="related_models"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="General information">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="General information"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 2.1 Date of QMRF -->
+ <xs:element name="qmrf_date">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="2.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Date of QMRF">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Date of QMRF"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 2.2. QMRF authors -->
+ <xs:element name="qmrf_authors">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="author_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="2.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="QMRF author(s) and contact details">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="QMRF author(s) and contact details"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 2.3 Date of QMRF update -->
+ <xs:element name="qmrf_date_revision">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="2.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Date of QMRF update(s)">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Date of QMRF update(s)"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 2.4 QMRF update(s) -->
+ <xs:element name="qmrf_revision">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="2.4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="QMRF update(s)">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="QMRF update(s)"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Model developers -->
+ <xs:element name="model_authors">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="author_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="2.5">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.5"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Model developer(s) and contact details">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Model developer(s) and contact details"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Date of model development -->
+ <xs:element name="model_date">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="2.6">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.6"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Date of model development and/or publication">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Date of model development and/or publication"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 2.7 Reference(s) to main scientific papers and/or software package -->
+ <xs:element name="references">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="publication_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="2.7">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.7"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Reference(s) to main scientific papers and/or software package">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Reference(s) to main scientific papers and/or software package"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 2.8 Availability of information about the model -->
+ <xs:element name="info_availability">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="2.8">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.8"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Availability of information about the model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Availability of information about the model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 2.9 Availability of another QMRF for exactly the same model -->
+ <xs:element name="related_models">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="2.9">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="2.9"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Availability of another QMRF for exactly the same model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Availability of another QMRF for exactly the same model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 3 -->
+ <xs:element name="QSAR_Endpoint">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="model_species"/>
+ <xs:element ref="model_endpoint"/>
+ <xs:element ref="endpoint_comments"/>
+ <xs:element ref="endpoint_units"/>
+ <xs:element ref="endpoint_variable"/>
+ <xs:element ref="endpoint_protocol"/>
+ <xs:element ref="endpoint_data_quality"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Defining the endpoint - OECD Principle 1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Defining the endpoint - OECD Principle 1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Link to species catalog -->
+ <xs:element name="model_species">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="3.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Species">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Species"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Link to endpoint catalog -->
+ <xs:element name="model_endpoint">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="endpoint_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="3.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Endpoint">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Endpoint"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- endpoints units -->
+ <xs:element name="endpoint_comments">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="3.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Comment on endpoint">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Comment on endpoint"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- endpoints units -->
+ <xs:element name="endpoint_units">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="3.4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3.4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Endpoint units">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Endpoint units"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- dependent variable -->
+ <xs:element name="endpoint_variable">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="3.5">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3.5"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Dependent variable">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Dependent variable"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Experimental protocol -->
+ <xs:element name="endpoint_protocol">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="3.6">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3.6"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Experimental protocol">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Experimental protocol"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Endpoint data quality -->
+ <xs:element name="endpoint_data_quality">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="3.7">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="3.7"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Endpoint data quality and variability">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Endpoint data quality and variability"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 4 -->
+ <xs:element name="QSAR_Algorithm">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="algorithm_type"/>
+ <xs:element ref="algorithm_explicit"/>
+ <xs:element ref="algorithms_descriptors"/>
+ <xs:element ref="descriptors_selection"/>
+ <xs:element ref="descriptors_generation"/>
+ <xs:element ref="descriptors_generation_software"/>
+ <xs:element ref="descriptors_chemicals_ratio"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Defining the algorithm - OECD Principle 2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Defining the algorithm - OECD Principle 2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 4.1 Types of model -->
+ <xs:element name="algorithm_type">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="4.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Type of model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Type of model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 4.2 Explicit algorithm -->
+ <xs:element name="algorithm_explicit">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="algorithm_ref"/>
+ <xs:element ref="equation"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="4.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Explicit algorithm">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Explicit algorithm"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="equation" type="xs:string"/>
+ <!--
+ 4.3 Comments on algorithm - removed in 1.2
+ <!ELEMENT algorithm_comments (#PCDATA)>
+ <!ATTLIST algorithm_comments chapter CDATA #FIXED "4.3" name CDATA #FIXED "Comments on algorithm" help CDATA "" >
+ -->
+ <!-- 4.3 Descriptors in model -->
+ <xs:element name="algorithms_descriptors">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="descriptor_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="4.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Descriptors in the model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Descriptors in the model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 4.4 Descriptor selection -->
+ <xs:element name="descriptors_selection">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="4.4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4.4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Descriptor selection">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Descriptor selection"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 4.5 Descriptor generator -->
+ <xs:element name="descriptors_generation">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="4.5">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4.5"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Algorithm and descriptor generation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Algorithm and descriptor generation"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 4.6 Software name and version for descriptor generation todo - ref to Software catalog -->
+ <xs:element name="descriptors_generation_software">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="software_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="4.6">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4.6"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Software name and version for descriptor generation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Software name and version for descriptor generation"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ <xs:attribute name="options"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 4.7 Descriptors/Chemicals ratio -->
+ <xs:element name="descriptors_chemicals_ratio">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="4.7">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="4.7"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Chemicals/Descriptors ratio">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Chemicals/Descriptors ratio"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 5 -->
+ <xs:element name="QSAR_Applicability_domain">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="app_domain_description"/>
+ <xs:element ref="app_domain_method"/>
+ <xs:element ref="app_domain_software"/>
+ <xs:element ref="applicability_limits"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="5">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="5"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Defining the applicability domain - OECD Principle 3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Defining the applicability domain - OECD Principle 3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 5.1 Description of the applicability domain of the model -->
+ <xs:element name="app_domain_description">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="5.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="5.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Description of the applicability domain of the model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Description of the applicability domain of the model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 5.2 Description of the applicability domain of the model -->
+ <xs:element name="app_domain_method">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="5.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="5.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Method used to assess the applicability domain">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Method used to assess the applicability domain"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 5.3 Software name and version for applicability domain assessment -->
+ <xs:element name="app_domain_software">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="software_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="5.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="5.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Software name and version for applicability domain assessment">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Software name and version for applicability domain assessment"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 5.4 Description of the applicability domain of the model -->
+ <xs:element name="applicability_limits">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="5.4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="5.4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Limits of applicability">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Limits of applicability"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 6 -->
+ <xs:element name="QSAR_Robustness">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="training_set_availability"/>
+ <xs:element ref="training_set_data"/>
+ <xs:element ref="training_set_descriptors"/>
+ <xs:element ref="dependent_var_availability"/>
+ <xs:element ref="other_info"/>
+ <xs:element ref="preprocessing"/>
+ <xs:element ref="goodness_of_fit"/>
+ <xs:element ref="loo"/>
+ <xs:element ref="lmo"/>
+ <xs:element ref="yscrambling"/>
+ <xs:element ref="bootstrap"/>
+ <xs:element ref="other_statistics"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="6">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Internal validation - OECD Principle 4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Internal validation - OECD Principle 4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.1 Availability of the training set -->
+ <xs:element name="training_set_availability">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="answer" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Availability of the training set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Availability of the training set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.2 Available information for the training set -->
+ <xs:element name="training_set_data">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Available information for the training set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Available information for the training set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ <xs:attribute name="chemname" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="cas" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="smiles" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="inchi" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="mol" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="formula" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.3 Data for each descriptor variable for the training set -->
+ <xs:element name="training_set_descriptors">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Data for each descriptor variable for the training set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Data for each descriptor variable for the training set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="answer" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="All"/>
+ <xs:enumeration value="Some"/>
+ <xs:enumeration value="No"/>
+ <xs:enumeration value="Unknown"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.4 Data for the dependent variable for the training set -->
+ <xs:element name="dependent_var_availability">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Data for the dependent variable for the training set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Data for the dependent variable for the training set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="answer" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="All"/>
+ <xs:enumeration value="Some"/>
+ <xs:enumeration value="No"/>
+ <xs:enumeration value="Unknown"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.5 Other information about the training set -->
+ <xs:element name="other_info">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.5">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.5"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Other information about the training set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Other information about the training set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.6 Pre-processing of data before modelling -->
+ <xs:element name="preprocessing">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.6">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.6"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Pre-processing of data before modelling">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Pre-processing of data before modelling"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.7 Statistics for goodness-of-fit -->
+ <xs:element name="goodness_of_fit">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.7">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.7"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Statistics for goodness-of-fit">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Statistics for goodness-of-fit"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.8 Robustness - Statistics obtained by leave-one-out cross-validation -->
+ <xs:element name="loo">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.8">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.8"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Robustness - Statistics obtained by leave-one-out cross-validation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Robustness - Statistics obtained by leave-one-out cross-validation"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.9 Robustness - Statistics obtained by leave-many-out cross-validation -->
+ <xs:element name="lmo">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.9">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.9"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Robustness - Statistics obtained by leave-many-out cross-validation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Robustness - Statistics obtained by leave-many-out cross-validation"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.10 Robustness - Statistics obtained by Y-scrambling -->
+ <xs:element name="yscrambling">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.10">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.10"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Robustness - Statistics obtained by Y-scrambling">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Robustness - Statistics obtained by Y-scrambling"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.11 Robustness - Statistics obtained by bootstrap -->
+ <xs:element name="bootstrap">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.11">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.11"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Robustness - Statistics obtained by bootstrap">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Robustness - Statistics obtained by bootstrap"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 6.12 Robustness - Statistics obtained by other methods -->
+ <xs:element name="other_statistics">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="6.12">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="6.12"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Robustness - Statistics obtained by other methods">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Robustness - Statistics obtained by other methods"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 7 -->
+ <xs:element name="QSAR_Predictivity">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="validation_set_availability"/>
+ <xs:element ref="validation_set_data"/>
+ <xs:element ref="validation_set_descriptors"/>
+ <xs:element ref="validation_dependent_var_availability"/>
+ <xs:element ref="validation_other_info"/>
+ <xs:element ref="experimental_design"/>
+ <xs:element ref="validation_predictivity"/>
+ <xs:element ref="validation_assessment"/>
+ <xs:element ref="validation_comments"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="7">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="External validation - OECD Principle 4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="External validation - OECD Principle 4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.1 Availability of the external validation set -->
+ <xs:element name="validation_set_availability">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="answer" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Availability of the external validation set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Availability of the external validation set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.2 Available information for the external validation set -->
+ <xs:element name="validation_set_data">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Available information for the external validation set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Available information for the external validation set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ <xs:attribute name="chemname" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="cas" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="smiles" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="inchi" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="mol" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="formula" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.3 Data for each descriptor variable for the external validation set -->
+ <xs:element name="validation_set_descriptors">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Data for each descriptor variable for the external validation set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Data for each descriptor variable for the external validation set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="answer" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="All"/>
+ <xs:enumeration value="Some"/>
+ <xs:enumeration value="No"/>
+ <xs:enumeration value="Unknown"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.4 Data for the dependent variable for the external validation set -->
+ <xs:element name="validation_dependent_var_availability">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Data for the dependent variable for the external validation set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Data for the dependent variable for the external validation set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="answer" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="All"/>
+ <xs:enumeration value="Some"/>
+ <xs:enumeration value="No"/>
+ <xs:enumeration value="Unknown"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.5 Other information about the external validation set -->
+ <xs:element name="validation_other_info">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.5">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.5"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Other information about the external validation set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Other information about the external validation set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.6 Experimental design for data splitting -->
+ <xs:element name="experimental_design">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.6">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.6"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Experimental design of test set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Experimental design of test set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.7 Predictivity - Statistics obtained by external validation -->
+ <xs:element name="validation_predictivity">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.7">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.7"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Predictivity - Statistics obtained by external validation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Predictivity - Statistics obtained by external validation"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.8 Predictivity - Assessment of the external validation set -->
+ <xs:element name="validation_assessment">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.8">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.8"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Predictivity - Assessment of the external validation set">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Predictivity - Assessment of the external validation set"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 7.9 Comments on the external validation of the model -->
+ <xs:element name="validation_comments">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="7.9">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="7.9"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Comments on the external validation of the model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Comments on the external validation of the model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 8 -->
+ <xs:element name="QSAR_Interpretation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="mechanistic_basis"/>
+ <xs:element ref="mechanistic_basis_comments"/>
+ <xs:element ref="mechanistic_basis_info"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="8">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="8"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Providing a mechanistic interpretation - OECD Principle 5">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Providing a mechanistic interpretation - OECD Principle 5"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 8.1 Mechanistic basis of the model: -->
+ <xs:element name="mechanistic_basis">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="8.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="8.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Mechanistic basis of the model">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Mechanistic basis of the model"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 8.2 A priori or a posteriori mechanistic interpretation -->
+ <xs:element name="mechanistic_basis_comments">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="8.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="8.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="A priori or a posteriori mechanistic interpretation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="A priori or a posteriori mechanistic interpretation"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 8.3 Other information about the mechanistic interpretation -->
+ <xs:element name="mechanistic_basis_info">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="8.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="8.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Other information about the mechanistic interpretation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Other information about the mechanistic interpretation"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Chapter 9 -->
+ <xs:element name="QSAR_Miscelaneous">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="comments"/>
+ <xs:element ref="bibliography"/>
+ <xs:element ref="attachments"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="9">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="9"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Miscellaneous information">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Miscellaneous information"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 9.1 Comments -->
+ <xs:element name="comments">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="9.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="9.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Comments">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Comments"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 9.2 Bibliography -->
+ <xs:element name="bibliography">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="publication_ref"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="9.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="9.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Bibliography">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Bibliography"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 9.3 Supporting information -->
+ <!-- added embedded attribute, expecting CDATA in Base64 v1.2 -->
+ <xs:element name="attachments">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="attachment_training_data"/>
+ <xs:element ref="attachment_validation_data"/>
+ <xs:element ref="attachment_documents"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="9.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="9.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Supporting information">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Supporting information"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="attachment_training_data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="molecules"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="attachment_validation_data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="molecules"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="attachment_documents">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="document"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="molecules">
+ <xs:complexType>
+ <xs:attribute name="embedded">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="url" use="required"/>
+ <xs:attribute name="filetype"/>
+ <xs:attribute name="description"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- http://www.ch.ic.ac.uk/chemime/Chemical MIME types -->
+ <xs:element name="document">
+ <xs:complexType>
+ <xs:attribute name="embedded">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="url" use="required"/>
+ <xs:attribute name="filetype"/>
+ <xs:attribute name="description"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 10. Summary (ECB Inventory) -->
+ <xs:element name="QMRF_Summary">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="QMRF_number"/>
+ <xs:element ref="date_publication"/>
+ <xs:element ref="keywords"/>
+ <xs:element ref="summary_comments"/>
+ </xs:sequence>
+ <xs:attribute name="chapter" default="10">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="10"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Summary (JRC QSAR Model Database)">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Summary (JRC QSAR Model Database)"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- 10.1 QMRF number -->
+ <xs:element name="QMRF_number">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="10.1">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="10.1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="QMRF number">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="QMRF number"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="date_publication">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="10.2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="10.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Publication date">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Publication date"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="keywords">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="10.3">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="10.3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Keywords">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Keywords"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="summary_comments">
+ <xs:complexType mixed="true">
+ <xs:attribute name="chapter" default="10.4">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="10.4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" default="Comments">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Comments"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="help" default=""/>
+ </xs:complexType>
+ </xs:element>
+ <!-- Misc repositories -->
+ <xs:element name="Catalogs">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="software_catalog"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="algorithms_catalog"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="descriptors_catalog"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="endpoints_catalog"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="publications_catalog"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="authors_catalog"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- Software catalog -->
+ <xs:element name="software_catalog">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="software"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="software">
+ <xs:complexType>
+ <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="name" use="required"/>
+ <xs:attribute name="url"/>
+ <xs:attribute name="number" use="required"/>
+ <xs:attribute name="description"/>
+ <xs:attribute name="version"/>
+ <xs:attribute name="contact"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="software_ref">
+ <xs:complexType>
+ <xs:attribute name="idref" use="required" type="xs:IDREF"/>
+ <xs:attribute name="catalog" default="software_catalog">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="software_catalog"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- Algorithms catalog -->
+ <xs:element name="algorithms_catalog">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="algorithm"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="algorithm">
+ <xs:complexType>
+ <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="definition" use="required"/>
+ <xs:attribute name="description" use="required"/>
+ <xs:attribute name="publication_ref" type="xs:IDREF"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="algorithm_ref">
+ <xs:complexType>
+ <xs:attribute name="idref" use="required" type="xs:IDREF"/>
+ <xs:attribute name="catalog" default="algorithms_catalog">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="algorithms_catalog"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- Descriptors catalog -->
+ <xs:element name="descriptors_catalog">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="descriptor"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="descriptor">
+ <xs:complexType>
+ <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="name" use="required"/>
+ <xs:attribute name="units" use="required"/>
+ <xs:attribute name="description" use="required"/>
+ <xs:attribute name="publication_ref" type="xs:IDREF"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="descriptor_ref">
+ <xs:complexType>
+ <xs:attribute name="idref" use="required" type="xs:IDREF"/>
+ <xs:attribute name="catalog" default="descriptors_catalog">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="descriptors_catalog"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- Endpoints catalog -->
+ <!-- subgroup attribute added version 0.9 -->
+ <xs:element name="endpoints_catalog">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="endpoint"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="endpoint">
+ <xs:complexType>
+ <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="name" use="required"/>
+ <xs:attribute name="subgroup"/>
+ <xs:attribute name="group"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="endpoint_ref">
+ <xs:complexType>
+ <xs:attribute name="idref" use="required" type="xs:IDREF"/>
+ <xs:attribute name="catalog" default="endpoints_catalog">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="endpoints_catalog"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- Authors catalog. Number attribute should be unique, will be used in QMRF number generation -->
+ <xs:element name="authors_catalog">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="author"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="author">
+ <xs:complexType>
+ <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="name" use="required"/>
+ <xs:attribute name="affiliation"/>
+ <xs:attribute name="contact"/>
+ <xs:attribute name="url"/>
+ <xs:attribute name="email"/>
+ <xs:attribute name="number" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="author_ref">
+ <xs:complexType>
+ <xs:attribute name="idref" use="required" type="xs:IDREF"/>
+ <xs:attribute name="catalog" default="authors_catalog">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="authors_catalog"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- Publications catalog -->
+ <xs:element name="publications_catalog">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="publication"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="publication">
+ <xs:complexType>
+ <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="title" use="required"/>
+ <xs:attribute name="url"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="publication_ref">
+ <xs:complexType>
+ <xs:attribute name="idref" use="required" type="xs:IDREF"/>
+ <xs:attribute name="number" default=""/>
+ <xs:attribute name="catalog" default="publications_catalog">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="publications_catalog"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/qmrf-report.gemspec b/qmrf-report.gemspec
new file mode 100644
index 0000000..2472dba
--- /dev/null
+++ b/qmrf-report.gemspec
@@ -0,0 +1,21 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = "qmrf-report"
+ s.version = File.read("./VERSION")
+ s.date = "2016-08-19"
+ s.authors = ["Micha Rautenberg"]
+ s.email = ["rautenberg@in-silico.ch"]
+ s.homepage = "http://github.com/opentox/qmrf-report"
+ s.summary = %q{qmrf-report}
+ s.description = %q{QMRF reporting for OpenTox ruby module and Lazar Toxicology Predictions}
+ s.license = 'GPL-3'
+
+ #s.rubyforge_project = "qmrf-report"
+
+ s.files = `git ls-files`.split("\n")
+ s.required_ruby_version = '>= 2.0.0'
+
+ s.add_runtime_dependency "nokogiri"
+
+end \ No newline at end of file
diff --git a/test/data/qmrf_t4.xml b/test/data/qmrf_t4.xml
new file mode 100644
index 0000000..16a12bf
--- /dev/null
+++ b/test/data/qmrf_t4.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE QMRF PUBLIC "http://qmrf.sourceforge.net/qmrf.dtd" "qmrf.dtd">
+<QMRF author="Joint Research Centre, European Commission" contact="Joint Research Centre, European Commission" date="July 2007" email="JRC-IHCP-COMPUTOX@ec.europa.eu" name="(Q)SAR Model Reporting Format" schema_version="1.0" url="http://ihcp.jrc.ec.europa.eu/" version="1.3">
+<QMRF_chapters>
+<QSAR_identifier chapter="1" help="" name="QSAR identifier">
+<QSAR_title chapter="1.1" help="" name="QSAR identifier (title)">My QSAR Title</QSAR_title>
+<QSAR_models chapter="1.2" help="" name="Other related models">My QSAR Model</QSAR_models>
+<QSAR_software chapter="1.3" help="" name="Software coding the model">
+
+ <software_ref idref="firstsoftware"/>
+</QSAR_software>
+</QSAR_identifier>
+<QSAR_General_information chapter="2" help="" name="General information">
+<qmrf_date chapter="2.1" help="" name="Date of QMRF"/>
+<qmrf_authors chapter="2.2" help="" name="QMRF author(s) and contact details">
+
+ <author_ref idref="firstauthor"/>
+</qmrf_authors>
+<qmrf_date_revision chapter="2.3" help="" name="Date of QMRF update(s)"/>
+<qmrf_revision chapter="2.4" help="" name="QMRF update(s)"/>
+<model_authors chapter="2.5" help="" name="Model developer(s) and contact details">
+
+ <author_ref idref="modelauthor"/>
+</model_authors>
+<model_date chapter="2.6" help="" name="Date of model development and/or publication"/>
+<references chapter="2.7" help="" name="Reference(s) to main scientific papers and/or software package">
+
+ </references>
+<info_availability chapter="2.8" help="" name="Availability of information about the model"/>
+<related_models chapter="2.9" help="" name="Availability of another QMRF for exactly the same model"/>
+</QSAR_General_information>
+<QSAR_Endpoint chapter="3" help="" name="Defining the endpoint - OECD Principle 1">
+<model_species chapter="3.1" help="" name="Species"/>
+<model_endpoint chapter="3.2" help="" name="Endpoint">
+
+ </model_endpoint>
+<endpoint_comments chapter="3.3" help="" name="Comment on endpoint"/>
+<endpoint_units chapter="3.4" help="" name="Endpoint units"/>
+<endpoint_variable chapter="3.5" help="" name="Dependent variable"/>
+<endpoint_protocol chapter="3.6" help="" name="Experimental protocol"/>
+<endpoint_data_quality chapter="3.7" help="" name="Endpoint data quality and variability"/>
+</QSAR_Endpoint>
+<QSAR_Algorithm chapter="4" help="" name="Defining the algorithm - OECD Principle 2">
+<algorithm_type chapter="4.1" help="" name="Type of model"/>
+<algorithm_explicit chapter="4.2" help="" name="Explicit algorithm">
+<algorithm_ref idref="algorithms_catalog_1"/>
+<equation/>
+</algorithm_explicit>
+<algorithms_descriptors chapter="4.3" help="" name="Descriptors in the model">
+
+ <descriptor_ref idref="descriptors_catalog_1"/>
+</algorithms_descriptors>
+<descriptors_selection chapter="4.4" help="" name="Descriptor selection"/>
+<descriptors_generation chapter="4.5" help="" name="Algorithm and descriptor generation"/>
+<descriptors_generation_software chapter="4.6" help="" name="Software name and version for descriptor generation" options="">
+
+ <software_ref idref="software_catalog_2"/>
+</descriptors_generation_software>
+<descriptors_chemicals_ratio chapter="4.7" help="" name="Chemicals/Descriptors ratio"/>
+</QSAR_Algorithm>
+<QSAR_Applicability_domain chapter="5" help="" name="Defining the applicability domain - OECD Principle 3">
+<app_domain_description chapter="5.1" help="" name="Description of the applicability domain of the model"/>
+<app_domain_method chapter="5.2" help="" name="Method used to assess the applicability domain"/>
+<app_domain_software chapter="5.3" help="" name="Software name and version for applicability domain assessment">
+
+ <software_ref idref="software_catalog_3"/>
+</app_domain_software>
+<applicability_limits chapter="5.4" help="" name="Limits of applicability"/>
+</QSAR_Applicability_domain>
+<QSAR_Robustness chapter="6" help="" name="Internal validation - OECD Principle 4">
+<training_set_availability answer="Yes" chapter="6.1" help="" name="Availability of the training set"/>
+<training_set_data cas="Yes" chapter="6.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the training set" smiles="Yes"/>
+<training_set_descriptors answer="All" chapter="6.3" help="" name="Data for each descriptor variable for the training set"/>
+<dependent_var_availability answer="All" chapter="6.4" help="" name="Data for the dependent variable for the training set"/>
+<other_info chapter="6.5" help="" name="Other information about the training set"/>
+<preprocessing chapter="6.6" help="" name="Pre-processing of data before modelling"/>
+<goodness_of_fit chapter="6.7" help="" name="Statistics for goodness-of-fit"/>
+<loo chapter="6.8" help="" name="Robustness - Statistics obtained by leave-one-out cross-validation"/>
+<lmo chapter="6.9" help="" name="Robustness - Statistics obtained by leave-many-out cross-validation"/>
+<yscrambling chapter="6.10" help="" name="Robustness - Statistics obtained by Y-scrambling"/>
+<bootstrap chapter="6.11" help="" name="Robustness - Statistics obtained by bootstrap"/>
+<other_statistics chapter="6.12" help="" name="Robustness - Statistics obtained by other methods"/>
+</QSAR_Robustness>
+<QSAR_Predictivity chapter="7" help="" name="External validation - OECD Principle 4">
+<validation_set_availability answer="Yes" chapter="7.1" help="" name="Availability of the external validation set"/>
+<validation_set_data cas="Yes" chapter="7.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the external validation set" smiles="Yes"/>
+<validation_set_descriptors answer="All" chapter="7.3" help="" name="Data for each descriptor variable for the external validation set"/>
+<validation_dependent_var_availability answer="All" chapter="7.4" help="" name="Data for the dependent variable for the external validation set"/>
+<validation_other_info chapter="7.5" help="" name="Other information about the external validation set"/>
+<experimental_design chapter="7.6" help="" name="Experimental design of test set"/>
+<validation_predictivity chapter="7.7" help="" name="Predictivity - Statistics obtained by external validation"/>
+<validation_assessment chapter="7.8" help="" name="Predictivity - Assessment of the external validation set"/>
+<validation_comments chapter="7.9" help="" name="Comments on the external validation of the model"/>
+</QSAR_Predictivity>
+<QSAR_Interpretation chapter="8" help="" name="Providing a mechanistic interpretation - OECD Principle 5">
+<mechanistic_basis chapter="8.1" help="" name="Mechanistic basis of the model"/>
+<mechanistic_basis_comments chapter="8.2" help="" name="A priori or a posteriori mechanistic interpretation"/>
+<mechanistic_basis_info chapter="8.3" help="" name="Other information about the mechanistic interpretation"/>
+</QSAR_Interpretation>
+<QSAR_Miscelaneous chapter="9" help="" name="Miscellaneous information">
+<comments chapter="9.1" help="" name="Comments"/>
+<bibliography chapter="9.2" help="" name="Bibliography">
+
+ <publication_ref idref="publications_catalog_1"/>
+</bibliography>
+<attachments chapter="9.3" help="" name="Supporting information">
+
+
+
+
+
+
+ <attachment_training_data/>
+<attachment_validation_data/>
+<attachment_documents/>
+</attachments>
+</QSAR_Miscelaneous>
+<QMRF_Summary chapter="10" help="" name="Summary (JRC QSAR Model Database)">
+<QMRF_number chapter="10.1" help="" name="QMRF number">To be entered by JRC</QMRF_number>
+<date_publication chapter="10.2" help="" name="Publication date">To be entered by JRC</date_publication>
+<keywords chapter="10.3" help="" name="Keywords">To be entered by JRC</keywords>
+<summary_comments chapter="10.4" help="" name="Comments">To be entered by JRC</summary_comments>
+</QMRF_Summary>
+</QMRF_chapters>
+<Catalogs>
+<software_catalog>
+<software contact="" description="" id="firstsoftware" name="" number="" url=""/>
+<software contact="" description="" id="software_catalog_2" name="" number="" url=""/>
+<software contact="" description="" id="software_catalog_3" name="" number="" url=""/>
+</software_catalog>
+<algorithms_catalog>
+<algorithm definition="" description="" id="algorithms_catalog_1" publication_ref=""/>
+</algorithms_catalog>
+<descriptors_catalog>
+<descriptor description="" id="descriptors_catalog_1" name="" publication_ref="" units=""/>
+</descriptors_catalog>
+<endpoints_catalog/>
+<publications_catalog>
+<publication id="publications_catalog_1" title="" url=""/>
+</publications_catalog>
+<authors_catalog>
+<author affiliation="" contact="" email="" id="firstauthor" name="" number="" url=""/>
+<author affiliation="" contact="" email="" id="modelauthor" name="" number="" url=""/>
+</authors_catalog>
+</Catalogs>
+</QMRF>
diff --git a/test/data/qmrf_t7.xml b/test/data/qmrf_t7.xml
new file mode 100644
index 0000000..038110e
--- /dev/null
+++ b/test/data/qmrf_t7.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE QMRF PUBLIC "http://qmrf.sourceforge.net/qmrf.dtd" "qmrf.dtd">
+<QMRF author="Joint Research Centre, European Commission" contact="Joint Research Centre, European Commission" date="July 2007" email="JRC-IHCP-COMPUTOX@ec.europa.eu" name="(Q)SAR Model Reporting Format" schema_version="1.0" url="http://ihcp.jrc.ec.europa.eu/" version="1.3">
+<QMRF_chapters>
+<QSAR_identifier chapter="1" help="" name="QSAR identifier">
+<QSAR_title chapter="1.1" help="" name="QSAR identifier (title)">My QSAR Title</QSAR_title>
+<QSAR_models chapter="1.2" help="" name="Other related models">My QSAR Model</QSAR_models>
+<QSAR_software chapter="1.3" help="" name="Software coding the model">
+
+ <software_ref idref="firstsoftware"/>
+</QSAR_software>
+</QSAR_identifier>
+<QSAR_General_information chapter="2" help="" name="General information">
+<qmrf_date chapter="2.1" help="" name="Date of QMRF"/>
+<qmrf_authors chapter="2.2" help="" name="QMRF author(s) and contact details">
+
+ <author_ref idref="firstauthor"/>
+</qmrf_authors>
+<qmrf_date_revision chapter="2.3" help="" name="Date of QMRF update(s)"/>
+<qmrf_revision chapter="2.4" help="" name="QMRF update(s)"/>
+<model_authors chapter="2.5" help="" name="Model developer(s) and contact details">
+
+ <author_ref idref="modelauthor"/>
+</model_authors>
+<model_date chapter="2.6" help="" name="Date of model development and/or publication"/>
+<references chapter="2.7" help="" name="Reference(s) to main scientific papers and/or software package">
+
+ </references>
+<info_availability chapter="2.8" help="" name="Availability of information about the model"/>
+<related_models chapter="2.9" help="" name="Availability of another QMRF for exactly the same model"/>
+</QSAR_General_information>
+<QSAR_Endpoint chapter="3" help="" name="Defining the endpoint - OECD Principle 1">
+<model_species chapter="3.1" help="" name="Species"/>
+<model_endpoint chapter="3.2" help="" name="Endpoint">
+
+ </model_endpoint>
+<endpoint_comments chapter="3.3" help="" name="Comment on endpoint"/>
+<endpoint_units chapter="3.4" help="" name="Endpoint units"/>
+<endpoint_variable chapter="3.5" help="" name="Dependent variable"/>
+<endpoint_protocol chapter="3.6" help="" name="Experimental protocol"/>
+<endpoint_data_quality chapter="3.7" help="" name="Endpoint data quality and variability"/>
+</QSAR_Endpoint>
+<QSAR_Algorithm chapter="4" help="" name="Defining the algorithm - OECD Principle 2">
+<algorithm_type chapter="4.1" help="" name="Type of model"/>
+<algorithm_explicit chapter="4.2" help="" name="Explicit algorithm">
+<algorithm_ref idref="algorithms_catalog_1"/>
+<equation/>
+</algorithm_explicit>
+<algorithms_descriptors chapter="4.3" help="" name="Descriptors in the model">
+
+ <descriptor_ref idref="descriptors_catalog_1"/>
+</algorithms_descriptors>
+<descriptors_selection chapter="4.4" help="" name="Descriptor selection"/>
+<descriptors_generation chapter="4.5" help="" name="Algorithm and descriptor generation"/>
+<descriptors_generation_software chapter="4.6" help="" name="Software name and version for descriptor generation" options="">
+
+ <software_ref idref="software_catalog_2"/>
+</descriptors_generation_software>
+<descriptors_chemicals_ratio chapter="4.7" help="" name="Chemicals/Descriptors ratio"/>
+</QSAR_Algorithm>
+<QSAR_Applicability_domain chapter="5" help="" name="Defining the applicability domain - OECD Principle 3">
+<app_domain_description chapter="5.1" help="" name="Description of the applicability domain of the model"/>
+<app_domain_method chapter="5.2" help="" name="Method used to assess the applicability domain"/>
+<app_domain_software chapter="5.3" help="" name="Software name and version for applicability domain assessment">
+
+ <software_ref idref="software_catalog_3"/>
+</app_domain_software>
+<applicability_limits chapter="5.4" help="" name="Limits of applicability"/>
+</QSAR_Applicability_domain>
+<QSAR_Robustness chapter="6" help="" name="Internal validation - OECD Principle 4">
+<training_set_availability answer="Yes" chapter="6.1" help="" name="Availability of the training set"/>
+<training_set_data cas="Yes" chapter="6.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the training set" smiles="Yes"/>
+<training_set_descriptors answer="All" chapter="6.3" help="" name="Data for each descriptor variable for the training set"/>
+<dependent_var_availability answer="All" chapter="6.4" help="" name="Data for the dependent variable for the training set"/>
+<other_info chapter="6.5" help="" name="Other information about the training set"/>
+<preprocessing chapter="6.6" help="" name="Pre-processing of data before modelling"/>
+<goodness_of_fit chapter="6.7" help="" name="Statistics for goodness-of-fit"/>
+<loo chapter="6.8" help="" name="Robustness - Statistics obtained by leave-one-out cross-validation"/>
+<lmo chapter="6.9" help="" name="Robustness - Statistics obtained by leave-many-out cross-validation"/>
+<yscrambling chapter="6.10" help="" name="Robustness - Statistics obtained by Y-scrambling"/>
+<bootstrap chapter="6.11" help="" name="Robustness - Statistics obtained by bootstrap"/>
+<other_statistics chapter="6.12" help="" name="Robustness - Statistics obtained by other methods"/>
+</QSAR_Robustness>
+<QSAR_Predictivity chapter="7" help="" name="External validation - OECD Principle 4">
+<validation_set_availability answer="Yes" chapter="7.1" help="" name="Availability of the external validation set"/>
+<validation_set_data cas="Yes" chapter="7.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the external validation set" smiles="Yes"/>
+<validation_set_descriptors answer="All" chapter="7.3" help="" name="Data for each descriptor variable for the external validation set"/>
+<validation_dependent_var_availability answer="All" chapter="7.4" help="" name="Data for the dependent variable for the external validation set"/>
+<validation_other_info chapter="7.5" help="" name="Other information about the external validation set"/>
+<experimental_design chapter="7.6" help="" name="Experimental design of test set"/>
+<validation_predictivity chapter="7.7" help="" name="Predictivity - Statistics obtained by external validation"/>
+<validation_assessment chapter="7.8" help="" name="Predictivity - Assessment of the external validation set"/>
+<validation_comments chapter="7.9" help="" name="Comments on the external validation of the model"/>
+</QSAR_Predictivity>
+<QSAR_Interpretation chapter="8" help="" name="Providing a mechanistic interpretation - OECD Principle 5">
+<mechanistic_basis chapter="8.1" help="" name="Mechanistic basis of the model"/>
+<mechanistic_basis_comments chapter="8.2" help="" name="A priori or a posteriori mechanistic interpretation"/>
+<mechanistic_basis_info chapter="8.3" help="" name="Other information about the mechanistic interpretation"/>
+</QSAR_Interpretation>
+<QSAR_Miscelaneous chapter="9" help="" name="Miscellaneous information">
+<comments chapter="9.1" help="" name="Comments"/>
+<bibliography chapter="9.2" help="" name="Bibliography">
+
+ <publication_ref idref="publications_catalog_1"/>
+</bibliography>
+<attachments chapter="9.3" help="" name="Supporting information">
+
+
+
+
+
+
+ <attachment_training_data/>
+<attachment_validation_data/>
+<attachment_documents/>
+</attachments>
+</QSAR_Miscelaneous>
+<QMRF_Summary chapter="10" help="" name="Summary (JRC QSAR Model Database)">
+<QMRF_number chapter="10.1" help="" name="QMRF number">To be entered by JRC</QMRF_number>
+<date_publication chapter="10.2" help="" name="Publication date">To be entered by JRC</date_publication>
+<keywords chapter="10.3" help="" name="Keywords">To be entered by JRC</keywords>
+<summary_comments chapter="10.4" help="" name="Comments">To be entered by JRC</summary_comments>
+</QMRF_Summary>
+</QMRF_chapters>
+<Catalogs>
+<software_catalog>
+<software contact="in-silico toxicology gmbh" description="lazar toxicity predictions" id="firstsoftware" name="lazar" number="" url="https://lazar.in-silico.ch"/>
+<software contact="" description="" id="software_catalog_2" name="" number="" url=""/>
+<software contact="" description="" id="software_catalog_3" name="" number="" url=""/>
+</software_catalog>
+<algorithms_catalog>
+<algorithm definition="" description="" id="algorithms_catalog_1" publication_ref=""/>
+</algorithms_catalog>
+<descriptors_catalog>
+<descriptor description="" id="descriptors_catalog_1" name="" publication_ref="" units=""/>
+</descriptors_catalog>
+<endpoints_catalog/>
+<publications_catalog>
+<publication id="publications_catalog_1" title="MyName M (2016) My Publication Title, QSAR News, 10, 14-22" url="http://myqsarnewsmag.dom"/>
+<publication id="publications_catalog_2" title="MyName M (2016) My Second Publication Title, Hornblower, 101ff." url="http://hornblower.dom"/></publications_catalog>
+<authors_catalog>
+<author affiliation="" contact="" email="" id="firstauthor" name="" number="" url=""/>
+<author affiliation="" contact="" email="" id="modelauthor" name="" number="" url=""/>
+</authors_catalog>
+</Catalogs>
+</QMRF>
diff --git a/test/data/qmrf_t8.xml b/test/data/qmrf_t8.xml
new file mode 100644
index 0000000..76e2973
--- /dev/null
+++ b/test/data/qmrf_t8.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE QMRF PUBLIC "http://qmrf.sourceforge.net/qmrf.dtd" "qmrf.dtd">
+<QMRF author="Joint Research Centre, European Commission" contact="Joint Research Centre, European Commission" date="July 2007" email="JRC-IHCP-COMPUTOX@ec.europa.eu" name="(Q)SAR Model Reporting Format" schema_version="1.0" url="http://ihcp.jrc.ec.europa.eu/" version="1.3">
+<QMRF_chapters>
+<QSAR_identifier chapter="1" help="" name="QSAR identifier">
+<QSAR_title chapter="1.1" help="" name="QSAR identifier (title)"/>
+<QSAR_models chapter="1.2" help="" name="Other related models"/>
+<QSAR_software chapter="1.3" help="" name="Software coding the model">
+
+ <software_ref idref="firstsoftware"/>
+</QSAR_software>
+</QSAR_identifier>
+<QSAR_General_information chapter="2" help="" name="General information">
+<qmrf_date chapter="2.1" help="" name="Date of QMRF"/>
+<qmrf_authors chapter="2.2" help="" name="QMRF author(s) and contact details">
+
+ <author_ref idref="firstauthor"/>
+<author_ref idref="secondauthor"/></qmrf_authors>
+<qmrf_date_revision chapter="2.3" help="" name="Date of QMRF update(s)"/>
+<qmrf_revision chapter="2.4" help="" name="QMRF update(s)"/>
+<model_authors chapter="2.5" help="" name="Model developer(s) and contact details">
+
+ <author_ref idref="modelauthor"/>
+</model_authors>
+<model_date chapter="2.6" help="" name="Date of model development and/or publication"/>
+<references chapter="2.7" help="" name="Reference(s) to main scientific papers and/or software package">
+
+ </references>
+<info_availability chapter="2.8" help="" name="Availability of information about the model"/>
+<related_models chapter="2.9" help="" name="Availability of another QMRF for exactly the same model"/>
+</QSAR_General_information>
+<QSAR_Endpoint chapter="3" help="" name="Defining the endpoint - OECD Principle 1">
+<model_species chapter="3.1" help="" name="Species"/>
+<model_endpoint chapter="3.2" help="" name="Endpoint">
+
+ </model_endpoint>
+<endpoint_comments chapter="3.3" help="" name="Comment on endpoint"/>
+<endpoint_units chapter="3.4" help="" name="Endpoint units"/>
+<endpoint_variable chapter="3.5" help="" name="Dependent variable"/>
+<endpoint_protocol chapter="3.6" help="" name="Experimental protocol"/>
+<endpoint_data_quality chapter="3.7" help="" name="Endpoint data quality and variability"/>
+</QSAR_Endpoint>
+<QSAR_Algorithm chapter="4" help="" name="Defining the algorithm - OECD Principle 2">
+<algorithm_type chapter="4.1" help="" name="Type of model"/>
+<algorithm_explicit chapter="4.2" help="" name="Explicit algorithm">
+<algorithm_ref idref="algorithms_catalog_1"/>
+<equation/>
+</algorithm_explicit>
+<algorithms_descriptors chapter="4.3" help="" name="Descriptors in the model">
+
+ <descriptor_ref idref="descriptors_catalog_1"/>
+</algorithms_descriptors>
+<descriptors_selection chapter="4.4" help="" name="Descriptor selection"/>
+<descriptors_generation chapter="4.5" help="" name="Algorithm and descriptor generation"/>
+<descriptors_generation_software chapter="4.6" help="" name="Software name and version for descriptor generation" options="">
+
+ <software_ref idref="software_catalog_2"/>
+</descriptors_generation_software>
+<descriptors_chemicals_ratio chapter="4.7" help="" name="Chemicals/Descriptors ratio"/>
+</QSAR_Algorithm>
+<QSAR_Applicability_domain chapter="5" help="" name="Defining the applicability domain - OECD Principle 3">
+<app_domain_description chapter="5.1" help="" name="Description of the applicability domain of the model"/>
+<app_domain_method chapter="5.2" help="" name="Method used to assess the applicability domain"/>
+<app_domain_software chapter="5.3" help="" name="Software name and version for applicability domain assessment">
+
+ <software_ref idref="software_catalog_3"/>
+</app_domain_software>
+<applicability_limits chapter="5.4" help="" name="Limits of applicability"/>
+</QSAR_Applicability_domain>
+<QSAR_Robustness chapter="6" help="" name="Internal validation - OECD Principle 4">
+<training_set_availability answer="Yes" chapter="6.1" help="" name="Availability of the training set"/>
+<training_set_data cas="Yes" chapter="6.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the training set" smiles="Yes"/>
+<training_set_descriptors answer="All" chapter="6.3" help="" name="Data for each descriptor variable for the training set"/>
+<dependent_var_availability answer="All" chapter="6.4" help="" name="Data for the dependent variable for the training set"/>
+<other_info chapter="6.5" help="" name="Other information about the training set"/>
+<preprocessing chapter="6.6" help="" name="Pre-processing of data before modelling"/>
+<goodness_of_fit chapter="6.7" help="" name="Statistics for goodness-of-fit"/>
+<loo chapter="6.8" help="" name="Robustness - Statistics obtained by leave-one-out cross-validation"/>
+<lmo chapter="6.9" help="" name="Robustness - Statistics obtained by leave-many-out cross-validation"/>
+<yscrambling chapter="6.10" help="" name="Robustness - Statistics obtained by Y-scrambling"/>
+<bootstrap chapter="6.11" help="" name="Robustness - Statistics obtained by bootstrap"/>
+<other_statistics chapter="6.12" help="" name="Robustness - Statistics obtained by other methods"/>
+</QSAR_Robustness>
+<QSAR_Predictivity chapter="7" help="" name="External validation - OECD Principle 4">
+<validation_set_availability answer="Yes" chapter="7.1" help="" name="Availability of the external validation set"/>
+<validation_set_data cas="Yes" chapter="7.2" chemname="Yes" formula="Yes" help="" inchi="Yes" mol="Yes" name="Available information for the external validation set" smiles="Yes"/>
+<validation_set_descriptors answer="All" chapter="7.3" help="" name="Data for each descriptor variable for the external validation set"/>
+<validation_dependent_var_availability answer="All" chapter="7.4" help="" name="Data for the dependent variable for the external validation set"/>
+<validation_other_info chapter="7.5" help="" name="Other information about the external validation set"/>
+<experimental_design chapter="7.6" help="" name="Experimental design of test set"/>
+<validation_predictivity chapter="7.7" help="" name="Predictivity - Statistics obtained by external validation"/>
+<validation_assessment chapter="7.8" help="" name="Predictivity - Assessment of the external validation set"/>
+<validation_comments chapter="7.9" help="" name="Comments on the external validation of the model"/>
+</QSAR_Predictivity>
+<QSAR_Interpretation chapter="8" help="" name="Providing a mechanistic interpretation - OECD Principle 5">
+<mechanistic_basis chapter="8.1" help="" name="Mechanistic basis of the model"/>
+<mechanistic_basis_comments chapter="8.2" help="" name="A priori or a posteriori mechanistic interpretation"/>
+<mechanistic_basis_info chapter="8.3" help="" name="Other information about the mechanistic interpretation"/>
+</QSAR_Interpretation>
+<QSAR_Miscelaneous chapter="9" help="" name="Miscellaneous information">
+<comments chapter="9.1" help="" name="Comments"/>
+<bibliography chapter="9.2" help="" name="Bibliography">
+
+ <publication_ref idref="publications_catalog_1"/>
+</bibliography>
+<attachments chapter="9.3" help="" name="Supporting information">
+
+
+
+
+
+
+ <attachment_training_data/>
+<attachment_validation_data/>
+<attachment_documents/>
+</attachments>
+</QSAR_Miscelaneous>
+<QMRF_Summary chapter="10" help="" name="Summary (JRC QSAR Model Database)">
+<QMRF_number chapter="10.1" help="" name="QMRF number">To be entered by JRC</QMRF_number>
+<date_publication chapter="10.2" help="" name="Publication date">To be entered by JRC</date_publication>
+<keywords chapter="10.3" help="" name="Keywords">To be entered by JRC</keywords>
+<summary_comments chapter="10.4" help="" name="Comments">To be entered by JRC</summary_comments>
+</QMRF_Summary>
+</QMRF_chapters>
+<Catalogs>
+<software_catalog>
+<software contact="" description="" id="firstsoftware" name="" number="" url=""/>
+<software contact="" description="" id="software_catalog_2" name="" number="" url=""/>
+<software contact="" description="" id="software_catalog_3" name="" number="" url=""/>
+</software_catalog>
+<algorithms_catalog>
+<algorithm definition="" description="" id="algorithms_catalog_1" publication_ref=""/>
+</algorithms_catalog>
+<descriptors_catalog>
+<descriptor description="" id="descriptors_catalog_1" name="" publication_ref="" units=""/>
+</descriptors_catalog>
+<endpoints_catalog/>
+<publications_catalog>
+<publication id="publications_catalog_1" title="" url=""/>
+</publications_catalog>
+<authors_catalog>
+<author affiliation="" contact="" email="myauthor@myauthor.dom" id="firstauthor" name="Dr. My MyName" number="" url="http://myauthor.dom"/>
+<author affiliation="" contact="" email="" id="modelauthor" name="" number="" url=""/>
+<author id="secondauthor" name="Dr. Mysec MysecName" url="http://myauthor.dom" email="myauthor@myauthor.dom"/></authors_catalog>
+</Catalogs>
+</QMRF>
diff --git a/test/report.rb b/test/report.rb
new file mode 100644
index 0000000..b9a6c54
--- /dev/null
+++ b/test/report.rb
@@ -0,0 +1,74 @@
+require_relative "setup.rb"
+
+class QMRFReportTest < MiniTest::Test
+
+ def test_0_self
+ puts "MiniTest start OK"
+ end
+
+ def test_1_base
+ report = OpenTox::QMRFReport.new
+ assert report
+ assert_kind_of(OpenTox::QMRFReport, report)
+ end
+
+ def test_2_validate
+ report = OpenTox::QMRFReport.new
+ assert_empty report.validate
+ end
+
+ def test_3_write_some_values
+ report = OpenTox::QMRFReport.new
+ report.change_qmrf_tag "QSAR_title", "My QSAR Title"
+ report.change_qmrf_tag "QSAR_models", "My QSAR Model"
+ assert_equal report.get_qmrf_tag("QSAR_title"), "My QSAR Title"
+ assert_equal report.get_qmrf_tag("QSAR_models"), "My QSAR Model"
+ refute_equal report.get_qmrf_tag("QSAR_title"), "lazar"
+ end
+
+ def test_4_write_check
+ report = OpenTox::QMRFReport.new
+ report.change_qmrf_tag "QSAR_title", "My QSAR Title"
+ report.change_qmrf_tag "QSAR_models", "My QSAR Model"
+ assert_equal report.to_xml, File.read(File.join(File.join(DATA_DIR, "qmrf_t4.xml")))
+ end
+
+ def test_5_write_catalog
+ report = OpenTox::QMRFReport.new
+ report.change_catalog :software_catalog, :firstsoftware, {:name => "lazar", :contact => "in-silico toxicology gmbh", :url => "https://lazar.in-silico.ch", :description => "lazar toxicity predictions"}
+ assert "in-silico toxicology gmbh", report.get_catalog_value(:software_catalog, :firstsoftware, :contact)
+ assert "lazar", report.get_catalog_value(:software_catalog, :firstsoftware, :name)
+ assert "https://lazar.in-silico.ch", report.get_catalog_value(:software_catalog, :firstsoftware, :url)
+ assert "lazar toxicity predictions", report.get_catalog_value(:software_catalog, :firstsoftware, :description)
+ end
+
+ def test_6_check_catalog_exists
+ report = OpenTox::QMRFReport.new
+ assert_raises RuntimeError do
+ report.catalog_exists? :noexist_catalog
+ end
+ assert report.catalog_exists? :software_catalog
+ end
+
+ def test_7_write_alot
+ report = OpenTox::QMRFReport.new
+ report.change_qmrf_tag "QSAR_title", "My QSAR Title"
+ report.change_qmrf_tag "QSAR_models", "My QSAR Model"
+ report.change_catalog :software_catalog, :firstsoftware, {:name => "lazar", :contact => "in-silico toxicology gmbh", :url => "https://lazar.in-silico.ch", :description => "lazar toxicity predictions"}
+ report.change_catalog :publications_catalog, :publications_catalog_1, {:title => "MyName M (2016) My Publication Title, QSAR News, 10, 14-22", :url => "http://myqsarnewsmag.dom"}
+ report.change_catalog :publications_catalog, :publications_catalog_2, {:title => "MyName M (2016) My Second Publication Title, Hornblower, 101ff.", :url => "http://hornblower.dom"}
+ assert_equal report.to_xml, File.read(File.join(File.join(File.dirname(__FILE__),"data/qmrf_t7.xml")))
+ report.change_catalog :publications_catalog, :publications_catalog_3, {:title => "MyName M (2016) My Third Publication Title, Somewhereelse, 43f.", :url => "http://somewhereelse.dom"}
+ refute_equal report.to_xml, File.read(File.join(File.join(DATA_DIR, "qmrf_t7.xml")))
+ end
+
+ def test_8_ref_catalog_entry
+ report = OpenTox::QMRFReport.new
+ report.change_catalog :authors_catalog, :firstauthor, {:name => "Dr. My MyName", :url => "http://myauthor.dom", :email => "myauthor@myauthor.dom"}
+ report.ref_catalog :qmrf_authors, :authors_catalog, :firstauthor
+ report.change_catalog :authors_catalog, :secondauthor, {:name => "Dr. Mysec MysecName", :url => "http://myauthor.dom", :email => "myauthor@myauthor.dom"}
+ report.ref_catalog :qmrf_authors, :authors_catalog, :secondauthor
+ assert_equal report.to_xml, File.read(File.join(File.join(DATA_DIR, "qmrf_t8.xml")))
+ end
+
+end
diff --git a/test/setup.rb b/test/setup.rb
new file mode 100644
index 0000000..5d61c1c
--- /dev/null
+++ b/test/setup.rb
@@ -0,0 +1,7 @@
+ENV["LAZAR_ENV"] = "development"
+require 'minitest/autorun'
+require_relative '../lib/qmrf-report.rb'
+#require 'lazar'
+include OpenTox
+TEST_DIR ||= File.expand_path(File.dirname(__FILE__))
+DATA_DIR ||= File.join(TEST_DIR,"data") \ No newline at end of file