Ejemplo n.º 1
0
function handleUTDOKTYPE($srcBase, $uttrekkMySQLBase, $tableName, $logger)
{
    echo "\t handling UTDOKTYPE ... ";
    $logger->log("UTDOKTYPE.XML", "Started processing UTDOKTYPE(" . $tableName . ")", Constants::LOG_PROCESSINGINFO);
    $utvDokTypeDAO = new UtDokTypDAO($srcBase, $uttrekkMySQLBase, $tableName, $logger);
    $utvDokTypeDAO->processTable();
    $issues = $utvDokTypeDAO->getIssues();
    if ($issues == "") {
        $logger->log("UTDOKTYPE.XML", "Finished processing UTDOKTYPE. No issues reported", Constants::LOG_PROCESSINGINFO);
    } else {
        $logger->log("UTDOKTYPE.XML", "Finished processing UTDOKTYPE. " . $issues, Constants::LOG_PROCESSINGINFO);
    }
    echo $issues . " ... processed UTDOKTYPE " . $utvDokTypeDAO->countRowsInTableAfter() . " rows handled\n";
    return $utvDokTypeDAO;
}
$avsmotDAO = new AvsmotDAO($srcBase, $uttrekkMySQLBase, $table_names['AVSMOT_TABLE'], $logger);
$dokTilknDAO = new DokTilknDAO($srcBase, $uttrekkMySQLBase, $table_names['DOKTILKN_TABLE'], $logger);
$enhTypeDAO = new EnhTypeDAO($srcBase, $uttrekkMySQLBase, $table_names['ENHTYPE_TABLE'], $logger);
$medadrgrDAO = new MedadrgrDAO($srcBase, $uttrekkMySQLBase, $table_names['MEDADRGR_TABLE'], $logger);
//$perklarDAO = handlePERKLAR($srcBase, $uttrekkMySQLBase, $table_names['PERKLAR_TABLE'], $logger);
//$tilleggDAO =  handleTILLEGG($srcBase, $uttrekkMySQLBase, $table_names['TILLEGG_TABLE'], $logger);
$sakPartDAO = new SakPartDAO($srcBase, $uttrekkMySQLBase, $table_names['SAKPART_TABLE'], $logger);
$statMDokDAO = new StatMDokDAO($srcBase, $uttrekkMySQLBase, $table_names['SAKPART_TABLE'], $logger);
$polsakgDAO = new PolsakgDAO($srcBase, $uttrekkMySQLBase, $table_names['POLSAKG_TABLE'], $logger);
$tlKodeDAO = new TlKodeDAO($srcBase, $uttrekkMySQLBase, $table_names['TLKODE_TABLE'], $logger);
// dokLink / dokVers / dokBesk are handled inside JOURPST, Creating DAO objects
// only to create extraction to XML
$dokVersDAO = new DokLinkDAO($srcBase, $uttrekkMySQLBase, $table_names['DOKLINK_TABLE'], $kommuneName, $logger);
$dokLinkDAO = new DokVersDAO($srcBase, $uttrekkMySQLBase, $table_names['DOKVERS_TABLE'], $kommuneName, $logger);
$dokBeskDAO = new DokBeskDAO($srcBase, $uttrekkMySQLBase, $table_names['DOKBESK_TABLE'], $kommuneName, $logger);
$utDokTypDAO = new UtDokTypDAO($srcBase, $uttrekkMySQLBase, $table_names['UTVDOKTYPE_TABLE'], $logger);
$utvMoteDAO = new UtvMoteDAO($srcBase, $uttrekkMySQLBase, $table_names['UTVMOTE_TABLE'], $logger);
$utvMoteDokDAO = new UtvMoteDokDAO($srcBase, $uttrekkMySQLBase, $table_names['UTVMOTEDOK_TABLE'], $logger);
$utvBehDoDAO = new UtvBehDoDAO($srcBase, $uttrekkMySQLBase, $table_names['UTVBEHDO_TABLE'], $logger);
$utvSakDAO = new UtvSakDAO($srcBase, $uttrekkMySQLBase, $table_names['UTVSAK_TABLE'], $logger, $utvBehDoDAO);
$utvBehDAO = new UtvBehDAO($srcBase, $uttrekkMySQLBase, $table_names['UTVBEH_TABLE'], $logger, $utvSakDAO, $utvBehDoDAO);
$emneOrdDAO = new EmneOrdDAO($srcBase, $uttrekkMySQLBase, 'UNKNOWN', $logger);
//PERKLAR STATMDOK UTVDOKTYPE
$adminDelDAO->createXML($extractor);
$adradmenhDAO->createXML($extractor);
$adressekpDAO->createXML($extractor);
$adrPersonDAO->createXML($extractor);
$adrTypeDAO->createXML($extractor);
$aliasAdmDAO->createXML($extractor);
$arkivDAO->createXML($extractor);
$arkivdelDAO->createXML($extractor);