Skip to content

Batch Imports

Fritz Lekschas edited this page Dec 16, 2015 · 1 revision

HomeWikiApplicationBatch Imports


Requirements

  • Neo4J up and running
  • An OWL ontologies
  • Import definition file

Batch import definition file

In order to import multiple ontologies at once, create a JSON file with the following structure:

{
    "server": "http://my-server:7474",
    "ontologies": [
        {
            "o": "./chebi.owl",
            "n": "Chemical Entities of Biological Interest",
            "a": "CHEBI"
        },
        {
            "o": "./cl.owl",
            "n": "Cell Ontology",
            "a": "CL"
        },
        {
            "o": "./efo.owl",
            "n": "Experimental Factor Ontology",
            "a": "EFO"
        }
    ]
}

o, n and a correspond to the options. The only difference is that n, i.e. the path to the OWL file to be imported, should be relative to the location of the JSON file. server is optional; when it's not defined, the default server url, i.e. http://127.0.0.1:7474, is used.

Import an ontology

$ java -jar ./owl2neo4j.jar \
       -b import.json

Assuming that the batch import definition file is ./import.json.