Skip to content

Commit fdddb95

Browse files
authored
Merge pull request #56 from duncdrum/0.6-cleanup
0.6 mila
2 parents 1411079 + 66236be commit fdddb95

30 files changed

+12747
-41786
lines changed

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# CBDB in TEI
2+
<img src="icon.png" align="left" width="25%"/>
3+
4+
*CBDB in TEI* brings the data of the [China Biographical Database](http://projects.iq.harvard.edu/cbdb/home)
5+
to [eXist-db](http://exist-db.org/exist/apps/homepage/index.html) by converting it into [TEI](http://www.tei-c.org/index.xml).
6+
7+
Currently, the application focuses on the data conversion, and integration of the contents with other TEI tools in exist-db.
8+
For a more detailed account please consult the [Documentation](#documentation) below. Future updates will bring the familiar query
9+
tools of *CBDB* to the browser along with means for exporting and visualizing the data.
10+
Because *CBDB* consists of roughly ~350k records, users are strongly encouraged to use *cbdb in TEI* in combination with an xml database, see [installation](#installation) below.
11+
12+
The current release ``0.6`` is based on the ``20150202`` version of *CBDB*.
13+
14+
## Requirements
15+
* eXist-db version ``2.2 <`` with min. ``2gb`` (!) allocated memory.
16+
* (ant version ``1.10.1`` for compiling from source)
17+
18+
## Releases
19+
Releases have three flavors: [full](#full), [develop](#develop), and [data pack](#data-pack).
20+
21+
### Full
22+
This is the default version for most users. It contains the xQuery conversion modules, and the complete TEI files.
23+
But not the CBDB's source files, the index configuration is adapted accordingly.
24+
25+
### Develop
26+
The develop version has both source and converted files. It also contains indexes for both kind of files.
27+
This version is only of interest to users wishing to experiment with the transformation itself.
28+
29+
### Data pack
30+
A zip file with just the TEI files.
31+
32+
## Installation
33+
1. Download either "-dev" or "-full" ``.xar`` from the [releases](https://github.com/duncdrum/cbdb-data/releases) page.
34+
2. Go to your running eXist-db and open package manager from the dashboard.
35+
1. Click on the "add package" symbol in the upper left corner and select the ``.xar`` file you just downloaded.
36+
37+
### Building from source
38+
1. Download, fork or clone this GitHub repository
39+
1. To compile the develop version from source, you need to add your own copy of CBDB's source files as xml in:``cbdb-data/src/xml``
40+
2. In your CLI, go to the folder you just downloaded:``cd cbdb-data``
41+
3. now call ant:``ant`` after a few minutes you should see:``BUILD SUCCESSFUL``
42+
4. Go to your running eXist-db and open package manager from the dashboard.
43+
1. Click on the "add package" symbol in the upper left corner and select the ``.xar`` file you just created which is inside the ``/build`` folder.
44+
45+
46+
## Documentation
47+
* [TEI encoding guidelines](doc/encoding-desc.md)
48+
* [Function documentation](doc/function-doc.md)

build.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
<xmlproperty file="expath-pkg.xml"/>
44
<property name="project.version" value="${package(version)}"/>
55
<property name="project.app" value="cbdb-data"/>
6+
<property name="teiTitle" value="cbdbTEI"/>
67
<property name="build.dir" value="build"/>
78
<target name="xar">
89
<mkdir dir="${build.dir}"/>
9-
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}.xar" excludes="${build.dir}/*"/>
10+
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}-dev.xar" excludes="${build.dir}/*, src/xml/*.md"/>
11+
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}-full.xar" excludes="${build.dir}/*, src/xml/*.xml"/>
12+
<zip basedir="." destfile="${build.dir}/${teiTitle}-${project.version}.zip" includes="target/**"/>
1013
</target>
1114
</project>

collection.xconf

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
11
<collection xmlns="http://exist-db.org/collection-config/1.0">
22
<index xmlns:no="http://none" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
3-
<!--Lucene -->
3+
<!-- Lucene -->
44
<lucene>
55
<text qname="no:c_notes"/>
66
<text qname="no:c_event"/>
77
</lucene>
88
<range>
9+
<!-- TEI -->
10+
<!-- names -->
11+
<create qname="tei:persName" type="xs:string"/>
12+
<create qname="tei:roleName" type="xs:string"/>
13+
<create qname="tei:surname" type="xs:string"/>
14+
<create qname="tei:forename" type="xs:string"/>
15+
<create qname="tei:addName" type="xs:string"/>
16+
<create qname="tei:orgName" type="xs:string"/>
17+
<create qname="tei:placeName" type="xs:string"/>
18+
<create qname="tei:title" type="xs:string"/>
19+
20+
<!-- general-->
21+
<create qname="tei:catDesc" type="xs:string"/>
22+
<create qname="tei:desc" type="xs:string"/>
23+
<create qname="tei:term" type="xs:string"/>
24+
<create qname="tei:note" type="xs:string"/>
25+
<create qname="tei:label" type="xs:string"/>
26+
27+
<!-- ref attributes -->
28+
<create qname="@n" type="xs:string"/>
29+
<create qname="@ana" type="xs:string"/>
30+
<create qname="@type" type="xs:string"/>
31+
<create qname="@ref" type="xs:string"/>
32+
<create qname="@target" type="xs:string"/>
33+
<create qname="@sameAs" type="xs:string"/>
34+
35+
<!-- numerical -->
36+
<create qname="tei:date" type="xs:string"/>
37+
<create qname="@when" type="xs:string"/>
38+
<create qname="tei:geo" type="xs:double"/>
39+
40+
<!-- CBDB SOURCE FILES -->
941
<create qname="no:c_personid" type="xs:integer"/>
1042
<create qname="no:c_name" type="xs:string"/>
1143
<create qname="no:c_name_chn" type="xs:string"/>
1244
<create qname="no:c_db_id" type="xs:integer"/>
1345
<create qname="no:c_sequence" type="xs:integer"/>
14-
<!--date type data -->
46+
<!--date type data -->
1547
<create qname="no:c_dy" type="xs:integer"/>
1648
<create qname="no:c_dynasty" type="xs:string"/>
1749
<create qname="no:c_dynasty_chn" type="xs:string"/>
@@ -24,13 +56,13 @@
2456
<create qname="no:c_end" type="xs:integer"/>
2557
<create qname="no:c_firstyear" type="xs:integer"/>
2658
<create qname="no:c_lastyear" type="xs:integer"/>
27-
<!-- direct link to BIOG_MAIN -->
59+
<!-- direct link to BIOG_MAIN -->
2860
<create qname="no:c_alt_name_type_code" type="xs:integer"/>
2961
<create qname="no:c_name_type_code" type="xs:integer"/>
3062
<create qname="no:c_choronym_code" type="xs:integer"/>
3163
<create qname="no:c_ethnicity_code" type="xs:integer"/>
3264
<create qname="no:c_household_status_code" type="xs:integer"/>
33-
<!-- text related items -->
65+
<!-- text related items -->
3466
<create qname="no:c_source" type="xs:integer"/>
3567
<create qname="no:c_pages" type="xs:string"/><!--not all c_pages can be cast as integer -->
3668
<create qname="no:c_textid" type="xs:integer"/>
@@ -42,7 +74,7 @@
4274
<create qname="no:c_text_year" type="xs:integer"/>
4375
<create qname="no:c_role_id" type="xs:integer"/>
4476
<create qname="no:c_text_cat_code" type="xs:integer"/>
45-
<!--relationships -->
77+
<!--relationships -->
4678
<create qname="no:c_kin_id" type="xs:integer"/>
4779
<create qname="no:c_kin_code" type="xs:integer"/>
4880
<create qname="no:c_kincode" type="xs:integer"/>
@@ -71,20 +103,20 @@
71103
<create qname="no:c_office_category_id" type="xs:integer"/>
72104
<create qname="no:c_assume_office_code" type="xs:integer"/>
73105
<create qname="no:c_appt_type_code" type="xs:integer"/>
74-
<!-- Places -->
106+
<!-- Places -->
75107
<create qname="no:c_place_id" type="xs:integer"/>
76108
<create qname="no:c_addr_id" type="xs:integer"/>
77109
<create qname="no:c_addr_type" type="xs:integer"/>
78110
<create qname="no:c_country_code" type="xs:integer"/>
79111
<create qname="no:c_inst_addr_id" type="xs:integer"/>
80112

81-
<!-- Stand-in for geo-spatial index -->
113+
<!-- Stand-in for geo-spatial index -->
82114
<create qname="no:x_coord" type="xs:double"/>
83115
<create qname="no:y_coord" type="xs:double"/>
84116
<create qname="no:inst_xcoord" type="xs:double"/>
85117
<create qname="no:inst_ycoord" type="xs:double"/>
86118

87-
<!-- primary keys to seldomly used data -->
119+
<!-- primary keys to seldomly used data -->
88120
<create qname="no:c_bi_role_code" type="xs:integer"/>
89121
<create qname="no:c_measure_code" type="xs:integer"/>
90122
<create qname="no:c_occasion_code" type="xs:integer"/>

0 commit comments

Comments
 (0)