# Path: OGRgeoConverter/models.py
# class ConversionJob(models.Model):
#     job_identifier = models.ForeignKey(JobIdentifier)
# 
#     export_format_name = models.CharField(max_length=50)
#     source_srs = models.IntegerField()
#     target_srs = models.IntegerField()
#     simplify_parameter = models.DecimalField(max_digits=16, decimal_places=10)
# 
#     upload_folder_path = models.CharField(max_length=128)
#     extract_folder_path = models.CharField(max_length=128)
#     output_folder_path = models.CharField(max_length=128)
#     download_folder_path = models.CharField(max_length=128)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_jobs'
# 
#     @staticmethod
#     def get_conversion_job(job_identifier):
#         return ConversionJob.objects.filter(job_identifier=job_identifier)
# 
# Path: OGRgeoConverter/models.py
# class ConversionJobFolder(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
# 
#     folder_path = models.CharField(max_length=1024)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_folders'
#         unique_together = (('conversion_job', 'folder_path'),)
# 
#     @staticmethod
#     def get_conversion_job_folders(conversion_job):
#         return ConversionJobFolder.objects.filter(
#             conversion_job=conversion_job)
# 
#     @staticmethod
#     def get_conversion_job_folder_by_path(conversion_job, folder_path):
#         return ConversionJobFolder.objects.filter(
#             conversion_job=conversion_job,
#             folder_path=folder_path)
# 
# class ConversionJobFileMatch(models.Model):
#     conversion_job_folder = models.ForeignKey(ConversionJobFolder)
# 
#     identified_format_name = models.CharField(max_length=50)
#     is_archive = models.BooleanField()
#     is_valid = models.BooleanField()
#     in_process_id = models.CharField(max_length=50)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_file_matches'
# 
# class ConversionJobFile(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
#     file_match = models.ForeignKey(ConversionJobFileMatch)
# 
#     file_id = models.CharField(max_length=50)
#     file_name = models.CharField(max_length=1024)
#     matched_file_name = models.CharField(max_length=1024)
#     is_uploaded = models.BooleanField()
#     is_processed = models.BooleanField()
#     is_removed = models.BooleanField()
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_files'
#         unique_together = (('conversion_job', 'file_id'),)
# 
#     @staticmethod
#     def get_conversion_job_files_by_conversion_job(conversion_job):
#         return ConversionJobFile.objects.filter(conversion_job=conversion_job)
# 
#     @staticmethod
#     def get_conversion_job_files_by_file_match(file_match):
#         return ConversionJobFile.objects.filter(file_match=file_match)
# 
# class ConversionJobFileIdTracker(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
#     file_id = models.AutoField(primary_key=True)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_file_id_tracking'
# 
# Path: OGRgeoConverter/models.py
# class ConversionJobUrl(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
# 
#     url_id = models.CharField(max_length=50)
#     url = models.CharField(max_length=2048)
#     is_processed = models.BooleanField()
#     is_removed = models.BooleanField()
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_urls'
# 
#     @staticmethod
#     def get_conversion_job_urls(conversion_job):
#         return ConversionJobUrl.objects.filter(conversion_job=conversion_job)
# 
# Path: OGRgeoConverter/models.py
# class ConversionJobShellParameter(ShellParameter):
#     conversion_job = models.ForeignKey(ConversionJob)
# 
#     class Meta(ShellParameter.Meta):
#         db_table = 'ogrgeoconverter_conversion_job_shell_parameters'
#         unique_together = (
#             ('conversion_job',
#              'parameter_name',
#              'parameter_value'),
#         )
# 
#     @staticmethod
#     def get_conversion_job_shell_parameters(conversion_job):
#         return ConversionJobShellParameter.objects.filter(
#             conversion_job=conversion_job)


from OGRgeoConverter.models import ConversionJob
from OGRgeoConverter.models import ConversionJobFolder, ConversionJobFileMatch, ConversionJobFile, ConversionJobFileIdTracker
from OGRgeoConverter.models import ConversionJobUrl
from OGRgeoConverter.models import ConversionJobShellParameter
        for url_id, url in url_dict:
            self.add_webservice_url(url_id, url)

    def get_webservice_urls(self):
        url_query_set = self.__get_conversion_job_urls_query_set()
        url_dict = {}
        for webservice_url in url_query_set:
            url_dict[webservice_url.url_id] = webservice_url.url
        return url_dict

    def get_webservice_urls_count(self):
        url_query_set = self.__get_conversion_job_urls_query_set()
        return len(url_query_set)

    def remove_webservice_url(self):
        raise Exception('Not implemented')

    def add_shell_parameter_object(self, shell_parameter):
        self.add_shell_parameter(
            shell_parameter.prefix,
            shell_parameter.parameter_name,
            shell_parameter.parameter_value,
            shell_parameter.value_quotation_marks)

    def add_shell_parameter(
            self,
            prefix,
            parameter_name,
            parameter_value,
            value_quotation_marks):

# Path: OGRgeoConverter/models.py
# class ConversionJob(models.Model):
#     job_identifier = models.ForeignKey(JobIdentifier)
# 
#     export_format_name = models.CharField(max_length=50)
#     source_srs = models.IntegerField()
#     target_srs = models.IntegerField()
#     simplify_parameter = models.DecimalField(max_digits=16, decimal_places=10)
# 
#     upload_folder_path = models.CharField(max_length=128)
#     extract_folder_path = models.CharField(max_length=128)
#     output_folder_path = models.CharField(max_length=128)
#     download_folder_path = models.CharField(max_length=128)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_jobs'
# 
#     @staticmethod
#     def get_conversion_job(job_identifier):
#         return ConversionJob.objects.filter(job_identifier=job_identifier)
# 
# Path: OGRgeoConverter/models.py
# class ConversionJobFolder(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
# 
#     folder_path = models.CharField(max_length=1024)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_folders'
#         unique_together = (('conversion_job', 'folder_path'),)
# 
#     @staticmethod
#     def get_conversion_job_folders(conversion_job):
#         return ConversionJobFolder.objects.filter(
#             conversion_job=conversion_job)
# 
#     @staticmethod
#     def get_conversion_job_folder_by_path(conversion_job, folder_path):
#         return ConversionJobFolder.objects.filter(
#             conversion_job=conversion_job,
#             folder_path=folder_path)
# 
# class ConversionJobFileMatch(models.Model):
#     conversion_job_folder = models.ForeignKey(ConversionJobFolder)
# 
#     identified_format_name = models.CharField(max_length=50)
#     is_archive = models.BooleanField()
#     is_valid = models.BooleanField()
#     in_process_id = models.CharField(max_length=50)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_file_matches'
# 
# class ConversionJobFile(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
#     file_match = models.ForeignKey(ConversionJobFileMatch)
# 
#     file_id = models.CharField(max_length=50)
#     file_name = models.CharField(max_length=1024)
#     matched_file_name = models.CharField(max_length=1024)
#     is_uploaded = models.BooleanField()
#     is_processed = models.BooleanField()
#     is_removed = models.BooleanField()
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_files'
#         unique_together = (('conversion_job', 'file_id'),)
# 
#     @staticmethod
#     def get_conversion_job_files_by_conversion_job(conversion_job):
#         return ConversionJobFile.objects.filter(conversion_job=conversion_job)
# 
#     @staticmethod
#     def get_conversion_job_files_by_file_match(file_match):
#         return ConversionJobFile.objects.filter(file_match=file_match)
# 
# class ConversionJobFileIdTracker(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
#     file_id = models.AutoField(primary_key=True)
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_file_id_tracking'
# 
# Path: OGRgeoConverter/models.py
# class ConversionJobUrl(models.Model):
#     conversion_job = models.ForeignKey(ConversionJob)
# 
#     url_id = models.CharField(max_length=50)
#     url = models.CharField(max_length=2048)
#     is_processed = models.BooleanField()
#     is_removed = models.BooleanField()
# 
#     class Meta:
#         db_table = 'ogrgeoconverter_conversion_job_urls'
# 
#     @staticmethod
#     def get_conversion_job_urls(conversion_job):
#         return ConversionJobUrl.objects.filter(conversion_job=conversion_job)
# 
# Path: OGRgeoConverter/models.py
# class ConversionJobShellParameter(ShellParameter):
#     conversion_job = models.ForeignKey(ConversionJob)
# 
#     class Meta(ShellParameter.Meta):
#         db_table = 'ogrgeoconverter_conversion_job_shell_parameters'
#         unique_together = (
#             ('conversion_job',
#              'parameter_name',
#              'parameter_value'),
#         )
# 
#     @staticmethod
#     def get_conversion_job_shell_parameters(conversion_job):
#         return ConversionJobShellParameter.objects.filter(
#             conversion_job=conversion_job)


# Path: OGRgeoConverter/modelhandlers/jobhandler.py
from OGRgeoConverter.models import ConversionJob
from OGRgeoConverter.models import ConversionJobFolder, ConversionJobFileMatch, ConversionJobFile, ConversionJobFileIdTracker
from OGRgeoConverter.models import ConversionJobUrl
from OGRgeoConverter.models import ConversionJobShellParameter

        for url_id, url in url_dict:
            self.add_webservice_url(url_id, url)

    def get_webservice_urls(self):
        url_query_set = self.__get_conversion_job_urls_query_set()
        url_dict = {}
        for webservice_url in url_query_set:
            url_dict[webservice_url.url_id] = webservice_url.url
        return url_dict

    def get_webservice_urls_count(self):
        url_query_set = self.__get_conversion_job_urls_query_set()
        return len(url_query_set)

    def remove_webservice_url(self):
        raise Exception('Not implemented')

    def add_shell_parameter_object(self, shell_parameter):
        self.add_shell_parameter(
            shell_parameter.prefix,
            shell_parameter.parameter_name,
            shell_parameter.parameter_value,
            shell_parameter.value_quotation_marks)

    def add_shell_parameter(
            self,
            prefix,
            parameter_name,
            parameter_value,
            value_quotation_marks):

        shell_parameter = ConversionJobShellParameter()