def load_data_append(self):

        # instantiate class
        session = Data_Append(self.data)

        # define current session id
        session_id = self.data['data']['settings']['svm_session_id']
        session.validate_id(session_id)

        # implement class methods
        if not session.validate_arg_none() and not session.get_errors():
            session.validate_svm_settings()
            session.validate_mime_type()
            session.check()

            session_entity = session.save_svm_entity('data_append', session_id)
            if session_entity['status']:
                session.check()

                session.dataset_to_dict(session_id)
                session.check()

                session.save_observation_label('data_append', session_id)
                session.check()

                session.save_svm_dataset()
                session.check()

            return 'Dataset(s) properly appended into database'
        else:
            print session.get_errors()
            return None
Exemple #2
0
    def load_data_append(self):
        '''

        This method validates the supplied parameters, before being appended to
        existing entries, from corresponding tables in the SQL database.

        '''

        # instantiate class
        session = Data_Append(self.data)

        # define current session id
        session_id = self.data['data']['settings']['session_id']
        session.validate_id(session_id)

        # implement class methods
        if not session.validate_arg_none() and not session.get_errors():
            session.validate_premodel_settings()
            session.validate_file_extension()
            session.check()

            session_entity = session.save_entity('data_append', session_id)
            if session_entity['status']:
                session.check()

                session.dataset_to_dict(session_id)
                session.check()

                session.save_observation_label('data_append', session_id)
                session.check()

                session.save_premodel_dataset()
                session.check()

            response = {
                'status': 0,
                'msg': 'Dataset(s) properly appended into database',
                'type': 'data-append'
            }

        else:
            print session.get_errors()
            response = {
                'status': 1,
                'msg': 'Dataset(s) not uploaded into database',
                'type': 'data-append'
            }

        return json.dumps(response)
    def load_data_append(self):
        '''@load_data_append

        This method validates the supplied parameters, before being appended to
        existing entries, from corresponding tables in the SQL database.

        '''

        # instantiate class
        session = Data_Append(self.data)

        # define current session id
        session_id = self.data['data']['settings']['session_id']
        session.validate_id(session_id)

        # implement class methods
        if not session.validate_arg_none() and not session.get_errors():
            session.validate_premodel_settings()
            session.validate_file_extension()
            session.check()

            session_entity = session.save_entity('data_append', session_id)
            if session_entity['status']:
                session.check()

                session.dataset_to_dict(session_id)
                session.check()

                session.save_observation_label('data_append', session_id)
                session.check()

                session.save_premodel_dataset()
                session.check()

            return 'Dataset(s) properly appended into database'
        else:
            print session.get_errors()
            return None
Exemple #4
0
    def load_data_append(self):
        """@load_data_append

        This method validates the supplied parameters, before being appended to
        existing entries, from corresponding tables in the SQL database.

        """

        # instantiate class
        session = Data_Append(self.data)

        # define current session id
        session_id = self.data['data']['settings']['svm_session_id']
        session.validate_id(session_id)

        # implement class methods
        if not session.validate_arg_none() and not session.get_errors():
            session.validate_svm_settings()
            session.validate_file_extension()
            session.check()

            session_entity = session.save_svm_entity('data_append', session_id)
            if session_entity['status']:
                session.check()

                session.dataset_to_dict(session_id)
                session.check()

                session.save_observation_label('data_append', session_id)
                session.check()

                session.save_svm_dataset()
                session.check()

            return 'Dataset(s) properly appended into database'
        else:
            print session.get_errors()
            return None