Definition at line 1212 of file mainMonetTest.cpp. References Impala::Util::DatabaseReadString(), Impala::FileNameBase(), Impala::CmdOptions::GetArg(), Impala::Core::Database::RawDataSet::GetDatabase(), Impala::Core::Database::RawDataSet::GetFilePathAnnotation(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetNrArg(), Impala::Core::Database::RawDataSet::GetSetNameBase(), ILOG_ERROR, ILOG_INFO, ILOG_VAR, and Impala::Core::VideoSet::MakeVideoSet(). Referenced by mainMonetTest(). 01213 { 01214 ILOG_VAR(Impala.Samples.MonetTest.DoInsertModelSets); 01215 CmdOptions& options = CmdOptions::GetInstance(); 01216 if (options.GetNrArg() < 9) 01217 { 01218 ILOG_ERROR("Need more parameters"); 01219 return; 01220 } 01221 01222 String vidSetName = options.GetArg(4); 01223 String conceptSet = options.GetArg(5); 01224 String modelName = options.GetArg(6); 01225 String modelSetName = options.GetArg(7); 01226 std::vector<String> featureDefs; 01227 for (int i=8 ; i<options.GetNrArg() ; i++) 01228 featureDefs.push_back(options.GetArg(i)); 01229 01230 VideoSet* vidSet = Core::VideoSet::MakeVideoSet(vidSetName); 01231 String path = vidSet->GetFilePathAnnotation(conceptSet, false, false); 01232 if (path.empty()) 01233 return; 01234 KeywordList concepts; 01235 Util::Database* db = vidSet->GetDatabase(); 01236 Util::DatabaseReadString(std::back_inserter(concepts), path, db, true); 01237 01238 String vidSetBase = vidSet->GetSetNameBase(); 01239 String conceptSetBase = FileNameBase(conceptSet); 01240 for (int i=0 ; i<concepts.size() ; i++) 01241 { 01242 String q = "select i_add_model_sets('" + vidSetBase + "', '" + 01243 conceptSetBase + "', '" + concepts[i] + "', '" + modelName + 01244 "', '" + modelSetName + "');"; 01245 ILOG_INFO("q = [" + q + "]"); 01246 conn->Query(q, false, false); 01247 01248 String baseQ = "select i_add_model_to_set('" + vidSetBase + "', '" + 01249 conceptSetBase + "', '" + concepts[i] + "', '" + modelName + 01250 "', '" + modelSetName + "', '"; 01251 for (int f=0 ; f<featureDefs.size() ; f++) 01252 { 01253 String q = baseQ + featureDefs[f] + "');"; 01254 ILOG_INFO("q = [" + q + "]"); 01255 conn->Query(q, false, false); 01256 } 01257 } 01258 }
Here is the call graph for this function:
|