Mercurial > hg > extraction-interface
diff models/extractapp.php @ 87:fb5049fc5dd7 extractapp_dev
New:(1)UI(2)generate simple regex by examples(3)coordinates in book metadata
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 02 Jun 2015 16:52:05 +0200 |
parents | 0141df465205 |
children | e681d693240e |
line wrap: on
line diff
--- a/models/extractapp.php Thu Apr 30 10:52:05 2015 +0200 +++ b/models/extractapp.php Tue Jun 02 16:52:05 2015 +0200 @@ -27,7 +27,9 @@ class ExtractappModel extends BaseModel{ protected $section_id = 0, $data_path, $file_id = 0, $current_fileId=0, - $branch_id = 0, $user_id = 0, $lg_text = "", $topic, $taglist_infile = "", $book_meta = "",$book_dynasty=""; + $branch_id = 0, $user_id = 0, $lg_text = "", $topic, $taglist_infile = "", + $book_meta = "", $book_dynasty = ""; + public $messages = array('info'=>"",'error'=>"",'warning'=>"",'debug'=>""); @@ -107,6 +109,12 @@ $book_meta->in_jibengujiku = $b['in_jibengujiku']; $book_meta->admin_type = $b['admin_type']; + $coordinates = $section_meta['section']['coordinates_books']; + $book_meta->x = $coordinates['x']; + $book_meta->y = $coordinates['y']; + $book_meta->place_name = $coordinates['place_name']; + + $this->book_meta = $book_meta; @@ -385,23 +393,26 @@ $book = $this->book_meta; $text .= "<book>\n"; - $text .= "<id>".$book->id."</id>\n"; - $text .= "<name>".$book->name."</name>\n"; - $text .= "<level1>".$book->level1."</level1>\n"; - $text .= "<level2>".$book->level2."</level2>\n"; - $text .= "<period>".$book->period."</period>\n"; - $text .= "<dynasty>".$book->dynasty."</dynasty>\n"; - $text .= "<start_year>".$book->start_year."</start_year>\n"; - $text .= "<end_year>".$book->end_year."</end_year>\n"; - $text .= "<line>".$book->line."</line>\n"; - $text .= "<volume>".$book->volume."</volume>\n"; - $text .= "<author>".$book->author."</author>\n"; - $text .= "<edition>".$book->edition."</edition>\n"; - $text .= "<in_jibengujiku>".$book->in_jibengujiku."</in_jibengujiku>\n"; - $text .= "<admin_type>".$book->admin_type."</admin_type>\n"; + $text .= "<id>".$book->id."</id>\n"; + $text .= "<name>".$book->name."</name>\n"; + $text .= "<level1>".$book->level1."</level1>\n"; + $text .= "<level2>".$book->level2."</level2>\n"; + $text .= "<period>".$book->period."</period>\n"; + $text .= "<dynasty>".$book->dynasty."</dynasty>\n"; + $text .= "<start_year>".$book->start_year."</start_year>\n"; + $text .= "<end_year>".$book->end_year."</end_year>\n"; + $text .= "<line>".$book->line."</line>\n"; + $text .= "<volume>".$book->volume."</volume>\n"; + $text .= "<author>".$book->author."</author>\n"; + $text .= "<edition>".$book->edition."</edition>\n"; + $text .= "<in_jibengujiku>".$book->in_jibengujiku."</in_jibengujiku>\n"; + $text .= "<admin_type>".$book->admin_type."</admin_type>\n"; + + $text .= "<place_name>".$book->place_name."</place_name>\n"; + $text .= "<x>".$book->x."</x>\n"; + $text .= "<y>".$book->y."</y>\n"; $text .= "</book>\n"; - /* foreach ($book as $b) { $text .= "<book>\n";