#!/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, 
            configPath,
            configDoc,
            gpc1Db, 
            ippToPspsDb,
            batchID):
       super(InitBatch, self).__init__(logger, 
               configPath, 
               configDoc, 
               gpc1Db, 
               ippToPspsDb, 
               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 satidfy base-class")

    '''
    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 1

