[ 
https://issues.apache.org/jira/browse/MARMOTTA-617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14936900#comment-14936900
 ] 

Dietmar Glachs commented on MARMOTTA-617:
-----------------------------------------

Sure, you can find the query in the description of the issue - see above. Then 
you'll need a simple SKOS-Thesaurus like the following:

{code:xml}
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix : <http://sample/vocabulary/> .

:Vocabulary a skos:ConceptScheme;
    skos:hasTopConcept :TopLevelConceptA;
    skos:hasTopConcept :TopLevelConceptB; 
    rdfs:label "A simple Vocabulary"@en.

:TopLevelConceptA a skos:Concept;
    skos:inScheme :Vocabulary;
    skos:topConceptOf :Vocabulary;
    skos:prefLabel "Label Concept a"@en.

:TopLevelConceptB a skos:Concept;
    skos:inScheme :Vocabulary;
    skos:topConceptOf :Vocabulary;
    skos:narrower :NarrowerConceptB;
    skos:prefLabel "Label Concept b"@en.

:NarrowerConceptB a skos:Concept;
    skos:inScheme :Vocabulary;
    skos:broader :TopLevelConceptB;
    skos:prefLabel "Label Concept b"@en.
{code}
which you may import in a graph (for example <http://host/context/graph>). 
Running the above query will then show a proper value for ?children including 
data type. 

Without the patch, no datatype is assigned, and for example SKOSjs does not 
work properly.


> SPARQL-command with "native" sparql.strategy setting fails
> ----------------------------------------------------------
>
>                 Key: MARMOTTA-617
>                 URL: https://issues.apache.org/jira/browse/MARMOTTA-617
>             Project: Marmotta
>          Issue Type: Bug
>          Components: KiWi Triple Store
>    Affects Versions: 3.3.0
>            Reporter: Dietmar Glachs
>
> The following SPARQL-Command fails when using the configuration setting 
> {{native}} for {{sparql.strategy}}:
> {code}
> SELECT DISTINCT ?uri ?title ?children {
>   GRAPH <http://host/context/graph> {
>     ?uri a <http://www.w3.org/2004/02/skos/core#ConceptScheme> .
>     OPTIONAL { 
>       ?uri <http://www.w3.org/2000/01/rdf-schema#label> ?title . 
>       FILTER (lang(?title) = 'en') 
>     }
>     BIND ( EXISTS { ?uri <http://www.w3.org/2004/02/skos/core#hasTopConcept> 
> ?_top } AS ?children )
>   }
> }
> {code}
> when using {{sparql.strategy=memory}} the query works!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to