Set field types and serialize as koral:fields
Change-Id: I6f256fcbf3996e6ae45db60bc3aef98ff431b0b9
diff --git a/t/real/lwc.t b/t/real/lwc.t
index d69e3d2..1c104a5 100644
--- a/t/real/lwc.t
+++ b/t/real/lwc.t
@@ -30,37 +30,37 @@
is($doc->corpus_sigle, 'WPD17', 'Correct corpus sigle');
my $meta = $doc->meta;
-is($meta->{title}, '0er', 'Title');
-is($meta->{pub_place}, 'URL:http://de.wikipedia.org', 'PubPlace');
-is($meta->{pub_date}, '20170701', 'Creation Date');
-ok(!$meta->{sub_title}, 'SubTitle');
-is($meta->{author}, 'Rogi.Official, u.a.', 'Author');
+is($meta->{T_title}, '0er', 'Title');
+is($meta->{S_pub_place}, 'URL:http://de.wikipedia.org', 'PubPlace');
+is($meta->{D_pub_date}, '20170701', 'Creation Date');
+ok(!$meta->{T_sub_title}, 'SubTitle');
+is($meta->{T_author}, 'Rogi.Official, u.a.', 'Author');
-is($meta->{publisher}, 'Wikipedia', 'Publisher');
-is($meta->{editor},'wikipedia.org', 'Editor');
+is($meta->{A_publisher}, 'Wikipedia', 'Publisher');
+is($meta->{A_editor},'wikipedia.org', 'Editor');
ok(!$meta->{translator}, 'Translator');
-is($meta->{text_type}, 'Enzyklopädie', 'Correct Text Type');
-is($meta->{text_type_art}, 'Enzyklopädie-Artikel', 'Correct Text Type Art');
-ok(!$meta->{text_type_ref}, 'Correct Text Type Ref');
-ok(!$meta->{text_column}, 'Correct Text Column');
-ok(!$meta->{text_domain}, 'Correct Text Domain');
-is($meta->{creation_date},'20150511', 'Creation Date');
+is($meta->{S_text_type}, 'Enzyklopädie', 'Correct Text Type');
+is($meta->{S_text_type_art}, 'Enzyklopädie-Artikel', 'Correct Text Type Art');
+ok(!$meta->{S_text_type_ref}, 'Correct Text Type Ref');
+ok(!$meta->{S_text_column}, 'Correct Text Column');
+ok(!$meta->{S_text_domain}, 'Correct Text Domain');
+is($meta->{D_creation_date},'20150511', 'Creation Date');
ok(!$meta->{pages}, 'Pages');
-ok(!$meta->{file_edition_statement}, 'File Ed Statement');
-ok(!$meta->{bibl_edition_statement}, 'Bibl Ed Statement');
-is($meta->{reference}, '0er, In: Wikipedia - URL:http://de.wikipedia.org/wiki/0er: Wikipedia, 2017', 'Reference');
-is($meta->{language}, 'de', 'Language');
+ok(!$meta->{A_file_edition_statement}, 'File Ed Statement');
+ok(!$meta->{A_bibl_edition_statement}, 'Bibl Ed Statement');
+is($meta->{A_reference}, '0er, In: Wikipedia - URL:http://de.wikipedia.org/wiki/0er: Wikipedia, 2017', 'Reference');
+is($meta->{S_language}, 'de', 'Language');
-is($meta->{corpus_title}, 'Wikipedia', 'Correct Corpus title');
-ok(!$meta->{corpus_sub_title}, 'Correct Corpus Sub title');
-ok(!$meta->{corpus_author}, 'Correct Corpus author');
-is($meta->{corpus_editor}, 'wikipedia.org', 'Correct Corpus editor');
+is($meta->{T_corpus_title}, 'Wikipedia', 'Correct Corpus title');
+ok(!$meta->{T_corpus_sub_title}, 'Correct Corpus Sub title');
+ok(!$meta->{T_corpus_author}, 'Correct Corpus author');
+is($meta->{A_corpus_editor}, 'wikipedia.org', 'Correct Corpus editor');
-is($meta->{doc_title}, 'Wikipedia, Artikel mit Anfangszahl 0, Teil 00', 'Correct Doc title');
-ok(!$meta->{doc_sub_title}, 'Correct Doc Sub title');
-ok(!$meta->{doc_author}, 'Correct Doc author');
-ok(!$meta->{doc_editor}, 'Correct Doc editor');
+is($meta->{T_doc_title}, 'Wikipedia, Artikel mit Anfangszahl 0, Teil 00', 'Correct Doc title');
+ok(!$meta->{T_doc_sub_title}, 'Correct Doc Sub title');
+ok(!$meta->{T_doc_author}, 'Correct Doc author');
+ok(!$meta->{A_doc_editor}, 'Correct Doc editor');
# Tokenization
use_ok('KorAP::XML::Tokenizer');
@@ -112,11 +112,11 @@
$meta = $doc->meta;
-is($meta->{doc_title}, 'Wikipedia, Artikel mit Anfangszahl 0, Teil 60', 'No doc title');
+is($meta->{T_doc_title}, 'Wikipedia, Artikel mit Anfangszahl 0, Teil 60', 'No doc title');
ok(!exists $meta->{translator}, 'No translator');
-is($meta->{text_class}->[0], 'staat-gesellschaft', 'text class');
-is($meta->{text_class}->[1], 'verbrechen', 'text class');
+is($meta->{K_text_class}->[0], 'staat-gesellschaft', 'text class');
+is($meta->{K_text_class}->[1], 'verbrechen', 'text class');