Browse Source

Changing packages around to match new modules

master
Drew Short 10 years ago
parent
commit
15ce4f1f05
  1. 1
      cli/name.info
  2. 2
      cli/pom.xml
  3. 5
      cli/src/main/java/com/sothr/imagetools/cli/AppCLI.java
  4. 1
      cli/version.info
  5. 8
      engine/src/main/java/com/sothr/imagetools/engine/AppConfig.java
  6. 2
      engine/src/main/java/com/sothr/imagetools/engine/errors/ImageToolsException.java
  7. 2
      engine/src/main/java/com/sothr/imagetools/engine/image/ImageType.java
  8. 2
      engine/src/main/java/com/sothr/imagetools/engine/util/ResourceLoader.java
  9. 4
      engine/src/main/resources/hibernate/Image.hbm.xml
  10. 2
      engine/src/main/resources/hibernate/ImageHash.hbm.xml
  11. 7
      engine/src/main/scala/com/sothr/imagetools/engine/ConcurrentEngine.scala
  12. 7
      engine/src/main/scala/com/sothr/imagetools/engine/Engine.scala
  13. 3
      engine/src/main/scala/com/sothr/imagetools/engine/SequentialEngine.scala
  14. 4
      engine/src/main/scala/com/sothr/imagetools/engine/dao/HibernateUtil.scala
  15. 4
      engine/src/main/scala/com/sothr/imagetools/engine/dao/ImageDAO.scala
  16. 2
      engine/src/main/scala/com/sothr/imagetools/engine/dto/ImageHashDTO.scala
  17. 2
      engine/src/main/scala/com/sothr/imagetools/engine/hash/AHash.scala
  18. 2
      engine/src/main/scala/com/sothr/imagetools/engine/hash/DHash.scala
  19. 8
      engine/src/main/scala/com/sothr/imagetools/engine/hash/HashService.scala
  20. 2
      engine/src/main/scala/com/sothr/imagetools/engine/hash/PHash.scala
  21. 2
      engine/src/main/scala/com/sothr/imagetools/engine/hash/PerceptualHasher.scala
  22. 6
      engine/src/main/scala/com/sothr/imagetools/engine/image/Image.scala
  23. 2
      engine/src/main/scala/com/sothr/imagetools/engine/image/ImageFilter.scala
  24. 11
      engine/src/main/scala/com/sothr/imagetools/engine/image/ImageService.scala
  25. 2
      engine/src/main/scala/com/sothr/imagetools/engine/image/SimilarImages.scala
  26. 2
      engine/src/main/scala/com/sothr/imagetools/engine/util/DirectoryFilter.scala
  27. 34
      engine/src/main/scala/com/sothr/imagetools/engine/util/Hamming.scala
  28. 2
      engine/src/main/scala/com/sothr/imagetools/engine/util/PropertiesService.scala
  29. 2
      engine/src/main/scala/com/sothr/imagetools/engine/util/PropertyEnum.scala
  30. 2
      engine/src/main/scala/com/sothr/imagetools/engine/util/Timing.scala
  31. 2
      engine/src/main/scala/com/sothr/imagetools/engine/util/Version.scala
  32. 2
      engine/src/test/java/com/sothr/imagetools/engine/AppTest.java
  33. 4
      engine/src/test/resources/hibernate/Image.hbm.xml
  34. 2
      engine/src/test/resources/hibernate/ImageHash.hbm.xml
  35. 4
      engine/src/test/scala/com/sothr/imagetools/engine/BaseTest.scala
  36. 4
      engine/src/test/scala/com/sothr/imagetools/engine/EngineTest.scala
  37. 2
      engine/src/test/scala/com/sothr/imagetools/engine/ScalaAppTest.scala
  38. 2
      engine/src/test/scala/com/sothr/imagetools/engine/TestParams.scala
  39. 7
      engine/src/test/scala/com/sothr/imagetools/engine/hash/HashServiceTest.scala
  40. 4
      engine/src/test/scala/com/sothr/imagetools/engine/image/ImageFilterTest.scala
  41. 1
      gui/name.info
  42. 2
      gui/pom.xml
  43. 7
      gui/src/main/java/com/sothr/imagetools/ui/App.java
  44. 2
      gui/src/main/scala/com/sothr/imagetools/ui/component/ImageTile.scala
  45. 3
      gui/src/main/scala/com/sothr/imagetools/ui/component/ImageTileFactory.scala
  46. 2
      gui/src/main/scala/com/sothr/imagetools/ui/controller/AppController.scala
  47. 1
      gui/version.info

1
cli/name.info

@ -0,0 +1 @@
Image-Tools-CLI

2
cli/pom.xml

@ -70,7 +70,7 @@
<manifest> <manifest>
<addClasspath>true</addClasspath> <addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix> <classpathPrefix>lib/</classpathPrefix>
<mainClass>com.sothr.imagetools.AppCLI</mainClass>
<mainClass>com.sothr.imagetools.cli.AppCLI</mainClass>
</manifest> </manifest>
</archive> </archive>
<outputDirectory> <outputDirectory>

5
cli/src/main/java/com/sothr/imagetools/AppCLI.java → cli/src/main/java/com/sothr/imagetools/cli/AppCLI.java

@ -1,12 +1,13 @@
package com.sothr.imagetools;
package com.sothr.imagetools.cli;
import akka.actor.ActorRef; import akka.actor.ActorRef;
import akka.actor.ActorSystem; import akka.actor.ActorSystem;
import akka.actor.Props; import akka.actor.Props;
import com.sothr.imagetools.engine.AppConfig;
import com.sothr.imagetools.engine.CLIEngineListener; import com.sothr.imagetools.engine.CLIEngineListener;
import com.sothr.imagetools.engine.ConcurrentEngine; import com.sothr.imagetools.engine.ConcurrentEngine;
import com.sothr.imagetools.engine.Engine; import com.sothr.imagetools.engine.Engine;
import com.sothr.imagetools.image.SimilarImages;
import com.sothr.imagetools.engine.image.SimilarImages;
import org.apache.commons.cli.*; import org.apache.commons.cli.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

1
cli/version.info

@ -0,0 +1 @@
0.1.1-DEV-13-661ba6d

8
engine/src/main/java/com/sothr/imagetools/AppConfig.java → engine/src/main/java/com/sothr/imagetools/engine/AppConfig.java

@ -1,4 +1,4 @@
package com.sothr.imagetools;
package com.sothr.imagetools.engine;
import akka.actor.ActorSystem; import akka.actor.ActorSystem;
import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.Logger;
@ -6,9 +6,9 @@ import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.util.StatusPrinter; import ch.qos.logback.core.util.StatusPrinter;
import com.sothr.imagetools.dao.HibernateUtil;
import com.sothr.imagetools.util.PropertiesService;
import com.sothr.imagetools.util.ResourceLoader;
import com.sothr.imagetools.engine.dao.HibernateUtil;
import com.sothr.imagetools.engine.util.PropertiesService;
import com.sothr.imagetools.engine.util.ResourceLoader;
import javafx.stage.Stage; import javafx.stage.Stage;
import net.sf.ehcache.CacheManager; import net.sf.ehcache.CacheManager;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

2
engine/src/main/java/com/sothr/imagetools/errors/ImageToolsException.java → engine/src/main/java/com/sothr/imagetools/engine/errors/ImageToolsException.java

@ -1,4 +1,4 @@
package com.sothr.imagetools.errors;
package com.sothr.imagetools.engine.errors;
/** /**
* Simple Exception * Simple Exception

2
engine/src/main/java/com/sothr/imagetools/image/ImageType.java → engine/src/main/java/com/sothr/imagetools/engine/image/ImageType.java

@ -1,4 +1,4 @@
package com.sothr.imagetools.image;
package com.sothr.imagetools.engine.image;
public enum ImageType { public enum ImageType {
SingleFrameImage, MultiFrameImage SingleFrameImage, MultiFrameImage

2
engine/src/main/java/com/sothr/imagetools/util/ResourceLoader.java → engine/src/main/java/com/sothr/imagetools/engine/util/ResourceLoader.java

@ -1,4 +1,4 @@
package com.sothr.imagetools.util;
package com.sothr.imagetools.engine.util;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

4
engine/src/main/resources/hibernate/Image.hbm.xml

@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD//EN" "-//Hibernate/Hibernate Mapping DTD//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping> <hibernate-mapping>
<class name="com.sothr.imagetools.image.Image" table="Image">
<class name="com.sothr.imagetools.engine.image.Image" table="Image">
<meta attribute="class-description"> <meta attribute="class-description">
This class contains the image hashes and meta data This class contains the image hashes and meta data
</meta> </meta>
@ -11,6 +11,6 @@
<property name="thumbnailPath" column="thumbnail_path" type="string" not-null="true"/> <property name="thumbnailPath" column="thumbnail_path" type="string" not-null="true"/>
<property name="width" column="width" type="int" not-null="true"/> <property name="width" column="width" type="int" not-null="true"/>
<property name="height" column="height" type="int" not-null="true"/> <property name="height" column="height" type="int" not-null="true"/>
<many-to-one name="hashes" column="hashes" unique="true" class="com.sothr.imagetools.dto.ImageHashDTO" cascade="save-update, delete" not-null="true" lazy="false"/>
<many-to-one name="hashes" column="hashes" unique="true" class="com.sothr.imagetools.engine.dto.ImageHashDTO" cascade="save-update, delete" not-null="true" lazy="false"/>
</class> </class>
</hibernate-mapping> </hibernate-mapping>

2
engine/src/main/resources/hibernate/ImageHash.hbm.xml

@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD//EN" "-//Hibernate/Hibernate Mapping DTD//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping> <hibernate-mapping>
<class name="com.sothr.imagetools.dto.ImageHashDTO" table="ImageHash">
<class name="com.sothr.imagetools.engine.dto.ImageHashDTO" table="ImageHash">
<meta attribute="class-description"> <meta attribute="class-description">
This class contains the image hashes This class contains the image hashes
</meta> </meta>

7
engine/src/main/scala/com/sothr/imagetools/engine/ConcurrentEngine.scala

@ -7,9 +7,10 @@ import akka.actor._
import akka.pattern.ask import akka.pattern.ask
import akka.routing.{Broadcast, RoundRobinRouter, SmallestMailboxRouter} import akka.routing.{Broadcast, RoundRobinRouter, SmallestMailboxRouter}
import akka.util.Timeout import akka.util.Timeout
import com.sothr.imagetools.hash.HashService
import com.sothr.imagetools.image.{Image, ImageService, SimilarImages}
import com.sothr.imagetools.util._
import com.sothr.imagetools.engine.hash.HashService
import com.sothr.imagetools.engine.image.{SimilarImages, ImageService, Image}
import com.sothr.imagetools.image.SimilarImages
import com.sothr.imagetools.engine.util._
import scala.collection.mutable import scala.collection.mutable
import scala.concurrent.Await import scala.concurrent.Await

7
engine/src/main/scala/com/sothr/imagetools/engine/Engine.scala

@ -3,9 +3,10 @@ package com.sothr.imagetools.engine
import java.io.File import java.io.File
import akka.actor.{Actor, ActorLogging, ActorRef, ActorSystem} import akka.actor.{Actor, ActorLogging, ActorRef, ActorSystem}
import com.sothr.imagetools.AppConfig
import com.sothr.imagetools.image.{Image, ImageFilter, SimilarImages}
import com.sothr.imagetools.util.DirectoryFilter
import AppConfig
import com.sothr.imagetools.engine.image.{SimilarImages, ImageFilter, Image}
import com.sothr.imagetools.image.SimilarImages
import com.sothr.imagetools.engine.util.DirectoryFilter
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import scala.collection.mutable import scala.collection.mutable

3
engine/src/main/scala/com/sothr/imagetools/engine/SequentialEngine.scala

@ -3,7 +3,8 @@ package com.sothr.imagetools.engine
import java.io.File import java.io.File
import akka.actor.{ActorRef, Props} import akka.actor.{ActorRef, Props}
import com.sothr.imagetools.image.{Image, ImageService, SimilarImages}
import com.sothr.imagetools.engine.image.{SimilarImages, ImageService, Image}
import com.sothr.imagetools.image.SimilarImages
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import scala.collection.mutable import scala.collection.mutable

4
engine/src/main/scala/com/sothr/imagetools/dao/HibernateUtil.scala → engine/src/main/scala/com/sothr/imagetools/engine/dao/HibernateUtil.scala

@ -1,6 +1,6 @@
package com.sothr.imagetools.dao
package com.sothr.imagetools.engine.dao
import com.sothr.imagetools.util.{PropertiesService, PropertyEnum}
import com.sothr.imagetools.engine.util.{PropertiesService, PropertyEnum}
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import org.hibernate.SessionFactory import org.hibernate.SessionFactory
import org.hibernate.boot.registry.StandardServiceRegistryBuilder import org.hibernate.boot.registry.StandardServiceRegistryBuilder

4
engine/src/main/scala/com/sothr/imagetools/dao/ImageDAO.scala → engine/src/main/scala/com/sothr/imagetools/engine/dao/ImageDAO.scala

@ -1,6 +1,6 @@
package com.sothr.imagetools.dao
package com.sothr.imagetools.engine.dao
import com.sothr.imagetools.image.Image
import com.sothr.imagetools.engine.image.Image
import org.hibernate.{Session, SessionFactory} import org.hibernate.{Session, SessionFactory}
/** /**

2
engine/src/main/scala/com/sothr/imagetools/dto/ImageHashDTO.scala → engine/src/main/scala/com/sothr/imagetools/engine/dto/ImageHashDTO.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.dto
package com.sothr.imagetools.engine.dto
import javax.persistence._ import javax.persistence._

2
engine/src/main/scala/com/sothr/imagetools/hash/AHash.scala → engine/src/main/scala/com/sothr/imagetools/engine/hash/AHash.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.hash
package com.sothr.imagetools.engine.hash
import grizzled.slf4j.Logging import grizzled.slf4j.Logging

2
engine/src/main/scala/com/sothr/imagetools/hash/DHash.scala → engine/src/main/scala/com/sothr/imagetools/engine/hash/DHash.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.hash
package com.sothr.imagetools.engine.hash
import grizzled.slf4j.Logging import grizzled.slf4j.Logging

8
engine/src/main/scala/com/sothr/imagetools/hash/HashService.scala → engine/src/main/scala/com/sothr/imagetools/engine/hash/HashService.scala

@ -1,12 +1,12 @@
package com.sothr.imagetools.hash
package com.sothr.imagetools.engine.hash
import java.awt.image.BufferedImage import java.awt.image.BufferedImage
import java.io.{File, FileInputStream} import java.io.{File, FileInputStream}
import javax.imageio.ImageIO import javax.imageio.ImageIO
import com.sothr.imagetools.dto.ImageHashDTO
import com.sothr.imagetools.image.ImageService
import com.sothr.imagetools.util.{Hamming, PropertiesService}
import com.sothr.imagetools.engine.dto.ImageHashDTO
import com.sothr.imagetools.engine.image.ImageService
import com.sothr.imagetools.engine.util.{Hamming, PropertiesService}
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import org.apache.commons.codec.digest.DigestUtils import org.apache.commons.codec.digest.DigestUtils
import resource._ import resource._

2
engine/src/main/scala/com/sothr/imagetools/hash/PHash.scala → engine/src/main/scala/com/sothr/imagetools/engine/hash/PHash.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.hash
package com.sothr.imagetools.engine.hash
import edu.emory.mathcs.jtransforms.dct.FloatDCT_2D import edu.emory.mathcs.jtransforms.dct.FloatDCT_2D
import grizzled.slf4j.Logging import grizzled.slf4j.Logging

2
engine/src/main/scala/com/sothr/imagetools/hash/PerceptualHasher.scala → engine/src/main/scala/com/sothr/imagetools/engine/hash/PerceptualHasher.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.hash
package com.sothr.imagetools.engine.hash
/** /**
* Interface for perceptual hashing * Interface for perceptual hashing

6
engine/src/main/scala/com/sothr/imagetools/image/Image.scala → engine/src/main/scala/com/sothr/imagetools/engine/image/Image.scala

@ -1,9 +1,9 @@
package com.sothr.imagetools.image
package com.sothr.imagetools.engine.image
import javax.persistence._ import javax.persistence._
import com.sothr.imagetools.dto.ImageHashDTO
import com.sothr.imagetools.hash.HashService
import com.sothr.imagetools.engine.dto.ImageHashDTO
import com.sothr.imagetools.engine.hash.HashService
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
@Entity @Entity

2
engine/src/main/scala/com/sothr/imagetools/image/ImageFilter.scala → engine/src/main/scala/com/sothr/imagetools/engine/image/ImageFilter.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.image
package com.sothr.imagetools.engine.image
import java.io.{File, FilenameFilter} import java.io.{File, FilenameFilter}

11
engine/src/main/scala/com/sothr/imagetools/image/ImageService.scala → engine/src/main/scala/com/sothr/imagetools/engine/image/ImageService.scala

@ -1,13 +1,12 @@
package com.sothr.imagetools.image
package com.sothr.imagetools.engine.image
import java.awt.image.{BufferedImage, ColorConvertOp, DataBufferByte} import java.awt.image.{BufferedImage, ColorConvertOp, DataBufferByte}
import java.io.{File, IOException} import java.io.{File, IOException}
import javax.imageio.ImageIO import javax.imageio.ImageIO
import com.sothr.imagetools.AppConfig
import com.sothr.imagetools.dao.ImageDAO
import com.sothr.imagetools.hash.HashService
import com.sothr.imagetools.util.{PropertiesService, PropertyEnum}
import com.sothr.imagetools.engine.AppConfig
import com.sothr.imagetools.engine.dao.ImageDAO
import com.sothr.imagetools.engine.hash.HashService
import com.sothr.imagetools.engine.util.{PropertiesService, PropertyEnum}
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import net.coobird.thumbnailator.Thumbnails import net.coobird.thumbnailator.Thumbnails
import net.sf.ehcache.Element import net.sf.ehcache.Element

2
engine/src/main/scala/com/sothr/imagetools/image/SimilarImages.scala → engine/src/main/scala/com/sothr/imagetools/engine/image/SimilarImages.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.image
package com.sothr.imagetools.engine.image
import grizzled.slf4j.Logging import grizzled.slf4j.Logging

2
engine/src/main/scala/com/sothr/imagetools/util/DirectoryFilter.scala → engine/src/main/scala/com/sothr/imagetools/engine/util/DirectoryFilter.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.util
package com.sothr.imagetools.engine.util
import java.io.{File, FilenameFilter} import java.io.{File, FilenameFilter}

34
engine/src/main/scala/com/sothr/imagetools/util/Hamming.scala → engine/src/main/scala/com/sothr/imagetools/engine/util/Hamming.scala

@ -1,18 +1,18 @@
package com.sothr.imagetools.util
object Hamming {
/**
* Calculate the hamming distance between two longs
*
* @param hash1 The first hash to compare
* @param hash2 The second hash to compare
* @return
*/
def getDistance(hash1: Long, hash2: Long): Int = {
//The XOR of hash1 and hash2 is converted to a binary string
//then the number of '1's is counted. This is the hamming distance
(hash1 ^ hash2).toBinaryString.count(_ == '1')
}
package com.sothr.imagetools.engine.util
object Hamming {
/**
* Calculate the hamming distance between two longs
*
* @param hash1 The first hash to compare
* @param hash2 The second hash to compare
* @return
*/
def getDistance(hash1: Long, hash2: Long): Int = {
//The XOR of hash1 and hash2 is converted to a binary string
//then the number of '1's is counted. This is the hamming distance
(hash1 ^ hash2).toBinaryString.count(_ == '1')
}
} }

2
engine/src/main/scala/com/sothr/imagetools/util/PropertiesService.scala → engine/src/main/scala/com/sothr/imagetools/engine/util/PropertiesService.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.util
package com.sothr.imagetools.engine.util
import java.io.{File, FileOutputStream, PrintStream} import java.io.{File, FileOutputStream, PrintStream}
import java.util.Properties import java.util.Properties

2
engine/src/main/scala/com/sothr/imagetools/util/PropertyEnum.scala → engine/src/main/scala/com/sothr/imagetools/engine/util/PropertyEnum.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.util
package com.sothr.imagetools.engine.util
object PropertyEnum extends Enumeration { object PropertyEnum extends Enumeration {
type PropertiesEnum = Value type PropertiesEnum = Value

2
engine/src/main/scala/com/sothr/imagetools/util/Timing.scala → engine/src/main/scala/com/sothr/imagetools/engine/util/Timing.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.util
package com.sothr.imagetools.engine.util
import grizzled.slf4j.Logging import grizzled.slf4j.Logging

2
engine/src/main/scala/com/sothr/imagetools/util/Version.scala → engine/src/main/scala/com/sothr/imagetools/engine/util/Version.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools.util
package com.sothr.imagetools.engine.util
import grizzled.slf4j.Logging import grizzled.slf4j.Logging

2
engine/src/test/java/com/sothr/imagetools/AppTest.java → engine/src/test/java/com/sothr/imagetools/engine/AppTest.java

@ -1,4 +1,4 @@
package com.sothr.imagetools;
package com.sothr.imagetools.engine;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;

4
engine/src/test/resources/hibernate/Image.hbm.xml

@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD//EN" "-//Hibernate/Hibernate Mapping DTD//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping> <hibernate-mapping>
<class name="com.sothr.imagetools.image.Image" table="Image">
<class name="com.sothr.imagetools.engine.image.Image" table="Image">
<meta attribute="class-description"> <meta attribute="class-description">
This class contains the image hashes and meta data This class contains the image hashes and meta data
</meta> </meta>
@ -11,6 +11,6 @@
<property name="thumbnailPath" column="thumbnail_path" type="string" not-null="true"/> <property name="thumbnailPath" column="thumbnail_path" type="string" not-null="true"/>
<property name="width" column="width" type="int" not-null="true"/> <property name="width" column="width" type="int" not-null="true"/>
<property name="height" column="height" type="int" not-null="true"/> <property name="height" column="height" type="int" not-null="true"/>
<many-to-one name="hashes" column="hashes" unique="true" class="com.sothr.imagetools.dto.ImageHashDTO" cascade="save-update, delete" not-null="true" lazy="false"/>
<many-to-one name="hashes" column="hashes" unique="true" class="com.sothr.imagetools.engine.dto.ImageHashDTO" cascade="save-update, delete" not-null="true" lazy="false"/>
</class> </class>
</hibernate-mapping> </hibernate-mapping>

2
engine/src/test/resources/hibernate/ImageHash.hbm.xml

@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD//EN" "-//Hibernate/Hibernate Mapping DTD//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping> <hibernate-mapping>
<class name="com.sothr.imagetools.dto.ImageHashDTO" table="ImageHash">
<class name="com.sothr.imagetools.engine.dto.ImageHashDTO" table="ImageHash">
<meta attribute="class-description"> <meta attribute="class-description">
This class contains the image hashes This class contains the image hashes
</meta> </meta>

4
engine/src/test/scala/com/sothr/imagetools/BaseTest.scala → engine/src/test/scala/com/sothr/imagetools/engine/BaseTest.scala

@ -1,6 +1,6 @@
package com.sothr.imagetools
package com.sothr.imagetools.engine
import com.sothr.imagetools.util.Timing
import com.sothr.imagetools.engine.util.Timing
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import org.scalatest.{BeforeAndAfter, FunSuite, Inside, Inspectors, Matchers, OptionValues} import org.scalatest.{BeforeAndAfter, FunSuite, Inside, Inspectors, Matchers, OptionValues}

4
engine/src/test/scala/com/sothr/imagetools/EngineTest.scala → engine/src/test/scala/com/sothr/imagetools/engine/EngineTest.scala

@ -1,6 +1,4 @@
package com.sothr.imagetools
import com.sothr.imagetools.engine.{ConcurrentEngine, Engine, SequentialEngine}
package com.sothr.imagetools.engine
/** /**
* Basic Test of the engines * Basic Test of the engines

2
engine/src/test/scala/com/sothr/imagetools/ScalaAppTest.scala → engine/src/test/scala/com/sothr/imagetools/engine/ScalaAppTest.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools
package com.sothr.imagetools.engine
class ScalaAppTest extends BaseTest { class ScalaAppTest extends BaseTest {

2
engine/src/test/scala/com/sothr/imagetools/TestParams.scala → engine/src/test/scala/com/sothr/imagetools/engine/TestParams.scala

@ -1,4 +1,4 @@
package com.sothr.imagetools
package com.sothr.imagetools.engine
object TestParams { object TestParams {
val LargeSampleImage1 = "sample/sample_01_large.jpg" val LargeSampleImage1 = "sample/sample_01_large.jpg"

7
engine/src/test/scala/com/sothr/imagetools/hash/HashServiceTest.scala → engine/src/test/scala/com/sothr/imagetools/engine/hash/HashServiceTest.scala

@ -1,10 +1,11 @@
package com.sothr.imagetools.hash
package com.sothr.imagetools.engine.hash
import java.io.File import java.io.File
import javax.imageio.ImageIO import javax.imageio.ImageIO
import com.sothr.imagetools.dto.ImageHashDTO
import com.sothr.imagetools.{AppConfig, BaseTest, TestParams}
import com.sothr.imagetools.engine.{TestParams, BaseTest, AppConfig}
import com.sothr.imagetools.engine.dto.ImageHashDTO
import com.sothr.imagetools.TestParams
import net.sf.ehcache.Element import net.sf.ehcache.Element
import scala.collection.mutable import scala.collection.mutable

4
engine/src/test/scala/com/sothr/imagetools/image/ImageFilterTest.scala → engine/src/test/scala/com/sothr/imagetools/engine/image/ImageFilterTest.scala

@ -1,8 +1,8 @@
package com.sothr.imagetools.image
package com.sothr.imagetools.engine.image
import java.io.File import java.io.File
import com.sothr.imagetools.BaseTest
import com.sothr.imagetools.engine.BaseTest
/** /**
* Test to make sure that the image filters work * Test to make sure that the image filters work

1
gui/name.info

@ -0,0 +1 @@
Image-Tools-GUI

2
gui/pom.xml

@ -74,7 +74,7 @@
<manifest> <manifest>
<addClasspath>true</addClasspath> <addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix> <classpathPrefix>lib/</classpathPrefix>
<mainClass>com.sothr.imagetools.App</mainClass>
<mainClass>com.sothr.imagetools.ui.App</mainClass>
</manifest> </manifest>
</archive> </archive>
<outputDirectory> <outputDirectory>

7
gui/src/main/java/com/sothr/imagetools/App.java → gui/src/main/java/com/sothr/imagetools/ui/App.java

@ -1,7 +1,8 @@
package com.sothr.imagetools;
package com.sothr.imagetools.ui;
import com.sothr.imagetools.errors.ImageToolsException;
import com.sothr.imagetools.util.ResourceLoader;
import com.sothr.imagetools.engine.AppConfig;
import com.sothr.imagetools.engine.errors.ImageToolsException;
import com.sothr.imagetools.engine.util.ResourceLoader;
import javafx.application.Application; import javafx.application.Application;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Parent; import javafx.scene.Parent;

2
engine/src/main/scala/com/sothr/imagetools/ui/component/ImageTile.scala → gui/src/main/scala/com/sothr/imagetools/ui/component/ImageTile.scala

@ -2,7 +2,7 @@ package com.sothr.imagetools.ui.component
import javafx.scene.layout.VBox import javafx.scene.layout.VBox
import com.sothr.imagetools.image.Image
import com.sothr.imagetools.engine.image.Image
/** /**
* ImageTile class that is a special VBox * ImageTile class that is a special VBox

3
engine/src/main/scala/com/sothr/imagetools/ui/component/ImageTileFactory.scala → gui/src/main/scala/com/sothr/imagetools/ui/component/ImageTileFactory.scala

@ -7,6 +7,7 @@ import javafx.scene.control.{Label, Tooltip}
import javafx.scene.image.{Image, ImageView} import javafx.scene.image.{Image, ImageView}
import javafx.scene.input.MouseEvent import javafx.scene.input.MouseEvent
import com.sothr.imagetools.engine.image
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import resource._ import resource._
@ -17,7 +18,7 @@ import resource._
*/ */
object ImageTileFactory extends Logging { object ImageTileFactory extends Logging {
def get(image:com.sothr.imagetools.image.Image):ImageTile = {
def get(image:image.Image):ImageTile = {
val imageTile = new ImageTile() val imageTile = new ImageTile()
imageTile.setImageData(image) imageTile.setImageData(image)
//set tile size //set tile size

2
engine/src/main/scala/com/sothr/imagetools/ui/controller/AppController.scala → gui/src/main/scala/com/sothr/imagetools/ui/controller/AppController.scala

@ -12,7 +12,7 @@ import javafx.stage.{DirectoryChooser, Stage, StageStyle}
import com.sothr.imagetools.engine.{ConcurrentEngine, Engine} import com.sothr.imagetools.engine.{ConcurrentEngine, Engine}
import com.sothr.imagetools.ui.component.ImageTileFactory import com.sothr.imagetools.ui.component.ImageTileFactory
import com.sothr.imagetools.util.{PropertiesService, ResourceLoader}
import com.sothr.imagetools.engine.util.{PropertiesService, ResourceLoader}
import grizzled.slf4j.Logging import grizzled.slf4j.Logging
import org.markdown4j.Markdown4jProcessor import org.markdown4j.Markdown4jProcessor

1
gui/version.info

@ -0,0 +1 @@
0.1.1-DEV-13-661ba6d
Loading…
Cancel
Save