summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-18 16:32:23 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-18 16:32:23 +0100
commita36be9501898d3bd2b7c85c2225bff2217dcde72 (patch)
tree0e506a01aa6cabdc91d5fe0ce88259fec9c5d7b9 /data
parentdfca16e5fb6bd14462fef41c8c771e2f758c92d3 (diff)
restructured domains and deleted as many duplicates from testdata as possible.
Diffstat (limited to 'data')
-rw-r--r--data/domain/bibliography.osxml33
-rw-r--r--data/domain/meta.osxml14
2 files changed, 36 insertions, 11 deletions
diff --git a/data/domain/bibliography.osxml b/data/domain/bibliography.osxml
index 11e2606..5953e5f 100644
--- a/data/domain/bibliography.osxml
+++ b/data/domain/bibliography.osxml
@@ -12,16 +12,31 @@
<field name="bibliography" isSubtree="true"/>
</parentRef>
</struct>
-
<struct name="bibEntry">
- <primitive name="name" type="string" isSubtree="true"/>
- <primitive name="year" type="int" isSubtree="true"/>
- <primitive name="journal" type="string" isSubtree="true" optional="true"/>
- <primitive name="pages" type="cardinality" isSubtree="true" optional="true"/>
- <!-- Here a geographical enum or something would be more exact -->
- <primitive name="location" type="string" isSubtree="true" optional="true"/>
- <field name="authors" optional="true">
- <childRef ref="meta.author"/>
+ <field>
+ <childRef ref="meta.authors"/>
+ <childRef ref="title"/>
+ <childRef ref="year"/>
+ <childRef ref="journal"/>
+ <childRef ref="pages"/>
+ <childRef ref="location"/>
</field>
</struct>
+ <struct name="title" cardinality="{1}">
+ <primitive type="string"/>
+ </struct>
+ <struct name="year" cardinality="{1}">
+ <primitive type="int"/>
+ </struct>
+ <struct name="journal" cardinality="{0-1}">
+ <!-- here some kind of database reference would be better -->
+ <primitive type="string"/>
+ </struct>
+ <struct name="pages" cardinality="{0-1}">
+ <primitive type="cardinality"/>
+ </struct>
+ <struct name="location" cardinality="{0-1}">
+ <!-- here some kind of database reference would be better -->
+ <primitive type="string"/>
+ </struct>
</domain>
diff --git a/data/domain/meta.osxml b/data/domain/meta.osxml
index 67ba1c9..d214921 100644
--- a/data/domain/meta.osxml
+++ b/data/domain/meta.osxml
@@ -21,14 +21,24 @@
<!-- One could also include "article" and other things here -->
</struct>
- <!-- no explicit cardinality, because we might have multiple authors -->
- <struct name="author">
+ <struct name="person">
<primitive isSubtree="true" name="firstName" type="string"/>
<primitive isSubtree="true" name="lastName" type="string"/>
<primitive isSubtree="true" name="email" type="email" optional="true"/>
<primitive isSubtree="true" name="affiliation" type="affiliation" optional="true"/>
</struct>
+ <!-- wrapper author tag to allow specifying no authors whatsoever. But if
+ an author is specified it has to be at least one primary author. -->
+ <struct name="authors" transparent="true" cardinality="{0-1}">
+ <field>
+ <childRef ref="author"/>
+ </field>
+ </struct>
+
+ <!-- no explicit cardinality, because we might have multiple authors -->
+ <struct name="author" isa="person"/>
+
<!-- but we need at least one primary author -->
<struct name="primaryAuthor" cardinality="{>0}" isa="author"/>