GraphDB Free 8.5版本Domain-Range图无法显示的技术咨询
The issue here is straightforward: your property :p doesn't have explicit domain and range declarations, which are required for the visualization tool to generate a Domain-Range chart.
Right now, you've defined :p as an owl:ObjectProperty, but you haven't told the system which class this property starts from (domain) or which class it points to (range). Most Domain-Range visualization tools rely on explicit rdfs:domain and rdfs:range assertions to map these relationships—they won't automatically infer them just from the instance triple :f :p :b (even though OWL-Horst supports some reasoning, many visualization tools don't run inference for this by default).
Fixed RDF Code
First, add the rdfs prefix (since you're using RDF Schema terms), then add the domain and range to :p:
@prefix : <http://example.org/owlim#>. @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . # New required prefix :Foo a owl:Class . :Bar a owl:Class . :p a owl:ObjectProperty ; rdfs:domain :Foo ; # Explicitly define :p originates from :Foo instances rdfs:range :Bar . # Explicitly define :p points to :Bar instances :f a :Foo . :b a :Bar . :f :p :b .
What This Fixes
With these declarations, the visualization tool can clearly parse the relationship structure:
- All instances of
:Fooare valid subjects for the property:p - All objects linked via
:pwill be instances of:Bar
This gives the tool the explicit metadata it needs to generate the Domain-Range graph you're expecting. If you were hoping to rely on inference instead of explicit declarations, you might need to enable reasoning capabilities in your visualization tool—but adding direct rdfs:domain/rdfs:range assertions is the most reliable way to get the graph working immediately.
内容的提问来源于stack exchange,提问作者floatingpurr

