# Neosemantics for loading the \<owl:Restriction\>

**URL:** <https://community.neo4j.com/t/neosemantics-for-loading-the-owl-restriction/30090>\
**Category:** Neo4j Graph Platform\
**Tags:** knowledge-base\
**Created:** [December 4, 2020, 4:53am UTC](https://community.neo4j.com/t/neosemantics-for-loading-the-owl-restriction/30090 "2020-12-04T04:53:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jesus\_barrasa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jesus_barrasa/32/27513_2.png) [@jesus\_barrasa](https://community.neo4j.com/u/jesus_barrasa)\
**Post date:** [January 10, 2021, 7:21pm UTC](https://community.neo4j.com/t/neosemantics-for-loading-the-owl-restriction/30090/2 "2021-01-10T19:21:07Z")

</div>

If you're importing the ontology using the `n10s.onto.import` methods then this is normal because this method only imports a subset of the triples in an ontology.

Here's a fragment from [the manual](https://neo4j.com/labs/neosemantics/4.0/importing-ontologies/) describing precisely that:

Ontologies are serialised as RDF, so they can be imported using plain `n10s.rdf.import.fetch` but the `n10s.onto.import.fetch` method will give us a higher level of control over how an RDFS or OWL ontology is imported into Neo4j. It’s important to note that this procedure exclusively imports the following:

1. Named class (category) declarations with both `rdfs:Class` and `owl:Class` .
2. Explicit class hierarchies defined with `rdf:subClassOf` statements.
3. Property definitions with `owl:ObjectProperty` , `owl:DatatypeProperty` and `rdfs:Property`
4. Explicit property hierarchies defined with `rdfs:subPropertyOf` statements.
5. Domain and range information for properties described as `rdfs:domain` and `rdfs:range` statements.

All other elements will be ignored by this loader.

You can try to import the ontology using the `n10s.rdf.import` methods instead. While this approach imports all statements in the ontology (including restrictions) the representation may not be the most usable. On that, you may find interesting this thread on `<owl:Restriction>` definitions:

> [@Custom properties of OWL/RDF Ontology](https://community.neo4j.com/t/custom-properties-of-owl-rdf-ontology/19739):
>
> Hi, I am trying to import an ontology, which is in RDF/XML format (owl): call n10s.graphconfig.init( { keepCustomDataTypes:true, handleRDFTypes: "LABELS\_AND\_NODES" }); CALL n10s.onto.import.fetch("...","RDF/XML"); In the ontology file, each class contains synonym properties: \<oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string"\>human mammary epithelial cell\</oboInOwl:hasExactSynonym\> However the nodes of type Class do not contain that custom properties, and also s…

Cheers,

JB.

---

_[View the full topic](https://community.neo4j.com/t/neosemantics-for-loading-the-owl-restriction/30090)._
