Hello,
I have a basic question related to the Stardog Explorer search string.
I have done the following
- Created a Database using Studio
- Created the Model using Studio
- Created the mapping file and generated the Virtual Graph
- Enabled Virtual Transparency option in the DB properties
- Then Visualized the graph using Explorer
Everything seems working fine, but the only thing bothering is, every time I have to search for something then I have to provide the entire URI prefix to the Search keyword, like shown below. If I search only for the keyword then it is not fetching any result. Any idea what am I missing here? Please find below the snapshot of the Explorer
Mapping File (Partial):
PREFIX : <http://example.com/DNA/KG/Sample/>
PREFIX Sample: <http://example.com/DNA/KG/Sample/>
PREFIX rr: <http://www.w3.org/ns/r2rml#>
MAPPING
FROM SQL {
SELECT "country_id", "country_name", "location_currency"
FROM "public"."location"
GROUP BY "country_id", "country_name", "location_currency"
}
TO {
?subject Sample:has_currency ?has_currency .
?subject Sample:has_name ?country_name .
?subject rdf:type Sample:Country
} WHERE {
BIND(template("http://example.com/DNA/KG/Sample/{country_id}") AS ?subject)
BIND(template("http://example.com/DNA/KG/Sample/{location_currency}") AS ?has_currency)
}
;
Model
@prefix : <http://api.stardog.com/> .
@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#> .
@prefix stardog: <tag:stardog:api:> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix Location: <http://example.com/DNA/KG/Sample/> .
Location:Currency a owl:Class ;
<tag:stardog:studio:label> "Currency" ;
rdfs:label "Currency" ;
rdfs:comment "Currency" .
Location:Country a owl:Class ;
<tag:stardog:studio:label> "Country" ;
rdfs:label "Country" ;
rdfs:comment "Country" ;
rdfs:subClassOf owl:Thing .
Location:Region a owl:Class ;
<tag:stardog:studio:label> "Region" ;
rdfs:label "Region" ;
rdfs:comment "Region" ;
rdfs:subClassOf Location:Country .