#!/usr/bin/env jython

import sys
import stilts
import logging
import logging.config
from java.lang import *
from java.sql import *

from xml.etree.ElementTree import ElementTree, Element, tostring

from batch import Batch
from pslogger import PSLogger
from gpc1db import Gpc1Db
from ipptopspsdb import IppToPspsDb
from stackbatch import StackBatch
from detectionbatch import DetectionBatch

'''
Class encapsulating the init batch type (IN)
'''
class InitBatch(Batch):

    '''
    Constructor
    '''
    def __init__(self, 
            logger, 
            config,
            skychunk,
            gpc1Db, 
            ippToPspsDb,
            scratchDb,
            batchID):

       super(InitBatch, self).__init__(logger, 
               config,
               skychunk,
               gpc1Db, 
               ippToPspsDb, 
               scratchDb,
               0, 
               batchID,
               "IN", 
               None)

       self.outputFitsFile = "00000000.FITS";
       self.outputFitsPath = self.localOutPath + "/" + self.outputFitsFile

    '''
    Empty implementation
    '''
    def importIppTables(self, filter=""):
        self.logger.debug("importIppTables method here to satisfy base-class")
        return True

    '''
    Here to satidfy the base-class
    '''
    def alterPspsTables(self):
        return True

    '''
    Implementing base class method, though not necessary
    '''
    def populatePspsTables(self):
        self.logger.debug("No processing required for this batch type")
        return True

