I'm a new stardog user. Quite impressed so far but having some trouble with basic questions and a bit confused, especially insofar as skos: support and how namespaces are being handled.
I've a java program that converts a geonames .csv file to (what I believe is) valid turtle (more or less) and importing it via the batch command-line interface. Here's a snippet of the import file:
@prefix base: <http://dtra.mil/LocationOntology> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dc: <http://purl.org/dc/elements/1.1/#> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix dtra: <http://dtra.mil/LocationOntology#> .
<dtra:LocationOntology> a <owl:Ontology> ;
<owl:imports> <http://www.w3.org/2008/05/skos> , <http://www.w3.org/2003/01/geo/wgs84_pos> , <http://www.w3.org/2002/07/owl> .
<dtra:LocationScheme> a <skos:ConceptScheme> ;
<skos:prefLabel> "Locations" ;
<skos:altLabel> "Places" ;
<skos:inScheme> <dtra:LocationScheme> .
<dtra:Location> a <skos:TopConcept> ;
<skos:prefLabel> "Location" ;
<skos:altLabel> "Place" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <skos:Concept> ;
<rdfs:comment> "The class of locations/places from geonames.org" .
<dtra:City> a <dtra:Location> ;
<skos:prefLabel> "City" ;
<skos:altLabel> "Village" , "Town" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <dtra:Location> ;
<rdfs:comment> "The class of cities, towns or villages from geonames.org." ;
<skos:broader> <dtra:County> ;
<rdfs:label> "City" .
<dtra:County> a <dtra:Location> ;
<skos:prefLabel> "County" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <dtra:Location> ;
<rdfs:comment> "The class of counties from geonames.org." ;
<skos:broader> <dtra:State> ;
<rdfs:label> "County" .
<dtra:State> a <dtra:Location> ;
<skos:prefLabel> "State" ;
<skos:altLabel> "Province" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <dtra:Location> ;
<rdfs:comment> "The class of states or provinces from geonames.org" ;
<skos:broader> <dtra:Country> ;
<rdfs:label> "State" .
<dtra:Country> a <dtra:Location>;
<skos:prefLabel> "Country" ;
<skos:altLabel> "Nation" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <dtra:Location> ;
<rdfs:comment> """The class of countries/nations from geonames.org.
Name not provided by geonames but is derived via
lookup from a build-in table of iso country codes.""" ;
<skos:broader> <dtra:Location> , <dtra:Chilpancingo_de_los_Bravo> , <dtra:El_Mante> ;
<rdfs:label> "Country" .
<dtra:Community> a <dtra:Location> ;
<skos:prefLabel> "Community" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <dtra:Location> ;
<rdfs:comment> """The class of communities as the term is used by geonames.org.""" ;
<skos:broader> <dtra:Country> ;
<rdfs:label> "Community" .
<dtra:hasCode> a <owl:DatatypeProperty> ;
<rdfs:comment> "Postal code as used by geonames.org" .
<dtra:hasCounty> a <owl:ObjectProperty> ;
<rdfs:comment> "County as used by geonames.org" .
<dtra:hasState> a <owl:ObjectProperty> ;
<rdfs:comment> "State or Province as used by geonames.org" .
<dtra:hasCommunity> a <owl:ObjectProperty> ;
<rdfs:comment> "Community as used by geonames.org" .
<dtra:hasCountry> a <owl:ObjectProperty> ;
<rdfs:comment> "Country as used by geonames.org" .
<dtra:City_AD100> a <dtra:City> ;
<skos:prefLabel> "Canillo" ;
<geo:lat> "42.5833"^^<xsd:double> ;
<geo:long> "1.6667"^^<xsd:double> ;
<dtra:hasCountry> <dtra:Country_AD> ;
<dtra:hasCode> "AD100"^^<xsd:string> .
<dtra:Country_AD> a <dtra:Country> ;
<skos:prefLabel> "Andorra" ;
<dtra:hasCode> "AD"^^<xsd:string> .
But when I have stardog export the database as turtle, I get this; minus the@prefix information. Although namespaces are used in the body, there's no indication that namespaces are actually defined.
<dtra:LocationOntology> a <owl:Ontology> ;
<owl:imports> <http://www.w3.org/2008/05/skos> , <http://www.w3.org/2003/01/geo/wgs84_pos> , <http://www.w3.org/2002/07/owl> .
<dtra:LocationScheme> a <skos:ConceptScheme> ;
<dc:title> "DTRA Location Scheme" ;
<dc:description> "DTRA Location Thesaurus based on geonames.org" ;
<dc:creator> "Brad Cox" ;
<skos:prefLabel> "Locations" ;
<skos:altLabel> "Places" ;
<skos:inScheme> <dtra:LocationScheme> .
<dtra:Location> a <skos:TopConcept> ;
<skos:prefLabel> "Location" ;
<skos:altLabel> "Place" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <skos:Concept> ;
<rdfs:comment> "The class of locations/places from geonames.org" .
<dtra:City> a <dtra:Location> ;
<skos:prefLabel> "City" ;
<skos:altLabel> "Village" , "Town" ;
<skos:inScheme> <dtra:LocationScheme> ;
<rdfs:subClassOf> <dtra:Location> ;
<rdfs:comment> "The class of cities, towns or villages from geonames.org." ;
Can someone get me on the right path? Are those namespaces really in effect?
I'm also uncertain about owl/skos integration, especially about the relation between owl instances and skos classes (and/or instances). As far I know, skos doesn't support instances (only concepts), but the dox leave me uncertain about this. So I'm exploring...