#! /usr/bin/env python
#############################################################
#                                                           #
#   Author: Herve Menager                                   #
#   Organization:'Biological Software and Databases' Group, #
#                Institut Pasteur, Paris.                   #
#   Distributed under GPLv2 Licence. Please refer to the    #
#   COPYING.LIB document.                                   #
#                                                           #
#############################################################
import mb_cgi
from Mobyle.Validator import Validator

def process(self):
    val = Validator(docString = self.request.getfirst("programXmlString"))
    val.run()
    self.jsonMap = {'ok':val.valOk,
                      'rngErrors':val.rngErrors,
                      'schErrors':val.schErrors
                      }
    
if __name__ == "__main__":
    mb_cgi.JSONCGI(processFunction=process)