コード例 #1
0
    def check_node_existence(self, data):
        """Checks if the nodes for the relationship exists, if not creates new nodes."""

        if data:
            permalink = Transform.to_str(data.get('Permalink'))
            label = Transform.to_str(data.get('PrimaryRole'))
            name = Transform.to_str(data.get('Name'))

            try:
                organization = Organization()
                organization.check_create_organization_node(label, permalink)
                category = Category()
                category.check_create_category_node(name)

            except Exception as e:
                pass
コード例 #2
0
    def check_node_existence(self, data):
        """Checks if the nodes for the relationship exists, if not creates new nodes."""

        if data:
            permalink = Transform.to_str(data.get('Permalink'))
            label = Transform.to_str(data.get('PrimaryRole'))
            people_permalink = Transform.to_str(data.get('PeoplePermalink'))

            try:
                organization = Organization()
                organization.check_create_organization_node(label, permalink)
                person = Person()
                person.check_create_person_node(people_permalink)

            except Exception as e:
                pass
コード例 #3
0
    def check_node_existence(self, data):
        """Checks if the nodes for the relationship exists, if not creates new nodes."""

        if data:
            permalink = Transform.to_str(data.get('Permalink'))
            label = Transform.to_str(data.get('PrimaryRole'))
            fund_id = Transform.to_str(data.get('FundsId'))

            try:
                organization = Organization()
                organization.check_create_organization_node(label, permalink)
                fund = Fund()
                fund.check_create_fund_node(fund_id)

            except Exception as e:
                pass
コード例 #4
0
    def check_node_existence(self, data):
        """Checks if the nodes for the relationship exists, if not creates new nodes."""
        # import pdb; pdb.set_trace()
        if data:
            permalink = Transform.to_str(data.get('Permalink'))
            label = Transform.to_str(data.get('PrimaryRole'))
            uuid = Transform.to_str(data.get('Uuid'))

            try:
                organization = Organization()
                organization.check_create_organization_node(label, permalink)
                event = Event()
                event.check_create_event_node(uuid)

            except Exception as e:
                pass
コード例 #5
0
	def check_node_existence(self, data):
		"""Checks if the nodes for the relationship exists, if not creates new nodes."""
		
		if data:
			permalinks = [
							(data.get('OrganizationAcquireeID'), data.get('AcquireePrimaryRole')),
							(data.get('OrganizationAcquirerID'), data.get('AcquirerPrimaryRole'))
							]

			for permalink, label in permalinks:
				permalink = Transform.to_str(permalink)
				label = Transform.to_str(label)
				try:
					organization = Organization()
					organization.check_create_organization_node(label, permalink)
				except Exception as e:
					pass