Thank you Nishen. I will try this and see if I can use it in my code...
Thanks again!
Pierre-Yves
Nishen Naidoo a écrit :
Hi Pierre-Yves,
I haven't used this in a bit, but I think it works... Attached is a
data utility class I have been using. The 'fedoraXMLHashFormat' method
formats a document the same way that Fedora does when computing a
hash... so if you format the doc, and compute the hash on it, it
should be the same as the Fedora generated hash.
Thanks,
Nish
Pierre-Yves JALLUD wrote:
That was what I thought... well, something like that. But is there a
method to verify the checksum when you add an "X" datastream? Maybe a
java librairy?... I have looked for it, but I didn't found it.
Pierre-Yves
Aaron Birkland a écrit :
Hi, Pierre-Yves
When you create an "M" datastream, Fedora stores the content in a
separate location with byte-for-byte accuracy. It stores exactly
what you send without modification. With inline XML (and FOXML in
general), the whitespace (indenting, spaces between attribute
values, etc) may be modified by the object serializer/deserializer.
Indeed, when Fedora calculates the checksum for "X" datastream, it
canonicalizes the content before calculating the checksum so that it
may arrive at the same value despite formatting changes that may
have been introduced in the XML serialization or parsing. Since "M"
datastreams are stored as exact bytes and never travel through an
XML parser, Fedora simply calculates the checksum on the bytes
without any sort of manipulation
-Aaron
-----Original Message-----
From: Pierre-Yves JALLUD [mailto:[email protected]]
Sent: Fri 5/15/2009 5:28 AM
To: fedora-commons-developers
Subject: [Fedora-commons-developers] Checksum problem for datastream
Hi all,
I have a problem of checksum for datastreams. If I add a datastream
with
a Content Model wich is equal to "M", the checksum I had calculate and
the one fedora-commons calculates are the same. But if I add the same
datastream with a Content Model wich is equal to "X", fedora-commons
finds another checksum.
Is that normal?... I don't see why there is a difference... Is that a
bug or a normal behaviour?
Greetings
Pierre-Yves
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
------------------------------------------------------------------------
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers
--
------------------------------------------------------------------------
Nishen Naidoo
Research Coordinator
Muradora Project Lead
Macquarie E-Learning Centre of Excellence (MELCOE)
MACQUARIE UNIVERSITY NSW 2109
E-Mail: [email protected] <mailto:[email protected]>
Phone: +61 (0)2 98506531
Mobile: +61 (0)4 30006783
Fax: +61 (0)2 98506527
http://www.melcoe.mq.edu.au/
CRICOS Provider No 00002J
This message is intended for the addressee named and may contain
confidential information. If you are not the intended recipient,
please delete it and notify the sender. Views expressed in this
message are those of the individual sender, and are not necessarily
the views of MELCOE or Macquarie University.
begin:vcard
fn:Pierre-Yves JALLUD
n:JALLUD;Pierre-Yves
email;internet:[email protected]
tel;work:04-72-69-52-79
url:http://cc.in2p3.fr
version:2.1
end:vcard
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers