Mercurial > hg > extraction-interface
comparison controllers/extractapp.php @ 53:f9594c240826 extractapp
get/update text after saving, for xml file consistency
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Thu, 26 Mar 2015 17:25:46 +0100 |
| parents | 886f43b26ee2 |
| children | 5cf9720a2e25 |
comparison
equal
deleted
inserted
replaced
| 52:94064f625650 | 53:f9594c240826 |
|---|---|
| 25 case 'SaveFullTextToLGService': | 25 case 'SaveFullTextToLGService': |
| 26 $viewmodel->messages .= "SaveFullTextToLGService! "."<br>"; | 26 $viewmodel->messages .= "SaveFullTextToLGService! "."<br>"; |
| 27 $viewmodel->GetInfoFromPreviousPage($this->postdata); | 27 $viewmodel->GetInfoFromPreviousPage($this->postdata); |
| 28 $response = $viewmodel->SaveFullTextToLGService($this->postdata); | 28 $response = $viewmodel->SaveFullTextToLGService($this->postdata); |
| 29 $viewmodel->UpdateInfoByResponseFromLGService($response); // update file_id, branch_id, user_id | 29 $viewmodel->UpdateInfoByResponseFromLGService($response); // update file_id, branch_id, user_id |
| 30 // TODO: GetTextFromFileId?? reload saved file from LGService, necessary! | |
| 31 $viewmodel->GetTextFromFileId(); | |
| 30 $this->ReturnView($viewmodel->StartTagging(), true); | 32 $this->ReturnView($viewmodel->StartTagging(), true); |
| 31 break; | 33 break; |
| 32 | 34 |
| 33 case 'SmartRegexLoad': | 35 case 'SmartRegexLoad': |
| 34 $viewmodel->SmartRegexLoad($this->postdata['topic_id']); | 36 $viewmodel->SmartRegexLoad($this->postdata['topic_id']); |
| 53 default: // first time visit extraction interface from LGService | 55 default: // first time visit extraction interface from LGService |
| 54 $viewmodel->messages .= "Welcome to Extraction Interface. "."<br>"; | 56 $viewmodel->messages .= "Welcome to Extraction Interface. "."<br>"; |
| 55 | 57 |
| 56 if ($this->postdata['fileId'] != 0) { // ($this->postdata['branchId'] != 0) { | 58 if ($this->postdata['fileId'] != 0) { // ($this->postdata['branchId'] != 0) { |
| 57 // get text from fileId, from LGService | 59 // get text from fileId, from LGService |
| 58 $viewmodel->GetTextFromFileId($this->postdata); | 60 $viewmodel->GetInfoFromPreviousPage($this->postdata); |
| 61 $viewmodel->GetTextFromFileId(); | |
| 62 | |
| 59 } else if ($this->postdata['sectionId'] != 0 && $this->postdata['userId'] != 0) { | 63 } else if ($this->postdata['sectionId'] != 0 && $this->postdata['userId'] != 0) { |
| 60 // get text from sectionId from LGService | 64 // get text from sectionId from LGService |
| 61 $viewmodel->GetTextFromSectionId($this->postdata); | 65 $viewmodel->GetInfoFromPreviousPage($this->postdata); |
| 66 $viewmodel->GetTextFromSectionId(); | |
| 67 | |
| 62 } else if ($this->postdata['sectionId'] != 0) { | 68 } else if ($this->postdata['sectionId'] != 0) { |
| 63 $viewmodel->GetTextFromLocal($this->postdata['sectionId']); | 69 $viewmodel->GetTextFromLocal($this->postdata['sectionId']); |
| 64 | 70 |
| 65 } else if (is_numeric($this->urlvalues['id'])) { | 71 } else if (is_numeric($this->urlvalues['id'])) { |
| 66 // get text from local file system (for development stage only) | 72 // get text from local file system (for development stage only) |
