Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-30-2021 12:38 PM
Can I customize what prefixes and namespaces are used by default instead of?:
"n4sch" : "neo4j://graph.schema#",
"n4ind" : "neo4j://graph.individuals#"
Thanks for your help!
04-17-2021 11:09 AM
@jesus.barrasa - I have been using neo4j for a while now to build several knowledge graphs. We recently have a request to have the graph export to rdf/xml with very specific structure. With namespace mapping we can solve most of the issues. However, we are currently stuck with this autogenerated namespace and prefix above. Can you help how to change this? Plus, can we use custom unique id that we created for our own database instead the node id from neo4j?
04-21-2021 01:30 AM
Hi @duncandam86 glad to hear you're finding n10s useful 🙂
I think what you suggest sounds reasonable,
What would a useful solution look like? Something like setting a property as the preferred uri and maybe in the absence of that property default to the current behavior and generate based on node id?
Or would you rather keep the current behavior but just have the option to define the namespace for uris instead of "neo4j://graph.individuals#"
Or maybe any other suggestion?
JB.
05-05-2021 11:47 AM
Hi JB,
Thanks for responding. I think an option to define the namespace for the uris would be great. I think it would make the graphs retrieved from Neo4j as RDF feels a bit less generic when there isn't a mapping for a property or properties.
10-01-2022 07:45 PM
Wish to know how you are managing this scenario of currently?
Modifying for contextualizing the resource neo4j://graph.individuals#
10-01-2022 07:42 PM
Mine usecase is similar, Neo4j As a recommendation engine will load virtual knowledge graph from distributed schema. Neo4j, will have Conceptual model to link the virtual graph using ontology. However, in the current Neo4j RDF store, Individual are stored and and requires round tripping in other schema for mapping and enabling queries and result set as response. which is cost intensive.
04-21-2021 01:24 AM
For the schema elements you can define mappings (see section in manual).
For the individual's uris I'm afraid they are not configurable. It's just adding that namespace to the internal neo4j ids. I guess you could RDFize your graph (although it would be a bit hacky) by labeling all individuals as :Resource
and setting a uri
property on them with your preferred one (you would need to guarantee uniqueness, so probably creating a constraint would be a good idea). Then you can play with your GraphConfig and make it behave the way you want. Does this make sense?
Cheers,
JB.
All the sessions of the conference are now available online