~zorba-coders/zorba/QT_driver_fixes

« back to all changes in this revision

Viewing changes to test/driver/testuriresolver.cpp

  • Committer: sorin.marian.nasoi
  • Date: 2013-08-06 16:39:51 UTC
  • mfrom: (11547.2.36 lp_zorba)
  • Revision ID: spungi@gmail.com-20130806163951-ad2k2v2914sbqr3f
-merged lp:zorba trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
286
286
/******************************************************************************
287
287
  Collection Resolver
288
288
*******************************************************************************/
289
 
TestCollectionURIMapper::TestCollectionURIMapper (
290
 
  const char * file,
291
 
  const std::string& rbkt_src_dir )
292
 
  : theMapFileName(file),
293
 
    theRbktSrcFile(rbkt_src_dir)
 
289
TestCollectionURIMapper::TestCollectionURIMapper(
 
290
    zorba::XmlDataManager* xmlDataMgr,
 
291
    const char * file,
 
292
    const std::string& rbkt_src_dir)
 
293
  :
 
294
  theXmlDataMgr(xmlDataMgr),
 
295
  theMapFileName(file),
 
296
  theRbktSrcFile(rbkt_src_dir)
294
297
{
295
298
}
296
299
 
 
300
 
297
301
TestCollectionURIMapper::~TestCollectionURIMapper ()
298
302
{
299
303
300
304
 
 
305
 
301
306
void
302
307
std_string_tokenize(
303
308
    const std::string& aStr,
375
380
  if ( it != theMap.end() )
376
381
  {
377
382
    const std::vector<std::string>& target = it->second;
378
 
    XmlDataManager* lDataManager = Zorba::getInstance(0)->getXmlDataManager();
379
383
    ItemFactory* lFactory = Zorba::getInstance(0)->getItemFactory();
380
 
    CollectionManager* lMgr = lDataManager->getW3CCollectionManager();
 
384
    CollectionManager* lMgr = theXmlDataMgr->getW3CCollectionManager();
381
385
 
382
386
    Item lColName = lFactory->createAnyURI(request);
383
387
 
392
396
        std::ifstream lIn(lIter->c_str());
393
397
        assert(lIn.good());
394
398
 
395
 
        Item lDoc = lDataManager->parseXML(lIn);
 
399
        Item lDoc = theXmlDataMgr->parseXML(lIn);
396
400
 
397
401
        lColl->insertNodesLast(new SingletonItemSequence(lDoc));
398
402
      }