Definition at line 224 of file TrecTopic.h. References Impala::Util::XmlDoc::GetAttributeValue(), Impala::Util::XmlDoc::GetChildNode(), Impala::Util::XmlDoc::GetChildNodes(), Impala::Util::Database::GetInstance(), Impala::Util::Database::GetIOBuffer(), Impala::Persistency::File::GetReadBuffer(), ILOG_DEBUG, ILOG_INFO, mFileIdx, Impala::Core::Trec::SearchTopic::mNum, Impala::Core::Trec::SearchTopic::mText, mVideoEnd, mVideoSrc, mVideoStart, and Impala::Persistency::XmlFileReader::Read(). Referenced by TrecTopic(). 00225 { 00226 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00227 Util::Database& db = Util::Database::GetInstance(); 00228 Util::IOBuffer* ioBuf = db.GetIOBuffer(xmlFile, true, true, ""); 00229 #else // REPOSITORY_USED 00230 Persistency::FileLocator loc(xmlFile); 00231 typedef Persistency::RepositoryInFileSystem FS; 00232 Persistency::File file = FS::GetInstance().GetFile(loc, false, false); 00233 Util::IOBuffer* ioBuf = file.GetReadBuffer(true, ""); 00234 #endif // REPOSITORY_USED 00235 Persistency::XmlFileReader reader; 00236 DOMDocument* doc = reader.Read(xmlFile, ioBuf); 00237 delete ioBuf; 00238 DOMNode* root = GetChildNode(doc, "videoTopics", true); 00239 std::vector<DOMNode*> topics = GetChildNodes(root, "videoTopic"); 00240 ILOG_INFO("topics.size = " << topics.size()); 00241 int curFileIdx = 0; 00242 for (int t=0 ; t<topics.size() ; t++) 00243 { 00244 DOMNode* topic = topics[t]; 00245 String num = GetAttributeValue(topic, "num"); 00246 ILOG_DEBUG("num = " << num); 00247 mNum.push_back(num); 00248 DOMNode* textDesc = GetChildNode(topic, "textDescription", true); 00249 String text = GetAttributeValue(textDesc, "text"); 00250 ILOG_DEBUG(" text = " << text); 00251 mText.push_back(text); 00252 std::vector<String> src; 00253 std::vector<String> start; 00254 std::vector<String> end; 00255 std::vector<int> fileIdx; 00256 std::vector<DOMNode*> vidEx = GetChildNodes(topic, "videoExample"); 00257 ILOG_DEBUG("nr video examples = " << vidEx.size()); 00258 for (int i=0 ; i<vidEx.size() ; i++) 00259 { 00260 DOMNode* example = vidEx[i]; 00261 src.push_back(GetAttributeValue(example, "src")); 00262 start.push_back(GetAttributeValue(example, "start")); 00263 end.push_back(GetAttributeValue(example, "stop")); 00264 fileIdx.push_back(curFileIdx++); 00265 } 00266 mVideoSrc.push_back(src); 00267 mVideoStart.push_back(start); 00268 mVideoEnd.push_back(end); 00269 mFileIdx.push_back(fileIdx); 00270 } 00271 }
Here is the call graph for this function:
|