Sparql query serialization error
--------------------------------

                 Key: CLEREZZA-15
                 URL: https://issues.apache.org/jira/browse/CLEREZZA-15
             Project: Clerezza
          Issue Type: Bug
            Reporter: Hasan


The following query after being parsed generates an error when serialized

PREFIX owl: <http://www.w3.org/2002/07/owl#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX skos: <http://www.w3.org/2008/05/skos#> 
CONSTRUCT {?concept a skos:Concept; skos:prefLabel ?prefLabel; rdfs:comment 
?comment; owl:sameAs ?sameConcept .} 
WHERE { ?concept skos:inScheme <http://localhost:8080/concept-scheme/default>; 
skos:prefLabel ?prefLabel . 
OPTIONAL { ?concept skos:altLabel ?altLabel; rdfs:comment ?comment; owl:sameAs 
?sameConcept . } 
FILTER (STR(?prefLabel) = 'Linux' || STR(?altLabel) = 'Linux')}

=> error generated:

java.lang.ClassCastException: 
org.apache.clerezza.rdf.core.sparql.query.impl.SimpleBasicGraphPattern cannot 
be cast to org.apache.clerezza.rdf.core.sparql.query.GroupGraphPattern
        at 
org.apache.clerezza.rdf.core.sparql.query.impl.SimpleStringQuerySerializer.appendQueryPattern(SimpleStringQuerySerializer.java:127)
        at 
org.apache.clerezza.rdf.core.sparql.query.impl.SimpleStringQuerySerializer.appendWhere(SimpleStringQuerySerializer.java:112)
        at 
org.apache.clerezza.rdf.core.sparql.query.impl.SimpleStringQuerySerializer.serialize(SimpleStringQuerySerializer.java:270)

affected bundle: org.apache.clerezza.rdf.core

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to