Пример #1
0
	def present(self, meta):
		self.v.visit(meta)
		self.validation = {}
		
		for ge in self.v.result:
			uv = UsedByVisitor(ge, ['USES', 'WILL USE', 'MAY USE'], se=True, app=True, experiment=False, transitive=False)
			uv.visit(meta)
			
			uve = set(uv.result)
			
			ses = [e for e in uve if e.entity == 'SE']
			apps = [e for e in uve if e.entity == 'APP']

			
			for se in ses:
				partner, contact = se.provider
				
				if not partner in self.validation:
					self.validation[partner] = {"contacts" : set(), "GEs" : set()}
					
				self.validation[partner]["contacts"].add(contact)
				self.validation[partner]["GEs"].add(ge)

			for app in apps:
				partner, contact = app.developer
				
				if not partner in self.validation:
					self.validation[partner] = {"contacts" : set(), "GEs" : set()}
					
				self.validation[partner]["contacts"].add(contact)
				self.validation[partner]["GEs"].add(ge)
Пример #2
0
    def present(self, meta):
        self.v.visit(meta)
        self.validation = {}

        for ge in self.v.result:
            uv = UsedByVisitor(ge, ['USES', 'WILL USE', 'MAY USE'],
                               se=True,
                               app=True,
                               experiment=False,
                               transitive=False)
            uv.visit(meta)

            uve = set(uv.result)

            ses = [e for e in uve if e.entity == 'SE']
            apps = [e for e in uve if e.entity == 'APP']

            for se in ses:
                partner, contact = se.provider

                if not partner in self.validation:
                    self.validation[partner] = {
                        "contacts": set(),
                        "GEs": set()
                    }

                self.validation[partner]["contacts"].add(contact)
                self.validation[partner]["GEs"].add(ge)

            for app in apps:
                partner, contact = app.developer

                if not partner in self.validation:
                    self.validation[partner] = {
                        "contacts": set(),
                        "GEs": set()
                    }

                self.validation[partner]["contacts"].add(contact)
                self.validation[partner]["GEs"].add(ge)
Пример #3
0
	def present_ge(self, ge, meta):
		uv1 = UsedByVisitor(ge, ['USES'], self.collect_entities)
		uv1.visit(meta)
		uv2 = UsedByVisitor(ge, ['USES', 'WILL USE'], self.collect_entities)
		uv2.visit(meta)
		uv3 = UsedByVisitor(ge, ['USES', 'WILL USE', 'MAY USE'], self.collect_entities)
		uv3.visit(meta)
		
		uv1e = set(uv1.get_result())
		uv2e = set(uv2.get_result()) - (uv1e       )
		uv3e = set(uv3.get_result()) - (uv1e | uv2e)
		
		return (ge, list(uv1e), list(uv2e), list(uv3e))
Пример #4
0
    def present_ge(self, ge, meta):
        uv1 = UsedByVisitor(ge, ['USES'], self.collect_entities)
        uv1.visit(meta)
        uv2 = UsedByVisitor(ge, ['USES', 'WILL USE'], self.collect_entities)
        uv2.visit(meta)
        uv3 = UsedByVisitor(ge, ['USES', 'WILL USE', 'MAY USE'],
                            self.collect_entities)
        uv3.visit(meta)

        uv1e = set(uv1.get_result())
        uv2e = set(uv2.get_result()) - (uv1e)
        uv3e = set(uv3.get_result()) - (uv1e | uv2e)

        return (ge, list(uv1e), list(uv2e), list(uv3e))