How to use the ontospy.core.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 / hacks / sparql-cli.py View on Github external
def load_file_or_uri(source):
    """wrapper around RDFLoader class"""
    _db = RDFLoader()
    try:       
        db = _db.load(source) 
        add_ns(db)
        return db
    except:
        e = sys.exc_info()[0]
        print "--error--->", e   
        return None
github lambdamusic / Ontospy / ontospy / core / ontospy.py View on Github external
def load(self, uri_or_path=None, text=None, file_obj=None, rdf_format="", verbose=False):
        l = RDFLoader()
        self.rdfgraph = l.load(uri_or_path, text, file_obj, rdf_format, verbose)
        self.queryHelper = QueryHelper(self.rdfgraph)
        self.namespaces = sorted(self.rdfgraph.namespaces())