Steve,

On Oct 28, 2010, at 3:09 AM, Steve Bayliss wrote:

> All Content Model objects *should* contain the triple that Adam has
> identified, the triple isn't generated automatically (however if an object
> declares no content model, then a triple will be generated identifying the
> "default" content model - info:fedora/fedora-system:FedoraObject-3.0).
> 

Thanks very much for confirming the use of <fedora-model:hasModel 
rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/> as convention. 

Some of our cmodels do not assert it, so I will update them to do so.

> I'm not sure if the CMA works correctly if a Content Model object fails to
> declare that triple, perhaps that's what is going on in this case?  It would
> be useful to confirm if (a) the RELS-EXT of the CModel objects do indeed
> fail to declare that triple and (b) if any objects belonging to that CModel
> "work" correctly wrt object methods etc.
> 

Yes, they do work, at least as regards CMA binding for dissemination execution.

> If you want to query for content models *in use* by objects in the
> repository, you could use the query
> 
> select $o
> from <#ri>
> where $s <info:fedora/fedora-system:def/model#hasModel> $o
> 
> and use the "Force Distinct" option in the risearch web interface (or the
> distinct=on query parameter if calling the risearch service directly).
> 

That's what I'm doing now, though since your confirmation that cmodel objects 
should assert  <fedora-model:hasModel 
rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/>, I'll update all 
our cmodels to do so. I'm then inclined to use Adam's original query suggestion 
as it seems more efficient:

        select $cmodel
        from   <#ri>
        where $cmodel <fedora-model:hasModel> 
"info:fedora/fedora-system:ContentModel-3.0"

Thanks very much,

- Bill




> Steve
> 
>> -----Original Message-----
>> From: aj...@virginia.edu [mailto:aj...@virginia.edu] 
>> Sent: 22 October 2010 16:10
>> To: Support and info exchange list for Fedora users.
>> Subject: Re: [fcrepo-user] Cmodel discovery?
>> 
>> 
>> Bill--
>> 
>> Perhaps we're seeing CModels created by different means 
>> ending up with different RELS-EXT contents. I'm seeing that 
>> triple in all of our CModels, but because some of them were 
>> taken from external sources (e.g. a JPEG2000 CModel from the 
>> LANL Djatoka project) I don't know whether this triple is 
>> normatively produced or is just a matter of convention.
>> 
>> Perhaps one of the Fedora developers can speak to this?
>> 
>> ---
>> A. Soroka
>> Digital Research and Scholarship R & D
>> the University of Virginia Library
>> 
>> 
>> 
>> On Oct 22, 2010, at 10:59 AM, Bill Parod wrote:
>> 
>>> Hi Adam,
>>> 
>>> I tried it (with slightly different syntax):
>>> select $cmodel
>>> from   <#ri>
>>> where $cmodel <fedora-model:hasModel> 
>> <info:fedora/fedora-system:ContentModel-3.0>
>>> 
>>> and found some of our cmodels but not all, which leads me 
>> to think that you've not only provided a query solution but 
>> revealed something some of our cmodels RELS-EXT are lacking: 
>>> 
>>> <fedora-model:hasModel 
>> rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/>
>>> 
>>> Is that indeed the convention?
>>> 
>>> Thanks much!
>>> 
>>> Bill
>>> 
>>> 
>>> 
>>> 
>>> On Oct 22, 2010, at 9:40 AM, aj...@virginia.edu wrote:
>>> 
>>>> Bill--
>>>> 
>>>> If I'm not mistaken, you'll find an RDF statement:
>>>> 
>>>> <fedora-model:hasModel 
>> rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/>
>>>> 
>>>> in every cModel object. Might that be a query that can do 
>> the job? Something like:
>>>> 
>>>>    select $cmodel
>>>>    from   <#ri>
>>>>    where $cmodel <fedora-model:hasModel> 
>> "info:fedora/fedora-system:ContentModel-3.0"
>>>> 
>>>> 
>>>> ---
>>>> A. Soroka
>>>> Digital Research and Scholarship R & D
>>>> the University of Virginia Library
>>>> 
>>>> 
>>>> 
>>>> On Oct 22, 2010, at 10:34 AM, Bill Parod wrote:
>>>> 
>>>>> I'm working on a repository introspection service that 
>> provides a repository profile from the point of view of 
>> cmodels and services. The motivation is to obtain a concise 
>> picture of what's in the repository, provide export tools to 
>> aid in selective migration, and to generate model/service 
>> documentation from the models and services themselves. 
>>>>> 
>>>>> My question is this: Is there a way, using Fedora REST 
>> APIs or triple store queries to obtain a list of the pids of 
>> cmodel objects in the repository? 
>>>>> 
>>>>> I'm currently using the triple store to query for cmodel 
>> / service pairings:
>>>>>   select $cmodel $service
>>>>>   from   <#ri>
>>>>>   where $cmodel <fedora-model:hasService> $service
>>>>> 
>>>>> But that will only find cmodels that have associated 
>> services. Ours tend to fall into that category but I'd like 
>> to do it in a way that is more general. I'm not very 
>> experienced with using the tripe store, so I'm hoping there's 
>> a way there to do this, though that seems doubtful from what 
>> I'm seeing in cmodel RELS-EXT.
>>>>> 
>>>>> I know I can do a sql query on the database ( select 
>> distinct cModel from modelDeploymentMap) , but I'd of course 
>> like to avoid cutting in at that level, and I'm not sure 
>> cmodels without services are represented there anyway.
>>>>> 
>>>>> Is there a way to discover cmodels using the APIs or the 
>> triple store? Or is it best to put something specific in 
>> cmodel RELS-EXT for that purpose? That's what I'm about to 
>> do, but thought I'd ask first.
>>>>> 
>>>>> Thanks,
>>>>> Bill
>>>>> 
>>>>> Bill Parod
>>>>> Library Technology Division - Enterprise Systems
>>>>> Northwestern University Library 
>>>>> bill-pa...@northwestern.edu
>>>>> 847 491 5368
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>> --------------------------------------------------------------
>> ----------------
>>>>> Nokia and AT&T present the 2010 Calling All 
>> Innovators-North America contest
>>>>> Create new apps & games for the Nokia N8 for consumers in 
>> U.S. and Canada
>>>>> $10 million total in prizes - $4M cash, 500 devices, 
>> nearly $6M in marketing
>>>>> Develop with Nokia Qt SDK, Web Runtime, or Java and 
>> Publish to Ovi Store 
>>>>> 
>> http://p.sf.net/sfu/nokia-dev2dev_____________________________
>> __________________
>>>>> Fedora-commons-users mailing list
>>>>> Fedora-commons-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>>>> 
>>>> 
>>>> 
>> --------------------------------------------------------------
>> ----------------
>>>> Nokia and AT&T present the 2010 Calling All 
>> Innovators-North America contest
>>>> Create new apps & games for the Nokia N8 for consumers in  
>> U.S. and Canada
>>>> $10 million total in prizes - $4M cash, 500 devices, 
>> nearly $6M in marketing
>>>> Develop with Nokia Qt SDK, Web Runtime, or Java and 
>> Publish to Ovi Store 
>>>> http://p.sf.net/sfu/nokia-dev2dev
>>>> _______________________________________________
>>>> Fedora-commons-users mailing list
>>>> Fedora-commons-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>>> 
>>> Bill Parod
>>> Library Technology Division - Enterprise Systems
>>> Northwestern University Library 
>>> bill-pa...@northwestern.edu
>>> 847 491 5368
>>> 
>>> 
>>> 
>>> 
>>> 
>> --------------------------------------------------------------
>> ----------------
>>> Nokia and AT&T present the 2010 Calling All 
>> Innovators-North America contest
>>> Create new apps & games for the Nokia N8 for consumers in  
>> U.S. and Canada
>>> $10 million total in prizes - $4M cash, 500 devices, nearly 
>> $6M in marketing
>>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish 
>> to Ovi Store 
>>> 
>> http://p.sf.net/sfu/nokia-dev2dev_____________________________
> __________________
>> Fedora-commons-users mailing list
>> Fedora-commons-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> 
> 
> ----------------------------------------------------------------------------
> --
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> 
> 
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Bill Parod
Library Technology Division - Enterprise Systems
Northwestern University Library 
bill-pa...@northwestern.edu
847 491 5368



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to