コード例 #1
0
    def getUserAbstraction(self):
        """
        Get the user abstraction (relation and entity as subject and object)

        :return:
        :rtype:
        """
        data = {}
        self.log.debug(" =========== TripleStoreExplorer:getUserAbstraction ===========")

        sqg = SparqlQueryGraph(self.settings, self.session)
        ql = MultipleQueryLauncher(self.settings, self.session)
        em = EndpointManager(self.settings, self.session)
        lEndp = em.listActiveEndpoints()

        data['relations'] = ql.process_query(sqg.get_public_abstraction_relation('owl:ObjectProperty').query,lEndp)
        data['relations'] += ql.process_query(sqg.get_user_abstraction_relation('owl:ObjectProperty').query,lEndp)
        data['subclassof'] = ql.process_query(sqg.get_isa_relation_entities().query,lEndp)
        data['entities'] = ql.process_query(sqg.get_public_abstraction_entity().query,lEndp)
        data['entities'] += ql.process_query(sqg.get_user_abstraction_entity().query,lEndp)
        data['attributes'] = ql.process_query(sqg.get_public_abstraction_attribute_entity().query,lEndp)
        data['attributes'] += ql.process_query(sqg.get_user_abstraction_attribute_entity().query,lEndp)
        data['categories'] = ql.process_query(sqg.get_public_abstraction_category_entity().query,lEndp)
        data['categories'] += ql.process_query(sqg.get_user_abstraction_category_entity().query,lEndp)
        data['positionable'] = ql.process_query(sqg.get_abstraction_positionable_entity().query,lEndp)
        data['endpoints'] = sqg.getGraphUser()
        data['endpoints_ext'] = sqg.getExternalServiceEndpoint()

        self.log.debug("============== ENDPOINTS AND GRAPH =====================================")
        self.log.debug(data['endpoints'])
        return data
コード例 #2
0
    def getUserAbstraction(self, service):
        """
        Get the user abstraction (relation and entity as subject and object)

        :return:
        :rtype:
        """
        data = {}
        self.log.debug(
            " =========== TripleStoreExplorer:getUserAbstraction ===========")

        sqg = SparqlQueryGraph(self.settings, self.session)
        ql = QueryLauncher(self.settings, self.session)

        data['relations'] = ql.process_query(
            sqg.get_abstraction_relation('owl:ObjectProperty').query)
        data['subclassof'] = ql.process_query(
            sqg.get_isa_relation_entities().query)
        data['entities'] = ql.process_query(sqg.get_abstraction_entity().query)
        data['attributes'] = ql.process_query(
            sqg.get_abstraction_attribute_entity().query)
        data['categories'] = ql.process_query(
            sqg.get_abstraction_category_entity().query)
        data['positionable'] = ql.process_query(
            sqg.get_abstraction_positionable_entity().query)
        data['graph'] = sqg.getGraphUser()

        return data
コード例 #3
0
    def getUserAbstraction(self,service):
        """
        Get the user abstraction (relation and entity as subject and object)

        :return:
        :rtype:
        """
        data = {}
        self.log.debug(" =========== TripleStoreExplorer:getUserAbstraction ===========")

        sqg = SparqlQueryGraph(self.settings, self.session)
        ql = QueryLauncher(self.settings, self.session)

        data['relations'] = ql.process_query(sqg.get_abstraction_relation('owl:ObjectProperty').query)
        data['subclassof'] = ql.process_query(sqg.get_isa_relation_entities().query)
        data['entities'] = ql.process_query(sqg.get_abstraction_entity().query)
        data['attributes'] = ql.process_query(sqg.get_abstraction_attribute_entity().query)
        data['categories'] = ql.process_query(sqg.get_abstraction_category_entity().query)
        data['positionable'] = ql.process_query(sqg.get_abstraction_positionable_entity().query)
        data['graph'] = sqg.getGraphUser()

        return data