How to use the ontospy.core.rdf_loader.RDFLoader function in ontospy

To help you get started, we’ve selected a few ontospy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lambdamusic / Ontospy / ontospy / core / rdf_loader.py View on Github external
def test(uri_or_path, noverbose, trylist):
    l = RDFLoader(verbose=not (noverbose))
    if trylist or not uri_or_path:
        l.load(["http://purl.org/dc/terms/", "http://xmlns.com/foaf/spec/"])
    else:
        l.load(uri_or_path)
github lambdamusic / Ontospy / ontospy / core / ontospy.py View on Github external
def load_rdf(self,
                 uri_or_path=None,
                 data=None,
                 file_obj=None,
                 rdf_format="",
                 verbose=False,
                 hide_base_schemas=True,
                 hide_implicit_types=True,
                 hide_implicit_preds=True):
        """Load an RDF source into an ontospy/rdflib graph"""
        loader = RDFLoader(verbose=verbose)
        loader.load(uri_or_path, data, file_obj, rdf_format)
        self.rdflib_graph = loader.rdflib_graph
        self.sources = loader.sources_valid
        self.sparqlHelper = SparqlHelper(self.rdflib_graph)
        self.namespaces = sorted(self.rdflib_graph.namespaces())
github lambdamusic / Ontospy / ontospy / core / rdf_loader.py View on Github external
def __init__(self, rdfgraph=None, verbose=False):
        super(RDFLoader, self).__init__()

        self.rdflib_graph = rdfgraph or rdflib.Graph()
        self.sources_valid = []
        self.sources_invalid = []
        self.verbose = verbose