Hi all,
I'm currently struggling with the definition of a query to get a list of
datastreams that match a specific property and belong to a particular
digital object. Here is an example to illustrate my problem:
I have one digital object (let's say: pid = di:101) that contains several
datastreams of type M (managed content). Here is the RELS-INT definition:
<rdf:RDF xmlns:fedora="info:fedora/fedora-system:def/relations-external#"
xmlns:myns="http://www.nsdl.org/ontologies/relationships#" xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="
http://www.w3.org/2000/01/rdf-schema#">
<rdf:Description rdf:about="info:fedora/di:101/DOC_1">
<myns:type>pdf1a</myns:type>
</rdf:Description>
<rdf:Description rdf:about="info:fedora/di:101/DOC_2">
<myns:type>pdf1b</myns:type>
</rdf:Description>
</rdf:RDF>
Note: I'm using RELS-INT to add an extract information about the mime-type.
Indeed, knowing that a datastream is of type 'application/pdf' is not enough
because I need to distinguish pdf1a from pdf1b, for instance.
I can easily get the list of datastreams of a specific type (let's say
'pdf1a') like this:
select $object from <#ri> where $object <
http://www.nsdl.org/ontologies/relationships#type> 'pdf1a'
With this query, I get all datastreams in the Fedora's repository where
their type is 'pdf1a' but I would like to limit the result to a specific
digital object. Something like this:
select $object from <#ri> where $object <
http://www.nsdl.org/ontologies/relationships#type> 'pdf1a' and
<info:fedora/di:101> <dc:identifier> 'di:101'
When a execute such a query, I get an empty result which is normal because
my understanding is that there's no common results in the two set (separated
by the 'and'). But I'm wondering how I could rewrite the query the proper
way.
Any idea? Thanks in advance.
Regards,
--
*Ludovic*
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users