{"id":19210802,"url":"https://github.com/flekschas/owl2neo4j","last_synced_at":"2025-05-12T19:26:13.515Z","repository":{"id":34951980,"uuid":"39027014","full_name":"flekschas/owl2neo4j","owner":"flekschas","description":"Convert OWL to labeled property graph and import into Neo4J","archived":false,"fork":false,"pushed_at":"2021-09-07T22:48:35.000Z","size":31770,"stargazers_count":49,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-20T17:37:37.749Z","etag":null,"topics":["gradle","import","java","neo4j","ontology","owl"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flekschas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null}},"created_at":"2015-07-13T17:31:07.000Z","updated_at":"2024-12-01T07:01:48.000Z","dependencies_parsed_at":"2022-09-15T22:31:31.888Z","dependency_job_id":null,"html_url":"https://github.com/flekschas/owl2neo4j","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fowl2neo4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fowl2neo4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fowl2neo4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fowl2neo4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flekschas","download_url":"https://codeload.github.com/flekschas/owl2neo4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253807167,"owners_count":21967307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradle","import","java","neo4j","ontology","owl"],"created_at":"2024-11-09T13:38:06.197Z","updated_at":"2025-05-12T19:26:13.486Z","avatar_url":"https://github.com/flekschas.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OWL 2 Neo4J [![Build Status](https://travis-ci.org/flekschas/owl2neo4j.svg?branch=master)](https://travis-ci.org/flekschas/owl2neo4j)\n\nConvert [OWL](owl) schema ontologies to labeled property graph and import into [Neo4J](neo4j).\n\n_Note: currently the tool only converts the class hierarchy; instances are ignored for now._\n\n## Build\n\nEach release comes with a precompiled JAR, created automatically by Travis-CI. To build the JAR file manually follow the three steps below. The JAR file will be created in `dist`.\n\n**Requirements**:\n\n* [Java 7](jre7) or [Java 8](jre8) or [Java 11](jdk11)\n* [Gradle](gradle)\n\n```\ngit clone https://github.com/flekschas/owl2neo4j \u0026\u0026 cd owl2neo4j\ngradle build\n```\n\n## Import ontology\n\n**Requirements**:\n\n* [Neo4J](neo4j)\n\nA single file import is executed as follows:\n\n```\njava -jar ./dist/owl2neo4j.jar -o ./pizza.owl -n \"Pizza Ontology\" -a pizza\n```\n\n(To get `pizza.owl` run `curl -O https://protege.stanford.edu/ontologies/pizza/pizza.owl`.)\n\nIn order to import multiple ontologies at once create a JSON file:\n\n```\n{\n\t\"server\": \"http://my-server:7474\",\n    \"ontologies\": [\n        {\n            \"o\": \"./chebi.owl\",\n            \"n\": \"Chemical Entities of Biological Interest\",\n            \"a\": \"CHEBI\"\n        },\n        {\n            \"o\": \"./cl.owl\",\n            \"n\": \"Cell Ontology\",\n            \"a\": \"CL\",\n            \"i\": true\n        },\n        {\n            \"o\": \"./efo.owl\",\n            \"n\": \"Experimental Factor Ontology\",\n            \"a\": \"EFO\"\n        }\n    ]\n}\n```\n\n`a`, `i`, `n` and `o` correspond to the CLI options. The only difference is that n, i.e. the path to the OWL file to be imported, should be relative to 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.\nNext you can import the everything with the following call:\n\n```\n$ java -jar ./dist/owl2neo4j.jar -b ./import.json\n```\n\n(Assuming that the file above is `./import.json`.)\n\n**Command line options**:\n\n```\nusage: java -jar owl2neo4j.jar -a \u003cString\u003e -b \u003cPath\u003e [--eqp \u003cString\u003e] [-h]\n       [-i] [-l] -n \u003cString\u003e -o \u003cPath\u003e [-p \u003cString\u003e] [-s \u003cURL\u003e] [-u\n       \u003cString\u003e] [-v] [--version]\nImport OWL into Neo4J as a labeled property graph.\n\n -a,--abbreviation \u003cString\u003e   Ontology abbreviation (E.g. go)\n -b,--batch \u003cPath\u003e            Path to JSON file\n    --eqp \u003cString\u003e            Existential quantification property (E.g.\n                              http://www.co-ode.org/ontologies/pizza/pizza\n                              .owl#hasTopping)\n -h,--help                    Shows this help\n -i,--incl-imports            Include import closure\n -l,--no-local                Don't scan for locally available OWL files\n                              to ensure loading remote files.\n -n,--name \u003cString\u003e           Ontology name (E.g. Gene Ontology)\n -o,--owl \u003cPath\u003e              Path to OWL file\n -p,--password \u003cString\u003e       Neo4J user password\n -s,--server \u003cURL\u003e            Neo4J server root URL [Default:\n                              http://localhost:7474]\n -u,--user \u003cString\u003e           Neo4J user name\n -v,--verbosity               Verbose output\n    --version                 Show version\n```\n\nFor detailed instructions and help regarding the different options please refer to the [wiki](./wiki).\n\n**Importing large ontologies**:\n\nBy default the OWLAPI XML loader has a 64,000 triple limit. To increase the limit and being able to import larger ontologies start `owl2neo4j.jar` with `DentityExpansionLimit=\u003cLARGE_NUMBER\u003e` flag like so:\n\n```\njava -jar -DentityExpansionLimit=1000000 ./dist/owl2neo4j.jar -o ./extra-large-pizza.owl -n \"Extra Large Pizza Ontology\" -a elpo\n```\n\nBe sure that you have enough RAM to theoretical load _1000000_ (or any other number), otherwise your system will complain.\n\n**Handshake error**:\n\nIn case you see a _handshake_ error of this form `Remote host closed connection during handshake` add the following parameter when calling java:\n\n```\njava -jar -Dhttps.protocols=TLSv1.1,TLSv1.2 ...\n```\n\n[gradle]:https://gradle.org/\n[jre7]:http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html\n[jre8]:http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html\n[jre11]:http://jdk.java.net/11/\n[neo4j]:http://neo4j.com/\n[owl]:www.w3.org/2004/OWL/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflekschas%2Fowl2neo4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflekschas%2Fowl2neo4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflekschas%2Fowl2neo4j/lists"}