diff --git a/.classpath b/.classpath
index c5b01cc..5a55327 100644
--- a/.classpath
+++ b/.classpath
@@ -23,6 +23,6 @@
-
+
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 5406c7c..fbce724 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,14 @@
eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs
index 64a7f25..6cce11f 100644
--- a/.settings/org.eclipse.jdt.ui.prefs
+++ b/.settings/org.eclipse.jdt.ui.prefs
@@ -76,6 +76,10 @@ formatter_settings_version=19
jautodoc.cleanup.add_header=false
jautodoc.cleanup.javadoc=false
jautodoc.cleanup.replace_header=false
+org.eclipse.jdt.ui.exception.name=exception
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
diff --git a/lib/catgenerator-0.1.0-sources.zip b/lib/catgenerator-0.1.1-sources.zip
similarity index 80%
rename from lib/catgenerator-0.1.0-sources.zip
rename to lib/catgenerator-0.1.1-sources.zip
index 5484502..a26be29 100644
Binary files a/lib/catgenerator-0.1.0-sources.zip and b/lib/catgenerator-0.1.1-sources.zip differ
diff --git a/lib/catgenerator-0.1.0.jar b/lib/catgenerator-0.1.1.jar
similarity index 93%
rename from lib/catgenerator-0.1.0.jar
rename to lib/catgenerator-0.1.1.jar
index d26a757..38e7fd6 100644
Binary files a/lib/catgenerator-0.1.0.jar and b/lib/catgenerator-0.1.1.jar differ
diff --git a/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java b/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java
index e16714c..c72d106 100644
--- a/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java
+++ b/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java
@@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.catgenerator.core.BirdGenerator;
import fr.devinsy.catgenerator.core.CatGenerator;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.core.StatoolInfosUtils;
@@ -42,6 +43,12 @@ public class CrawlCache
{
private static Logger logger = LoggerFactory.getLogger(CrawlCache.class);
+ public static enum DefaultLogoGenerator
+ {
+ CAT,
+ BIRD
+ }
+
private File directory;
/**
@@ -192,10 +199,12 @@ public class CrawlCache
* the target
* @param seed
* the seed
+ * @param generator
+ * the generator
* @throws IOException
* Signals that an I/O exception has occurred.
*/
- public void restoreLogoTo(final URL url, final File target, final String seed) throws IOException
+ public void restoreLogoTo(final URL url, final File target, final String seed, final DefaultLogoGenerator generator) throws IOException
{
if ((target == null) || (seed == null))
{
@@ -208,7 +217,14 @@ public class CrawlCache
try
{
logger.info("CatGeneratoring cat avatar (1): {}", target.getAbsoluteFile());
- CatGenerator.buildAvatarTo(seed, target);
+ if ((generator == null) || (generator == DefaultLogoGenerator.CAT))
+ {
+ CatGenerator.buildAvatarTo(seed, target);
+ }
+ else
+ {
+ BirdGenerator.buildAvatarTo(seed, target);
+ }
}
catch (IOException exception)
{
@@ -224,7 +240,14 @@ public class CrawlCache
try
{
logger.info("CatGeneratoring cat avatar (2): {}", target.getAbsoluteFile());
- CatGenerator.buildAvatarTo(seed, target);
+ if ((generator == null) || (generator == DefaultLogoGenerator.CAT))
+ {
+ CatGenerator.buildAvatarTo(seed, target);
+ }
+ else
+ {
+ BirdGenerator.buildAvatarTo(seed, target);
+ }
}
catch (IOException exception)
{
diff --git a/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java b/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java
index 2b3d006..9e3cc1d 100644
--- a/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java
+++ b/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java
@@ -40,6 +40,7 @@ import fr.devinsy.statoolinfos.core.Softwares;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.core.StatoolInfosUtils;
import fr.devinsy.statoolinfos.crawl.CrawlCache;
+import fr.devinsy.statoolinfos.crawl.CrawlCache.DefaultLogoGenerator;
import fr.devinsy.statoolinfos.stats.StatAgent;
import fr.devinsy.statoolinfos.stats.categories.CategoryStats;
import fr.devinsy.statoolinfos.stats.properties.PropertyStats;
@@ -220,7 +221,7 @@ public class Htmlizer
// Manage the logo file.
logger.info("Htmlize federation logo.");
- cache.restoreLogoTo(federation.getLogoURL(), new File(htmlizeDirectory, federation.getTechnicalName() + "-logo.png"), federation.getTechnicalName());
+ cache.restoreLogoTo(federation.getLogoURL(), new File(htmlizeDirectory, federation.getTechnicalName() + "-logo.png"), federation.getTechnicalName(), DefaultLogoGenerator.CAT);
logger.info("Htmlize federation properties files.");
FileUtils.copyFile(federation.getInputFile(), new File(htmlizeDirectory, federation.getTechnicalName() + ".properties"));
@@ -238,7 +239,7 @@ public class Htmlizer
{
// Manage the logo file.
logger.info("Htmlize organization logo: {}.", organization.getName());
- cache.restoreLogoTo(organization.getLogoURL(), new File(htmlizeDirectory, organization.getTechnicalName() + "-logo.png"), organization.getTechnicalName());
+ cache.restoreLogoTo(organization.getLogoURL(), new File(htmlizeDirectory, organization.getTechnicalName() + "-logo.png"), organization.getTechnicalName(), DefaultLogoGenerator.CAT);
logger.info("Htmlize organization properties file: {}.", organization.getName());
FileUtils.copyFile(organization.getInputFile(), new File(htmlizeDirectory, organization.getTechnicalName() + ".properties"));
@@ -251,7 +252,8 @@ public class Htmlizer
{
// Manage the logo file.
logger.info("Htmlize service logo: {}.", service.getName());
- cache.restoreLogoTo(service.getLogoURL(), new File(htmlizeDirectory, organization.getTechnicalName() + "-" + service.getTechnicalName() + "-logo.png"), service.getTechnicalName());
+ cache.restoreLogoTo(service.getLogoURL(), new File(htmlizeDirectory, organization.getTechnicalName() + "-" + service.getTechnicalName() + "-logo.png"), service.getTechnicalName(),
+ DefaultLogoGenerator.BIRD);
logger.info("Htmlize service properties file: {}.", service.getName());
FileUtils.copyFile(service.getInputFile(),
new File(htmlizeDirectory, organization.getTechnicalName() + "-" + service.getTechnicalName() + ".properties"));
@@ -347,7 +349,7 @@ public class Htmlizer
copyStuff(htmlizeDirectory);
// Manage the logo file.
- cache.restoreLogoTo(organization.getLogoURL(), new File(htmlizeDirectory, organization.getTechnicalName() + "-logo.jpg"), organization.getTechnicalName());
+ cache.restoreLogoTo(organization.getLogoURL(), new File(htmlizeDirectory, organization.getTechnicalName() + "-logo.jpg"), organization.getTechnicalName(), DefaultLogoGenerator.CAT);
//
logger.info("Htmlize about page.");
@@ -361,7 +363,7 @@ public class Htmlizer
for (Service service : organization.getServices())
{
// Manage the logo file.
- cache.restoreLogoTo(service.getLogoURL(), new File(htmlizeDirectory, service.getTechnicalName() + "-logo.jpg"), service.getTechnicalName());
+ cache.restoreLogoTo(service.getLogoURL(), new File(htmlizeDirectory, service.getTechnicalName() + "-logo.jpg"), service.getTechnicalName(), DefaultLogoGenerator.BIRD);
//
page = ServicePage.build(organization, service);