I am a complete Semantic Web beginner and RDF4J beginner. Currently i have some RDF xml and i can not write a simple construct query to select all related statements by subject value. I have this:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://example.org/cocktail#Mimosa">
<rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
<prefLabel xmlns="http://www.w3.org/2004/02/skos/core#">Mimosa</prefLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">bla</altLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">huuh</altLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">owiii</altLabel>
<broader xmlns="http://www.w3.org/2004/02/skos/core#">Wine cocktail</broader>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/cocktail#White Russian">
<rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
<prefLabel xmlns="http://www.w3.org/2004/02/skos/core#">White Russian</prefLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">Ruski</altLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">kasdnjkldfan</altLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">oasdasi</altLabel>
<broader xmlns="http://www.w3.org/2004/02/skos/core#">Wine cocktail</broader>
</rdf:Description>
</rdf:RDF>
I want to write a simple query which takes prefLabel as an argument and selects a whole block of statements (everything in the description including the description it self). For example i have a value "Mimosa" for prefLabel and now i wish to get this:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://example.org/cocktail#Mimosa">
<rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
<prefLabel xmlns="http://www.w3.org/2004/02/skos/core#">Mimosa</prefLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">bla</altLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">huuh</altLabel>
<altLabel xmlns="http://www.w3.org/2004/02/skos/core#">owiii</altLabel>
<broader xmlns="http://www.w3.org/2004/02/skos/core#">Wine cocktail</broader>
</rdf:Description>
</rdf:RDF>