report_queries.label_whitespace.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robot-core Show documentation
Show all versions of robot-core Show documentation
Core library for ROBOT: Library for working with OWL ontologies, especially Open Biological and Biomedical Ontologes (OBO).
The newest version!
# # Label Whitespace
#
# **Problem:** A label has leading or trailing whitespace. This may cause issues when trying to reference the entity by label.
#
# **Solution:** Remove the additional whitespace.
PREFIX owl:
PREFIX rdfs:
SELECT DISTINCT ?entity ?property ?value WHERE {
{
VALUES ?property {rdfs:label}
?entity ?property ?value .
FILTER REGEX(str(?value), "[\\s\r\n]+$")
FILTER (!isBlank(?entity))
}
UNION
{
VALUES ?property {rdfs:label}
?entity ?property ?value .
FILTER REGEX(str(?value), "^[\\s\r\n]+")
FILTER (!isBlank(?entity))
}
}
ORDER BY ?entity
© 2015 - 2025 Weber Informatics LLC | Privacy Policy