Definition at line 1159 of file mainMonetTest.cpp. References Impala::Util::DatabaseReadString(), Impala::FileNameBase(), Impala::CmdOptions::GetArg(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetNrArg(), ILOG_ERROR, ILOG_INFO, ILOG_VAR, and Impala::Core::VideoSet::MakeVideoSet(). Referenced by mainMonetTest(). 01160 { 01161 ILOG_VAR(Impala.Samples.MonetTest.DoInsertModels); 01162 CmdOptions& options = CmdOptions::GetInstance(); 01163 if (options.GetNrArg() < 8) 01164 { 01165 ILOG_ERROR("Need more parameters"); 01166 return; 01167 } 01168 01169 String vidSetName = options.GetArg(4); 01170 String conceptSet = options.GetArg(5); 01171 String modelName = options.GetArg(6); 01172 String featureDef(options.GetArg(7)); 01173 01174 VideoSet* vidSet = Core::VideoSet::MakeVideoSet(vidSetName); 01175 String path = vidSet->GetFilePathAnnotation(conceptSet, false, false); 01176 if (path.empty()) 01177 return; 01178 KeywordList concepts; 01179 Util::Database* db = vidSet->GetDatabase(); 01180 Util::DatabaseReadString(std::back_inserter(concepts), path, db, true); 01181 01182 String q = "select i_add_feature('" + featureDef + "');"; 01183 ILOG_INFO("q = [" + q + "]"); 01184 conn->Query(q, false, false); 01185 01186 String vidSetBase = vidSet->GetSetNameBase(); 01187 String conceptSetBase = FileNameBase(conceptSet); 01188 for (int i=0 ; i<concepts.size() ; i++) 01189 { 01190 String q = "select i_add_model('" + vidSetBase + "', '" + 01191 conceptSetBase + "', '" + concepts[i] + "', '" + modelName + 01192 "', '" + featureDef + "');"; 01193 ILOG_INFO("q = [" + q + "]"); 01194 conn->Query(q, false, false); 01195 01196 // a model is also a set with itself as element 01197 q = "select i_add_model_sets('" + vidSetBase + "', '" + 01198 conceptSetBase + "', '" + concepts[i] + "', '" + modelName + 01199 "', '" + featureDef + "');"; 01200 ILOG_INFO("q = [" + q + "]"); 01201 conn->Query(q, false, false); 01202 q = "select i_add_model_to_set('" + vidSetBase + "', '" + 01203 conceptSetBase + "', '" + concepts[i] + "', '" + modelName + 01204 "', '" + featureDef + "', '" + featureDef + "');"; 01205 ILOG_INFO("q = [" + q + "]"); 01206 conn->Query(q, false, false); 01207 } 01208 }
Here is the call graph for this function:
|