Hello, I am currently in the process of migrating our Fedora 2.2.4-based Repository to Fedora 3.1, and I'm wondering what would be the best way to model the following functionality in the new CMA:
In our repository we have an abstract "Document"-model-class which can be either a PDF document or a LaTeX-Document. In Fedora 2, we have the data object which contains (among other metadata) an OCTETS datastream which is the binary stream of the PDF- or the LaTeX-document (with different MIME-types - application/pdf or text/x-tex). One special functionality of these objects is that they can disseminate as PDF, no matter if they are PDF already or LaTeX, in which case they have to be converted first. This is expressed as bdef:Document with one method, "getPDF". Now currently in our Fedora 2 based repository we either added a bmech:DocumentPDFImpl or bmech:DocumentLaTeXImpl-disseminator, depending on which MIME-type the OCTETS-datastream has, to the object, thus being able to "route" the request to different webservices which take care of the dissemination. Now I'm trying to map that behaviour to the CMA of Fedora 3. As far as I can see, I'd have to create two new content model objects, for example "cmodel:PDFDocument" and "cmodel:LaTex- Document", which both "hasService" "bdef:Document". And for the deployment, two new service deployment objects "sdep:PDFDocument" and "sdep:LaTexDocument", which are "contractorOf" cmodel:PDFDocument and cmodel:LaTeXDocument, respectively. This seems a bit clumsy. Why can't I just have _one_ cmodel:Document - it doesn't seem necessary to distinguish between cmodel:PDFDocument and cmodel:LaTeXDocument - the layout of the underlying two data objects is absolutely the same, apart from the MIME-type for the OCTETS-datastream. I tried that, and told the two sdep:LaTeXDocument and sdep:PDFDocument service deployments to be contractors of cmodel:Document and deployment of bdef:Document, but then I get a INFO message in the log: INFO 2009-04-09 11:41:19.723 [main] (DefaultDOManager) More than one service deployment specified for sDef bdef:Document in model cmodel:Document. Using the one with the EARLIEST modification date. So this doesn't seem to be allowed. From a mere technical point of view, it would be absolutely possible for Fedora to pick the right service deployment from the MIME-type of a datastream, if two or more service deployments come into question for a dissemination request. So my question is: can this be done in another, correct, way, or do I really have to create two separate cmodel-objects for two separate service deployments, e.g. for PDF- and for LaTeX-documents (and possibly many many more...)? Thank you, Tom ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Fedora-commons-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
