On 21 Sep 2012 at 10:47, Dan Haywood wrote:

> On 21 September 2012 10:38, Giedrius Grazevicius <[email protected]> wrote:
> 
> > > ~~~
> > > 2. Why is ContentDescription and the describeXxx() method required?
> > >  Wouldn't an annotation do? eg:
> >
> > I considered an annotation, but this way we are limiting what can be
> > stored. For example we want to allow storing Adobe Acrobat
> > (application/pdf) and Microsoft Word (application/msword) documents,
> > but with static annotation there is no way of doing it. Though I
> > agree, that the filename can be inferred from attribute name + mime
> > type, for example by using standard Java mechanism (.mime.type files).
> >
> >
> I must be missing something.  In:
> 
> @Blob(mimeType="application/pdf")
> public byte[] getCurriculumVitae() { ... }
> public void setCurriculumVitae(byte[] cv) { ... }
> 
> we have the mime type there.  What other info is it that we need?

What Giedrius was saying, and which I agree with, is that the field (CV, 
in this case) does not *have* to be of a single document type.

What if CVs are also submitted as Word docx and Open Office odts?

This is a valid use-case.




There is another question waiting in the wings: How would we handle 
this if you don't want to store the document byte stream as a blob in 
the database, but leave it on the file system? 
In the SQL-OS and I could just write a valuemapper that knows to 
fetch the actual byte stream via the filename (which would be stored in 
the database).. this uses the existing object store API. Is there another 
solution?

Regards,
Kevin


Reply via email to