def setUp(self): logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) self.longMessage = True # Print complete error message self.rdf_graph = rdflib.Graph() self.rdf_graph.parse(str(STREAM_WITH_BNODES), format="n3") logging.info('%s triples loaded into RDF graph' % str(len(self.rdf_graph))) self.g = rdf2g.setup_graph()
def setUp(self): logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) self.longMessage = True # Print complete error message self.rdf_graph = rdflib.Graph() self.rdf_graph.parse(str(OUTPUT_FILE_LAM_PROPERTIES), format="ttl") logging.info('%s triples loaded into RDF graph' % str(len(self.rdf_graph))) self.g = rdf2g.setup_graph()
def __init__(self, rdf_file, connection_string=rdf2g.DEFAULT_LOCAL_CONNECTION_STRING, generate_collections=False): self.content = None self.g = rdf2g.setup_graph(connection_string) self.generate_collections = generate_collections rdf2g.clear_graph(self.g) self.rdf_graph = rdflib.Graph() self.rdf_graph.parse(str(rdf_file), format=rdflib.util.guess_format(str(rdf_file))) rdf2g.clear_graph(self.g) rdf2g.load_rdf2g(self.g, self.rdf_graph)
def setUp(self) -> None: self.g = rdf2g.setup_graph()