diff --git a/.classpath b/.classpath index 76e99241..8c62259c 100644 --- a/.classpath +++ b/.classpath @@ -1,67 +1,46 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -77,10 +56,32 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -169,6 +170,5 @@ - - + diff --git a/.gitignore b/.gitignore index 9ed47574..4e56c17e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /build_local *.class -CVS -TAGS +/fitsBasicTestOutput.xml # Directory created by fits-blackbox-tester .bb-testing/ @@ -15,3 +14,4 @@ TAGS /fits-tests.log /javadoc/ /target/ +/version.properties diff --git a/.project b/.project index e9da4534..596988ee 100644 --- a/.project +++ b/.project @@ -4,20 +4,20 @@ - - - org.eclipse.jdt.core.javabuilder - - - - - net.sourceforge.metrics.builder - - - - - - org.eclipse.jdt.core.javanature - net.sourceforge.metrics.nature - + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..29abf999 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index d17b6724..6b5aebc4 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -9,4 +9,5 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..f4ef8aa0 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Licenses/SAXON-LICENSE.txt b/Licenses/SAXON-LICENSE.txt index 5d079cd0..267a534a 100644 --- a/Licenses/SAXON-LICENSE.txt +++ b/Licenses/SAXON-LICENSE.txt @@ -1,6 +1,6 @@ -The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); +The contents of this file are subject to the Mozilla Public License Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.mozilla.org/MPL/ +License at https://www.mozilla.org/en-US/MPL/2.0/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. diff --git a/README.md b/README.md index 90e7e5b6..f9543f05 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,23 @@ System Requirements ------------------- FITS is a Java program and requires Java version 1.7 or higher. To find out your Java version type java -version in a command-line window. +Building FITS +------------- +As of release 1.3.0 FITS is built using [Apache Maven](https://maven.apache.org/). +The build artifacts are fits-.jar and fits-.zip. The JAR file contains the compiled Java source files contained in this project whereas the ZIP file contains the final artifact which can be extracted and used to process input files for analysis. +The ZIP file can be built with the following command, which will also run the entire test suite: + + mvn clean package + +To build yet skip the tests, use the following command: + + mvn clean package -DskipTests + +NOTE: A few Maven dependencies are not in public repositories. These are within the source tree in the lib-local directory. Other dependencies are within the lib directory for use by the FITS custom classloader. + Installation ------------ -Download the latest official release from our [Downloads](http://fitstool.org/downloads) page. +Download the latest official binary release from our [Downloads](http://fitstool.org/downloads) page. **IMPORTANT NOTE**: The code on this GitHub site is not meant for direct installation since it does NOT include the necessary fits.jar file (which is a primary build artifact of this project). If you want to use this GitHub site for installing FITS, you must first download (or Git clone) the code then build the project using the Ant 'release' target. @@ -19,7 +33,7 @@ If this is your first time downloading FITS, create a directory for FITS, for ex Extract the contents of your ZIP file to your FITS directory. You should end up with a another directory under your top-level FITS directory that has a version number embedded in it, for example on Windows: - C:\Program Files\Fits\fits-1.0.0 + C:\Program Files\Fits\fits-1.3.0 Running FITS ------------ diff --git a/build.xml b/build.xml deleted file mode 100644 index 18c589c7..00000000 --- a/build.xml +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extras.zip b/extras.zip deleted file mode 100644 index bebb40b6..00000000 Binary files a/extras.zip and /dev/null differ diff --git a/fits-env.sh b/fits-env.sh index a5caf246..4315398c 100755 --- a/fits-env.sh +++ b/fits-env.sh @@ -38,4 +38,8 @@ for i in "$JCPATH"/*.jar; do APPCLASSPATH="$APPCLASSPATH":"$i" done +# optionally set Java maximum heap size +JAVA_OPTS="" +#JAVA_OPTS="-Xmx2048m" + # all subdirectories of ${FITS_HOME}/lib/ get loaded dynamically at runtime. DO NOT add here! diff --git a/fits.bat b/fits.bat index 9ece8f3f..85662016 100644 --- a/fits.bat +++ b/fits.bat @@ -20,4 +20,9 @@ for %%i in (lib\*.jar) do call "%FITS_HOME%\cpappend.bat" %%i set APPCLASSPATH=.%JARS% :: uncomment following line to see classpath :: echo classpath=%APPCLASSPATH% -java -classpath %APPCLASSPATH% edu.harvard.hul.ois.fits.Fits %* + +:: optionally set Java maximum heap size - uncomment and adjust as necessary +set JAVA_OPTS= +:: set JAVA_OPTS="-Xmx2048m" + +java %JAVA_OPTS% -classpath %APPCLASSPATH% edu.harvard.hul.ois.fits.Fits %* diff --git a/fits.sh b/fits.sh index 7e22cec0..4f102816 100755 --- a/fits.sh +++ b/fits.sh @@ -16,6 +16,6 @@ done . "$(dirname $FITS_SCRIPT)/fits-env.sh" -cmd="java -classpath \"$APPCLASSPATH\" edu.harvard.hul.ois.fits.Fits $args" +cmd="java $JAVA_OPTS -classpath \"$APPCLASSPATH\" edu.harvard.hul.ois.fits.Fits $args" eval "exec $cmd" diff --git a/lib-ant/README.txt b/lib-ant/README.txt deleted file mode 100644 index 42ae33fc..00000000 --- a/lib-ant/README.txt +++ /dev/null @@ -1 +0,0 @@ -This directory is for any JAR files that are needed specifically to run JUnit tests via Ant. \ No newline at end of file diff --git a/lib-ant/junit-4.11.jar b/lib-ant/junit-4.11.jar deleted file mode 100644 index 4d552a6f..00000000 Binary files a/lib-ant/junit-4.11.jar and /dev/null differ diff --git a/lib-ant/xmlunit-1.6.jar b/lib-ant/xmlunit-1.6.jar deleted file mode 100644 index b9328ef0..00000000 Binary files a/lib-ant/xmlunit-1.6.jar and /dev/null differ diff --git a/lib-local/_readme.txt b/lib-local/_readme.txt new file mode 100644 index 00000000..90cbc2a5 --- /dev/null +++ b/lib-local/_readme.txt @@ -0,0 +1,6 @@ +This directory contains Maven dependencies that are not available publicly. They are arranged by the standard Maven deployment method. These are accessed by the pom.xml file. +For an example, an artifact should be deployed to this directory as follows: + +mvn install:install-file -Dfile=[FILE_PATH] -DgroupId=[GROUP] -DartifactId=[ARTIFACT] -Dversion=[VERS] -Dpackaging=jar -DlocalRepositoryPath=[REPO_DIR] + +mvn install:install-file -Dfile=local/location/PDFBox-0.7.3.jar -DgroupId=org.pdfbox -DartifactId=PDFBox -Dversion=0.7.3 -Dpackaging=jar -DlocalRepositoryPath=./lib-local diff --git a/lib/AES31.jar b/lib-local/com/therockquarry/aes/aes/31.3/aes-31.3.jar similarity index 100% rename from lib/AES31.jar rename to lib-local/com/therockquarry/aes/aes/31.3/aes-31.3.jar diff --git a/lib-local/com/therockquarry/aes/aes/31.3/aes-31.3.pom b/lib-local/com/therockquarry/aes/aes/31.3/aes-31.3.pom new file mode 100644 index 00000000..0889e9eb --- /dev/null +++ b/lib-local/com/therockquarry/aes/aes/31.3/aes-31.3.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + com.therockquarry.aes + aes + 31.3 + POM was created from install:install-file + diff --git a/lib-local/com/therockquarry/aes/aes/maven-metadata-local.xml b/lib-local/com/therockquarry/aes/aes/maven-metadata-local.xml new file mode 100644 index 00000000..529363b6 --- /dev/null +++ b/lib-local/com/therockquarry/aes/aes/maven-metadata-local.xml @@ -0,0 +1,12 @@ + + + com.therockquarry.aes + aes + + 31.3 + + 31.3 + + 20180316145608 + + diff --git a/lib/fast-md5.jar b/lib-local/com/twmacinta/fast-md5/1.0.0/fast-md5-1.0.0.jar similarity index 100% rename from lib/fast-md5.jar rename to lib-local/com/twmacinta/fast-md5/1.0.0/fast-md5-1.0.0.jar diff --git a/lib-local/com/twmacinta/fast-md5/1.0.0/fast-md5-1.0.0.pom b/lib-local/com/twmacinta/fast-md5/1.0.0/fast-md5-1.0.0.pom new file mode 100644 index 00000000..4001948a --- /dev/null +++ b/lib-local/com/twmacinta/fast-md5/1.0.0/fast-md5-1.0.0.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + com.twmacinta + fast-md5 + 1.0.0 + POM was created from install:install-file + diff --git a/lib-local/com/twmacinta/fast-md5/maven-metadata-local.xml b/lib-local/com/twmacinta/fast-md5/maven-metadata-local.xml new file mode 100644 index 00000000..92fdd6b2 --- /dev/null +++ b/lib-local/com/twmacinta/fast-md5/maven-metadata-local.xml @@ -0,0 +1,12 @@ + + + com.twmacinta + fast-md5 + + 1.0.0 + + 1.0.0 + + 20180316150009 + + diff --git a/lib/hclaps-2.1.jar b/lib-local/edu/harvard/hcl/hclaps/2.1/hclaps-2.1.jar similarity index 100% rename from lib/hclaps-2.1.jar rename to lib-local/edu/harvard/hcl/hclaps/2.1/hclaps-2.1.jar diff --git a/lib-local/edu/harvard/hcl/hclaps/2.1/hclaps-2.1.pom b/lib-local/edu/harvard/hcl/hclaps/2.1/hclaps-2.1.pom new file mode 100644 index 00000000..bd42ff52 --- /dev/null +++ b/lib-local/edu/harvard/hcl/hclaps/2.1/hclaps-2.1.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + edu.harvard.hcl + hclaps + 2.1 + POM was created from install:install-file + diff --git a/lib-local/edu/harvard/hcl/hclaps/maven-metadata-local.xml b/lib-local/edu/harvard/hcl/hclaps/maven-metadata-local.xml new file mode 100644 index 00000000..9c64b152 --- /dev/null +++ b/lib-local/edu/harvard/hcl/hclaps/maven-metadata-local.xml @@ -0,0 +1,12 @@ + + + edu.harvard.hcl + hclaps + + 2.1 + + 2.1 + + 20180316145848 + + diff --git a/lib/ots-1.0.50.jar b/lib-local/edu/harvard/huit/lts/ots/1.0.50/ots-1.0.50.jar similarity index 100% rename from lib/ots-1.0.50.jar rename to lib-local/edu/harvard/huit/lts/ots/1.0.50/ots-1.0.50.jar diff --git a/lib-local/edu/harvard/huit/lts/ots/1.0.50/ots-1.0.50.pom b/lib-local/edu/harvard/huit/lts/ots/1.0.50/ots-1.0.50.pom new file mode 100644 index 00000000..5c148915 --- /dev/null +++ b/lib-local/edu/harvard/huit/lts/ots/1.0.50/ots-1.0.50.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + edu.harvard.huit.lts + ots + 1.0.50 + POM was created from install:install-file + diff --git a/lib-local/edu/harvard/huit/lts/ots/maven-metadata-local.xml b/lib-local/edu/harvard/huit/lts/ots/maven-metadata-local.xml new file mode 100644 index 00000000..f02af38b --- /dev/null +++ b/lib-local/edu/harvard/huit/lts/ots/maven-metadata-local.xml @@ -0,0 +1,12 @@ + + + edu.harvard.huit.lts + ots + + 1.0.50 + + 1.0.50 + + 20180423145721 + + diff --git a/lib-local/nz/govt/natlib/metadata/3.6GA/metadata-3.6GA.jar b/lib-local/nz/govt/natlib/metadata/3.6GA/metadata-3.6GA.jar new file mode 100644 index 00000000..1669da8e Binary files /dev/null and b/lib-local/nz/govt/natlib/metadata/3.6GA/metadata-3.6GA.jar differ diff --git a/lib-local/nz/govt/natlib/metadata/3.6GA/metadata-3.6GA.pom b/lib-local/nz/govt/natlib/metadata/3.6GA/metadata-3.6GA.pom new file mode 100644 index 00000000..706e2ba9 --- /dev/null +++ b/lib-local/nz/govt/natlib/metadata/3.6GA/metadata-3.6GA.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + nz.govt.natlib + metadata + 3.6GA + POM was created from install:install-file + diff --git a/lib-local/nz/govt/natlib/metadata/maven-metadata-local.xml b/lib-local/nz/govt/natlib/metadata/maven-metadata-local.xml new file mode 100644 index 00000000..ab7d90dc --- /dev/null +++ b/lib-local/nz/govt/natlib/metadata/maven-metadata-local.xml @@ -0,0 +1,12 @@ + + + nz.govt.natlib + metadata + + 3.6GA + + 3.6GA + + 20180316150100 + + diff --git a/lib/_readme.txt b/lib/_readme.txt index d0510bea..1892af8e 100644 --- a/lib/_readme.txt +++ b/lib/_readme.txt @@ -1,3 +1,4 @@ -All sub-directories of the "lib" are for tool-specific JAR files for the specific tool as listed in fits.xml within element, "classpath-dirs" attribute. +All sub-directories of the "lib" directory are for tool-specific JAR files for the specific tool as listed in fits.xml within each element in the "classpath-dirs" attribute. All resources loaded from each sub-directory will be loaded in a child-first ClassLoader so as to isolate these JAR classes and resources from other tools. -"classpath-dirs" values in fits.xml may also point to other directories containing other types of resources. \ No newline at end of file +"classpath-dirs" attribute values in fits.xml may also point to other directories containing other types of required resources. +See edu.harvard.hul.ois.fits.tools.utils.ParentLastClassLoader.java for technical implementation. diff --git a/lib/commons-cli-1.1.jar b/lib/commons-cli-1.1.jar deleted file mode 100644 index e633afbe..00000000 Binary files a/lib/commons-cli-1.1.jar and /dev/null differ diff --git a/lib/commons-collections-3.2.1.jar b/lib/commons-collections-3.2.1.jar deleted file mode 100644 index c35fa1fe..00000000 Binary files a/lib/commons-collections-3.2.1.jar and /dev/null differ diff --git a/lib/commons-configuration-1.8.jar b/lib/commons-configuration-1.8.jar deleted file mode 100644 index ae9ae996..00000000 Binary files a/lib/commons-configuration-1.8.jar and /dev/null differ diff --git a/lib/commons-io-2.4.jar b/lib/commons-io-2.4.jar deleted file mode 100644 index 90035a4f..00000000 Binary files a/lib/commons-io-2.4.jar and /dev/null differ diff --git a/lib/commons-lang-2.6.jar b/lib/commons-lang-2.6.jar deleted file mode 100644 index 98467d3a..00000000 Binary files a/lib/commons-lang-2.6.jar and /dev/null differ diff --git a/lib/commons-logging-1.2.jar b/lib/commons-logging-1.2.jar deleted file mode 100644 index 93a3b9f6..00000000 Binary files a/lib/commons-logging-1.2.jar and /dev/null differ diff --git a/lib/jaxen-core.jar b/lib/jaxen-core.jar deleted file mode 100644 index e52bf679..00000000 Binary files a/lib/jaxen-core.jar and /dev/null differ diff --git a/lib/jaxen-jdom.jar b/lib/jaxen-jdom.jar deleted file mode 100644 index 978bd026..00000000 Binary files a/lib/jaxen-jdom.jar and /dev/null differ diff --git a/lib/jdom.jar b/lib/jdom.jar deleted file mode 100644 index 97c85f56..00000000 Binary files a/lib/jdom.jar and /dev/null differ diff --git a/lib/jna-4.1.0.jar b/lib/jna-4.1.0.jar deleted file mode 100644 index b1a3922f..00000000 Binary files a/lib/jna-4.1.0.jar and /dev/null differ diff --git a/lib/log4j-1.2.17.jar b/lib/log4j-1.2.17.jar deleted file mode 100644 index 068867eb..00000000 Binary files a/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/lib/saxon9-dom.jar b/lib/saxon9-dom.jar deleted file mode 100644 index a3f442a4..00000000 Binary files a/lib/saxon9-dom.jar and /dev/null differ diff --git a/lib/saxon9-jdom.jar b/lib/saxon9-jdom.jar deleted file mode 100644 index 7d1ac1e6..00000000 Binary files a/lib/saxon9-jdom.jar and /dev/null differ diff --git a/lib/saxon9.jar b/lib/saxon9.jar deleted file mode 100644 index 6583963b..00000000 Binary files a/lib/saxon9.jar and /dev/null differ diff --git a/lib/saxpath.jar b/lib/saxpath.jar deleted file mode 100644 index 2b43955b..00000000 Binary files a/lib/saxpath.jar and /dev/null differ diff --git a/lib/serializer.jar b/lib/serializer.jar deleted file mode 100644 index 7cd80696..00000000 Binary files a/lib/serializer.jar and /dev/null differ diff --git a/lib/slf4j-api-1.7.12.jar b/lib/slf4j-api-1.7.12.jar deleted file mode 100644 index 51e2fad1..00000000 Binary files a/lib/slf4j-api-1.7.12.jar and /dev/null differ diff --git a/lib/slf4j-log4j12-1.7.12.jar b/lib/slf4j-log4j12-1.7.12.jar deleted file mode 100644 index 49a24fc9..00000000 Binary files a/lib/slf4j-log4j12-1.7.12.jar and /dev/null differ diff --git a/lib/stax2-api-3.0.1.jar b/lib/stax2-api-3.0.1.jar deleted file mode 100644 index 08f2cc4d..00000000 Binary files a/lib/stax2-api-3.0.1.jar and /dev/null differ diff --git a/lib/staxmate-2.0.0.jar b/lib/staxmate-2.0.0.jar deleted file mode 100644 index 6d2f6111..00000000 Binary files a/lib/staxmate-2.0.0.jar and /dev/null differ diff --git a/lib/woodstox-core-lgpl-4.0.7.jar b/lib/woodstox-core-lgpl-4.0.7.jar deleted file mode 100644 index 7e1e95bf..00000000 Binary files a/lib/woodstox-core-lgpl-4.0.7.jar and /dev/null differ diff --git a/lib/xercesImpl-2.9.1.jar b/lib/xercesImpl-2.9.1.jar deleted file mode 100644 index 547f5630..00000000 Binary files a/lib/xercesImpl-2.9.1.jar and /dev/null differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..6504ae73 --- /dev/null +++ b/pom.xml @@ -0,0 +1,348 @@ + + 4.0.0 + edu.harvard.huit.lts + fits + 1.3.0 + jar + + FITS + File Information Tool Set - An application for extracting metadata from various types of files. + http://fitstool.org + + + UTF-8 + 1.7 + 1.7 + 132 + 1.2.17 + 1.7.22 + 1.8 + 1.1.3 + 4.4.1 + 1.6 + 3.0.2 + 2.0.1 + 4.12 + 2.6 + 1.2 + 3.2.2 + 2.4 + 1.2 + 1.8 + 6.3 + 1.0.50 + 1.18.1 + 4.1.0 + 2.1 + 1.0.0 + 31.3 + 2.4 + 3.6GA + 2.9.1 + 9.8.0-10 + 3.0 + + + + package + + + + src/main/resources + ${project.basedir} + + version.properties + + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${mvn-compiler-plgn.version} + + ${java.version} + ${java.target} + true + true + true + + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + + true + + + ${maven.build.timestamp} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.1.0 + + + src/assembly/assembly.xml + + ${project.artifactId}-${project.version} + + + + + false + + package + + single + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.0.0 + + + + javadoc + + + prepare-package + + + + + + + + + xerces + xercesImpl + ${xerces-impl.version} + + + log4j + log4j + ${log4j.version} + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + + + org.apache.tika + tika-core + ${tika.version} + + + org.jdom + jdom + ${jdom.version} + + + org.codehaus.woodstox + woodstox-core-lgpl + ${woodstox.version} + + + org.codehaus.woodstox + stax2-api + ${stax2.version} + + + org.codehaus.staxmate + staxmate + ${staxmate.version} + + + commons-lang + commons-lang + ${commons-lang.version} + + + commons-collections + commons-collections + ${commons-collections.version} + + + commons-logging + commons-logging + ${commons-logging.version} + + + commons-io + commons-io + ${commons-io.version} + + + commons-cli + commons-cli + ${commons-cli.version} + + + commons-configuration + commons-configuration + ${commons-configuration.version} + + + uk.gov.nationalarchives + droid-command-line + ${droid.version} + + + uk.gov.nationalarchives + droid-core + ${droid.version} + + + org.openpreservation.jhove + jhove-core + ${jhove.version} + + + net.java.dev.jna + jna + ${jna.version} + + + com.google.code.gson + gson + ${gson.version} + + + jaxen + jaxen + 1.1.6 + + + net.sf.saxon + Saxon-HE + ${saxon.version} + + + + + edu.harvard.huit.lts + ots + ${ots-schemas.version} + + + edu.harvard.hcl + hclaps + ${hclaps.version} + + + com.therockquarry.aes + aes + ${aes31.version} + + + com.twmacinta + fast-md5 + ${fast-md5.version} + + + nz.govt.natlib + metadata + ${nzmetool.version} + + + + + xmlunit + xmlunit + ${xmlunit.version} + test + + + junit + junit + ${junit.version} + test + + + + + + maven-central + Maven repo + http://central.maven.org/maven2/ + + + local-maven-repo + Local file system for temporarily holding non-repo JAR files + file://${project.basedir}/lib-local/ + + + + + maven2-repository.dev.java.net + Java.net Maven 2 Repository + http://central.maven.org/maven2/ + + + + + + + harvard-lts-internal-release-repository + Harvard LTS internal Release Repository + ${lts-artifactory-url}/lts-libs-release-local + + + harvard-lts-internal-snapshot-repository + Harvard LTS internal Snapshot Repository + ${lts-artifactory-url}/lts-libs-snapshot-local + + + + + scm:git:git://github.com/harvard-lts/fits.git + https://github.com/harvard-lts/fits.git + https://github.com/harvard-lts/fits/tree/master + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + + David Neiman + dneiman@g.harvard.edu + Harvard University Information Technology + https://huit.harvard.edu + + + Spencer McEwen + spencer_mcewen@harvard.edu + Harvard University Information Technology + https://huit.harvard.edu + + + + diff --git a/src/assembly/assembly.xml b/src/assembly/assembly.xml new file mode 100644 index 00000000..5a25da1b --- /dev/null +++ b/src/assembly/assembly.xml @@ -0,0 +1,72 @@ + + + + + + + + fits-zip-assembly + + zip + + false + + + true + false + false + runtime + lib + + + uk.gov.nationalarchives:droid-core + uk.gov.nationalarchives:droid-command-line + org.openpreservation.jhove:jhove-core + org.apache.tika:tika-core + nz.govt.natlib:metadata + + + + + + Licenses + + + Notices + + + lib + + + tools + + + xml + + + ${project.basedir} + + *.bat + *.sh + *.md + + + + + ${project.build.directory}/site/apidocs + javadoc + + + + + src/main/resources/log4j.properties + + + + ${project.basedir}/version.properties + + + \ No newline at end of file diff --git a/src/edu/harvard/hul/ois/fits/.gitignore b/src/edu/harvard/hul/ois/fits/.gitignore deleted file mode 100644 index 21e016e3..00000000 --- a/src/edu/harvard/hul/ois/fits/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/FitsMetadataElement.class diff --git a/src/edu/harvard/hul/ois/fits/consolidation/package.html b/src/edu/harvard/hul/ois/fits/consolidation/package.html deleted file mode 100644 index 72af8519..00000000 --- a/src/edu/harvard/hul/ois/fits/consolidation/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - -Classes for combining tool outputs into consolidated FITS output. -
- - - - - -
- - diff --git a/src/edu/harvard/hul/ois/fits/exceptions/package.html b/src/edu/harvard/hul/ois/fits/exceptions/package.html deleted file mode 100644 index f3871d76..00000000 --- a/src/edu/harvard/hul/ois/fits/exceptions/package.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - -Throwables that are specific to FITS. -
- - - - - -
- - diff --git a/src/edu/harvard/hul/ois/fits/identity/package.html b/src/edu/harvard/hul/ois/fits/identity/package.html deleted file mode 100644 index 2efe80ae..00000000 --- a/src/edu/harvard/hul/ois/fits/identity/package.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - -Classes holding identifying information about files. -
- - - - - -
- - diff --git a/src/edu/harvard/hul/ois/fits/package.html b/src/edu/harvard/hul/ois/fits/package.html deleted file mode 100644 index 811a6ce1..00000000 --- a/src/edu/harvard/hul/ois/fits/package.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - -General-purpose classes for FITS. -
- - - - - -
- - diff --git a/src/edu/harvard/hul/ois/fits/tools/package.html b/src/edu/harvard/hul/ois/fits/tools/package.html deleted file mode 100644 index dd3a62b5..00000000 --- a/src/edu/harvard/hul/ois/fits/tools/package.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - -Classes used by glue code to all tools. -
- - - - - -
- - diff --git a/src/edu/harvard/hul/ois/fits/tools/utils/XsltFunctions.java b/src/edu/harvard/hul/ois/fits/tools/utils/XsltFunctions.java deleted file mode 100644 index 944e95e8..00000000 --- a/src/edu/harvard/hul/ois/fits/tools/utils/XsltFunctions.java +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) 2016 by The President and Fellows of Harvard College -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may obtain a copy of the License at: -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under the License is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permission and limitations under the License. -// - -package edu.harvard.hul.ois.fits.tools.utils; - -import org.apache.commons.io.FilenameUtils; - -public class XsltFunctions { - - public static String getMessageString(String message, String subMessage, String severity, String offset) { - - if(subMessage != null && subMessage.length() > 0) { - message = message + " " + subMessage; - } - if(severity != null && severity.length() > 0) { - message = message + " severity=" + severity; - } - if(offset != null && offset.length() > 0) { - message = message + " offset=" + offset; - } - - return message; - } - - /** - * Assists with some of the streaming file types (wav/mp3/video) where - * bitrate and total bytes are given - * - * @param bytes - * @param bytesPerSec - */ - public static Object getDuration(double bytes, double bytesPerSec) { - long msecs = (long) ((bytes / bytesPerSec) * 1000); - return formatDuration(msecs); - } - - - private static final long SECS = 1000; - - private static final long MINS = SECS * 60; - - private static final long HRS = MINS * 60; - - public static String formatDuration(long number) { - long hrs = number / HRS; - number = number % HRS; - long mins = number / MINS; - number = number % MINS; - long secs = number / SECS; - number = number % SECS; - - return hrs + ":" + mins + ":" + secs + ":" + number; - } - - public static String getFileNameFromUrl(String url) { - return FilenameUtils.getName(url); - } - - public static String getFileExtension(String url) { - return FilenameUtils.getExtension(url); - } - -} diff --git a/src/edu/harvard/hul/ois/fits/AESModel.java b/src/main/java/edu/harvard/hul/ois/fits/AESModel.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/AESModel.java rename to src/main/java/edu/harvard/hul/ois/fits/AESModel.java diff --git a/src/edu/harvard/hul/ois/fits/AudioFormatElements.java b/src/main/java/edu/harvard/hul/ois/fits/AudioFormatElements.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/AudioFormatElements.java rename to src/main/java/edu/harvard/hul/ois/fits/AudioFormatElements.java diff --git a/src/edu/harvard/hul/ois/fits/DocumentMDModel.java b/src/main/java/edu/harvard/hul/ois/fits/DocumentMDModel.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/DocumentMDModel.java rename to src/main/java/edu/harvard/hul/ois/fits/DocumentMDModel.java diff --git a/src/edu/harvard/hul/ois/fits/DocumentTypes.java b/src/main/java/edu/harvard/hul/ois/fits/DocumentTypes.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/DocumentTypes.java rename to src/main/java/edu/harvard/hul/ois/fits/DocumentTypes.java diff --git a/src/edu/harvard/hul/ois/fits/EbuCoreFrameRateRatio.java b/src/main/java/edu/harvard/hul/ois/fits/EbuCoreFrameRateRatio.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/EbuCoreFrameRateRatio.java rename to src/main/java/edu/harvard/hul/ois/fits/EbuCoreFrameRateRatio.java diff --git a/src/edu/harvard/hul/ois/fits/EbuCoreModel.java b/src/main/java/edu/harvard/hul/ois/fits/EbuCoreModel.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/EbuCoreModel.java rename to src/main/java/edu/harvard/hul/ois/fits/EbuCoreModel.java diff --git a/src/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatio.java b/src/main/java/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatio.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatio.java rename to src/main/java/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatio.java diff --git a/src/edu/harvard/hul/ois/fits/Fits.java b/src/main/java/edu/harvard/hul/ois/fits/Fits.java similarity index 98% rename from src/edu/harvard/hul/ois/fits/Fits.java rename to src/main/java/edu/harvard/hul/ois/fits/Fits.java index 82c56055..a4c875f5 100644 --- a/src/edu/harvard/hul/ois/fits/Fits.java +++ b/src/main/java/edu/harvard/hul/ois/fits/Fits.java @@ -55,6 +55,7 @@ import edu.harvard.hul.ois.fits.consolidation.ToolOutputConsolidator; import edu.harvard.hul.ois.fits.exceptions.FitsConfigurationException; import edu.harvard.hul.ois.fits.exceptions.FitsException; +import edu.harvard.hul.ois.fits.exceptions.FitsToolException; import edu.harvard.hul.ois.fits.mapping.FitsXmlMapper; import edu.harvard.hul.ois.fits.tools.Tool; import edu.harvard.hul.ois.fits.tools.Tool.RunStatus; @@ -485,7 +486,7 @@ public static void outputStandardCombinedFormat( FitsOutput result, OutputStream } public static void outputStandardSchemaXml( FitsOutput fitsOutput, OutputStream out ) throws XMLStreamException, - IOException { + IOException, FitsException { XmlContent xml = fitsOutput.getStandardXmlContent(); FitsMetadataElement fileNameElement = fitsOutput.getMetadataElement("filename"); String inputFilename = fileNameElement == null ? null : fileNameElement.getValue(); @@ -494,7 +495,15 @@ public static void outputStandardSchemaXml( FitsOutput fitsOutput, OutputStream Transformer transformer = null; // initialize transformer for pretty print xslt - TransformerFactory tFactory = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", null); + TransformerFactory tFactory = null; + String factoryImpl = "net.sf.saxon.TransformerFactoryImpl"; + try { + Class clazz = Class.forName(factoryImpl); + tFactory = (TransformerFactory)clazz.newInstance(); + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { + throw new FitsToolException("Could not access or instantiate class: " + factoryImpl, e); + } + String prettyPrintXslt = FITS_XML_DIR + "prettyprint.xslt"; try { Templates template = tFactory.newTemplates( new StreamSource( prettyPrintXslt ) ); diff --git a/src/edu/harvard/hul/ois/fits/FitsMetadataElement.java b/src/main/java/edu/harvard/hul/ois/fits/FitsMetadataElement.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/FitsMetadataElement.java rename to src/main/java/edu/harvard/hul/ois/fits/FitsMetadataElement.java diff --git a/src/edu/harvard/hul/ois/fits/FitsMetadataValues.java b/src/main/java/edu/harvard/hul/ois/fits/FitsMetadataValues.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/FitsMetadataValues.java rename to src/main/java/edu/harvard/hul/ois/fits/FitsMetadataValues.java diff --git a/src/edu/harvard/hul/ois/fits/FitsOutput.java b/src/main/java/edu/harvard/hul/ois/fits/FitsOutput.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/FitsOutput.java rename to src/main/java/edu/harvard/hul/ois/fits/FitsOutput.java diff --git a/src/edu/harvard/hul/ois/fits/FormatElements.java b/src/main/java/edu/harvard/hul/ois/fits/FormatElements.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/FormatElements.java rename to src/main/java/edu/harvard/hul/ois/fits/FormatElements.java diff --git a/src/edu/harvard/hul/ois/fits/MixModel.java b/src/main/java/edu/harvard/hul/ois/fits/MixModel.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/MixModel.java rename to src/main/java/edu/harvard/hul/ois/fits/MixModel.java diff --git a/src/edu/harvard/hul/ois/fits/TextMDModel.java b/src/main/java/edu/harvard/hul/ois/fits/TextMDModel.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/TextMDModel.java rename to src/main/java/edu/harvard/hul/ois/fits/TextMDModel.java diff --git a/src/edu/harvard/hul/ois/fits/VideoFormatElements.java b/src/main/java/edu/harvard/hul/ois/fits/VideoFormatElements.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/VideoFormatElements.java rename to src/main/java/edu/harvard/hul/ois/fits/VideoFormatElements.java diff --git a/src/edu/harvard/hul/ois/fits/XmlContentConverter.java b/src/main/java/edu/harvard/hul/ois/fits/XmlContentConverter.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/XmlContentConverter.java rename to src/main/java/edu/harvard/hul/ois/fits/XmlContentConverter.java diff --git a/src/edu/harvard/hul/ois/fits/consolidation/OISConsolidator.java b/src/main/java/edu/harvard/hul/ois/fits/consolidation/OISConsolidator.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/consolidation/OISConsolidator.java rename to src/main/java/edu/harvard/hul/ois/fits/consolidation/OISConsolidator.java diff --git a/src/edu/harvard/hul/ois/fits/consolidation/ToolOutputConsolidator.java b/src/main/java/edu/harvard/hul/ois/fits/consolidation/ToolOutputConsolidator.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/consolidation/ToolOutputConsolidator.java rename to src/main/java/edu/harvard/hul/ois/fits/consolidation/ToolOutputConsolidator.java diff --git a/src/edu/harvard/hul/ois/fits/consolidation/VersionComparer.java b/src/main/java/edu/harvard/hul/ois/fits/consolidation/VersionComparer.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/consolidation/VersionComparer.java rename to src/main/java/edu/harvard/hul/ois/fits/consolidation/VersionComparer.java diff --git a/src/edu/harvard/hul/ois/fits/exceptions/FitsConfigurationException.java b/src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsConfigurationException.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/exceptions/FitsConfigurationException.java rename to src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsConfigurationException.java diff --git a/src/edu/harvard/hul/ois/fits/exceptions/FitsException.java b/src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsException.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/exceptions/FitsException.java rename to src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsException.java diff --git a/src/edu/harvard/hul/ois/fits/exceptions/FitsToolCLIException.java b/src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsToolCLIException.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/exceptions/FitsToolCLIException.java rename to src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsToolCLIException.java diff --git a/src/edu/harvard/hul/ois/fits/exceptions/FitsToolException.java b/src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsToolException.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/exceptions/FitsToolException.java rename to src/main/java/edu/harvard/hul/ois/fits/exceptions/FitsToolException.java diff --git a/src/edu/harvard/hul/ois/fits/identity/ExternalIdentifier.java b/src/main/java/edu/harvard/hul/ois/fits/identity/ExternalIdentifier.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/identity/ExternalIdentifier.java rename to src/main/java/edu/harvard/hul/ois/fits/identity/ExternalIdentifier.java diff --git a/src/edu/harvard/hul/ois/fits/identity/FitsIdentity.java b/src/main/java/edu/harvard/hul/ois/fits/identity/FitsIdentity.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/identity/FitsIdentity.java rename to src/main/java/edu/harvard/hul/ois/fits/identity/FitsIdentity.java diff --git a/src/edu/harvard/hul/ois/fits/identity/FormatVersion.java b/src/main/java/edu/harvard/hul/ois/fits/identity/FormatVersion.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/identity/FormatVersion.java rename to src/main/java/edu/harvard/hul/ois/fits/identity/FormatVersion.java diff --git a/src/edu/harvard/hul/ois/fits/identity/ToolIdentity.java b/src/main/java/edu/harvard/hul/ois/fits/identity/ToolIdentity.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/identity/ToolIdentity.java rename to src/main/java/edu/harvard/hul/ois/fits/identity/ToolIdentity.java diff --git a/src/edu/harvard/hul/ois/fits/mapping/AttributeMap.java b/src/main/java/edu/harvard/hul/ois/fits/mapping/AttributeMap.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/mapping/AttributeMap.java rename to src/main/java/edu/harvard/hul/ois/fits/mapping/AttributeMap.java diff --git a/src/edu/harvard/hul/ois/fits/mapping/ElementMap.java b/src/main/java/edu/harvard/hul/ois/fits/mapping/ElementMap.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/mapping/ElementMap.java rename to src/main/java/edu/harvard/hul/ois/fits/mapping/ElementMap.java diff --git a/src/edu/harvard/hul/ois/fits/mapping/FitsXmlMapper.java b/src/main/java/edu/harvard/hul/ois/fits/mapping/FitsXmlMapper.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/mapping/FitsXmlMapper.java rename to src/main/java/edu/harvard/hul/ois/fits/mapping/FitsXmlMapper.java diff --git a/src/edu/harvard/hul/ois/fits/mapping/ToolMap.java b/src/main/java/edu/harvard/hul/ois/fits/mapping/ToolMap.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/mapping/ToolMap.java rename to src/main/java/edu/harvard/hul/ois/fits/mapping/ToolMap.java diff --git a/src/edu/harvard/hul/ois/fits/tools/Tool.java b/src/main/java/edu/harvard/hul/ois/fits/tools/Tool.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/Tool.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/Tool.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ToolBase.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ToolBase.java similarity index 84% rename from src/edu/harvard/hul/ois/fits/tools/ToolBase.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ToolBase.java index d1765967..466832c2 100644 --- a/src/edu/harvard/hul/ois/fits/tools/ToolBase.java +++ b/src/main/java/edu/harvard/hul/ois/fits/tools/ToolBase.java @@ -20,17 +20,17 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamSource; +//import org.apache.xalan.processor.TransformerFactoryImpl; import org.jdom.Document; import org.jdom.input.SAXBuilder; import org.jdom.transform.JDOMResult; +import org.jdom.transform.JDOMSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +//import org.w3c.dom.Node; import edu.harvard.hul.ois.fits.exceptions.FitsToolException; import edu.harvard.hul.ois.fits.identity.ToolIdentity; -import net.sf.saxon.Configuration; -import net.sf.saxon.TransformerFactoryImpl; -import net.sf.saxon.jdom.DocumentWrapper; /** An abstract class implementing the Tool interface, the base * for all FITS tools. @@ -56,7 +56,15 @@ public abstract class ToolBase implements Tool { public ToolBase() throws FitsToolException { info = new ToolInfo(); - tFactory = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", ToolBase.class.getClassLoader()); + tFactory = TransformerFactory.newInstance(); + String factoryImpl = "net.sf.saxon.TransformerFactoryImpl"; + try { + Class clazz = Class.forName(factoryImpl, true, ToolBase.class.getClassLoader()); + tFactory = (TransformerFactory)clazz.newInstance(); + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { + throw new FitsToolException("Could not access or instantiate class: " + factoryImpl, e); + } + saxBuilder = new SAXBuilder(); excludedExtensions = new ArrayList(); includedExtensions = new ArrayList(); @@ -119,15 +127,23 @@ public Boolean validate(File files_or_dir, ToolIdentity identity) { } public Document transform(String xslt, Document input) throws FitsToolException { - Document doc = null; + org.jdom.Document doc = null; try { - Configuration config = ((TransformerFactoryImpl)tFactory).getConfiguration(); - DocumentWrapper docw = new DocumentWrapper(input,null,config); - JDOMResult out = new JDOMResult(); +// Configuration config = ((TransformerFactoryImpl)tFactory).getConfiguration(); +// DocumentWrapper docw = new DocumentWrapper(input,null,config); Templates templates = tFactory.newTemplates(new StreamSource(xslt)); Transformer transformer = templates.newTransformer(); - transformer.transform(docw, out); - doc = out.getDocument(); +// transformer.transform(new DOMSource((Node)input), out); +// transformer.transform(docw, out); + + JDOMSource in = new JDOMSource(input); + JDOMResult out = new JDOMResult(); +// JDOMResult result = new JDOMResult(); + transformer.transform(in, out); + doc = out.getDocument(); + + +// doc = out.getDocument(); } catch(Exception e) { throw new FitsToolException(info.getName()+": Error converting output using "+xslt,e); diff --git a/src/edu/harvard/hul/ois/fits/tools/ToolBelt.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ToolBelt.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ToolBelt.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ToolBelt.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ToolErrorHandler.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ToolErrorHandler.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ToolErrorHandler.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ToolErrorHandler.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ToolInfo.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ToolInfo.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ToolInfo.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ToolInfo.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ToolOutput.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ToolOutput.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ToolOutput.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ToolOutput.java diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/ArchiveContentIdentifier.java b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/ArchiveContentIdentifier.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/droid/ArchiveContentIdentifier.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/droid/ArchiveContentIdentifier.java diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/ContainerAggregator.java b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/ContainerAggregator.java similarity index 97% rename from src/edu/harvard/hul/ois/fits/tools/droid/ContainerAggregator.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/droid/ContainerAggregator.java index 03951501..09120f32 100644 --- a/src/edu/harvard/hul/ois/fits/tools/droid/ContainerAggregator.java +++ b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/ContainerAggregator.java @@ -13,6 +13,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.TreeMap; import java.util.zip.ZipEntry; /** @@ -35,7 +36,7 @@ public class ContainerAggregator { private boolean isEncrypted = false; public ContainerAggregator() { - formatToCount = new HashMap<>(); + formatToCount = new TreeMap<>(); // order entries by key for the sake of XMLUnit tests } /** diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/Droid.java b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/Droid.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/droid/Droid.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/droid/Droid.java diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/DroidQuery.java b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/DroidQuery.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/droid/DroidQuery.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/droid/DroidQuery.java diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/ResultPrinter.java b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/ResultPrinter.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/droid/ResultPrinter.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/droid/ResultPrinter.java diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/ZipArchiveContentIdentifier.java b/src/main/java/edu/harvard/hul/ois/fits/tools/droid/ZipArchiveContentIdentifier.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/droid/ZipArchiveContentIdentifier.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/droid/ZipArchiveContentIdentifier.java diff --git a/src/edu/harvard/hul/ois/fits/tools/exiftool/Exiftool.java b/src/main/java/edu/harvard/hul/ois/fits/tools/exiftool/Exiftool.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/exiftool/Exiftool.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/exiftool/Exiftool.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ffident/FFIdent.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FFIdent.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ffident/FFIdent.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FFIdent.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ffident/FormatDescription.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FormatDescription.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ffident/FormatDescription.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FormatDescription.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ffident/FormatDescriptionReader.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FormatDescriptionReader.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ffident/FormatDescriptionReader.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FormatDescriptionReader.java diff --git a/src/edu/harvard/hul/ois/fits/tools/ffident/FormatIdentification.java b/src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FormatIdentification.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/ffident/FormatIdentification.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/ffident/FormatIdentification.java diff --git a/src/edu/harvard/hul/ois/fits/tools/fileutility/FileUtility.java b/src/main/java/edu/harvard/hul/ois/fits/tools/fileutility/FileUtility.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/fileutility/FileUtility.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/fileutility/FileUtility.java diff --git a/src/edu/harvard/hul/ois/fits/tools/jhove/Jhove.java b/src/main/java/edu/harvard/hul/ois/fits/tools/jhove/Jhove.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/jhove/Jhove.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/jhove/Jhove.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/AudioMethods.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/AudioMethods.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/AudioMethods.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/AudioMethods.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionParser.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionParser.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionParser.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionParser.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionWrapper.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionWrapper.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionWrapper.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/ChannelPositionWrapper.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/ElementsToNormalize.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/ElementsToNormalize.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/ElementsToNormalize.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/ElementsToNormalize.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfo.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfo.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfo.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfo.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoNativeWrapper.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoNativeWrapper.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoNativeWrapper.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoNativeWrapper.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoUtil.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoUtil.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoUtil.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/MediaInfoUtil.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/OsCheck.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/OsCheck.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/OsCheck.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/OsCheck.java diff --git a/src/edu/harvard/hul/ois/fits/tools/mediainfo/VideoMethods.java b/src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/VideoMethods.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/mediainfo/VideoMethods.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/mediainfo/VideoMethods.java diff --git a/src/edu/harvard/hul/ois/fits/tools/nlnz/MetadataExtractor.java b/src/main/java/edu/harvard/hul/ois/fits/tools/nlnz/MetadataExtractor.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/nlnz/MetadataExtractor.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/nlnz/MetadataExtractor.java diff --git a/src/edu/harvard/hul/ois/fits/tools/nlnz/SLF4JLogger.java b/src/main/java/edu/harvard/hul/ois/fits/tools/nlnz/SLF4JLogger.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/nlnz/SLF4JLogger.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/nlnz/SLF4JLogger.java diff --git a/src/edu/harvard/hul/ois/fits/tools/oisfileinfo/ADLTool.java b/src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/ADLTool.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/oisfileinfo/ADLTool.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/ADLTool.java diff --git a/src/edu/harvard/hul/ois/fits/tools/oisfileinfo/AudioInfo.java b/src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/AudioInfo.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/oisfileinfo/AudioInfo.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/AudioInfo.java diff --git a/src/edu/harvard/hul/ois/fits/tools/oisfileinfo/FileInfo.java b/src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/FileInfo.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/oisfileinfo/FileInfo.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/FileInfo.java diff --git a/src/edu/harvard/hul/ois/fits/tools/oisfileinfo/VTTTool.java b/src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/VTTTool.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/oisfileinfo/VTTTool.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/VTTTool.java diff --git a/src/edu/harvard/hul/ois/fits/tools/oisfileinfo/XmlMetadata.java b/src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/XmlMetadata.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/oisfileinfo/XmlMetadata.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/oisfileinfo/XmlMetadata.java diff --git a/src/edu/harvard/hul/ois/fits/tools/tika/MetadataFormatter.java b/src/main/java/edu/harvard/hul/ois/fits/tools/tika/MetadataFormatter.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/tika/MetadataFormatter.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/tika/MetadataFormatter.java diff --git a/src/edu/harvard/hul/ois/fits/tools/tika/TikaTool.java b/src/main/java/edu/harvard/hul/ois/fits/tools/tika/TikaTool.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/tika/TikaTool.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/tika/TikaTool.java diff --git a/src/edu/harvard/hul/ois/fits/tools/utils/CommandLine.java b/src/main/java/edu/harvard/hul/ois/fits/tools/utils/CommandLine.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/utils/CommandLine.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/utils/CommandLine.java diff --git a/src/edu/harvard/hul/ois/fits/tools/utils/ParentLastClassLoader.java b/src/main/java/edu/harvard/hul/ois/fits/tools/utils/ParentLastClassLoader.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/utils/ParentLastClassLoader.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/utils/ParentLastClassLoader.java diff --git a/src/edu/harvard/hul/ois/fits/tools/utils/StreamGobbler.java b/src/main/java/edu/harvard/hul/ois/fits/tools/utils/StreamGobbler.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/utils/StreamGobbler.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/utils/StreamGobbler.java diff --git a/src/edu/harvard/hul/ois/fits/tools/utils/XmlUtils.java b/src/main/java/edu/harvard/hul/ois/fits/tools/utils/XmlUtils.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/utils/XmlUtils.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/utils/XmlUtils.java diff --git a/src/edu/harvard/hul/ois/fits/tools/utils/XsltTransformMap.java b/src/main/java/edu/harvard/hul/ois/fits/tools/utils/XsltTransformMap.java similarity index 100% rename from src/edu/harvard/hul/ois/fits/tools/utils/XsltTransformMap.java rename to src/main/java/edu/harvard/hul/ois/fits/tools/utils/XsltTransformMap.java diff --git a/src/nz/govt/natlib/adapter/wordperfect/WPAdapter.java b/src/main/java/nz/govt/natlib/adapter/wordperfect/WPAdapter.java similarity index 100% rename from src/nz/govt/natlib/adapter/wordperfect/WPAdapter.java rename to src/main/java/nz/govt/natlib/adapter/wordperfect/WPAdapter.java diff --git a/src/nz/govt/natlib/meta/config/Config.java b/src/main/java/nz/govt/natlib/meta/config/Config.java similarity index 97% rename from src/nz/govt/natlib/meta/config/Config.java rename to src/main/java/nz/govt/natlib/meta/config/Config.java index ac9e5697..a2c59c11 100644 --- a/src/nz/govt/natlib/meta/config/Config.java +++ b/src/main/java/nz/govt/natlib/meta/config/Config.java @@ -55,7 +55,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import blowfishj.BlowfishEasy; +//import blowfishj.BlowfishEasy; /** * The original class has been changed to allow the substitution of a different @@ -335,13 +335,13 @@ public Profile getDefaultProfile() { return defaultProfile; } - public void setAdminPassword(String oldPassword, String password) { - if (oldPassword.equals(adminPassword)) { - adminPassword = password; - BlowfishEasy bfish = new BlowfishEasy(SEED.toCharArray()); - adminPasswordNode.setNodeValue(bfish.encryptString(password)); - } - } +// public void setAdminPassword(String oldPassword, String password) { +// if (oldPassword.equals(adminPassword)) { +// adminPassword = password; +// BlowfishEasy bfish = new BlowfishEasy(SEED.toCharArray()); +// adminPasswordNode.setNodeValue(bfish.encryptString(password)); +// } +// } public boolean checkAdminPassword(String pass) { if (pass != null) { @@ -674,7 +674,7 @@ private boolean initApplication(Node node) { .getNodeName())) { // the value is in the tag - not an attribute... adminPasswordNode = appParam.getFirstChild(); - readAdminPassword(appParam.getFirstChild().getNodeValue()); +// readAdminPassword(appParam.getFirstChild().getNodeValue()); } if (LOG_TAG.equalsIgnoreCase(nodes.item(i).getNodeName())) { // the value is in the tag - not an attribute... @@ -686,13 +686,13 @@ private boolean initApplication(Node node) { return foundInit; } - private void readAdminPassword(String hashedValue) { - // System.out.println(hashedValue); - BlowfishEasy bf = new BlowfishEasy(SEED.toCharArray()); - // System.out.println(bf); - adminPassword = bf.decryptString(hashedValue);// .trim(); - // System.out.println(adminPassword); - } +// private void readAdminPassword(String hashedValue) { +// // System.out.println(hashedValue); +// BlowfishEasy bf = new BlowfishEasy(SEED.toCharArray()); +// // System.out.println(bf); +// adminPassword = bf.decryptString(hashedValue);// .trim(); +// // System.out.println(adminPassword); +// } private boolean initAdapters(Node node) throws ClassNotFoundException, IllegalAccessException, InstantiationException { diff --git a/log4j.properties b/src/main/resources/log4j.properties similarity index 100% rename from log4j.properties rename to src/main/resources/log4j.properties diff --git a/src/main/resources/version.properties b/src/main/resources/version.properties new file mode 100644 index 00000000..eb1dbe00 --- /dev/null +++ b/src/main/resources/version.properties @@ -0,0 +1,2 @@ +# substitution value filtered during Maven build +build.version=build.version=${project.version} diff --git a/tests/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatioTest.java b/src/test/java/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatioTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatioTest.java rename to src/test/java/edu/harvard/hul/ois/fits/EbuCoreNormalizedRatioTest.java diff --git a/tests/edu/harvard/hul/ois/fits/FitsOutputVersionTest.java b/src/test/java/edu/harvard/hul/ois/fits/FitsOutputVersionTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/FitsOutputVersionTest.java rename to src/test/java/edu/harvard/hul/ois/fits/FitsOutputVersionTest.java diff --git a/tests/edu/harvard/hul/ois/fits/XmlContentConverterTest.java b/src/test/java/edu/harvard/hul/ois/fits/XmlContentConverterTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/XmlContentConverterTest.java rename to src/test/java/edu/harvard/hul/ois/fits/XmlContentConverterTest.java diff --git a/tests/edu/harvard/hul/ois/fits/consolidation/OISConsolidatorTest.java b/src/test/java/edu/harvard/hul/ois/fits/consolidation/OISConsolidatorTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/consolidation/OISConsolidatorTest.java rename to src/test/java/edu/harvard/hul/ois/fits/consolidation/OISConsolidatorTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlUnitTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlUnitTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlUnitTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/AdobeIllustratorXmlUnitTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/AudioStdSchemaTestXmlUnit_NoMD5.java b/src/test/java/edu/harvard/hul/ois/fits/junit/AudioStdSchemaTestXmlUnit_NoMD5.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/AudioStdSchemaTestXmlUnit_NoMD5.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/AudioStdSchemaTestXmlUnit_NoMD5.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/DocMDTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/DocMDTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/DocMDTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/DocMDTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/DocMDXmlUnitTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/DocMDXmlUnitTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/DocMDXmlUnitTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/DocMDXmlUnitTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/EbucoreParseChannelPositionTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/EbucoreParseChannelPositionTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/EbucoreParseChannelPositionTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/EbucoreParseChannelPositionTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/FitsBasicAudioTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/FitsBasicAudioTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/FitsBasicAudioTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/FitsBasicAudioTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/FitsBasicTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/FitsBasicTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/FitsBasicTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/FitsBasicTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/FitsBasicVideoTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/FitsBasicVideoTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/FitsBasicVideoTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/FitsBasicVideoTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest_2.java b/src/test/java/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest_2.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest_2.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/FitsOutputXmlTest_2.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/IgnoreNamedElementsDifferenceListener.java b/src/test/java/edu/harvard/hul/ois/fits/junit/IgnoreNamedElementsDifferenceListener.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/IgnoreNamedElementsDifferenceListener.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/IgnoreNamedElementsDifferenceListener.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/MixTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/MixTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/MixTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/MixTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/TextMDTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/TextMDTest.java similarity index 80% rename from tests/edu/harvard/hul/ois/fits/junit/TextMDTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/TextMDTest.java index 21dc6772..7ac8a28c 100644 --- a/tests/edu/harvard/hul/ois/fits/junit/TextMDTest.java +++ b/src/test/java/edu/harvard/hul/ois/fits/junit/TextMDTest.java @@ -40,7 +40,8 @@ public class TextMDTest extends AbstractLoggingTest { @BeforeClass public static void beforeClass() throws Exception { // Set up FITS for entire class. - fits = new Fits(); + File fitsConfigFile = new File("testfiles/properties/fits-full-with-tool-output.xml"); + fits = new Fits(null, fitsConfigFile); } @AfterClass @@ -49,7 +50,7 @@ public static void afterClass() { } @Test - public void testTextMD() throws Exception { + public void testUTF16TextMD() throws Exception { String fileName = "utf16.txt"; File input = new File("testfiles/" + fileName); @@ -57,6 +58,16 @@ public void testTextMD() throws Exception { fitsOut.addStandardCombinedFormat(); fitsOut.saveToDisk("test-generated-output/" + fileName + "_Output.xml"); } + + @Test + public void testPlainText() throws Exception { + + String fileName = "plain-text.txt"; + File input = new File("testfiles/" + fileName); + FitsOutput fitsOut = fits.examine(input); + fitsOut.addStandardCombinedFormat(); + fitsOut.saveToDisk("test-generated-output/" + fileName + "_Output.xml"); + } @Test public void testCsv() throws Exception { diff --git a/tests/edu/harvard/hul/ois/fits/junit/TextMDXmlUnitTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/TextMDXmlUnitTest.java similarity index 78% rename from tests/edu/harvard/hul/ois/fits/junit/TextMDXmlUnitTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/TextMDXmlUnitTest.java index 3a067227..c7a0a1b5 100644 --- a/tests/edu/harvard/hul/ois/fits/junit/TextMDXmlUnitTest.java +++ b/src/test/java/edu/harvard/hul/ois/fits/junit/TextMDXmlUnitTest.java @@ -52,7 +52,7 @@ public static void afterClass() { } @Test - public void testTextMD() throws Exception { + public void testUTF16TextMD() throws Exception { String inputFilename = "utf16.txt"; File input = new File("testfiles/" + inputFilename); @@ -72,7 +72,29 @@ public void testTextMD() throws Exception { testActualAgainstExpected(actualXmlStr, expectedXmlStr, inputFilename); } - + + @Test + public void testPlainText() throws Exception { + + String inputFilename = "plain-text.txt"; + File input = new File("testfiles/" + inputFilename); + FitsOutput fitsOut = fits.examine(input); + fitsOut.addStandardCombinedFormat(); + fitsOut.saveToDisk("test-generated-output/" + inputFilename + ACTUAL_OUTPUT_FILE_SUFFIX); + + XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat()); + String actualXmlStr = serializer.outputString(fitsOut.getFitsXml()); + + // Read in the expected XML file + Scanner scan = new Scanner(new File( + "testfiles/output/" + inputFilename + EXPECTED_OUTPUT_FILE_SUFFIX)); + String expectedXmlStr = scan. + useDelimiter("\\Z").next(); + scan.close(); + + testActualAgainstExpected(actualXmlStr, expectedXmlStr, inputFilename); + } + @Test public void testCsv() throws Exception { diff --git a/tests/edu/harvard/hul/ois/fits/junit/VTTToolTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/VTTToolTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/VTTToolTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/VTTToolTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTest.java similarity index 88% rename from tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTest.java index 6d70fd28..72a05e67 100644 --- a/tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTest.java +++ b/src/test/java/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTest.java @@ -49,16 +49,6 @@ public static void beforeClass() throws Exception { public static void afterClass() { fits = null; } - - @Test - public void testVideo_AVC() throws Exception { - - String fileName = "utf16.txt"; - File input = new File("testfiles/" + fileName); - FitsOutput fitsOut = fits.examine(input); - fitsOut.addStandardCombinedFormat(); - fitsOut.saveToDisk("test-generated-output/" + fileName + "_Output.xml"); - } @Test public void testVideo_DV() throws Exception { diff --git a/tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit.java b/src/test/java/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit.java similarity index 90% rename from tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit.java index 5258ae3f..7c91208e 100644 --- a/tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit.java +++ b/src/test/java/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit.java @@ -270,6 +270,31 @@ public void testVideoXmlUnitCombinedOutput_MPEG2() throws Exception { testActualAgainstExpected(actualXmlStr, expectedXmlStr, inputFilename); } + + @Test + public void testVideoXmlUnitFitsOutput_AVC_NO_MD5() throws Exception { + + File fitsConfigFile = new File("testfiles/properties/fits_no_md5_video.xml"); + Fits fits = new Fits(null, fitsConfigFile); + + // First generate the FITS output + String inputFilename = "FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4"; + File input = new File("testfiles/" + inputFilename); + FitsOutput fitsOut = fits.examine(input); + fitsOut.saveToDisk("test-generated-output/" + "FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5_XmlUnitActualOutput.xml"); + + XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat()); + String actualXmlStr = serializer.outputString(fitsOut.getFitsXml()); + + // Read in the expected XML file + Scanner scan = new Scanner(new File( + "testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5.xml")); + String expectedXmlStr = scan. + useDelimiter("\\Z").next(); + scan.close(); + + testActualAgainstExpected(actualXmlStr, expectedXmlStr, inputFilename); + } /** * Send in set of XML elements to ignore that overrides the default. diff --git a/tests/edu/harvard/hul/ois/fits/junit/ZipXmlTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/ZipXmlTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/ZipXmlTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/ZipXmlTest.java diff --git a/tests/edu/harvard/hul/ois/fits/junit/ZipXmlUnitTest.java b/src/test/java/edu/harvard/hul/ois/fits/junit/ZipXmlUnitTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/junit/ZipXmlUnitTest.java rename to src/test/java/edu/harvard/hul/ois/fits/junit/ZipXmlUnitTest.java diff --git a/tests/edu/harvard/hul/ois/fits/tests/AbstractLoggingTest.java b/src/test/java/edu/harvard/hul/ois/fits/tests/AbstractLoggingTest.java similarity index 95% rename from tests/edu/harvard/hul/ois/fits/tests/AbstractLoggingTest.java rename to src/test/java/edu/harvard/hul/ois/fits/tests/AbstractLoggingTest.java index fbf22905..e93afc1b 100644 --- a/tests/edu/harvard/hul/ois/fits/tests/AbstractLoggingTest.java +++ b/src/test/java/edu/harvard/hul/ois/fits/tests/AbstractLoggingTest.java @@ -35,7 +35,7 @@ public abstract class AbstractLoggingTest { * See "Default Initialization Procedure" here: https://logging.apache.org/log4j/1.2/manual.html */ static { - File log4jProperties = new File("tests.log4j.properties"); + File log4jProperties = new File("src/test/resources/log4j.properties"); System.setProperty( "log4j.configuration", log4jProperties.toURI().toString()); } } diff --git a/tests/edu/harvard/hul/ois/fits/tests/AbstractXmlUnitTest.java b/src/test/java/edu/harvard/hul/ois/fits/tests/AbstractXmlUnitTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/tests/AbstractXmlUnitTest.java rename to src/test/java/edu/harvard/hul/ois/fits/tests/AbstractXmlUnitTest.java diff --git a/tests/edu/harvard/hul/ois/fits/tests/IgnoreAttributeValuesDifferenceListener.java b/src/test/java/edu/harvard/hul/ois/fits/tests/IgnoreAttributeValuesDifferenceListener.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/tests/IgnoreAttributeValuesDifferenceListener.java rename to src/test/java/edu/harvard/hul/ois/fits/tests/IgnoreAttributeValuesDifferenceListener.java diff --git a/tests/edu/harvard/hul/ois/fits/tests/TestOutput.java b/src/test/java/edu/harvard/hul/ois/fits/tests/TestOutput.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/tests/TestOutput.java rename to src/test/java/edu/harvard/hul/ois/fits/tests/TestOutput.java diff --git a/tests/edu/harvard/hul/ois/fits/tools/NoArgumentTestTool.java b/src/test/java/edu/harvard/hul/ois/fits/tools/NoArgumentTestTool.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/tools/NoArgumentTestTool.java rename to src/test/java/edu/harvard/hul/ois/fits/tools/NoArgumentTestTool.java diff --git a/tests/edu/harvard/hul/ois/fits/tools/OneArgumentTestTool.java b/src/test/java/edu/harvard/hul/ois/fits/tools/OneArgumentTestTool.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/tools/OneArgumentTestTool.java rename to src/test/java/edu/harvard/hul/ois/fits/tools/OneArgumentTestTool.java diff --git a/tests/edu/harvard/hul/ois/fits/tools/ToolBeltTest.java b/src/test/java/edu/harvard/hul/ois/fits/tools/ToolBeltTest.java similarity index 100% rename from tests/edu/harvard/hul/ois/fits/tools/ToolBeltTest.java rename to src/test/java/edu/harvard/hul/ois/fits/tools/ToolBeltTest.java diff --git a/tests.log4j.properties b/src/test/resources/log4j.properties similarity index 93% rename from tests.log4j.properties rename to src/test/resources/log4j.properties index 26d9fea1..a139aeee 100644 --- a/tests.log4j.properties +++ b/src/test/resources/log4j.properties @@ -37,7 +37,7 @@ log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Target=System.err log4j.appender.CONSOLE.Threshold=WARN log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%d${date-pattern} - %5p - %c{1}:%L - %m%n +log4j.appender.CONSOLE.layout.ConversionPattern=[TEST] %d${date-pattern} - %5p - %c{1}:%L - %m%n # Detailed appender for debugging, includes thread name: #log4j.appender.CONSOLE.layout.ConversionPattern=%d${date-pattern} - %5p - [%t] %c{1}:%L - %m%n @@ -55,7 +55,7 @@ log4j.appender.FILE.File = ./fits-tests.log log4j.appender.FILE.Threshold=WARN log4j.appender.FILE.Append = true log4j.appender.FILE.layout = org.apache.log4j.PatternLayout -log4j.appender.FILE.layout.ConversionPattern = %d${date-pattern} - %5p - %c{1}:%L - %m%n +log4j.appender.FILE.layout.ConversionPattern =[TEST] %d${date-pattern} - %5p - %c{1}:%L - %m%n # Detailed appender for debugging, includes thread name: #log4j.appender.FILE.layout.ConversionPattern = %d${date-pattern} - %5p - [%t] %c{1}:%L - %m%n diff --git a/test-generated-output/ant-junit-test-reports/.gitignore b/test-generated-output/ant-junit-test-reports/.gitignore deleted file mode 100644 index 429702af..00000000 --- a/test-generated-output/ant-junit-test-reports/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/TEST-* \ No newline at end of file diff --git a/test-generated-output/ant-junit-test-reports/README.txt b/test-generated-output/ant-junit-test-reports/README.txt deleted file mode 100644 index 888810b3..00000000 --- a/test-generated-output/ant-junit-test-reports/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Output from Ant target running the task are configured to go into this directory. -All files with the pattern TEST-* have been added to .gitignore diff --git a/testfiles/output/32044020597662.zip_XmlUnitExpectedOutput.xml b/testfiles/output/32044020597662.zip_XmlUnitExpectedOutput.xml index 8172563d..48a8f90d 100644 --- a/testfiles/output/32044020597662.zip_XmlUnitExpectedOutput.xml +++ b/testfiles/output/32044020597662.zip_XmlUnitExpectedOutput.xml @@ -1,14 +1,14 @@ - + - - - + + + - 1.0 - x-fmt/263 + 1.0 + x-fmt/263 @@ -16,7 +16,7 @@ 32044020597662.zip 95270 7c64750915af83a39c35f0e836d3690f - 1490192287000 + 1516117982000 @@ -24,27 +24,27 @@ 83996 stored - - + + - + - + - - + + - + - - + + diff --git a/testfiles/output/FITS-SAMPLE-26.mov-combined_XmlUnitExpectedOutput.xml b/testfiles/output/FITS-SAMPLE-26.mov-combined_XmlUnitExpectedOutput.xml index 233918d2..d9bbefbe 100644 --- a/testfiles/output/FITS-SAMPLE-26.mov-combined_XmlUnitExpectedOutput.xml +++ b/testfiles/output/FITS-SAMPLE-26.mov-combined_XmlUnitExpectedOutput.xml @@ -1,17 +1,17 @@ - + - + - - - x-fmt/384 + + + x-fmt/384 Apple QuickTime - /Users/dan179/git/fits-daveneiman/fits/testfiles/FITS-SAMPLE-26.mov - FITS-SAMPLE-26.mov + /Users/dan179/git/git-daveneiman/fits/testfiles/FITS-SAMPLE-26.mov + FITS-SAMPLE-26.mov 15060707 9c560fd7e4e6e0834bed9280c4b52d7b 1446674963000 @@ -19,7 +19,7 @@ - - + + - - - + + + - + - + diff --git a/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4_XmlUnitExpectedOutput.xml b/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4_XmlUnitExpectedOutput.xml index e77eae39..229e8f47 100644 --- a/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4_XmlUnitExpectedOutput.xml +++ b/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4_XmlUnitExpectedOutput.xml @@ -1,20 +1,20 @@ - + - + - + fmt/199 - - + + /Users/dan179/git/git-daveneiman/fits/testfiles/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4 - FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4 + FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4 9093784 61c4efc89a4acfb9db38edcdd6c39379 1446674963000 @@ -72,19 +72,19 @@ - - + + - - - + + + - + - + diff --git a/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5.xml b/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5.xml index 455f5709..10280f63 100644 --- a/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5.xml +++ b/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5.xml @@ -1,20 +1,20 @@ - + - + - + fmt/199 - - + + /Users/dan179/git/git-daveneiman/fits/testfiles/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4 - FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4 + FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4 9093784 1446674963000 @@ -71,19 +71,19 @@ - - + + - - - + + + - - + + - - + + diff --git a/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov_XmlUnitExpectedOutput.xml b/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov_XmlUnitExpectedOutput.xml index b0a5ac50..5b4d3fa1 100644 --- a/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov_XmlUnitExpectedOutput.xml +++ b/testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov_XmlUnitExpectedOutput.xml @@ -1,31 +1,31 @@ - + - - - x-fmt/384 + + + x-fmt/384 - /Users/dab980/git/fits/testfiles/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov - FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov + /Users/dan179/git/git-daveneiman/fits/testfiles/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov + FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_4_8_1_2_1_1.mov 1235897 d7e04890d435bc9a8e967f6b1054bb69 - 1468330022000 + 1516117983000 - - + + - - - + + + - + - + diff --git a/testfiles/output/gps.jpg_XmlUnitExpectedOutput.xml b/testfiles/output/gps.jpg_XmlUnitExpectedOutput.xml index 1531b5c5..ab81d18d 100644 --- a/testfiles/output/gps.jpg_XmlUnitExpectedOutput.xml +++ b/testfiles/output/gps.jpg_XmlUnitExpectedOutput.xml @@ -1,7 +1,7 @@ - + - + @@ -29,8 +29,8 @@ true true - Unknown TIFF IFD tag: 50341 offset=278 - TIFF compression scheme 6 is deprecated + Unknown TIFF IFD tag: 50341 severity=info offset=278 + TIFF compression scheme 6 is deprecated severity=info @@ -221,20 +221,20 @@ - + - - - - - - + + + + + + - - + + diff --git a/testfiles/output/plain-text.txt_XmlUnitExpectedOutput.xml b/testfiles/output/plain-text.txt_XmlUnitExpectedOutput.xml new file mode 100644 index 00000000..e3a4fb9b --- /dev/null +++ b/testfiles/output/plain-text.txt_XmlUnitExpectedOutput.xml @@ -0,0 +1,52 @@ + + + + + + + + x-fmt/111 + + + + 42 + /Users/dan179/git/git-daveneiman/fits/testfiles/plain-text.txt + plain-text.txt + b5b143e235cb5328a0f284679ed93a6e + 1526312227000 + + + true + true + + + + LF + US-ASCII + + + + US-ASCII + LF + + + + + + + + + + + + + + + + + + + + + + diff --git a/testfiles/output/testchunk.wav_XmlUnitExpectedOutput.xml b/testfiles/output/testchunk.wav_XmlUnitExpectedOutput.xml index 599aaa2b..974dbbaf 100644 --- a/testfiles/output/testchunk.wav_XmlUnitExpectedOutput.xml +++ b/testfiles/output/testchunk.wav_XmlUnitExpectedOutput.xml @@ -1,7 +1,7 @@ - + - + @@ -21,9 +21,9 @@ true true - Ignored unrecognized chunk: FLLR offset=910 - Ignored unrecognized chunk: MD5 offset=3986310 - Ignored unrecognized chunk: axml offset=3986366 + Ignored unrecognized chunk: FLLR severity=info offset=910 + Ignored unrecognized chunk: MD5 severity=info offset=3986310 + Ignored unrecognized chunk: axml severity=info offset=3986366 - + - + - - - - + + + + - + - - + + diff --git a/testfiles/plain-text.txt b/testfiles/plain-text.txt new file mode 100644 index 00000000..400e4ed4 --- /dev/null +++ b/testfiles/plain-text.txt @@ -0,0 +1 @@ +Just some plain text for FITS processing. diff --git a/tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit_NoMD5.java b/tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit_NoMD5.java deleted file mode 100644 index bfce083f..00000000 --- a/tests/edu/harvard/hul/ois/fits/junit/VideoStdSchemaTestXmlUnit_NoMD5.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2015 Harvard University Library - * - * This file is part of FITS (File Information Tool Set). - * - * FITS is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * FITS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with FITS. If not, see . - */ -package edu.harvard.hul.ois.fits.junit; - -import java.io.File; -import java.util.Scanner; - -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; -import org.junit.Test; - -import edu.harvard.hul.ois.fits.Fits; -import edu.harvard.hul.ois.fits.FitsOutput; -import edu.harvard.hul.ois.fits.tests.AbstractXmlUnitTest; - -public class VideoStdSchemaTestXmlUnit_NoMD5 extends AbstractXmlUnitTest { - - @Test - public void testVideoXmlUnitFitsOutput_AVC_NO_MD5() throws Exception { - - File fitsConfigFile = new File("testfiles/properties/fits_no_md5_video.xml"); - Fits fits = new Fits(null, fitsConfigFile); - - // First generate the FITS output - String inputFilename = "FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1.mp4"; - File input = new File("testfiles/" + inputFilename); - FitsOutput fitsOut = fits.examine(input); - fitsOut.saveToDisk("test-generated-output/" + "FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5_XmlUnitActualOutput.xml"); - - XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat()); - String actualXmlStr = serializer.outputString(fitsOut.getFitsXml()); - - // Read in the expected XML file - Scanner scan = new Scanner(new File( - "testfiles/output/FITS-SAMPLE-44_1_1_4_4_4_6_1_1_2_3_1_mp4_FITS_NO_MD5.xml")); - String expectedXmlStr = scan. - useDelimiter("\\Z").next(); - scan.close(); - - testActualAgainstExpected(actualXmlStr, expectedXmlStr, inputFilename); - } - -} diff --git a/version.properties b/version.properties deleted file mode 100644 index 461abf9d..00000000 --- a/version.properties +++ /dev/null @@ -1 +0,0 @@ -build.version=1.2.2 diff --git a/xml/jhove/jhove_common_to_fits.xslt b/xml/jhove/jhove_common_to_fits.xslt index 0714ff60..e80c5882 100644 --- a/xml/jhove/jhove_common_to_fits.xslt +++ b/xml/jhove/jhove_common_to_fits.xslt @@ -1,7 +1,6 @@ @@ -248,16 +247,23 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/xml/mediainfo/mediainfo_video_to_fits.xslt b/xml/mediainfo/mediainfo_video_to_fits.xslt index 38421c55..7065f874 100755 --- a/xml/mediainfo/mediainfo_video_to_fits.xslt +++ b/xml/mediainfo/mediainfo_video_to_fits.xslt @@ -1,7 +1,6 @@ - @@ -110,13 +108,6 @@ - - - - - - - diff --git a/xml/nlnz/fits/nlnz_default_to_fits.xslt b/xml/nlnz/fits/nlnz_default_to_fits.xslt index dac22c14..d3e69d00 100644 --- a/xml/nlnz/fits/nlnz_default_to_fits.xslt +++ b/xml/nlnz/fits/nlnz_default_to_fits.xslt @@ -1,7 +1,6 @@ + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> diff --git a/xml/nlnz/fits/nlnz_mp3_to_fits.xslt b/xml/nlnz/fits/nlnz_mp3_to_fits.xslt index edd0b217..6cea8e2f 100644 --- a/xml/nlnz/fits/nlnz_mp3_to_fits.xslt +++ b/xml/nlnz/fits/nlnz_mp3_to_fits.xslt @@ -1,7 +1,6 @@ + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> diff --git a/xml/nlnz/fits/nlnz_wav_to_fits.xslt b/xml/nlnz/fits/nlnz_wav_to_fits.xslt index 3b475f0b..34e09785 100644 --- a/xml/nlnz/fits/nlnz_wav_to_fits.xslt +++ b/xml/nlnz/fits/nlnz_wav_to_fits.xslt @@ -1,7 +1,6 @@ + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> @@ -19,19 +18,8 @@ - - - -