Skip to content
Jim Balhoff edited this page Feb 21, 2014 · 5 revisions

No variables in OWL expressions

A major limitation of owlet is that the OWL expression cannot contain variables. So the owlet expression can be used to grab a specific set of classes or individuals from the ontology, but different versions of the expression can't be generated based on other parts of the SPARQL query. For example, you might imagine a variable standing for an OWL class that is selected by some annotation property you've added to the RDF data (this is not valid):

SELECT DISTINCT ?gene
WHERE 
{
?gene ao:expressed_in ?muscle .
?muscle rdf:type ?muscle_type .
?containing_structure ex:in_subset ex:InterestingStructureGroup . # use these tagged structures in the OWL expression
?muscle_type rdfs:subClassOf "ao:muscle and (ao:part_of some ?containing_structure)"^^ow:omn .
}

You can also see that this limitation prevents you from capturing variable parts of the OWL expression as values in the SELECT query results.

Clone this wiki locally