All Downloads are FREE. Search and download functionalities are using the official Maven repository.

report_queries.label_whitespace.rq Maven / Gradle / Ivy

Go to download

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