Your query is invalid SPARQL, if you include some white space you can easily see this:
SELECT ?s
WHERE
{
?s rdf:type cim:TopologicalNode ;
cim:TopologicalNode.BaseVoltage ?o rdf:resource '#_2a9' ;
}
After the ?o
you immediately state another predicate and object pair but fail to include any additional punctuation to separate the tokens and indicate a new triple pattern so the parser is quite right to give you this error. Of course the error could be more helpful but that's a separate issue.
You can fix your query by inserting an additional semicolon character like so:
SELECT ?s
WHERE
{
?s rdf:type cim:TopologicalNode ;
cim:TopologicalNode.BaseVoltage ?o ;
rdf:resource '#_2a9' ;
}
Btw you still won't actually get any results because rdf:resource
is merely a serialisation detail of RDF/XML and will not show up in your data. What you probably meant was simply to use the URI in place of ?o
like so:
SELECT ?s
WHERE
{
?s rdf:type cim:TopologicalNode ;
cim:TopologicalNode.BaseVoltage <http://example.org#_2a9> ;
}
Of course you may still need to tweak this slightly to use the correct URI here but this should point you in the right direction