This page describes the changes made to JHove2 to get the modules running.
/config/spring/jhove2-framework-config.xml
Add the following section to the xml. This adds a developer BnF to Jhove2.
<!-- BnF (Bibliothéque nationale de France) agent bean --> <bean id="BnFAgent" class="org.jhove2.core.Agent" scope="singleton"> <constructor-arg value="Bibliothèque nationale de France" type="java.lang.String"/> <constructor-arg value="Corporate" type="org.jhove2.core.Agent$Type"/> <property name="URI" value="http://www.bnf.fr/"/> </bean>
/config/spring/persist/jhove2-persist-config.xml
Must be set to BerkeleyDB persistence because of several bugs in the InMemory persistence.
You must also change the envHome property in the BerkeleyDbPersistenceManager bean. This path must be valid and readable!
/config/spring/module/format/gzip/jhove2-gzip-config.xml
Added to allow Spring to recognize and load the GZipModule.
/config/spring/module/format/arc/jhove2-arc-config.xml
Added to allow Spring to recognize and load the ArcModule.
/config/spring/module/format/warc/jhove2-warc-config.xml
Added to allow Spring to recognize and load the WarcModule.
/config/droid/DROID_SignatureFile_V20.xml
The Droid signature file needs to be modified to recognize ARC and WARC files correctly.
<!-- ARC, matches "filedesc:" in beginning of file. --> <InternalSignature ID="123456" Specificity="Specific"> <ByteSequence Reference="BOFoffset"> <SubSequence Position="1" SubSeqMinOffset="0" SubSeqMaxOffset="0" MinFragLength="0"> <Sequence>66696C65646573633A</Sequence> <DefaultShift>10</DefaultShift> <Shift Byte="3A">1</Shift> <Shift Byte="63">2</Shift> <Shift Byte="73">3</Shift> <Shift Byte="65">4</Shift> <Shift Byte="64">5</Shift> <Shift Byte="65">6</Shift> <Shift Byte="6C">7</Shift> <Shift Byte="69">8</Shift> <Shift Byte="66">9</Shift> </SubSequence> </ByteSequence> </InternalSignature> <!-- WARC, matches "WARC/" in beginning of file. --> <InternalSignature ID="12345" Specificity="Specific"> <ByteSequence Reference="BOFoffset"> <SubSequence Position="1" SubSeqMinOffset="0" SubSeqMaxOffset="0" MinFragLength="0"> <Sequence>574152432F</Sequence> <DefaultShift>6</DefaultShift> <Shift Byte="2F">1</Shift> <Shift Byte="43">2</Shift> <Shift Byte="52">3</Shift> <Shift Byte="41">4</Shift> <Shift Byte="57">5</Shift> </SubSequence> </ByteSequence> </InternalSignature>
<!-- ARC --> <FileFormat ID="310" Name="Alexa Archive File" PUID="x-fmt/219"> <InternalSignatureID>123456</InternalSignatureID> <Extension>arc</Extension> <!-- If left out file is recognized as SGML --> <HasPriorityOverFileFormatID>638</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>639</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>640</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>641</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>642</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>643</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>644</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>645</HasPriorityOverFileFormatID> </FileFormat> <!-- WARC --> <FileFormat ID="12345" Name="WARC file" Version="1.0" PUID="x-fmt/289"> <InternalSignatureID>12345</InternalSignatureID> <Extension>warc</Extension> <!-- If left out file is recognized as SGML --> <HasPriorityOverFileFormatID>638</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>639</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>640</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>641</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>642</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>643</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>644</HasPriorityOverFileFormatID> <HasPriorityOverFileFormatID>645</HasPriorityOverFileFormatID> </FileFormat>
/src/main/java/org/jhove2/module/format/gzip/
This folder contains all the GZipModule implementation sources.
/src/main/java/org/jhove2/module/format/arc/
This folder contains all the ArcModule implementation sources.
/src/main/java/org/jhove2/module/format/warc/
This folder contains all the WarcModule implementation sources.