Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

VideoSet* Impala::Persistency::VideoSetRepositoryInMonet::Get ( const Locator loc  )  [inline]

Definition at line 25 of file VideoSetRepositoryInMonet.h.

References Impala::Core::Database::RawDataSet::AddFile(), Impala::FileNameBase(), Impala::Persistency::RepositoryInMonetDB::GetConnection(), Impala::Persistency::Locator::GetDataSet(), Impala::Core::VideoSet::VideoSet::GetQuidVideo(), ILOG_ERROR, Impala::QuidId(), and RepMonet().

00026     {
00027         Connection* conn = RepMonet().GetConnection(loc);
00028 
00029         String vidSetBase = FileNameBase(loc.GetDataSet());
00030         String query =
00031             "select f.filename, f.quid \
00032              from   file f, video_set vs, video_sets vss \
00033              where  vss.set_name = '" + vidSetBase + "' and \
00034                     vs.video_sets_id = vss.video_sets_id and \
00035                     f.file_id = vs.file_id \
00036              order by f.quid;";
00037 
00038         MapiHdl hdl = conn->QueryPartStart(query);
00039         if (hdl == 0)
00040             return 0;
00041 
00042         std::vector<String> fName;
00043         if (!conn->QueryPartFetchString(hdl, 0, fName))
00044             return 0;
00045 
00046         Quid* quid = 0;
00047         int quidSize = 0;
00048         if (!conn->QueryPartFetchULL(hdl, 1, quid, quidSize))
00049             return 0;
00050 
00051         conn->QueryPartEnd(hdl);
00052 
00053         VideoSet* vidSet = new VideoSet(loc.GetDataSet());
00054         for (int i=0 ; i<fName.size() ; i++)
00055         {
00056             int fileId = QuidId(quid[i]);
00057             vidSet->AddFile(fName[i], fileId);
00058             if (vidSet->GetQuidVideo(i, true) != quid[i])
00059                 ILOG_ERROR("Quid " << i << " doesn't match");
00060         }
00061         delete quid;
00062         return vidSet;
00063     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:37:18 2010 for ImpalaSrc by  doxygen 1.5.1