Пример #1
0
    def upload_all_ontologies(cls):
        """
        Uploads all ontologies in the specified folder.

        The format of the ontology is automatically interpreted by Blazegraph
        based on the file extension. If any format fails, it is probably
        because of an extension mismatch (for example, Turtle files are not
        .owl as the WC3 standardized file format for RDF and OWL is RDF/XML.

        """
        folder = generate_path("ontologies")
        files = os.listdir(folder)
        for file_ in files:
            path = os.path.join(folder, file_)
            print "importing %s" % file
            file_update(path)
Пример #2
0
 def upload_file(cls, filepath):
     """
         Relic - replaced by shared module
     """
     return file_update(filepath)