geosparql:skosMatch Extensions functions to SPARQL
                                                                                62
Copyright © 2015 Open Geospatial Consortium.
prefix geosparql-ext: http:www.opengis.nettestbed11deffunctiongeosparql . prefix skos:  http:www.w3.org200402skoscore .
prefix ems:   http:www.opengis.nettaxonomyems .
hswg:MarineIncident  a http:www.opengis.netontemergencyincidentIncidentTheme ,
http:www.w3.org200207owlThing , skos:Concept ; rdfs:label               Marine
incidenthttp:www.w3.org2001XMLSchemastring ; skos:closeMatch          ems:ems.incident.marine ;
skos:definition          An event involving a boat or ship resulting in damage, bodily injury, death, or the disruption of transportation
service.http:www.w3.org2001XMLSchemastring ; skos:exactMatch          ems:ems.incident.marine ;
skos:inScheme            hswg:Incident ; skos:narrowMatch         ems:ems.incident.marine.marineSecurity ,
ems:ems.incident.marine.portClosure , ems:ems.incident.marine.specialMarine ; skos:narrower            ems:ems.incident.marine.marineSecurity ,
ems:ems.incident.marine.portClosure , ems:ems.incident.marine.specialMarine , hswg:MarineAccident , hswg:MarineHijacking ;
skos:narrowerTransitive  ems:ems.incident.marine.marineSecurity , ems:ems.incident.marine.portClosure , ems:ems.incident.marine.specialMarine ,
hswg:MarineAccident , hswg:MarineHijacking ; skos:note                An event involving a boat or ship resulting in damage, bodily
injury, death, or the disruption of transportation service.http:www.w3.org2001XMLSchemastring ;
skos:prefLabel           Marine incidenthttp:www.w3.org2001XMLSchemastring ;
skos:semanticRelation    hswg:MarineAccident , hswg:MarineHijacking ; skos:topConceptOf        hswg:Incident .
Example2: List all the matching of EMS concepts to HSWG taxonomy callled hswg:Incident
PREFIX symbol:
http:www.opengis.netontportrayalsymbol
PREFIX style:
http:www.opengis.netontportrayalstyle
PREFIX geosparql-ext:
http:www.opengis.nettestbed11deffunctiongeosparql
PREFIX ems:
http:www.opengis.nettaxonomyems
PREFIX hswg:
http:www.fgdc.govHSWGtaxonomyincidents
PREFIX geosparql:
http:www.opengis.netontgeosparql
PREFIX
skos
:
http:www.w3.org200402skoscore
Copyright © 2015 Open Geospatial Consortium.
63 SELECT ?srcConcept ?
match
WHERE { ?srcConcept a
skos
:Concept. ?srcConcept
skos
:inScheme ems:EMSIncidentTaxonomy. BIND
geosparql-ext:
skosMatch
?srcConcept, hswg:Incident  AS ?
match
} The following result is returned:
{ head: {
vars: [ srcConcept , match ] } ,
results: { bindings: [
{ srcConcept: { type: uri , value:
http:www.opengis.nettaxonomyemsems.incident.civil.civilDemonstration } , match: { type: uri , value:
http:www.fgdc.govHSWGtaxonomyincidentsCivilDemonstrations } } ,
{ srcConcept: { type: uri , value:
http:www.opengis.nettaxonomyemsems.incident.civil.civilDisplacedPopulation } , match: { type: uri , value:
http:www.fgdc.govHSWGtaxonomyincidentsCivilDisplacedPopulation } } ,
{ srcConcept: { type: uri , value:
http:www.opengis.nettaxonomyemsems.incident.civil.civilEmergency } , match: { type: uri , value:
http:www.fgdc.govHSWGtaxonomyincidentsCivilDisturbanceIncident } } ,
{ srcConcept: { type: uri , value:
http:www.opengis.nettaxonomyemsems.incident.civil.civilRioting } , match: { type: uri , value:
http:www.fgdc.govHSWGtaxonomyincidentsCivilRioting } } ,
{ srcConcept: { type: uri , value:
http:www.opengis.nettaxonomyemsems.incident.crime.illigalImmigrant } , match: { type: uri , value:
http:www.fgdc.govHSWGtaxonomyincidentsCriminalActivityIncident }
64
Copyright © 2015 Open Geospatial Consortium.
} , ….. truncated
] }
}
This function comes handy to perform ontology alignment using mapping when some property uses different taxonomies. It makes it easier to write the transformation mapping
using SPARQL.
                