Beispiel #1
0
class Model:


    def __init__(self):
        self.data = Data()
        self.storage = Storage(self.data)
        self.parser = Parser()
        self.client = Client()
        self.crawler = Crawler()

        self.storage.load()

    def insert(self, inputString):
        command = self.parser.parse(inputString)
        command.insertData(self.data)
        self.client.insert(command)
        self.storage.save()

    def pull(self):
        output = []

        models = [self.data.getContracts(), self.data.getPeople(), self.data.getTeams()]

        for model in models:
            string = ''
            for entry in model:
                string += '{' + str(entry) + '}'
            output.append(string)

        return output
Beispiel #2
0
class Model:
    def __init__(self):
        self.data = Data()
        self.storage = Storage(self.data)
        self.parser = Parser()
        self.client = Client()
        self.crawler = Crawler()

        self.storage.load()

    def insert(self, inputString):
        command = self.parser.parse(inputString)
        command.insertData(self.data)
        self.client.insert(command)
        self.storage.save()

    def pull(self):
        output = []

        models = [
            self.data.getContracts(),
            self.data.getPeople(),
            self.data.getTeams()
        ]

        for model in models:
            string = ''
            for entry in model:
                string += '{' + str(entry) + '}'
            output.append(string)

        return output
Beispiel #3
0
    def __init__(self):
        self.data = Data()
        self.storage = Storage(self.data)
        self.parser = Parser()
        self.client = Client()
        self.crawler = Crawler()

        self.storage.load()
Beispiel #4
0
    def __init__(self):
        self.data = Data()
        self.storage = Storage(self.data)
        self.parser = Parser()
        self.client = Client()
        self.crawler = Crawler()

        self.storage.load()