コード例 #1
0
    def list_public_graphs(self):
        """list the public graphs

        :returns: description of the public graph
        :rtype: dict
        """

        sqb = SparqlQueryGraph(self.settings, self.request.session)
        query_laucher = QueryLauncher(self.settings, self.request.session)

        res = query_laucher.process_query(sqb.get_public_graphs())

        named_graphs = []
        print(res)
        for index_result in range(len(res)):
            named_graphs.append(res[index_result]['g'])

        return named_graphs
コード例 #2
0
ファイル: interface_tps_db.py プロジェクト: askomics/askomics
    def list_public_graphs(self):
        """list the public graphs

        :returns: description of the public graph
        :rtype: dict
        """

        sqb = SparqlQueryGraph(self.settings, self.request.session)
        query_laucher = QueryLauncher(self.settings, self.request.session)

        res = query_laucher.process_query(sqb.get_public_graphs())

        named_graphs = []
        print(res)
        for index_result in range(len(res)):
            named_graphs.append(res[index_result]['g'])

        return named_graphs
コード例 #3
0
ファイル: interface_tps.py プロジェクト: ofilangi/askomics
    def list_public_graphs(self):
        """list the public graphs

        :returns: description of the public graph
        :rtype: dict
        """

        sqb = SparqlQueryGraph(self.settings, self.request.session)
        query_laucher = QueryLauncher(self.settings, self.request.session)

        res = query_laucher.execute_query(sqb.get_public_graphs().query)

        named_graphs = []

        for index_result in range(len(res['results']['bindings'])):
            named_graphs.append(
                res['results']['bindings'][index_result]['g']['value'])

        return named_graphs