Ejemplo n.º 1
0
    def __init__(self):
        self.data = Data()
        self.storage = Storage(self.data)
        self.parser = Parser()
        self.client = Client()
        self.crawler = Crawler()

        self.storage.load()
Ejemplo n.º 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
Ejemplo n.º 3
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
Ejemplo n.º 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()