Added struct support and PTI

Change-Id: Ia418958e1c26f2c83026c29089be806cad157762
diff --git a/t/index/corpus/doc/header.xml b/t/index/corpus/doc/header.xml
new file mode 100644
index 0000000..7a73824
--- /dev/null
+++ b/t/index/corpus/doc/header.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-model href="header.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
+<!DOCTYPE idsCorpus PUBLIC "-//IDS//DTD IDS-XCES 1.0//EN" "http://corpora.ids-mannheim.de/idsxces1/DTD/ids.xcesdoc.dtd">
+<idsHeader type="document" pattern="text" status="new" version="1.1" TEIform="teiHeader">
+  <fileDesc>
+    <titleStmt>
+      <dokumentSigle>Corpus/Text</dokumentSigle>
+      <d.title>Beispiel Dokument</d.title>
+    </titleStmt>
+    <publicationStmt>
+      <distributor/>
+      <pubAddress/>
+      <availability region="world">QAO-NC</availability>
+      <pubDate/>
+    </publicationStmt>
+    <sourceDesc>
+      <biblStruct>
+        <monogr>
+          <h.title type="main"/>
+          <edition>
+            <further/>
+            <kind/>
+            <appearance/>
+          </edition>
+          <imprint/>
+        </monogr>
+      </biblStruct>
+    </sourceDesc>
+  </fileDesc>
+  <profileDesc>
+    <creation>
+      <creatDate>1827-1842</creatDate>
+      <creatRef>(Erstveröffentlichung: Stuttgart ; Tübingen, 1827-1842)</creatRef>
+      <creatRefShort>(Erstv. 1827-1842)</creatRefShort>
+    </creation>
+    <textDesc>
+      <textType>Aphorismus</textType>
+      <textTypeRef>Aphorismen</textTypeRef>
+    </textDesc>
+  </profileDesc>
+</idsHeader>
diff --git a/t/index/corpus/doc/text/base/paragraph.xml b/t/index/corpus/doc/text/base/paragraph.xml
new file mode 100644
index 0000000..be19d62
--- /dev/null
+++ b/t/index/corpus/doc/text/base/paragraph.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-model href="span.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
+
+<layer docid="ART_00001" xmlns="http://ids-mannheim.de/ns/KorAP" version="KorAP-0.4">
+  <spanList>
+    <span from="0" to="129" />
+  </spanList>
+</layer>
diff --git a/t/index/corpus/doc/text/base/sentences.xml b/t/index/corpus/doc/text/base/sentences.xml
new file mode 100644
index 0000000..be19d62
--- /dev/null
+++ b/t/index/corpus/doc/text/base/sentences.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-model href="span.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
+
+<layer docid="ART_00001" xmlns="http://ids-mannheim.de/ns/KorAP" version="KorAP-0.4">
+  <spanList>
+    <span from="0" to="129" />
+  </spanList>
+</layer>
diff --git a/t/index/corpus/doc/text/data.xml b/t/index/corpus/doc/text/data.xml
new file mode 100644
index 0000000..6b5af0f
--- /dev/null
+++ b/t/index/corpus/doc/text/data.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-model href="text.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
+
+<raw_text docid="ART_ABC.00001" xmlns="http://ids-mannheim.de/ns/KorAP">
+  <metadata file="metadata.xml" />
+  <text>Zum letzten kulturellen Anlass lädt die Leitung des Schulheimes Hofbergli ein, bevor der Betrieb Ende Schuljahr eingestellt wird.</text>
+</raw_text>
diff --git a/t/index/corpus/doc/text/header.xml b/t/index/corpus/doc/text/header.xml
new file mode 100644
index 0000000..fb770f7
--- /dev/null
+++ b/t/index/corpus/doc/text/header.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<?xml-model href="header.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
+<!DOCTYPE idsCorpus PUBLIC "-//IDS//DTD IDS-XCES 1.0//EN" "http://corpora.ids-mannheim.de/idsxces1/DTD/ids.xcesdoc.dtd">
+<idsHeader type="text" pattern="text" status="new" version="1.1" TEIform="teiHeader">
+  <fileDesc>
+    <titleStmt>
+      <textSigle>Corpus/Doc.Text</textSigle>
+      <t.title assemblage="regular"/>
+    </titleStmt>
+    <publicationStmt>
+      <distributor/>
+      <pubAddress/>
+      <availability region="world" status="unknown"/>
+      <pubDate/>
+    </publicationStmt>
+    <sourceDesc>
+      <biblStruct>
+        <analytic>
+          <h.title type="main">Beispiel Text</h.title>
+	  <h.title type="sub">Beispiel Text Untertitel</h.title>
+          <h.author>Mustermann, Max</h.author>
+	  <editor>Monkika Mustermann</editor>
+          <imprint/>
+          <biblScope type="pp"/>
+          <biblScope type="suppl"/>
+          <biblScope type="suppltitle"/>
+          <biblNote n="1"/>
+        </analytic>
+        <monogr>
+	  <h.title type="main">Beispiel Text</h.title>
+          <h.title type="sub">Best of!</h.title>
+          <h.author>Mustermann, Max</h.author>
+          <editor>Monika Mustermann</editor>
+          <imprint>
+            <publisher>Artificial articles Inc.</publisher>
+            <pubDate type="year">2001</pubDate>
+            <pubDate type="month">04</pubDate>
+            <pubDate type="day">02</pubDate>
+	    <pubPlace>Mannheim</pubPlace>
+          </imprint>
+          <biblScope type="issue"/>
+          <biblScope type="issueplace"/>
+        </monogr>
+      </biblStruct>
+      <reference type="complete" assemblage="regular"/>
+      <reference type="short" assemblage="regular"/>
+    </sourceDesc>
+  </fileDesc>
+  <profileDesc>
+    <creation>
+      <creatDate>1999.06.01</creatDate>
+    </creation>
+    <textClass>
+      <catRef n="1" target="topic.freizeit-unterhaltung.vereine-veranstaltungen" scheme="topic"/>
+      <h.keywords>
+        <keyTerm/>
+      </h.keywords>
+    </textClass>
+    <textDesc>
+      <textType>Zeitung: Tageszeitung</textType>
+      <textTypeArt>Bericht</textTypeArt>
+      <textDomain/>
+      <column/>
+    </textDesc>
+  </profileDesc>
+</idsHeader>
diff --git a/t/index/corpus/doc/text/opennlp/tokens.xml b/t/index/corpus/doc/text/opennlp/tokens.xml
new file mode 100644
index 0000000..b181a49
--- /dev/null
+++ b/t/index/corpus/doc/text/opennlp/tokens.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?><?xml-model href="span.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?><layer xmlns="http://ids-mannheim.de/ns/KorAP" docid="ART_00001" VERSION="KorAP-0.4">
+<spanList>
+      <span id="s_7" from="0" to="3"/>
+      <span id="s_8" from="4" to="11"/>
+      <span id="s_9" from="12" to="23"/>
+      <span id="s_10" from="24" to="30"/>
+      <span id="s_11" from="31" to="35"/>
+      <span id="s_12" from="36" to="39"/>
+      <span id="s_13" from="40" to="47"/>
+      <span id="s_14" from="48" to="51"/>
+      <span id="s_15" from="52" to="63"/>
+      <span id="s_16" from="64" to="73"/>
+      <span id="s_17" from="74" to="77"/>
+      <span id="s_18" from="77" to="78"/>
+      <span id="s_19" from="79" to="84"/>
+      <span id="s_20" from="85" to="88"/>
+      <span id="s_21" from="89" to="96"/>
+      <span id="s_22" from="97" to="101"/>
+      <span id="s_23" from="102" to="111"/>
+      <span id="s_24" from="112" to="123"/>
+      <span id="s_25" from="124" to="128"/>
+      <span id="s_26" from="128" to="129"/>
+   </spanList>
+</layer>