W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2004

RDQL - How to read the content of a bag?

From: <carsten@spichal.com>
Date: Mon, 2 Feb 2004 14:54:02 +0100
To: <www-rdf-interest@w3.org>
Message-Id: <6185270$1075729503401e545fb56c61.56859383@config11.schlund.de>


Hi everybody!

We are working with Jena 2.0. Right now we have some problems to
retrieve the content of a RDF-bag. The RDF-data is build like this:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"
xmlns:unihi="http://www.uni-hildesheim.de/~semweb/submodel.rdf#">
	<rdf:Description>
	<dc:title>Practical digital libraries dbooks, bytes, and
bucks</dc:title>
		<dc:creator>
			<vCard:N>
				<vCard:Family>Lesk</vCard:Family>
				<vCard:Given>Michael</vCard:Given>
			</vCard:N>
		</dc:creator>
		<dc:subject>
			<rdf:Bag>
			<rdf:li>Libraries</rdf:li>
			<rdf:li>Special collections</rdf:li>
			<rdf:li>Computer files</rdf:li>
			<rdf:li>United States</rdf:li>
			<rdf:li>Digital libraries</rdf:li>
			<rdf:li>Elektronische Bibliothek</rdf:li>
			</rdf:Bag>
		</dc:subject>
		<dc:subject>
			<rdf:Bag>
			<rdf:li>
				<unihi:hanke>
					<rdf:value/>
					<rdfs:label/>
				</unihi:hanke>
			</rdf:li>
			<rdf:li>
				<unihi:pica>
				<rdf:value>806.54</rdf:value>
		<rdfs:label>Bibliotheksautomatisierung</rdfs:label>
				</unihi:pica>
				</rdf:li>
				<rdf:li>
					<unihi:sachgruppe>
					<rdf:value>BUB 160</rdf:value>
					<rdfs:label/>
					</unihi:sachgruppe>
				</rdf:li>
			</rdf:Bag>
		</dc:subject>

We have two questions: 
How can we retrieve a specific content of a bag? 

This is our query and the result! In line 6 of the query we try to
recall the first element of the first bag. This works so far, but we
would like to recall the whole bag. In the result we get also the b-node
of the second bag. But we would like to avoid this because we are
interested in retrieving the content of a specific bag (in this case the
first bag).


SELECT ?person,?title,?liste
WHERE (?x, <dc:title>, ?title),
      (?x, <dc:creator>, ?name),
      (?name, <vCard:Family>, ?person),
      (?x, <dc:subject>, ?bag),
      (?bag, <rdf:_1>, ?liste)
USING dc FOR <http://purl.org/dc/elements/1.1/>,
      vCard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>, 
      rdf FOR <http://www.w3.org/1999/02/22-rdf-syntax-ns#>   

person       | title                       | liste                     
=======================================================================
"Lesk"       | "Practical digital ..."     | "Libraries"               
"Lesk"       | "Practical digital ..."     <15ac3c9:fa766df73b:-7ffc>  

And how can we distinguish between the two bags in the RDQL-Query?
It would be nice if you could help us!

A lot of greetings from Hildesheim, Germany!

Carsten!

-- 
Carsten Spichal
Samelsonplatz 4
31141 Hildesheim
05121-602565
Received on Monday, 2 February 2004 08:56:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:58 UTC