bio-nexml 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +15 -0
- data/Gemfile.lock +24 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +47 -0
- data/Rakefile +55 -0
- data/TODO.txt +6 -0
- data/VERSION +1 -0
- data/bio-nexml.gemspec +126 -0
- data/extconf.rb +2 -0
- data/lib/bio-nexml.rb +0 -0
- data/lib/bio.rb +321 -0
- data/lib/bio/db/nexml.rb +109 -0
- data/lib/bio/db/nexml/mapper.rb +113 -0
- data/lib/bio/db/nexml/mapper/framework.rb +157 -0
- data/lib/bio/db/nexml/mapper/inflection.rb +99 -0
- data/lib/bio/db/nexml/mapper/repository.rb +59 -0
- data/lib/bio/db/nexml/matrix.rb +1046 -0
- data/lib/bio/db/nexml/parser.rb +622 -0
- data/lib/bio/db/nexml/schema/README.txt +21 -0
- data/lib/bio/db/nexml/schema/abstract.xsd +159 -0
- data/lib/bio/db/nexml/schema/characters/README.txt +1 -0
- data/lib/bio/db/nexml/schema/characters/abstractcharacters.xsd +361 -0
- data/lib/bio/db/nexml/schema/characters/characters.xsd +22 -0
- data/lib/bio/db/nexml/schema/characters/continuous.xsd +190 -0
- data/lib/bio/db/nexml/schema/characters/dna.xsd +282 -0
- data/lib/bio/db/nexml/schema/characters/protein.xsd +280 -0
- data/lib/bio/db/nexml/schema/characters/restriction.xsd +239 -0
- data/lib/bio/db/nexml/schema/characters/rna.xsd +283 -0
- data/lib/bio/db/nexml/schema/characters/standard.xsd +261 -0
- data/lib/bio/db/nexml/schema/external/sawsdl.xsd +21 -0
- data/lib/bio/db/nexml/schema/external/xhtml-datatypes-1.xsd +177 -0
- data/lib/bio/db/nexml/schema/external/xlink.xsd +75 -0
- data/lib/bio/db/nexml/schema/external/xml.xsd +145 -0
- data/lib/bio/db/nexml/schema/meta/README.txt +2 -0
- data/lib/bio/db/nexml/schema/meta/annotations.xsd +100 -0
- data/lib/bio/db/nexml/schema/meta/meta.xsd +294 -0
- data/lib/bio/db/nexml/schema/nexml.xsd +104 -0
- data/lib/bio/db/nexml/schema/taxa/README.txt +2 -0
- data/lib/bio/db/nexml/schema/taxa/taxa.xsd +39 -0
- data/lib/bio/db/nexml/schema/trees/README.txt +2 -0
- data/lib/bio/db/nexml/schema/trees/abstracttrees.xsd +135 -0
- data/lib/bio/db/nexml/schema/trees/network.xsd +113 -0
- data/lib/bio/db/nexml/schema/trees/tree.xsd +149 -0
- data/lib/bio/db/nexml/schema/trees/trees.xsd +36 -0
- data/lib/bio/db/nexml/taxa.rb +147 -0
- data/lib/bio/db/nexml/trees.rb +663 -0
- data/lib/bio/db/nexml/writer.rb +265 -0
- data/test/data/nexml/test.xml +69 -0
- data/test/test_bio-nexml.rb +17 -0
- data/test/unit/bio/db/nexml/tc_factory.rb +119 -0
- data/test/unit/bio/db/nexml/tc_mapper.rb +78 -0
- data/test/unit/bio/db/nexml/tc_matrix.rb +551 -0
- data/test/unit/bio/db/nexml/tc_parser.rb +21 -0
- data/test/unit/bio/db/nexml/tc_taxa.rb +118 -0
- data/test/unit/bio/db/nexml/tc_trees.rb +370 -0
- data/test/unit/bio/db/nexml/tc_writer.rb +633 -0
- metadata +253 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
This directory and its subfolders contains the latest version of the nexml schema
|
2
|
+
from the subversion repository. The schema is designed following the 'Venetian
|
3
|
+
Blinds' design pattern. With this design approach we disassemble the problem
|
4
|
+
into individual components. Instead of creating element declarations, we create type
|
5
|
+
definitions.
|
6
|
+
|
7
|
+
This design has:
|
8
|
+
|
9
|
+
* maximized reuse
|
10
|
+
* maximized the potential to hide (localize) namespaces.
|
11
|
+
|
12
|
+
The Venetian Blind design espouses these guidelines:
|
13
|
+
|
14
|
+
* Design your schema to maximize the potential for hiding (localizing) namespace complexities.
|
15
|
+
* Use elementFormDefault to act as a switch for controlling namespace exposure - if you want element namespaces exposed in instance documents, simply turn the elementFormDefault switch to "on" (i.e, set elementFormDefault= "qualified"); if you don't want element namespaces exposed in instance documents, simply turn the elementFormDefault switch to "off" (i.e., set elementFormDefault="unqualified").
|
16
|
+
* Design your schema to maximize reuse.
|
17
|
+
* Use type definitions as the main form of component reuse.
|
18
|
+
* Nest element declarations within type definitions.
|
19
|
+
|
20
|
+
For more about this (and other) schema design patterns and best practices, visit
|
21
|
+
http://www.xfront.com/GlobalVersusLocal.html#ThirdDesign
|
@@ -0,0 +1,159 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
3
|
+
xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xlink="http://www.w3.org/1999/xlink"
|
4
|
+
targetNamespace="http://www.nexml.org/2009" xmlns="http://www.nexml.org/2009"
|
5
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml/datatypes/" elementFormDefault="qualified">
|
6
|
+
|
7
|
+
<xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"
|
8
|
+
schemaLocation="external/xhtml-datatypes-1.xsd"/>
|
9
|
+
|
10
|
+
<xs:include schemaLocation="meta/annotations.xsd"/>
|
11
|
+
<xs:annotation>
|
12
|
+
<xs:documentation>
|
13
|
+
This module defines abstract superclasses. In xml schema, inheritance of complex types
|
14
|
+
is either through extension or through restriction. Extensions in this context means that
|
15
|
+
the child class can have more types of elements appended to the end of its children, and/or
|
16
|
+
more attributes. Restriction means that the child class is more limited than the base class,
|
17
|
+
in that it might have fewer child elements, fewer attributes, or more restricted child
|
18
|
+
element types.<br/><br/>
|
19
|
+
The nexml schema uses inheritance such that abstract superclasses - i.e. those defined in
|
20
|
+
this module - extend each other to form a useful tree of superclasses, from which child
|
21
|
+
classes then derive by restriction. This is done so that for any type there is always an
|
22
|
+
exhaustive abstract superclass, to which parsers should be adapted, so that derived
|
23
|
+
instances won't have surprising substructures.
|
24
|
+
</xs:documentation>
|
25
|
+
</xs:annotation>
|
26
|
+
|
27
|
+
<!-- an element that can be annotated with RDFa-compliant metadata -->
|
28
|
+
<xs:complexType name="Annotated" abstract="true">
|
29
|
+
<xs:annotation>
|
30
|
+
<xs:documentation>
|
31
|
+
The Annotated complexType is a super class for objects that
|
32
|
+
optionally have metadata annotations of type Meta.
|
33
|
+
</xs:documentation>
|
34
|
+
</xs:annotation>
|
35
|
+
<xs:complexContent mixed="true">
|
36
|
+
<xs:extension base="Base">
|
37
|
+
<xs:sequence>
|
38
|
+
<xs:element name="meta" type="Meta" minOccurs="0" maxOccurs="unbounded"/>
|
39
|
+
</xs:sequence>
|
40
|
+
<xs:attribute name="about" type="xhtml:URIorSafeCURIE" use="optional"/>
|
41
|
+
</xs:extension>
|
42
|
+
</xs:complexContent>
|
43
|
+
</xs:complexType>
|
44
|
+
|
45
|
+
<!-- an element with a human readable label -->
|
46
|
+
<xs:complexType name="Labelled" abstract="true">
|
47
|
+
<xs:annotation>
|
48
|
+
<xs:documentation>
|
49
|
+
The Labelled complexType is a super class for objects that
|
50
|
+
optionally have label attributes to use as a (non-unique)
|
51
|
+
name of type xs:string.
|
52
|
+
</xs:documentation>
|
53
|
+
</xs:annotation>
|
54
|
+
<xs:complexContent mixed="true">
|
55
|
+
<xs:extension base="Annotated">
|
56
|
+
<xs:attribute name="label" type="xs:string" use="optional"/>
|
57
|
+
</xs:extension>
|
58
|
+
</xs:complexContent>
|
59
|
+
</xs:complexType>
|
60
|
+
|
61
|
+
<!-- any element that requires an ID -->
|
62
|
+
<xs:complexType name="IDTagged" abstract="true">
|
63
|
+
<xs:annotation>
|
64
|
+
<xs:documentation>
|
65
|
+
The IDTagged complexType is a super class for objects that require
|
66
|
+
unique id attributes of type xs:ID. The id must be unique within the XML document.
|
67
|
+
</xs:documentation>
|
68
|
+
</xs:annotation>
|
69
|
+
<xs:complexContent mixed="true">
|
70
|
+
<xs:extension base="Labelled">
|
71
|
+
<xs:sequence/>
|
72
|
+
</xs:extension>
|
73
|
+
</xs:complexContent>
|
74
|
+
</xs:complexType>
|
75
|
+
|
76
|
+
<!-- elements that enclose "class" elements -->
|
77
|
+
<xs:complexType name="Segmented" abstract="true" mixed="true">
|
78
|
+
<xs:annotation>
|
79
|
+
<xs:documentation>
|
80
|
+
The Segmented complexType is for elements that contain multiple child
|
81
|
+
elements of the same type, e.g. multiple cells in a row, multiple nodes
|
82
|
+
in a tree, etc. Segmented elements can hold one or more elements of type
|
83
|
+
Class, such that the segments can refer to the ID of the class they belong
|
84
|
+
to.
|
85
|
+
</xs:documentation>
|
86
|
+
</xs:annotation>
|
87
|
+
<xs:complexContent mixed="true">
|
88
|
+
<xs:extension base="IDTagged">
|
89
|
+
<xs:sequence>
|
90
|
+
<xs:element name="class" type="Class" minOccurs="0" maxOccurs="unbounded"/>
|
91
|
+
</xs:sequence>
|
92
|
+
</xs:extension>
|
93
|
+
</xs:complexContent>
|
94
|
+
</xs:complexType>
|
95
|
+
|
96
|
+
<!-- an annotated element with a required link to an otu -->
|
97
|
+
<xs:complexType name="TaxonLinked" abstract="true">
|
98
|
+
<xs:annotation>
|
99
|
+
<xs:documentation>
|
100
|
+
The TaxonLinked complexType is a super class for objects that
|
101
|
+
require a taxon id reference.
|
102
|
+
</xs:documentation>
|
103
|
+
</xs:annotation>
|
104
|
+
<xs:complexContent mixed="true">
|
105
|
+
<xs:extension base="IDTagged">
|
106
|
+
<xs:attribute name="otu" type="xs:IDREF" use="required"/>
|
107
|
+
</xs:extension>
|
108
|
+
</xs:complexContent>
|
109
|
+
</xs:complexType>
|
110
|
+
|
111
|
+
<!-- an annotated element with an optional link to an otu -->
|
112
|
+
<xs:complexType name="OptionalTaxonLinked" abstract="true">
|
113
|
+
<xs:annotation>
|
114
|
+
<xs:documentation>
|
115
|
+
The OptionalOTULinked complexType is a super class for objects that
|
116
|
+
that optionally have an otu id reference.
|
117
|
+
</xs:documentation>
|
118
|
+
</xs:annotation>
|
119
|
+
<xs:complexContent>
|
120
|
+
<xs:extension base="IDTagged">
|
121
|
+
<xs:attribute name="otu" type="xs:IDREF" use="optional"/>
|
122
|
+
</xs:extension>
|
123
|
+
</xs:complexContent>
|
124
|
+
</xs:complexType>
|
125
|
+
|
126
|
+
<!-- an annotated element with a required link to an otu container -->
|
127
|
+
<xs:complexType name="TaxaLinked" abstract="true">
|
128
|
+
<xs:annotation>
|
129
|
+
<xs:documentation>
|
130
|
+
The TaxaLinked complexType is a super class for objects that
|
131
|
+
that require an otus id reference.
|
132
|
+
</xs:documentation>
|
133
|
+
</xs:annotation>
|
134
|
+
<xs:complexContent>
|
135
|
+
<xs:extension base="IDTagged">
|
136
|
+
<xs:attribute name="otus" type="xs:IDREF" use="required"/>
|
137
|
+
</xs:extension>
|
138
|
+
</xs:complexContent>
|
139
|
+
</xs:complexType>
|
140
|
+
|
141
|
+
<!-- class element -->
|
142
|
+
<xs:complexType name="Class" abstract="false">
|
143
|
+
<xs:annotation>
|
144
|
+
<xs:documentation>
|
145
|
+
Elements of the Class complexType are elements with an ID to which
|
146
|
+
other elements refer using the "class" attribute. The purpose of this
|
147
|
+
to allow creation of sets, but rather than having a set specify its
|
148
|
+
members (such as character sets in nexus), in nexml the members specify
|
149
|
+
which class(es) they belong to. This is more idiomatic for xml, consider
|
150
|
+
for example the "class" attribute in (X)HTML which works the same way,
|
151
|
+
and is used for example for cascading style sheets.
|
152
|
+
</xs:documentation>
|
153
|
+
</xs:annotation>
|
154
|
+
<xs:complexContent>
|
155
|
+
<xs:extension base="IDTagged"/>
|
156
|
+
</xs:complexContent>
|
157
|
+
</xs:complexType>
|
158
|
+
|
159
|
+
</xs:schema>
|
@@ -0,0 +1 @@
|
|
1
|
+
This directory contains schema fragments for character data of various types.
|
@@ -0,0 +1,361 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
|
3
|
+
targetNamespace="http://www.nexml.org/2009" xmlns="http://www.nexml.org/2009"
|
4
|
+
elementFormDefault="qualified">
|
5
|
+
<xs:annotation>
|
6
|
+
<xs:documentation>
|
7
|
+
This module defines the abstract superclasses for the components
|
8
|
+
that go into character matrices. In nexml instance documents, the
|
9
|
+
<characters> element structure forms the concrete instance of
|
10
|
+
the complex types defined here. The concrete structure consists of
|
11
|
+
zero or one <format> structures that define allowed states,
|
12
|
+
their symbols and ambiguity mappings, and the matrix columns they
|
13
|
+
apply to. This is then followed by a <matrix> element that
|
14
|
+
contains rows that either consist of granular cells with individual
|
15
|
+
states, or of compact sequences.
|
16
|
+
</xs:documentation>
|
17
|
+
</xs:annotation>
|
18
|
+
|
19
|
+
<xs:include schemaLocation="../abstract.xsd"/>
|
20
|
+
|
21
|
+
<xs:complexType name="AbstractMapping" abstract="true">
|
22
|
+
<xs:annotation>
|
23
|
+
<xs:documentation>
|
24
|
+
The AbstractMapping type is the superclass for an ambiguity mapping. In an instance
|
25
|
+
document, a subclass of this type will look like <member state="st1"/>, i.e.
|
26
|
+
an element called "member" with an attribute called "state" whose value is an
|
27
|
+
id reference that refers to an element that subclasses AbstractState. The purpose
|
28
|
+
of AbstractMapping is to specify which other states may be implied, e.g. a nucleotide
|
29
|
+
symbol "N" would have mappings to "A", "C", "G" and "T".
|
30
|
+
</xs:documentation>
|
31
|
+
</xs:annotation>
|
32
|
+
<xs:complexContent>
|
33
|
+
<xs:extension base="Base">
|
34
|
+
<xs:attribute name="state" use="required" type="xs:IDREF"/>
|
35
|
+
</xs:extension>
|
36
|
+
</xs:complexContent>
|
37
|
+
</xs:complexType>
|
38
|
+
|
39
|
+
<xs:simpleType name="AbstractSymbol">
|
40
|
+
<xs:annotation>
|
41
|
+
<xs:documentation>
|
42
|
+
AbstractSymbol is a simple type, i.e. a string token. Concrete subclasses of character
|
43
|
+
blocks will restrict AbstractSymbol to something sensible such as a regular expression
|
44
|
+
of IUPAC symbols, a range of integer values, and so on.
|
45
|
+
</xs:documentation>
|
46
|
+
</xs:annotation>
|
47
|
+
<xs:restriction base="xs:string">
|
48
|
+
<xs:whiteSpace value="preserve"/>
|
49
|
+
</xs:restriction>
|
50
|
+
</xs:simpleType>
|
51
|
+
|
52
|
+
<xs:complexType name="AbstractState" abstract="true">
|
53
|
+
<xs:annotation>
|
54
|
+
<xs:documentation>
|
55
|
+
The AbstractState type is the superclass for a state definition.
|
56
|
+
The element encloses a required AbstractSymbol element that in restricted concrete
|
57
|
+
subclasses must be of a sensible type such as a single IUPAC character. It may
|
58
|
+
enclose zero or more AbstractMapping elements to resolve ambiguities.
|
59
|
+
</xs:documentation>
|
60
|
+
</xs:annotation>
|
61
|
+
<xs:complexContent mixed="true">
|
62
|
+
<xs:extension base="IDTagged">
|
63
|
+
<xs:sequence minOccurs="1" maxOccurs="1"> </xs:sequence>
|
64
|
+
<xs:attribute name="symbol" type="xs:anySimpleType" use="required"/>
|
65
|
+
</xs:extension>
|
66
|
+
</xs:complexContent>
|
67
|
+
</xs:complexType>
|
68
|
+
|
69
|
+
<xs:complexType name="AbstractUncertainStateSet" abstract="true" mixed="true">
|
70
|
+
<xs:annotation>
|
71
|
+
<xs:documentation>
|
72
|
+
The AbstractState type is the superclass for a state definition.
|
73
|
+
The element encloses a required AbstractSymbol element that in restricted concrete
|
74
|
+
subclasses must be of a sensible type such as a single IUPAC character. It may
|
75
|
+
enclose zero or more AbstractMapping elements to resolve ambiguities.
|
76
|
+
</xs:documentation>
|
77
|
+
</xs:annotation>
|
78
|
+
<xs:complexContent mixed="true">
|
79
|
+
<xs:extension base="AbstractState">
|
80
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
81
|
+
<xs:element name="member" type="AbstractMapping" minOccurs="0"
|
82
|
+
maxOccurs="unbounded"/>
|
83
|
+
</xs:sequence>
|
84
|
+
</xs:extension>
|
85
|
+
</xs:complexContent>
|
86
|
+
</xs:complexType>
|
87
|
+
|
88
|
+
<xs:complexType name="AbstractPolymorphicStateSet" abstract="true" mixed="true">
|
89
|
+
<xs:annotation>
|
90
|
+
<xs:documentation>
|
91
|
+
The AbstractState type is the superclass for a state definition.
|
92
|
+
The element encloses a required AbstractSymbol element that in restricted concrete
|
93
|
+
subclasses must be of a sensible type such as a single IUPAC character. It may
|
94
|
+
enclose zero or more AbstractMapping elements to resolve ambiguities.
|
95
|
+
</xs:documentation>
|
96
|
+
</xs:annotation>
|
97
|
+
<xs:complexContent mixed="true">
|
98
|
+
<xs:extension base="AbstractUncertainStateSet">
|
99
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
100
|
+
<xs:element name="uncertain_state_set" type="AbstractUncertainStateSet"
|
101
|
+
minOccurs="0" maxOccurs="unbounded"/>
|
102
|
+
</xs:sequence>
|
103
|
+
</xs:extension>
|
104
|
+
</xs:complexContent>
|
105
|
+
</xs:complexType>
|
106
|
+
|
107
|
+
<!-- TODO place constraint on symbol unicity -->
|
108
|
+
<xs:complexType name="AbstractStates" abstract="true">
|
109
|
+
<xs:annotation>
|
110
|
+
<xs:documentation>
|
111
|
+
A container for a set of AbstractState elements.
|
112
|
+
</xs:documentation>
|
113
|
+
</xs:annotation>
|
114
|
+
<xs:complexContent mixed="true">
|
115
|
+
<xs:extension base="IDTagged">
|
116
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
117
|
+
<xs:element name="state" type="AbstractState" minOccurs="0"
|
118
|
+
maxOccurs="unbounded"/>
|
119
|
+
<xs:element name="polymorphic_state_set" type="AbstractPolymorphicStateSet"
|
120
|
+
minOccurs="0" maxOccurs="unbounded"/>
|
121
|
+
<xs:element name="uncertain_state_set" type="AbstractUncertainStateSet"
|
122
|
+
minOccurs="0" maxOccurs="unbounded"/>
|
123
|
+
</xs:sequence>
|
124
|
+
</xs:extension>
|
125
|
+
</xs:complexContent>
|
126
|
+
</xs:complexType>
|
127
|
+
|
128
|
+
<xs:simpleType name="CodonPosition">
|
129
|
+
<xs:annotation>
|
130
|
+
<xs:documentation>
|
131
|
+
The CodonPosition type is an integer with value 1, 2 or 3, used in DNA and RNA.
|
132
|
+
</xs:documentation>
|
133
|
+
</xs:annotation>
|
134
|
+
<xs:restriction base="xs:nonNegativeInteger">
|
135
|
+
<xs:minInclusive value="1"/>
|
136
|
+
<xs:maxInclusive value="3"/>
|
137
|
+
</xs:restriction>
|
138
|
+
</xs:simpleType>
|
139
|
+
|
140
|
+
<xs:simpleType name="MSTokenLength">
|
141
|
+
<xs:annotation>
|
142
|
+
<xs:documentation>
|
143
|
+
The MSTokenLength simple type is used to specify, per column, how many
|
144
|
+
tokens may occur in a multistate single observation matrix. For example,
|
145
|
+
in a matrix where every cell holds a vector of two continuous values
|
146
|
+
(say, mean and standard deviation of a measurement), the column definition
|
147
|
+
provides a hint to this effect, by setting the attribute tokens="2"
|
148
|
+
</xs:documentation>
|
149
|
+
</xs:annotation>
|
150
|
+
<xs:restriction base="xs:positiveInteger"/>
|
151
|
+
</xs:simpleType>
|
152
|
+
|
153
|
+
<xs:complexType name="AbstractChar" abstract="true"
|
154
|
+
sawsdl:modelReference="http://evolutionaryontology-dev.nescent.org/cdao.owl#Character">
|
155
|
+
<xs:annotation>
|
156
|
+
<xs:documentation>
|
157
|
+
The AbstractChar type is the superclass for a column definition, which may
|
158
|
+
have a "states" attribute that refers to an AbstractStates element, a codon attribute
|
159
|
+
of type CodonPosition and an id attribute that may be an actual id (e.g. for categorical
|
160
|
+
matrices where observations explicitly refer to a column definition) or an integer for
|
161
|
+
sequence matrices.
|
162
|
+
</xs:documentation>
|
163
|
+
<xs:appinfo>Character</xs:appinfo>
|
164
|
+
</xs:annotation>
|
165
|
+
<xs:complexContent mixed="true">
|
166
|
+
<xs:extension base="IDTagged">
|
167
|
+
<xs:sequence minOccurs="1" maxOccurs="1"/>
|
168
|
+
<xs:attribute name="tokens" type="MSTokenLength" use="optional"/>
|
169
|
+
<xs:attribute name="states" type="xs:IDREF" use="optional"/>
|
170
|
+
<xs:attribute name="codon" type="CodonPosition" use="optional"/>
|
171
|
+
</xs:extension>
|
172
|
+
</xs:complexContent>
|
173
|
+
</xs:complexType>
|
174
|
+
|
175
|
+
<xs:complexType name="AbstractFormat" abstract="true" mixed="true">
|
176
|
+
<xs:annotation>
|
177
|
+
<xs:documentation>
|
178
|
+
The AbstractFormat type is the superclass for the element
|
179
|
+
that defines the allowed characters and states in a matrix, and their ambiguity mapping.
|
180
|
+
It may enclose AbstractStates elements that define states and their mappings, and
|
181
|
+
AbstractChar elements that specify which AbstractStates apply to which matrix columns.
|
182
|
+
</xs:documentation>
|
183
|
+
</xs:annotation>
|
184
|
+
<xs:complexContent mixed="true">
|
185
|
+
<xs:extension base="Annotated">
|
186
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
187
|
+
<xs:element name="states" minOccurs="0" maxOccurs="unbounded"
|
188
|
+
type="AbstractStates"/>
|
189
|
+
<xs:element name="char" minOccurs="0" maxOccurs="unbounded" type="AbstractChar"
|
190
|
+
/>
|
191
|
+
</xs:sequence>
|
192
|
+
</xs:extension>
|
193
|
+
</xs:complexContent>
|
194
|
+
</xs:complexType>
|
195
|
+
|
196
|
+
<xs:complexType name="AbstractObs" abstract="true">
|
197
|
+
<xs:annotation>
|
198
|
+
<xs:documentation>
|
199
|
+
The AbstractObs type is the superclass for single observations, i.e. cells
|
200
|
+
in a matrix. A concrete instance of AbstractObs has a "char" attribute that
|
201
|
+
either refers to an explicitly defined character (e.g. in categorical matrices)
|
202
|
+
or to a column number, and a "state" attribute that either holds a reference to
|
203
|
+
an explicitly defined state, or a raw state value (e.g. a nucleotide, a continuous
|
204
|
+
value).
|
205
|
+
</xs:documentation>
|
206
|
+
<xs:appinfo>Character_State_Datum</xs:appinfo>
|
207
|
+
</xs:annotation>
|
208
|
+
<xs:complexContent>
|
209
|
+
<xs:extension base="Labelled">
|
210
|
+
<xs:attribute name="char" use="required" type="xs:anySimpleType"/>
|
211
|
+
<xs:attribute name="state" use="required" type="xs:anySimpleType"/>
|
212
|
+
</xs:extension>
|
213
|
+
</xs:complexContent>
|
214
|
+
</xs:complexType>
|
215
|
+
|
216
|
+
<xs:simpleType name="AbstractSeq">
|
217
|
+
<xs:annotation>
|
218
|
+
<xs:documentation>
|
219
|
+
AbstractSeq is a simple type based on xs:string. Concrete subclasses
|
220
|
+
must restrict this type to something more sensible, such as a regular expression for
|
221
|
+
IUPAC single character symbols, or whitespace separated integers.
|
222
|
+
</xs:documentation>
|
223
|
+
</xs:annotation>
|
224
|
+
<xs:restriction base="xs:string"/>
|
225
|
+
</xs:simpleType>
|
226
|
+
|
227
|
+
<xs:simpleType name="AbstractTokenList">
|
228
|
+
<xs:annotation>
|
229
|
+
<xs:documentation>
|
230
|
+
AbstractTokenList is a simple type superclass for a compact character
|
231
|
+
data representations that consist of space-separated lists of tokens.
|
232
|
+
Examples of this are continuous character data (where the compact
|
233
|
+
representation is a list of space-separated floating point numbers) and
|
234
|
+
standard categorical data (which is represented as integers, which can be
|
235
|
+
> 9, and hence need to be space-separated).
|
236
|
+
</xs:documentation>
|
237
|
+
</xs:annotation>
|
238
|
+
<xs:list itemType="xs:double"/>
|
239
|
+
</xs:simpleType>
|
240
|
+
|
241
|
+
<xs:complexType name="AbstractSeqRow" abstract="true">
|
242
|
+
<xs:annotation>
|
243
|
+
<xs:documentation>
|
244
|
+
The AbstractSeqRow represents a single row in a matrix. The row
|
245
|
+
must refer to a previously declared taxon element by its id attribute (and must have
|
246
|
+
an id itself, may have a label, and may have dictionary attachments). The row
|
247
|
+
contains a single seq element with raw character data.
|
248
|
+
</xs:documentation>
|
249
|
+
</xs:annotation>
|
250
|
+
<xs:complexContent mixed="true">
|
251
|
+
<xs:extension base="TaxonLinked">
|
252
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
253
|
+
<xs:element name="seq" minOccurs="1" maxOccurs="1" type="xs:anySimpleType"/>
|
254
|
+
</xs:sequence>
|
255
|
+
</xs:extension>
|
256
|
+
</xs:complexContent>
|
257
|
+
</xs:complexType>
|
258
|
+
|
259
|
+
<xs:complexType name="AbstractObsRow" abstract="true" mixed="true">
|
260
|
+
<xs:annotation>
|
261
|
+
<xs:documentation>
|
262
|
+
The AbstractObsRow represents a single row in a matrix. The row
|
263
|
+
must refer to a previously declared taxon element by its id attribute (and must have
|
264
|
+
an id itself, may have a label, and may have dictionary attachments). The row
|
265
|
+
contains multiple obs elements.
|
266
|
+
</xs:documentation>
|
267
|
+
</xs:annotation>
|
268
|
+
<xs:complexContent mixed="true">
|
269
|
+
<xs:extension base="TaxonLinked">
|
270
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
271
|
+
<xs:element name="cell" minOccurs="1" maxOccurs="unbounded" type="AbstractObs"/>
|
272
|
+
</xs:sequence>
|
273
|
+
</xs:extension>
|
274
|
+
</xs:complexContent>
|
275
|
+
</xs:complexType>
|
276
|
+
|
277
|
+
<xs:complexType name="AbstractSeqMatrix" abstract="true" mixed="true">
|
278
|
+
<xs:annotation>
|
279
|
+
<xs:documentation>
|
280
|
+
The AbstractSeqMatrix super class is the abstract type for a
|
281
|
+
<matrix> element that contains rows which hold raw character sequences.
|
282
|
+
</xs:documentation>
|
283
|
+
</xs:annotation>
|
284
|
+
<xs:complexContent mixed="true">
|
285
|
+
<xs:extension base="Annotated">
|
286
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
287
|
+
<xs:element name="row" minOccurs="1" maxOccurs="unbounded" type="AbstractSeqRow"
|
288
|
+
/>
|
289
|
+
</xs:sequence>
|
290
|
+
</xs:extension>
|
291
|
+
</xs:complexContent>
|
292
|
+
</xs:complexType>
|
293
|
+
|
294
|
+
<xs:complexType name="AbstractObsMatrix" abstract="true" mixed="true">
|
295
|
+
<xs:annotation>
|
296
|
+
<xs:documentation>
|
297
|
+
The AbstractObsMatrix super class is the abstract type for a
|
298
|
+
<matrix> element that contains rows which hold granular state observations.
|
299
|
+
</xs:documentation>
|
300
|
+
</xs:annotation>
|
301
|
+
<xs:complexContent mixed="true">
|
302
|
+
<xs:extension base="Annotated">
|
303
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
304
|
+
<xs:element name="row" minOccurs="1" maxOccurs="unbounded" type="AbstractObsRow"
|
305
|
+
/>
|
306
|
+
</xs:sequence>
|
307
|
+
</xs:extension>
|
308
|
+
</xs:complexContent>
|
309
|
+
</xs:complexType>
|
310
|
+
|
311
|
+
<xs:complexType name="AbstractBlock" abstract="true"
|
312
|
+
sawsdl:modelReference="http://evolutionaryontology-dev.nescent.org/cdao.owl#CharacterStateDataMatrix">
|
313
|
+
<xs:annotation>
|
314
|
+
<xs:documentation>
|
315
|
+
The AbstractBlock is the superclass for blocks that contain
|
316
|
+
an element structure of type AbstractFormat.
|
317
|
+
</xs:documentation>
|
318
|
+
<xs:appinfo>Character_State_Data_Matrix</xs:appinfo>
|
319
|
+
</xs:annotation>
|
320
|
+
<xs:complexContent mixed="true">
|
321
|
+
<xs:extension base="TaxaLinked">
|
322
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
323
|
+
<xs:element name="format" minOccurs="0" maxOccurs="1" type="AbstractFormat"/>
|
324
|
+
</xs:sequence>
|
325
|
+
</xs:extension>
|
326
|
+
</xs:complexContent>
|
327
|
+
</xs:complexType>
|
328
|
+
|
329
|
+
<xs:complexType name="AbstractSeqs" abstract="true" mixed="true">
|
330
|
+
<xs:annotation>
|
331
|
+
<xs:documentation>
|
332
|
+
The AbstractSeqBlock type is the superclass for character blocks that
|
333
|
+
consist of raw character sequences.
|
334
|
+
</xs:documentation>
|
335
|
+
</xs:annotation>
|
336
|
+
<xs:complexContent mixed="true">
|
337
|
+
<xs:extension base="AbstractBlock">
|
338
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
339
|
+
<xs:element name="matrix" minOccurs="1" maxOccurs="1" type="AbstractSeqMatrix"/>
|
340
|
+
</xs:sequence>
|
341
|
+
</xs:extension>
|
342
|
+
</xs:complexContent>
|
343
|
+
</xs:complexType>
|
344
|
+
|
345
|
+
<xs:complexType name="AbstractCells" abstract="true">
|
346
|
+
<xs:annotation>
|
347
|
+
<xs:documentation>
|
348
|
+
The AbstractSeqBlock type is the superclass for character blocks that
|
349
|
+
consist of granular character state observations.
|
350
|
+
</xs:documentation>
|
351
|
+
</xs:annotation>
|
352
|
+
<xs:complexContent mixed="true">
|
353
|
+
<xs:extension base="AbstractBlock">
|
354
|
+
<xs:sequence minOccurs="1" maxOccurs="1">
|
355
|
+
<xs:element name="matrix" minOccurs="1" maxOccurs="1" type="AbstractObsMatrix"/>
|
356
|
+
</xs:sequence>
|
357
|
+
</xs:extension>
|
358
|
+
</xs:complexContent>
|
359
|
+
</xs:complexType>
|
360
|
+
|
361
|
+
</xs:schema>
|