# Title: 
#     Ontology Elements Shall Have at Most One SKOS prefLabel per Language
# Constraint Description: 
#     Each ontology element shall have at most one skos:prefLabel per language.
# Severity:
#     Warning

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

SELECT DISTINCT ?resource ?property ?value ?error
WHERE
{
    ?resource skos:prefLabel ?value .
    ?resource skos:prefLabel ?value2 .
    FILTER ((lang(?value) = lang(?value2)) && (?value != ?value2)) .
    FILTER (!isBlank(?resource))
    FILTER (lang(?value) != "")
    BIND (concat("WARNING: The following ontology elements have more than one skos:prefLabel per language ", str(?resource)) AS ?error)
}
ORDER BY ?resource