Example #1
0
 def get_triplestore(self):
     doc_xml_rdf = self.get_content_moded("rdf")
     if not doc_xml_rdf:
         return None
     # If the string is empty, it throws "<unknown>:1:0:"
     grph_kbase = lib_kbase.triplestore_from_rdf_xml(doc_xml_rdf)
     return TripleStore(grph_kbase)
Example #2
0
    def _check_rdf_url_ontology(self, the_content_rdf):
        print("test_create_source_local_rdf: RDF content=%s ..." %
              str(the_content_rdf)[:30])

        rdf_graph = lib_kbase.triplestore_from_rdf_xml(the_content_rdf)
        errors_list = _check_rdf_ontology_conformance(rdf_graph)
        print("Errors:")
        for one_error in errors_list:
            print("    ", one_error)
        return errors_list
Example #3
0
    def get_graph(self):
        doc_xml_rdf = self.get_content_moded("rdf")

        return lib_kbase.triplestore_from_rdf_xml(doc_xml_rdf)
        return TripleStore(grph_k_base)
Example #4
0
    def get_triplestore(self):
        docXmlRdf = self.get_content_moded("rdf")

        grphKBase = lib_kbase.triplestore_from_rdf_xml(docXmlRdf)
        return TripleStore(grphKBase)