AF Content Models vs Fedora Content Models

5 views
Skip to first unread message

Nathan

unread,
Oct 7, 2009, 10:54:30 AM10/7/09
to ActiveFedora / Ruby + Fedora Commons
Been looking through the AF and ruby-fedora code, and I had a question
about "content models" in ActiveFedora that I was hoping you all could
help me with.

It would appear to me that there's an important distinction between
content models in ActiveFedora and content models in Fedora. I had
assumed (I think) that the "models" you create in ActiveFedora would
actually mirror themselves in Fedora as FOXML-defined content models,
but I can't find any evidence in the code that this is the case. If it
were, one would think that all datastream accesses would be coming
through the accessors created in that FOXML, but instead ActiveFedora
appears to construct URLs that use the default or "basic" way of
getting at Fedora objects (implicitly using the basic content model
that Fedora creates for every new object).

This would mean that, even if you created (Fedora, FOXML-described)
content models "by hand" for your ActiveFedora-created objects, there
would be no way -within- ActiveFedora to subscribe to those content
models, or to use the accessors they describe.

Is this the way it works? I could definitely be missing something.

If so, I was wondering what the intention was with regard to content
model use. (This is a similar question to my disseminators question
from last week.) Is it simply the case that most schools never create
content models beyond the Fedora basic one, and so it was assumed that
support for that could be delayed somewhat? Is it the intention that
people create any content models they need by hand and not use them
within ActiveFedora?

Thanks,
Nathan

Matthew Zumwalt

unread,
Oct 7, 2009, 11:36:26 PM10/7/09
to active...@googlegroups.com
Hi Nathan.  

Thanks for asking.  In short, we've been waiting for someone to need this feature before we put time into implementing it.  I have already planned out how it will work but didn't prioritize implementing it because nobody was asking for it.  We all agreed that it made sense to do, but nobody seemed to have concrete plans for taking advantage of it.

There used to be a ticket for this feature but for some strange reason I closed it months ago.  I've created a new ticket #509Ability to push model information into a Fedora CMA CModel object.

Even with #509 implemented, that will just push the ActiveFedora model information into a CModel object.  As far as support for actually using disseminators, for now I am just planning to do what's described in #501Support for using (reading) Disseminators.  It would certainly be really nofty if ActiveFedora provided a way to construct disseminators, possibly using Chris Wilper's EZService, but I want to see a couple concrete use cases for that before I actually consider implementing it. 

Matt Zumwalt
MediaShelf, LLC



Nathan Piazza

unread,
Oct 8, 2009, 10:18:02 AM10/8/09
to active...@googlegroups.com, hydra-...@mailman.stanford.edu
Hi Matt,

Thanks for the usual speedy response. I'm really excited to hear that 509 and 501 are in the works. And while I agree that support for disseminator "creation" is probably not necessary in the near future (there usually aren't that many to create anyway, you can create them using the Fedora client fairly easily, etc), there are a couple of features that we -do- have usecases for today that are not explicitly referred to in 509. I don't know if you want to call these features "read support" for disseminators or "extended read support", but they all involve how ruby-fedora/active-fedora read data out of Fedora.

For instance... So, having ruby-fedora provide an accessor to a disseminator is a terrific and necessary bit of plumbing. But I think ideally, if you create an object in active-fedora, you should be able to assert in the RELS-EXT that it subscribes to a (pre-existing) contentModel (fedora-model:hasModel), that the content model has a service definition (fedora-model:hasService), that the content model has a service deployment contractor  (fedora-model:isContractorOf), and that the serviceDeployment is a deployment of the service definition (fedora-model:isDeploymentOf). (Among other issues blocking us from doing this in AF currently, none of these Fedora system level relations are available in the pre-defined list of RELS-EXT relations in ActiveFedora's "semantic_node.rb" - probably because they don't appear to be in the RELS-EXT rdf ontology either.)

When you define these "special relationships", ideally ActiveFedora would check to make sure the CMs and sdef/sdeps with the PIDS/names you described actually exist in Fedora. And if they DO exist, generate a whole new set of Ruby accessors for the ActiveFedora objects that would effectively insure that you were getting at the object via the disseminator.

Why, you ask, might you want to do this? Well, the general argument is that I think this would more or less bring ActiveFedora into "full" compliance with the Fedora content model architecture. But if you want a specific usecase, imagine that you want to use a particular content model/dissemination as a site of secure control over your data, as you will soon be able to do with FESL, if I understand that work correctly. So, in that instance, you're going to probably want to lock down -direct- access to your objects' datastreams and make available only certain fields, through a dissemination. In that instance, the ActiveFedora code is going to throw errors because its basic way of getting at the data is being blocked by Fedora. If a developer wants to write robust code, using the "low level" ActiveFedora access to the raw datastreams is a bad way to go.

-Nathan
--
//////////////////////////////////////////////
Nathan F. Piazza
nathan...@gmail.com
mobile: 404.713.1829
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Nathan

unread,
Oct 8, 2009, 10:39:04 AM10/8/09
to ActiveFedora / Ruby + Fedora Commons
Sorry, just to clarify: "there are a couple of features that we -do-
have
usecases for today that are not explicitly referred to in 509" should
read "there are a couple of features that we -do- have
usecases for today that are not explicitly referred to in 501".

-Nathan
> > closed it months ago.  I've created a new ticket #509<http://projects.mediashelf.us/issues/show/509>
> > : Ability to push model information into a Fedora CMA CModel object<http://projects.mediashelf.us/issues/show/509>
> > .
>
> > Even with #509 <http://projects.mediashelf.us/issues/show/509> implemented,
> > that will just push the ActiveFedora model information into a CModel object.
> >  As far as support for actually using disseminators, for now I am just
> > planning to do what's described in #501<http://projects.mediashelf.us/issues/show/501>
> > : Support for using (reading) Disseminators<http://projects.mediashelf.us/issues/show/501>.
> >  It would certainly be really nofty if ActiveFedora provided a way to
> > construct disseminators, possibly using Chris Wilper's EZService<http://fedora-commons.org/confluence/pages/viewpage.action?pageId=137...>,
> nathan.pia...@gmail.com
> mobile: 404.713.1829
> \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Nathan

unread,
Oct 8, 2009, 1:49:33 PM10/8/09
to ActiveFedora / Ruby + Fedora Commons
Also, FYI, I received this pointer from Chris Wilper, via Thorny, to a
Fedora Commons page documenting most of the important Fedora "system
relationships". They are not in the RELS-EXT rdf ontology, but it
would be nice to support fedora-model:hasService, hasModel,
isContractorOf, and isDeploymentOf.

-Nathan

Nathan

unread,
Oct 8, 2009, 1:50:33 PM10/8/09
to ActiveFedora / Ruby + Fedora Commons
http://fedora-commons.org/confluence/display/FCR30/Triples+in+the+Resource+Index

Sorry, forgot to paste it in.

-Nathan

On Oct 8, 10:39 am, Nathan <nathan.pia...@gmail.com> wrote:

Nathan

unread,
Oct 8, 2009, 3:57:25 PM10/8/09
to ActiveFedora / Ruby + Fedora Commons
Actually, having actually created some models and sdep/sdefs today, I
see that unless AF is creating the content model (which it doesn't
really need to do), all we need to add to semantic_node.rb is fedora-
model:hasModel.

But it would still be nice if, upon asserting the hasModel
relationship in an AF object model, the AF code looked up any
disseminations for the Fedora content model and created accessors on
the AF object.

-Nathan

On Oct 8, 1:50 pm, Nathan <nathan.pia...@gmail.com> wrote:
> http://fedora-commons.org/confluence/display/FCR30/Triples+in+the+Res...
Reply all
Reply to author
Forward
0 new messages