Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anonymous interface #6

Open
wants to merge 335 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
a90c1e3
updated examples output
jstavel Feb 17, 2013
9defbed
added indent for single validation process for text output.
Feb 17, 2013
b0069e7
indented text output.
jstavel Feb 17, 2013
9e04958
fixed significant properties for daitss,exiftoo,imagemagick
Feb 17, 2013
aaa70aa
updated all examples outputs. Indented text outputs.
jstavel Feb 17, 2013
1f6e404
updated significant properties.
Feb 17, 2013
b725b60
fixed xml syntax error.
Feb 17, 2013
b69968f
removed some properties for exiftool.
Feb 17, 2013
d8d9496
updated reports
jstavel Feb 18, 2013
ac3aa46
Merge branch 'master' of https://github.com/jstavel/differ
jstavel Feb 18, 2013
0be57e2
updated examples
jstavel Feb 18, 2013
6188fa8
removed old documentation.
Feb 18, 2013
ffa2ae3
Merge branch 'master' of https://github.com/jstavel/differ into stave…
Feb 18, 2013
44316e4
updated README
Feb 18, 2013
62a024d
updated installation documentation.
Feb 18, 2013
048019d
updated installation documentation.
Feb 18, 2013
06ab954
added basic authentication to send report to web repository.
Feb 18, 2013
e047aa0
adde jp2000 and updated documentation
jstavel Feb 18, 2013
987d394
added image loader for jp2000
Feb 18, 2013
8771c4a
first response for jp2000
jstavel Feb 18, 2013
7920227
joined compression scheme and compression
Feb 19, 2013
4cbe3f9
added mapping of significant properties for kakadu.
Feb 20, 2013
3ebb1eb
updated kakadu software metadata extraction.
Feb 20, 2013
4b5ca38
added significant properties for kakadu.
Feb 20, 2013
66d9bab
added jpf
jstavel Feb 20, 2013
80c180f
Merge branch 'master' of https://github.com/jstavel/differ
jstavel Feb 20, 2013
006e0c6
new examples output
jstavel Feb 20, 2013
d8dcd66
added kakadu output
jstavel Feb 20, 2013
0ec65e6
kakadu significant properties
Feb 20, 2013
e23e4d9
kakadu output
jstavel Feb 20, 2013
bd6d269
removed indentation for text results.
Feb 20, 2013
aa53928
normalized kakadu outputs
Feb 20, 2013
59107c8
kakadu output
jstavel Feb 20, 2013
fd7ee9c
added kakadu output
jstavel Feb 20, 2013
4ba9cf4
fixed typo error with compression in kakadu.
Feb 22, 2013
30fe0cd
moved jpylyzer configuration into separate file.
Feb 22, 2013
efb5e70
finished xslt transformation for jpylyzer.
Feb 22, 2013
15f085d
reformatted jpylyzer output
Feb 22, 2013
09c190c
added all tests that jpylyzer does into validation significant proper…
Feb 24, 2013
27288ef
fixed test properties for jpylyzer.
Feb 24, 2013
3d123c3
updated outputs with jpylyzer well set
jstavel Feb 24, 2013
087ab64
each stderr output is saved too now.
Feb 24, 2013
ae3dce2
fixed output of a stderr of a validator to a file.
Feb 24, 2013
1738bce
fixed a problem with command arguments for jpylyzer
Feb 24, 2013
8a69e9e
fixed Validation property for jpylyzer.
Feb 24, 2013
554e76a
updated output
jstavel Feb 24, 2013
506cb25
added stderr outputs
jstavel Feb 24, 2013
63e9166
Merge branch 'master' of https://github.com/jstavel/differ into stave…
Feb 24, 2013
94edd52
added black and white png file to test daitss color depth.
Feb 26, 2013
d4d72b0
added monochrome jpeg to test daitss color depth
Feb 26, 2013
6256986
added new monochrome files tests
jstavel Feb 26, 2013
03d1465
fixed a problem with color depth for daitss.
Feb 28, 2013
9d931cc
color depth fixed examples
jstavel Feb 28, 2013
efc7bf7
added size normalizer. Added size normalizer into final corrections o…
Mar 1, 2013
c06b28a
updated outputs with normalized file size
jstavel Mar 1, 2013
b7c335d
finished size normalization.
Mar 1, 2013
d327290
moved jhove configuration into separeated xml file
Mar 1, 2013
b66c1d5
file size normalized
jstavel Mar 1, 2013
bc81a26
removed spaces at text compare report
Mar 1, 2013
518685f
updated examples
jstavel Mar 1, 2013
04ede1b
finished formatting of text output.
Mar 1, 2013
f80db4a
added remove empty values from metadata result.
Mar 2, 2013
1cfe8ef
removed UUID from properties.
jstavel Mar 2, 2013
e461425
added interface for finishing metadata transformations.
Mar 3, 2013
a7e92e4
added interface for finishing metadata transformations. Normalized Fi…
Mar 3, 2013
5af0d30
added result transformer into finishing transformer. added empty valu…
Mar 4, 2013
73749b1
added cleaning of empty values - examples
jstavel Mar 4, 2013
e675457
moved version about extractor into its own section of significant pro…
Mar 4, 2013
5221abd
moved extractors properties into separated section for compare text r…
Mar 4, 2013
1ce7a48
moved version information into separated section
jstavel Mar 4, 2013
4368344
updated documentation. Added section "The Image Validator Procedure".
Mar 17, 2013
707099b
added section "Things to improve". Cleaned section about exiftool.
Mar 20, 2013
bfd4b01
added documentation for exiv2 tool. Clearing of a documentation.
Mar 20, 2013
c3c64f3
removed section "Program output examples" in a documentation.
Mar 20, 2013
83ace02
updated Improvements chapter.
Mar 30, 2013
3f38e27
updated links related to the project.
Mar 30, 2013
b5310bd
reorganized section "links related to the project"
Mar 30, 2013
634c19f
fixed header for "Links related to the project"
Mar 30, 2013
9b4572c
moved Ideas list toward.
Apr 11, 2013
cdfb740
highlighted important words for text to be easily readable.
Apr 11, 2013
eaf9183
updated searchindex
Apr 11, 2013
7cf927d
fixed a problem with table at a documentation. Fixed a link to sourc…
Apr 11, 2013
27c0475
Update index.rst
jstavel Apr 12, 2013
bd4d747
added chapter with important links to project repository
Apr 26, 2013
091e56c
Merge branch 'master' of https://github.com/jstavel/differ
Apr 26, 2013
1c8fe3f
refresh documentation result
Apr 26, 2013
04f19b0
added more new links into a project source code repository
Apr 27, 2013
e22cc8d
First commit (GSoC Sample)
xanat0s May 10, 2013
d02f751
Some ideas on how to start work for this GSoC project.
jonatansve May 13, 2013
93ff63e
Update
jonatansve May 13, 2013
15ea2a6
First commit with mainly some small /docs changes
jonatansve Jun 19, 2013
82e3688
Added Unit columns to text reports. Updated documentation with new te…
jonatansve Jun 24, 2013
ff0ad67
Text report changes to add new column structure
jonatansve Jun 24, 2013
5fd42c4
delete incorrect readme
jonatansve Jun 24, 2013
e9e99bc
Delete bin bolder
jonatansve Jun 24, 2013
9805693
Deleted Eclipse files and updated .gitignore
jonatansve Jun 24, 2013
03095a7
Updated gitignore
jonatansve Jun 24, 2013
e7e0aaa
moved metadata table creation to its own class
xanat0s Jun 28, 2013
42010a1
renamed & moved location of metadata generator
xanat0s Jun 28, 2013
43c7972
Merge remote branch 'tommy/master'
xrosecky Jun 29, 2013
b161d8b
differ-gsoc removed
xrosecky Jun 29, 2013
99fc4b2
example of test using application context added
xrosecky Jun 29, 2013
27f9d57
exclude eclipse project files from versioning
xrosecky Jun 29, 2013
e86c819
indentation in differ-common/pom.xml fixed
xrosecky Jun 29, 2013
7fc627e
Created branch with testing framework for cmd-line application
jonatansve Jul 1, 2013
0d26bab
new report for image 05 in images_01.
jstavel Jul 2, 2013
7d2d9fe
added test context and additional configurations.
jstavel Jul 2, 2013
950a9ef
added documentation for tests of metadata extractors.
jstavel Jul 2, 2013
901410e
Merge branch 'master' of github.com:jstavel/differ
xrosecky Jul 2, 2013
35b7def
Fixed merge
jonatansve Jul 2, 2013
95cbc2c
Merge remote-tracking branch 'differ-old/cmdline-testing'
jonatansve Jul 2, 2013
2b5b884
Fork merging
jonatansve Jul 2, 2013
53f24c6
Switched location of cmdline-test, changed documentation, updated app…
jonatansve Jul 3, 2013
b6defd8
Delete old context file
jonatansve Jul 3, 2013
a429ba4
Finalized test context, imported all test subjects to Junit environme…
jonatansve Jul 4, 2013
99c7dce
initial LRUCache submission
xanat0s Jul 8, 2013
99a7241
Updated Significant Properties tests and added log4j 2 dependency in …
jonatansve Jul 8, 2013
274e94a
Merge branch 'master' of https://github.com/Differ-GSOC/differ
jonatansve Jul 8, 2013
b631195
first attempt to get jpylyzerMetadataTransformer
jstavel Jul 11, 2013
58e1655
JpylyzerTest fixed (autowiring of jpylyzerMetadataTransformer failed
xrosecky Jul 11, 2013
0cd4bf9
added jpylyzerMetadataTranformer even with full AOP. Fixed jpylyzerTe…
jstavel Jul 11, 2013
914cfaf
added version field to class
xanat0s Jul 12, 2013
3ec5475
tool items now clickable; fix cellstylegenerator
xanat0s Jul 12, 2013
0bbb848
added bean image14Test01IgnoredProperties
jstavel Jul 12, 2013
13c0aa6
added ignoredSignificantProperties into right context file.
jstavel Jul 12, 2013
4ce4705
Test
jonatansve Jul 12, 2013
74d4d6f
Updated significant properties for image14, removed old appCtx
jonatansve Jul 12, 2013
452433d
Added first tests, and updated recognized properties with new propert…
jonatansve Jul 12, 2013
2950367
updated caching mechanics
xanat0s Jul 15, 2013
06198b9
Updated significant properties list with all correct values. List of …
jonatansve Jul 15, 2013
637d355
Added Jhove test environment. Updated list of significant properties …
jonatansve Jul 17, 2013
696f315
new tools added to web application
xrosecky Jul 17, 2013
09d7ee0
Revert "new tools added to web application"
xrosecky Jul 17, 2013
c6b1243
new tools added to web application
xrosecky Jul 17, 2013
13b0c02
Tests for kdu_expand added. New tests for each transformer tmake sure…
jonatansve Jul 22, 2013
c3d8de0
Tests for kdu_expand added. Fixed commit
jonatansve Jul 22, 2013
6265216
Merge branch 'jpylyzer-unittest' of https://github.com/Differ-GSOC/di…
jonatansve Jul 22, 2013
f84bd45
Merge pull request #5 from Differ-GSOC/jpylyzer-unittest
jonatansve Jul 23, 2013
fcb1d73
Added tests for Imagemagick. Values for image01 updated. Minor tweaks…
jonatansve Jul 25, 2013
8a35d0e
Added test documentation
jonatansve Jul 25, 2013
231dd23
New test documentation
jonatansve Jul 25, 2013
98f4834
login overhaul, anon uploads
xanat0s Jul 26, 2013
9f0b8da
Changed theme for the time being. New layout in the pipeline.
jonatansve Jul 26, 2013
92acac8
anon upload improvements & url support
xanat0s Jul 28, 2013
587e08e
styling additions; more visible load indicator
xanat0s Jul 28, 2013
13a0f4e
djvudump tests added. New test image: 05.djvu
jonatansve Jul 29, 2013
cdb820e
null exception fix
xanat0s Jul 29, 2013
51708d5
null exception fix updated
xanat0s Jul 29, 2013
20e9bb9
registered user URL upload
xanat0s Jul 30, 2013
ab5b19d
guaranteed filename uniqueness
xanat0s Jul 30, 2013
60d930f
Added exiftool tests [image01 image14]. Refactor of methods into Test…
jonatansve Jul 30, 2013
27e66c3
Actual changes, see last commit message
jonatansve Jul 30, 2013
acb0f39
Refactor all tests to just have one loop. Updated working specialProp…
jonatansve Aug 1, 2013
30ae264
Profiler report added to index
jonatansve Aug 1, 2013
7fb300e
logo change, compare button size
xanat0s Aug 1, 2013
61efddf
Merge pull request #16 from Differ-GSOC/image01-test
jonatansve Aug 2, 2013
b7d3afb
registration & captcha fixes
xanat0s Aug 3, 2013
2334deb
formatting/layout fixes
xanat0s Aug 3, 2013
bbb0a8e
layout tweaks, fixed anon image preview issue
xanat0s Aug 5, 2013
2726ddb
image preview fixes, layout changes results page
xanat0s Aug 5, 2013
9a6c20b
metadata table layout adjustment
xanat0s Aug 5, 2013
47f2744
Total refactor of all standarized test into parametrized class TestRu…
jonatansve Aug 5, 2013
719d965
GUI-Macro addition
xanat0s Aug 6, 2013
96c314b
multiple fixes & updates to results tab
xanat0s Aug 6, 2013
e6fcdaa
Added Version of Extractor to extractors. Normalized values. Added ac…
jonatansve Aug 6, 2013
1cfa621
Merge remote-tracking branch 'upstream/master' into anonymous_interface
xanat0s Aug 7, 2013
9d58cc9
Moved test files and extractors into differ-common. TODO: locate all …
jonatansve Aug 8, 2013
8854678
Fixed kdu_expand extractor version with new bean ManualExtractorVersion
jonatansve Aug 9, 2013
d06e4c3
Changes to differ-common for manual extractor version
jonatansve Aug 9, 2013
ddea56b
Small fix to add (latest known) to versions added manually
jonatansve Aug 9, 2013
3dc6aa4
Merge pull request #19 from Differ-GSOC/unittest
jonatansve Aug 10, 2013
6058da2
Bug fix DateNormalizer
jonatansve Aug 12, 2013
db4ce3e
added footer to application; misc cleanup
xanat0s Aug 12, 2013
4e57fb0
footer added to application
xanat0s Aug 12, 2013
dcb7e27
Updated tests.rst with tests
jonatansve Aug 12, 2013
b9ec44a
Two new tests added, imagemagick and jhove.
jonatansve Aug 12, 2013
bf16f8b
Updated documentation
jonatansve Aug 12, 2013
a226d98
Merge branch 'anonymous_interface'
xrosecky Aug 12, 2013
34d5cd5
differ-webapp reuses configuration from differ-common
xrosecky Aug 12, 2013
96988cc
log4j configuration in web.xml
xrosecky Aug 12, 2013
dbb8e0d
Added fitsMetadataExtractor tests. New TestHelper method to help set …
jonatansve Aug 13, 2013
5f89b28
Added daitss test context. Fixed Version of Extractor for fits/daitss
jonatansve Aug 13, 2013
212b680
Added normalizers and changed extractors to correct SP
jonatansve Aug 13, 2013
7f92442
Added exiv2 test framework. First implementation of ExtractorTimer as…
jonatansve Aug 14, 2013
1b18d9a
Code cleanup /resources
jonatansve Aug 15, 2013
25edec6
fix#1 index out of bounds exception
xanat0s Aug 15, 2013
2e29dc3
fix#2 index out of bounds exception
xanat0s Aug 15, 2013
338efc9
Added bypass normalizer. Ran more tests for 14.jpf. Fixed bug for Dat…
jonatansve Aug 18, 2013
e9b9250
Cleanup
jonatansve Aug 18, 2013
9c2d6bf
Changed Jhove metadata extraction to script run in sh to fix READBOX bug
jonatansve Aug 21, 2013
741d7c8
Implemented extractor timer - working correctly, now displayed as an …
jonatansve Aug 21, 2013
7bf2a86
metadata table perma-fix #1
xanat0s Aug 22, 2013
ff7bb4c
Merge pull request #21 from Differ-GSOC/unittest
jonatansve Aug 26, 2013
8e440b6
Merge branch 'anonymous_interface' of github.com:Differ-GSOC/differ
xrosecky Aug 27, 2013
3b69da1
first attempt to rearrange the documentation.
jstavel Aug 29, 2013
4b1f8f2
Updated documentation with new info
jonatansve Aug 29, 2013
3f53e3e
Merge pull request #25 from Differ-GSOC/test-documentation
jonatansve Aug 29, 2013
227f94d
renamed title of an old index page.
jstavel Aug 29, 2013
505ed55
Added new cmdline documentation and new updated reports
jonatansve Sep 1, 2013
76562b3
Added new section and updated with important parts links
jonatansve Sep 1, 2013
16ace6e
added pdf poster.
jstavel Sep 3, 2013
10fe0e4
added iframe of pdf file.
jstavel Sep 3, 2013
f7984c4
added png poster
jstavel Sep 3, 2013
c15d104
splitted introduction
jstavel Sep 3, 2013
2d4a9d5
embeded youtube presentation.
jstavel Sep 3, 2013
1d61b80
added description of Differ.
jstavel Sep 3, 2013
abd4b30
added link to original pdf
jstavel Sep 3, 2013
b48c966
added poster with thumbnail
jstavel Sep 4, 2013
47fc170
moved old documentation down.
jstavel Sep 4, 2013
e8d9788
moved poster.png into _static.
jstavel Sep 4, 2013
abf3e4a
remove marks
jstavel Sep 4, 2013
8bae8fc
added old cmdline documentation into new documentation
jstavel Sep 4, 2013
4adbdfd
fixed reference in old index
jstavel Sep 4, 2013
8c627e9
Fix cmdline section
jonatansve Sep 5, 2013
334691a
Merge branch 'master' into test-documentation
jonatansve Sep 5, 2013
6d1fc21
Updated documentation
jonatansve Sep 5, 2013
fc4c7a7
Merge branch 'test-documentation' of https://github.com/Differ-GSOC/d…
jonatansve Sep 5, 2013
2e456c2
Merge pull request #26 from Differ-GSOC/test-documentation
jonatansve Sep 5, 2013
9df788b
Updated cmd-line documentation so that table is shown and deleted old…
jonatansve Sep 5, 2013
30f775e
Documentation polish
jonatansve Sep 5, 2013
495216f
Merge pull request #27 from Differ-GSOC/test-documentation
jonatansve Sep 5, 2013
0c5a971
image hashes and table names
xanat0s Sep 6, 2013
2900052
clickable thumbnails
xanat0s Sep 6, 2013
cb6d41a
updated favicon
xanat0s Sep 6, 2013
e351415
project logo hotlinked to homepage
xanat0s Sep 6, 2013
73a7aad
style rule additions
xanat0s Sep 6, 2013
9e186ec
bug fix, table width overflow
xanat0s Sep 6, 2013
115b5e8
fixed tool version notification on click
xanat0s Sep 6, 2013
99d8082
file size restrictions
xanat0s Sep 9, 2013
a6ff50c
bug fix, upload B not working
xanat0s Sep 9, 2013
7edc4ec
Merge branch 'anonymous_interface' of github.com:Differ-GSOC/differ i…
xrosecky Sep 9, 2013
ea05600
differ.local.properties added to application context, so it is possib…
xrosecky Sep 9, 2013
9a00127
use default directory for building war
xrosecky Sep 9, 2013
fa9cea3
support for Google Analytics
xrosecky Sep 9, 2013
4c24222
implementation of image quality metrics in C++ added
xrosecky Sep 9, 2013
ad177b2
textual info in main anon tab
xanat0s Sep 11, 2013
87e9ffe
moved anon view to separate class
xanat0s Sep 11, 2013
06c03a2
scale thumbnails in compare page
xanat0s Sep 12, 2013
98a69a5
progress indicator alpha
xanat0s Sep 14, 2013
5b78592
minor; version notification format
xanat0s Sep 14, 2013
0d3118a
file filtration by size/extension
xanat0s Sep 14, 2013
b736fd3
tab merge and retrieval of documentation remotely
xanat0s Sep 14, 2013
1b50f71
save results to xml
xanat0s Sep 16, 2013
428524c
save results button
xanat0s Sep 16, 2013
66d37bc
Merge branch 'anonymous_interface'
xrosecky Sep 16, 2013
8abbaba
bug fix: comparing different file types
xanat0s Sep 19, 2013
764af29
bug fix: results page exception
xanat0s Sep 19, 2013
f8ceccc
changed path to results
xanat0s Sep 19, 2013
45832ee
changed link to documentation
xanat0s Sep 19, 2013
c65e784
string typo "silarity" to "similarity"
xanat0s Sep 20, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.class
*.iml
*.sh
*.raw
.idea
.classpath
.project
target
macros.el
bin
_build
.classpath
.project
.settings
.metadata
*/.classpath
*/.project
*/.settings

19 changes: 19 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,22 @@ To compile as needed and run on a local Jetty server first run mvn:package and t
To remove all build files:

mvn clean


Differ Documentation
====================

You can read documentation https://differ.readthedocs.org/en/latest/ .

You can read documentation docs/_build/dirhtml/index.html .

You can build documentation:

cd docs
make html

or:

cd docs
make.bat

6 changes: 0 additions & 6 deletions differ-cmdline/application.properties

This file was deleted.

Binary file added differ-cmdline/image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 41 additions & 1 deletion differ-cmdline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,41 @@
<artifactId>differ-common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.30</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.3</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.2.3</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.5.4</version>
</dependency>

<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.5.4</version>
</dependency>


</dependencies>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -91,6 +124,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>cz.nkp.differ.cmdline.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
62,145 changes: 62,145 additions & 0 deletions differ-cmdline/profile.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions differ-cmdline/run-dirs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties ../docs/examples/images_01 ../docs/examples/images_02

#/usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar -Didea.launcher.bin.path=/opt/idea-IC-123.72/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/javaws.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/management-agent.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/plugin.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/deploy.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunjce_provider.jar:/opt/differ/differ-cmdline/target/classes:/home/stavel/.m2/repository/org/springframework/spring-beans/3.1.2.RELEASE/spring-beans-3.1.2.RELEASE.jar:/home/stavel/.m2/repository/org/springframework/spring-core/3.1.2.RELEASE/spring-core-3.1.2.RELEASE.jar:/home/stavel/.m2/repository/org/springframework/spring-asm/3.1.2.RELEASE/spring-asm-3.1.2.RELEASE.jar:/home/stavel/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/home/stavel/.m2/repository/org/springframework/spring-context/3.1.2.RELEASE/spring-context-3.1.2.RELEASE.jar:/home/stavel/.m2/repository/org/springframework/spring-aop/3.1.2.RELEASE/spring-aop-3.1.2.RELEASE.jar:/home/stavel/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/home/stavel/.m2/repository/org/springframework/spring-expression/3.1.2.RELEASE/spring-expression-3.1.2.RELEASE.jar:/home/stavel/.m2/repository/org/springframework/spring-oxm/3.1.2.RELEASE/spring-oxm-3.1.2.RELEASE.jar:/home/stavel/.m2/repository/commons-lang/commons-lang/2.5/commons-lang-2.5.jar:/opt/differ/differ-common/target/classes:/home/stavel/.m2/repository/com/lizardtech/javadjvu-lib/0.8.9-RELEASE/javadjvu-lib-0.8.9-RELEASE.jar:/home/stavel/.m2/repository/javax/media/jai/com.springsource.javax.media.jai.core/1.1.3/com.springsource.javax.media.jai.core-1.1.3.jar:/home/stavel/.m2/repository/javax/media/jai/com.springsource.javax.media.jai.codec/1.1.3/com.springsource.javax.media.jai.codec-1.1.3.jar:/home/stavel/.m2/repository/org/jpedal/jpedalSTD/2.80b11/jpedalSTD-2.80b11.jar:/home/stavel/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/home/stavel/.m2/repository/commons-io/commons-io/2.3/commons-io-2.3.jar:/home/stavel/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar:/home/stavel/.m2/repository/javax/xml/bind/jaxb-api/2.2.6/jaxb-api-2.2.6.jar:/home/stavel/.m2/repository/com/beust/jcommander/1.30/jcommander-1.30.jar:/opt/idea-IC-123.72/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain cz.nkp.differ.cmdline.Main --save-raw-outputs --save-report --save-properties ../docs/examples/images_01 ../docs/examples/images_02
3 changes: 3 additions & 0 deletions differ-cmdline/run-tif.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties image.tif

2 changes: 2 additions & 0 deletions differ-cmdline/run-two.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties ../docs/examples/images_01/05.png ../docs/examples/images_02/05.jpg
8 changes: 8 additions & 0 deletions differ-cmdline/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
#java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs image.jpf
#java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties image.jp2
#java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties image.jpg
#java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties image.tif
#java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties ../docs/examples/images_01/01.jpg
java -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties ../docs/examples/images_01/14.jpf
#java -javaagent:/home/klas/lib/jip/profile/profile.jar -Dapplication.properties=file:./application.properties -jar target/differ-cmdline-0.0.1-SNAPSHOT.jar --save-raw-outputs --save-report --save-properties ../docs/examples/images_01/14.jpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package cz.nkp.differ.cmdline;

import com.beust.jcommander.Parameter;
import java.util.ArrayList;
import java.util.List;

/**
* Created with IntelliJ IDEA.
* User: stavel
* Date: 1.1.13
* Time: 15:37
* To change this template use File | Settings | File Templates.
*/

public class CommandArgs {
@Parameter(description = "Files to validate.")
public List<String> files = new ArrayList<String>();

@Parameter(names = {"-s","--save-report"}, description = "Report will be stored in a file named the same as input file. With extension: *.drep")
public boolean saveReport=false;

@Parameter(names = {"-l","--load-report"}, description = "Report will loaded from a given file named the same as input file. With extension: *.drep")
public boolean loadReport=false;

@Parameter(names = {"--save-properties"}, description = "A review of used significant properties will be saved.")
public boolean saveProperties=false;

@Parameter(names = {"--load-properties"}, description = "A review of significant properties to be used is loaded from a file.")
public boolean loadProperties=false;

@Parameter(names = {"-r","--save-raw-outputs"}, description = "Raw outputs of extractors will be saved too.")
public boolean saveOutputs=false;

@Parameter(names = {"-w","--send-report-to-web"}, description = "Report will be sent to web.")
public boolean sendReportToWeb=false;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package cz.nkp.differ.cmdline;

import cz.nkp.differ.compare.io.ImageProcessorResult;

import java.io.File;

/**
* User: stavel
* Date: 2.1.13
* Time: 18:39
*/
public interface CompareResultTransformer {
public Boolean includeOutputs = false;
public Boolean includeImage = false;
public OutputNamer outputNamer = null;
public Boolean saveProperties = false;
public Boolean saveReport = false;

public String transform(File files[], ImageProcessorResult results[]) throws Exception;
}
193 changes: 174 additions & 19 deletions differ-cmdline/src/main/java/cz/nkp/differ/cmdline/Main.java
Original file line number Diff line number Diff line change
@@ -1,33 +1,188 @@
package cz.nkp.differ.cmdline;

import com.beust.jcommander.JCommander;
import cz.nkp.differ.compare.metadata.external.ImagemagickInChainTransformer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import cz.nkp.differ.compare.io.ImageProcessor;
import cz.nkp.differ.compare.io.ImageProcessorResult;
import cz.nkp.differ.compare.io.SerializableImageProcessorResult;
import cz.nkp.differ.compare.io.SerializableImageProcessorResults;
import java.io.File;
import java.io.FileFilter;
import java.io.FileWriter;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import javax.xml.transform.stream.StreamResult;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;

/**
mvn -fn -o -Dmaven.compiler.showWarnings=true -f pom.xml compile test-compile
*/
public class Main {
private static CommandArgs commandArgs = new CommandArgs();

/**
*
* This function validates an image and writes all reports regarding to arguments.
* @throws Exception
*/
public static String processFile(ApplicationContext context, File file, ImageProcessorResult result, Boolean isComparison) throws Exception {
Jaxb2Marshaller marshaller = (Jaxb2Marshaller) context.getBean("jaxb2Marshaller");
TextResultTransformer textResultTransformer = new TextResultTransformer(
context,
new TheSameNameOutputNamer(),
commandArgs.saveOutputs,
commandArgs.saveReport,
commandArgs.saveProperties,
false
);
String output = textResultTransformer.transform(file, result);
if ( commandArgs.saveReport ) {
FileWriter writer = new FileWriter(textResultTransformer.outputNamer.textName(file,result).toString());
writer.write(output);
writer.close();

writer = new FileWriter(textResultTransformer.outputNamer.reportName(file,result));
SerializableImageProcessorResult resultForSerialization = SerializableImageProcessorResult.create(result, false);
StreamResult streamResult = new StreamResult(writer);
marshaller.marshal(resultForSerialization, streamResult);
writer.close();
if( !isComparison && commandArgs.sendReportToWeb) {
ReportHTTPSender httpSender = (ReportHTTPSender) context.getBean("reportHTTPSender");
httpSender.sendReport(textResultTransformer.outputNamer.reportName(file,result));
}
}
return output;
}

/**
* This function calls validator and comparator on two files.
* And will report averything it did.
*/
public static String processFiles(ApplicationContext context, File file[], ImageProcessorResult results[]) throws Exception {
String output = "";
Jaxb2Marshaller marshaller = (Jaxb2Marshaller) context.getBean("jaxb2Marshaller");
TextCompareResultTransformer textCompareResultTransformer = new TextCompareResultTransformer(context,
new TheSameNameOutputNamer(),
commandArgs.saveOutputs,
commandArgs.saveReport,
commandArgs.saveProperties,
false
);
output += textCompareResultTransformer.transform(file, results);
if ( commandArgs.saveReport ) {
FileWriter writer = new FileWriter(textCompareResultTransformer.outputNamer.textCompareName(file[0], file[1], results).toString());
writer.write(output);
writer.close();

writer = new FileWriter(textCompareResultTransformer.outputNamer.reportCompareName(file[0], file[1],
results));

List<SerializableImageProcessorResult> resultsForSerialization = new ArrayList<SerializableImageProcessorResult>();
for (ImageProcessorResult result : results) {
if( result != null ){
resultsForSerialization.add(SerializableImageProcessorResult.create(result, false));
};
}
SerializableImageProcessorResults serializableResults = new SerializableImageProcessorResults(resultsForSerialization);
StreamResult streamResult = new StreamResult(writer);
marshaller.marshal(serializableResults, streamResult);
writer.close();
if( commandArgs.sendReportToWeb ) {
ReportHTTPSender sender = (ReportHTTPSender) context.getBean("reportHTTPSender");
sender.sendReport(textCompareResultTransformer.outputNamer.reportCompareName(file[0], file[1], results));
}
}
return output;
}

/**
* Iterates through directories.
* It finds file pairs to compare.
* @param files
* @return
*/
public static ArrayList<File[]> getPairsToCompare(File [] files){
ArrayList<File[]> pairs = new ArrayList<File[]> ();
HashMap<String,File[]> pairsByName = new HashMap<String,File[]>();
for( File file: files[0].listFiles(new FileFilter() {
@Override
public boolean accept(File file) {
return !file.isDirectory();
}
})){
String name = file.getName();
String nameWithoutExtension = name.replaceFirst("[.][^.]+$", "");
File [] pair = new File[2];
pair[0] = file;
pair[1] = null;
pairsByName.put(nameWithoutExtension,pair);
}
for( File file: files[1].listFiles(new FileFilter() {
@Override
public boolean accept(File file) {
return !file.isDirectory();
}
})){
String name = file.getName().replaceFirst("[.][^.]+$", "");
if( pairsByName.containsKey(name)){
pairsByName.get(name)[1] = file;
};
}
// use just pairs that do have all elemenents filled.
for(String name: pairsByName.keySet()){
File[] pair = pairsByName.get(name);
if( pair[0] != null && pair[1] != null){
pairs.add(pair);
}
}
Collections.sort(pairs, new Comparator<File[]>() {
@Override
public int compare(File[] files, File[] files2) {
return files[0].toString().compareToIgnoreCase(files2[0].toString());
}
});
return pairs;
}

public static void main(String[] args) throws Exception {

ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"appCtx-differ-cmdline.xml", "classpath:appCtx-differ-common.xml"});
ImageProcessor processor = (ImageProcessor) context.getBean("imageProcessor");

public static void main(String[] args) throws Exception {
ApplicationContext context =
new ClassPathXmlApplicationContext(new String[]{"appCtx-differ-cmdline.xml"});
ImageProcessor processor = (ImageProcessor) context.getBean("imageProcessor");
Jaxb2Marshaller marshaller = (Jaxb2Marshaller) context.getBean("jaxb2Marshaller");
File file1 = new File(args[0]);
File file2 = new File(args[1]);
ImageProcessorResult[] results = processor.processImages(file1, file2);
List<SerializableImageProcessorResult> resultsForSerialization = new ArrayList<SerializableImageProcessorResult>();
for (ImageProcessorResult result : results) {
resultsForSerialization.add(SerializableImageProcessorResult.create(result, false));
}
SerializableImageProcessorResults serializableResults = new SerializableImageProcessorResults(resultsForSerialization);
StreamResult streamResult = new StreamResult(System.out);
marshaller.marshal(serializableResults, streamResult);
}
JCommander jcommander = new JCommander(commandArgs,args);
jcommander.setAcceptUnknownOptions(true);
if( commandArgs.files.size() > 1){
File files[] = new File[2];
files[0] = new File(commandArgs.files.get(0));
files[1] = new File(commandArgs.files.get(1));
if( files[0].isDirectory() && files[1].isDirectory()){
ArrayList<File[]> pairs = getPairsToCompare(files);
for( File[] fpair: pairs){
System.out.println(String.format("processing: \t%s\n\t\t%s", fpair[0], fpair[1]));
ImageProcessorResult[] results = processor.processImages(fpair[0], fpair[1]);
System.out.println(String.format(" process results: \t%s",fpair[0]));
processFile(context, fpair[0], results[0], true);
System.out.println(String.format(" process results: \t%s",fpair[1]));
processFile(context, fpair[1], results[1], true);
System.out.println(String.format(" process compare results"));
processFiles(context, fpair, results);
}
System.out.println("Done\n");
} else {
ImageProcessorResult[] results = processor.processImages(files[0], files[1]);
System.out.println(processFiles(context, files, results));
}
} else {
File file = new File(commandArgs.files.get(0));
if( file.isDirectory()){
System.out.println("argument is the only directory. I do not know what to do with it.");
} else {
ImageProcessorResult result = processor.processImage(file);
System.out.println(processFile(context, file, result, false));
}
}
}
}
Loading