neosemantics icon indicating copy to clipboard operation
neosemantics copied to clipboard

How to map 'reserved' Neosemantics properties?

Open remerjohnson opened this issue 1 year ago • 0 comments

Hello. I currently map properties from an ontology using the documentation, so e.g., "myont:has_package" becomes "HAS_PACKAGES" in Neo4j.

However, how would I do the same mapping for the 'inherent' Neo4j properties, such as Resource.uri? I've tried:

'''WITH
           [{ neoSchemaElem : "MYONT_IRI", publicSchemaElem: "uri" }] AS mappings,
           "neo4j://com.neo4j/voc#" AS Neo4jUri
           CALL n10s.nsprefixes.add("neo4j",Neo4jUri) YIELD namespace
           UNWIND mappings as m
           CALL n10s.mapping.add(Neo4jUri + m.publicSchemaElem,m.neoSchemaElem) YIELD schemaElement
           RETURN count(schemaElement) AS mappingsDefined;
                    '''

The mapping shows up fine in n10s.mapping.list, but the field/property name remains unmapped, with uri. Can this be changed?

If this cannot be done with Neosemantics and can just be done in CYPHER, that's fine. Thanks!

remerjohnson avatar Jun 11 '24 19:06 remerjohnson