Hello Hans,
First of all: the object of this relation should not be al literal but an uri
resource.
So this for collection with PID my:collection:
<isMemberOfCollection
xmlns="info:fedora/fedora-system:def/relations-external#"
rdf:resource="info:fedora/my:collection"/>
and your query will be:
prefix e: <info:fedora/fedora-system:def/relations-external#>
select ?s
where { ?s e:isMemberOfCollection <info:fedora/my:collection>}
Second: if the object of a relation is a plain literal you should not use
rdf:parseType="literal" because that is for xml. Just omit it:
<someRelation xmlns="some:namespace/">ABC_0123</someRelation>
I hope this helps (and don't forget the info:fedora/ part like I do about 10
times a day)
Egbert Gramsbergen
-----Original Message-----
From: hans [mailto:[email protected]]
Sent: donderdag 6 september 2012 10:45
To: [email protected]
Subject: [fcrepo-user] question sparql/rels-ext
Hi,
I'm trying to add some relations in my rels-ext like so:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description
rdf:about="info:fedora/unicum:uba.items.12903be24c35550edd1be17a7b3d9f12">
<isMemberOfCollection
xmlns="info:fedora/fedora-system:def/relations-external#"
rdf:parseType="literal">
ABC_0123
</isMemberOfCollection>
</rdf:Description>
</rdf:RDF>
When querying the triplestore with
prefix e: <info:fedora/fedora-system:def/relations-external#>
select ?s
where { ?s e:isMemberOfCollection 'ABC_0123'}
I have no results
Querying with
prefix e: <info:fedora/fedora-system:def/relations-external#>
select ?s ?o
where { ?s e:isMemberOfCollection ?o}
gives me:
"s","o"
info:fedora/unicum:uba.items.12903be24c35550edd1be17a7b3d9f12,ABC_0123
Why do i not have a result with the first query?
Regards, Hans
--
View this message in context:
http://fedora-commons.1317035.n2.nabble.com/question-sparql-rels-ext-tp7578332.html
Sent from the Fedora Commons Users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will include
endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users