Coser-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- 1259 discussions
07 Mar '14
Author: tchemit
Date: 2014-03-07 21:41:45 +0100 (Fri, 07 Mar 2014)
New Revision: 1133
Url: http://forge.codelutin.com/projects/coser/repository/revisions/1133
Log:
refs-30 #4651 (+ add missing svn properties)
Added:
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserTechnicalException.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/EchoBaseProject.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/IndicatorMap.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/ZoneMap.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/
trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserRequest.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResult.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResultEngine.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/DuplicatedResultException.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/FileResult.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultFoundException.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultRepositoryFoundException.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/Reports.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/ResultRepositoryInitializationException.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepository.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepositoryProvider.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepository.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProvider.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepository.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProvider.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CommunityIndicatorRequest.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestBuilder.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestFacadeAware.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestSpeciesAware.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestZoneAware.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/IndicatorRequest.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/MapRequest.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/PopulationIndicatorRequest.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/RawDataRequest.java
trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService2.java
trunk/coser-business/src/main/java/fr/ifremer/coser/storage/DataStorages.java
trunk/coser-business/src/test/java/fr/ifremer/coser/bean/
trunk/coser-business/src/test/java/fr/ifremer/coser/bean/IndicatorMapTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/bean/ZoneMapTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/result/
trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/
trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/
trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProviderTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/legacy/
trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProviderTest.java
trunk/coser-business/src/test/resources/web/echobaseprojects/
trunk/coser-business/src/test/resources/web/echobaseprojects/project1/
trunk/coser-business/src/test/resources/web/echobaseprojects/project1/communityIndicators.csv
trunk/coser-business/src/test/resources/web/echobaseprojects/project1/maps/
trunk/coser-business/src/test/resources/web/echobaseprojects/project1/populationIndicators.csv
trunk/coser-business/src/test/resources/web/echobaseprojects/project1/project.properties
trunk/coser-business/src/test/resources/web/echobaseprojects/project1/species.csv
trunk/coser-business/src/test/resources/web/echobaseprojects/project2/
trunk/coser-business/src/test/resources/web/echobaseprojects/project2/communityIndicators.csv
trunk/coser-business/src/test/resources/web/echobaseprojects/project2/maps/
trunk/coser-business/src/test/resources/web/echobaseprojects/project2/populationIndicators.csv
trunk/coser-business/src/test/resources/web/echobaseprojects/project2/project.properties
trunk/coser-business/src/test/resources/web/echobaseprojects/project2/species.csv
trunk/coser-business/src/test/resources/web/legacyprojects/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/codeTypeEspeces.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/control.properties
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testcatch_co.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testhaul_co.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testlength_co.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/teststrata_co.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testcatch.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testhaul.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testlength.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/teststrata.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/project.properties
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/reftaxSpecies.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/result.properties
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstComInd_test.txt
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstPopInd_test.txt
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/result.properties
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testcatch_se.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testhaul_se.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testlength_se.csv
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testselection1.selection
trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/teststrata_se.csv
trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserApplicationListener.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceHelper.java
Modified:
trunk/
trunk/LICENSE.txt
trunk/README.txt
trunk/changelog.txt
trunk/coser-business/LICENSE.txt
trunk/coser-business/README.txt
trunk/coser-business/changelog.txt
trunk/coser-business/pom.xml
trunk/coser-business/src/license/THIRD-PARTY.properties
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessException.java
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserUtils.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractDataContainer.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractEntity.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Control.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResult.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResultPath.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/SpeciesFieldType.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/CategoryLineCommand.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/Command.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/MergeSpeciesCommand.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/control/ControlError.java
trunk/coser-business/src/main/java/fr/ifremer/coser/control/ControlErrorGroup.java
trunk/coser-business/src/main/java/fr/ifremer/coser/control/DiffCatchLengthControlError.java
trunk/coser-business/src/main/java/fr/ifremer/coser/control/SpeciesControlError.java
trunk/coser-business/src/main/java/fr/ifremer/coser/control/SpeciesLengthControlError.java
trunk/coser-business/src/main/java/fr/ifremer/coser/control/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/data/AbstractDataEntity.java
trunk/coser-business/src/main/java/fr/ifremer/coser/data/Catch.java
trunk/coser-business/src/main/java/fr/ifremer/coser/data/Haul.java
trunk/coser-business/src/main/java/fr/ifremer/coser/data/Length.java
trunk/coser-business/src/main/java/fr/ifremer/coser/data/Strata.java
trunk/coser-business/src/main/java/fr/ifremer/coser/data/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommandService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/ControlService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/storage/DataStorage.java
trunk/coser-business/src/main/java/fr/ifremer/coser/storage/MemoryDataStorage.java
trunk/coser-business/src/main/java/fr/ifremer/coser/storage/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/util/Coordinate.java
trunk/coser-business/src/main/java/fr/ifremer/coser/util/DataType.java
trunk/coser-business/src/main/java/fr/ifremer/coser/util/InputStreamKnownSizeBody.java
trunk/coser-business/src/main/java/fr/ifremer/coser/util/ProgressMonitor.java
trunk/coser-business/src/main/java/fr/ifremer/coser/util/ProgressReader.java
trunk/coser-business/src/main/java/fr/ifremer/coser/util/ProgressStream.java
trunk/coser-business/src/main/java/fr/ifremer/coser/util/package-info.java
trunk/coser-business/src/main/java/fr/ifremer/coser/validators/AbstractFieldValidator.java
trunk/coser-business/src/main/java/fr/ifremer/coser/validators/CoserCheckDoubleValidator.java
trunk/coser-business/src/main/java/fr/ifremer/coser/validators/CoserDoubleValidator.java
trunk/coser-business/src/main/java/fr/ifremer/coser/validators/CoserExpressionValidator.java
trunk/coser-business/src/main/java/fr/ifremer/coser/validators/RegexFieldValidator.java
trunk/coser-business/src/main/java/fr/ifremer/coser/validators/package-info.java
trunk/coser-business/src/main/resources/ftl/decharge_en.ftl
trunk/coser-business/src/main/resources/ftl/decharge_fr.ftl
trunk/coser-business/src/main/resources/ftl/map.ftl
trunk/coser-business/src/main/resources/ftl/metainfo_en.ftl
trunk/coser-business/src/main/resources/ftl/metainfo_fr.ftl
trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties
trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties
trunk/coser-business/src/main/resources/validators.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-warning-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml
trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml
trunk/coser-business/src/test/java/fr/ifremer/coser/CoserUtilsTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/CommandServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/CommonServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/ControlServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/PublicationServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/storage/MemoryDataStorageTest.java
trunk/coser-business/src/test/resources/csv/badformat/capturesbadseparator.csv
trunk/coser-business/src/test/resources/csv/badformat/stratesheadername.csv
trunk/coser-business/src/test/resources/csv/badformat/traitsheaderorder.csv
trunk/coser-business/src/test/resources/csv/correct/testcatch.csv
trunk/coser-business/src/test/resources/csv/correct/testhaul.csv
trunk/coser-business/src/test/resources/csv/correct/testlength.csv
trunk/coser-business/src/test/resources/csv/correct/testreftax.csv
trunk/coser-business/src/test/resources/csv/correct/teststrata.csv
trunk/coser-business/src/test/resources/csv/correct/testtypeespeces.csv
trunk/coser-business/src/test/resources/log4j.properties
trunk/coser-business/src/test/resources/projects/project2/codeTypeEspeces.csv
trunk/coser-business/src/test/resources/projects/project2/control/control.properties
trunk/coser-business/src/test/resources/projects/project2/control/testcatch_co.csv
trunk/coser-business/src/test/resources/projects/project2/control/testhaul_co.csv
trunk/coser-business/src/test/resources/projects/project2/control/testlength_co.csv
trunk/coser-business/src/test/resources/projects/project2/control/testlength_del.csv
trunk/coser-business/src/test/resources/projects/project2/control/teststrata_co.csv
trunk/coser-business/src/test/resources/projects/project2/original/testcatch.csv
trunk/coser-business/src/test/resources/projects/project2/original/testhaul.csv
trunk/coser-business/src/test/resources/projects/project2/original/testlength.csv
trunk/coser-business/src/test/resources/projects/project2/original/teststrata.csv
trunk/coser-business/src/test/resources/projects/project2/project.properties
trunk/coser-business/src/test/resources/projects/project2/reftaxSpecies.csv
trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testcatch_se.csv
trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testhaul_se.csv
trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testlength_se.csv
trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testselection2.selection
trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/teststrata_se.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/codeTypeEspeces.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/control.properties
trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/testcatch_co.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/testhaul_co.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/testlength_co.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/teststrata_co.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/testcatch.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/testhaul.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/testlength.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/teststrata.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/project.properties
trunk/coser-business/src/test/resources/projects/projectctrvalidated/reftaxSpecies.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/result.properties
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testcatch_se.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testhaul_se.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testlength_se.csv
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testselection1.selection
trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/teststrata_se.csv
trunk/coser-business/src/test/resources/web/upload1.zip
trunk/coser-business/src/test/resources/web/upload2.zip
trunk/coser-business/src/test/resources/webindicators.csv
trunk/coser-business/src/test/resources/webzones.csv
trunk/coser-ui/LICENSE.txt
trunk/coser-ui/README.txt
trunk/coser-ui/changelog.txt
trunk/coser-ui/pom.xml
trunk/coser-ui/src/license/THIRD-PARTY.properties
trunk/coser-ui/src/main/assembly/bin.xml
trunk/coser-ui/src/main/assembly/coser
trunk/coser-ui/src/main/assembly/coser.bat
trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserException.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserExceptionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ContainerRedoMenu.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ContainerUndoMenu.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/HomeView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenu.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixFilter.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesListRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesTableCellRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDuplicatedLineTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlErrorTreeRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlFindReplaceDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlGraphFrame.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/GlobalControlErrorModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/SpecyComboModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/Freize.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/HaulLocationHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectMapsListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectNamesListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectSummaryView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/SpeciesFieldTypeListRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ExportUploadDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultZoneRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/SelectUploadResultView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/SelectionAddResultDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/SelectionEditResultDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ZoneComboBoxModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ZoneComboBoxRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SamplingEffortRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionFilesView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionRsufiView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesFusionDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesListOccDensRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesTypesRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/FileListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/MaturitySpeciesListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/OccurrenceDensitySpeciesListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/SizeAllYearSpeciesListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/SpeciesListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/SpeciesTypesListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/StrataListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/YearListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/CommandListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/CommandListRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionByProjectTreeModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserListModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserListSelectionModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserProgressBar.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/ErrorHelper.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionLayout.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionPane.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionPaneSubPanel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/ComponentTitledBorder.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/LookAndFeelViewMenuItem.java
trunk/coser-ui/src/main/jnlp/coser-jnlp.vm
trunk/coser-ui/src/main/resources/coser.properties
trunk/coser-ui/src/main/resources/fr/ifremer/coser/bean/Project-error-validation.xml
trunk/coser-ui/src/main/resources/fr/ifremer/coser/bean/RSufiResult-error-validation.xml
trunk/coser-ui/src/main/resources/fr/ifremer/coser/bean/Selection-error-validation.xml
trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
trunk/coser-ui/src/main/resources/icons/accept.png
trunk/coser-ui/src/main/resources/icons/agt_action_fail.png
trunk/coser-ui/src/main/resources/icons/arrow_jion_up.png
trunk/coser-ui/src/main/resources/icons/arrow_left.png
trunk/coser-ui/src/main/resources/icons/arrow_right.png
trunk/coser-ui/src/main/resources/icons/arrow_rotate_clockwise.png
trunk/coser-ui/src/main/resources/icons/button_ok.png
trunk/coser-ui/src/main/resources/icons/cancel.png
trunk/coser-ui/src/main/resources/icons/chart_bar.png
trunk/coser-ui/src/main/resources/icons/chart_curve.png
trunk/coser-ui/src/main/resources/icons/coser.ico
trunk/coser-ui/src/main/resources/icons/disk.png
trunk/coser-ui/src/main/resources/icons/logo.png
trunk/coser-ui/src/main/resources/icons/logo300.png
trunk/coser-ui/src/main/resources/icons/map.png
trunk/coser-ui/src/main/resources/icons/report.png
trunk/coser-ui/src/main/resources/icons/spellcheck.png
trunk/coser-ui/src/main/resources/icons/stock_lock.png
trunk/coser-ui/src/main/resources/icons/stock_select_clear.png
trunk/coser-ui/src/main/resources/icons/stock_select_table.png
trunk/coser-ui/src/main/resources/icons/table.png
trunk/coser-ui/src/main/resources/icons/warning.png
trunk/coser-ui/src/main/resources/log4j.properties
trunk/coser-ui/src/main/resources/maps/vmap_area_thin.shp
trunk/coser-ui/src/main/resources/maps/vmap_area_thin.ssx
trunk/coser-web/LICENSE.txt
trunk/coser-web/README.txt
trunk/coser-web/changelog.txt
trunk/coser-web/pom.xml
trunk/coser-web/src/license/THIRD-PARTY.properties
trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebException.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/DocumentsAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/QualityAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SurveyAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/IndexAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/ListProjectsAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginInterceptor.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/PerformLoginAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDownloadAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/IndicatorAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonFacade.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonIndicator.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonZone.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CoserAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SpeciesAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDownloadAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/IndicatorAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SpeciesAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceQualityAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java
trunk/coser-web/src/main/resources/coserweb.properties
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package.properties
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package_en.properties
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package_es.properties
trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package_fr.properties
trunk/coser-web/src/main/resources/i18n/coser-web_en_GB.properties
trunk/coser-web/src/main/resources/i18n/coser-web_fr_FR.properties
trunk/coser-web/src/main/resources/log4j.properties
trunk/coser-web/src/main/resources/struts.xml
trunk/coser-web/src/main/webapp/WEB-INF/content/admin/index.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/admin/list-projects.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/admin/login.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/admin/perform-login-input.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/indicator.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/documents.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/map.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/species.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/graph.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/indicator.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/species.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/quality.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/search/extract-input.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/search/extract-success.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/search/extract-wait.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/source/facade.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/source/source-data.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/source/source-quality.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/source/source.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/source/zone.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/survey.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp
trunk/coser-web/src/main/webapp/WEB-INF/decorators.xml
trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp
trunk/coser-web/src/main/webapp/WEB-INF/decorators/sublayout.jsp
trunk/coser-web/src/main/webapp/WEB-INF/web.xml
trunk/coser-web/src/main/webapp/favicon.png
trunk/coser-web/src/main/webapp/images/bas_page.png
trunk/coser-web/src/main/webapp/images/bas_page2.png
trunk/coser-web/src/main/webapp/images/carte_accueil.png
trunk/coser-web/src/main/webapp/images/contenu_haut.png
trunk/coser-web/src/main/webapp/images/degrade.png
trunk/coser-web/src/main/webapp/images/es.png
trunk/coser-web/src/main/webapp/images/facadesmap.png
trunk/coser-web/src/main/webapp/images/fond.jpg
trunk/coser-web/src/main/webapp/images/fond_02.jpg
trunk/coser-web/src/main/webapp/images/fond_contenu.png
trunk/coser-web/src/main/webapp/images/footer.png
trunk/coser-web/src/main/webapp/images/footer_02.jpg
trunk/coser-web/src/main/webapp/images/fr.png
trunk/coser-web/src/main/webapp/images/gb.png
trunk/coser-web/src/main/webapp/images/haut_page.png
trunk/coser-web/src/main/webapp/images/ico_accueil.png
trunk/coser-web/src/main/webapp/images/ico_carte.png
trunk/coser-web/src/main/webapp/images/logo.png
trunk/coser-web/src/main/webapp/images/logoIfremer.png
trunk/coser-web/src/main/webapp/images/logoSIH.png
trunk/coser-web/src/main/webapp/images/puce_liste.png
trunk/coser-web/src/main/webapp/images/puce_liste_18.png
trunk/coser-web/src/main/webapp/images/stock_select_clear.png
trunk/coser-web/src/main/webapp/images/stock_select_table.png
trunk/coser-web/src/main/webapp/images/top_contenu.png
trunk/coser-web/src/main/webapp/images/warper_page.png
trunk/coser-web/src/main/webapp/images/worldsmall.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4b-4c-E7d.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4b-4c.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c-E7d.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c4-E7d.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c4.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-7d.png
trunk/coser-web/src/main/webapp/images/zones/C_Ciem-E7d.png
trunk/coser-web/src/main/webapp/images/zones/C_Crustaflam.png
trunk/coser-web/src/main/webapp/images/zones/C_E-Corse.png
trunk/coser-web/src/main/webapp/images/zones/C_Facades.png
trunk/coser-web/src/main/webapp/images/zones/C_GdG-Ciem-7.png
trunk/coser-web/src/main/webapp/images/zones/C_GdG-Ech.png
trunk/coser-web/src/main/webapp/images/zones/C_GdG-MC.png
trunk/coser-web/src/main/webapp/images/zones/C_GdL.png
trunk/coser-web/src/main/webapp/images/zones/C_MC-Ciem-7.png
trunk/coser-web/src/main/webapp/images/zones/C_MC-Ech.png
trunk/coser-web/src/main/webapp/images/zones/C_Noursein.png
trunk/coser-web/src/main/webapp/images/zones/C_Noursom.png
trunk/coser-web/src/main/webapp/images/zones/C_Nurvil.png
trunk/coser-web/src/main/webapp/js/coser.js
trunk/coser-web/src/main/webapp/js/jquery-1.8.2.min.js
trunk/coser-web/src/main/webapp/js/jquery.expander.min.js
trunk/coser-web/src/main/webapp/pdf/Web_EstComInd_PresentationIndic_EN.pdf
trunk/coser-web/src/main/webapp/pdf/Web_EstComInd_PresentationIndic_FR.pdf
trunk/coser-web/src/main/webapp/pdf/Web_EstPopInd_PresentationIndic_EN.pdf
trunk/coser-web/src/main/webapp/pdf/Web_EstPopInd_PresentationIndic_FR.pdf
trunk/coser-web/src/main/webapp/styles/coser.css
trunk/pom.xml
trunk/src/site/en/rst/devel/textupdate.rst
trunk/src/site/en/rst/download.rst
trunk/src/site/en/rst/index.rst
trunk/src/site/en/rst/user/configuration.rst
trunk/src/site/en/rst/user/controls.rst
trunk/src/site/en/rst/user/dataformat.rst
trunk/src/site/en/rst/user/faq.rst
trunk/src/site/en/rst/user/guide_control.rst
trunk/src/site/en/rst/user/guide_listcontrols.rst
trunk/src/site/en/rst/user/guide_project.rst
trunk/src/site/en/rst/user/guide_results.rst
trunk/src/site/en/rst/user/guide_selection.rst
trunk/src/site/resources/icons/logo100.png
trunk/src/site/resources/images/en/01-noproject.png
trunk/src/site/resources/images/en/02-createproject.png
trunk/src/site/resources/images/en/03-openproject.png
trunk/src/site/resources/images/en/04-projectsummary.png
trunk/src/site/resources/images/en/10-controlmain.png
trunk/src/site/resources/images/en/11-controlmenu1.png
trunk/src/site/resources/images/en/12-controlmenu2.png
trunk/src/site/resources/images/en/13-controlgraphdiff.png
trunk/src/site/resources/images/en/14-controlgraphlength.png
trunk/src/site/resources/images/en/20-selectiondetail.png
trunk/src/site/resources/images/en/21-selectionyears.png
trunk/src/site/resources/images/en/22-selectionstrata.png
trunk/src/site/resources/images/en/23-selectionspecies.png
trunk/src/site/resources/images/en/24-selectionlists.png
trunk/src/site/resources/images/en/25-selectionresults.png
trunk/src/site/resources/images/en/26-selectionaddresult.png
trunk/src/site/resources/images/en/27-selectionmenu0.png
trunk/src/site/resources/images/en/28-selectionmenu1.png
trunk/src/site/resources/images/en/90-configurationpath.png
trunk/src/site/resources/images/en/91-configurationvalues.png
trunk/src/site/resources/images/fr/01-noproject.png
trunk/src/site/resources/images/fr/02-createproject.png
trunk/src/site/resources/images/fr/03-openproject.png
trunk/src/site/resources/images/fr/04-projectsummary.png
trunk/src/site/resources/images/fr/10-controlmain.png
trunk/src/site/resources/images/fr/11-controlmenu1.png
trunk/src/site/resources/images/fr/12-controlmenu2.png
trunk/src/site/resources/images/fr/13-controlgraphdiff.png
trunk/src/site/resources/images/fr/14-controlgraphlength.png
trunk/src/site/resources/images/fr/20-selectiondetail.png
trunk/src/site/resources/images/fr/21-selectionyears.png
trunk/src/site/resources/images/fr/22-selectionstrata.png
trunk/src/site/resources/images/fr/23-selectionspecies.png
trunk/src/site/resources/images/fr/24-selectionlists.png
trunk/src/site/resources/images/fr/25-selectionresults.png
trunk/src/site/resources/images/fr/26-selectionaddresult.png
trunk/src/site/resources/images/fr/27-selectionmenu0.png
trunk/src/site/resources/images/fr/28-selectionmenu1.png
trunk/src/site/resources/images/fr/90-configurationpath.png
trunk/src/site/resources/images/fr/91-configurationvalues.png
trunk/src/site/rst/devel/directory.rst
trunk/src/site/rst/devel/struts.rst
trunk/src/site/rst/devel/textupdate.rst
trunk/src/site/rst/download.rst
trunk/src/site/rst/index.rst
trunk/src/site/rst/user/configuration.rst
trunk/src/site/rst/user/controls.rst
trunk/src/site/rst/user/dataformat.rst
trunk/src/site/rst/user/faq.rst
trunk/src/site/rst/user/guide_control.rst
trunk/src/site/rst/user/guide_listcontrols.rst
trunk/src/site/rst/user/guide_project.rst
trunk/src/site/rst/user/guide_results.rst
trunk/src/site/rst/user/guide_selection.rst
trunk/src/site/site_en.xml
trunk/src/site/site_fr.xml
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- .settings
.project
target
*.iml
*.ipr
*.iws
+ .settings
.project
target
*.iml
*.ipr
*.iws
*.log
Property changes on: trunk/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -47,11 +47,12 @@
public CoserBusinessConfig() {
// init configuration with default options
- for (CoserBusinessOption o : CoserBusinessOption.values()) {
- if (o.defaultValue != null) {
- setDefaultOption(o.key, o.defaultValue);
- }
- }
+ loadDefaultOptions(CoserBusinessOption.values());
+// for (CoserBusinessOption o : CoserBusinessOption.values()) {
+// if (o.defaultValue != null) {
+// setDefaultOption(o.key, o.defaultValue);
+// }
+// }
}
/**
@@ -214,6 +215,11 @@
return result;
}
+ public File getWebEchobaseProjectsDirectory() {
+ File result = getOptionAsFile(CoserBusinessOption.WEB_ECHOBASE_PROJECTS_DIRECTORY.key);
+ return result;
+ }
+
public File getWebIndicatorsFile() {
File result = getOptionAsFile(CoserBusinessOption.WEB_INDICATORS.key);
return result;
@@ -265,6 +271,7 @@
WEB_PROPERTIES_FILE("coser.web.properties.file", t("coser.config.web.properties.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "web.properties"),
WEB_INDICATORS_PROJECTS_DIRECTORY("coser.web.indicators.projects.directory", t("coser.config.web.indicators.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webindicatorsprojects"),
WEB_MAPS_PROJECTS_DIRECTORY("coser.web.maps.projects.directory", t("coser.config.web.maps.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webmapsprojects"),
+ WEB_ECHOBASE_PROJECTS_DIRECTORY("coser.web.echobase.projects.directory", t("coser.config.web.echobase.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webechobaseprojects"),
WEB_INDICATORS("coser.web.indicators.file", t("coser.config.web.indicators.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webindicators.csv"),
WEB_ZONES("coser.web.zones.file", t("coser.config.web.zones.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webzones.csv"),
WEB_PUBLICATION_EMAIL("coser.web.newresult.emails", t("coser.config.web.newresult.emails.description"), null);
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessException.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserClassLoader.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserTechnicalException.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserTechnicalException.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserTechnicalException.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,50 @@
+package fr.ifremer.coser;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+/**
+ * Technical exception.
+ *
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class CoserTechnicalException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
+ public CoserTechnicalException(String message) {
+ super(message);
+ }
+
+ public CoserTechnicalException(Throwable cause) {
+ super(cause);
+ }
+
+ public CoserTechnicalException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserTechnicalException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserUtils.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractDataContainer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/AbstractEntity.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Control.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/EchoBaseProject.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/EchoBaseProject.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/EchoBaseProject.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,284 @@
+package fr.ifremer.coser.bean;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Charsets;
+import com.google.common.base.Function;
+import com.google.common.io.Files;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.filefilter.OrFileFilter;
+import org.apache.commons.io.filefilter.PrefixFileFilter;
+import org.apache.commons.io.filefilter.SuffixFileFilter;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Serializable;
+import java.io.Writer;
+import java.util.Date;
+import java.util.Properties;
+
+/**
+ * Represent the storage of the EchoBase project published to CoserWeb application.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class EchoBaseProject implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String METADATA_FILE = "project.properties";
+
+ /**
+ * Base directory of the project.
+ */
+ protected final File basedir;
+
+ protected String author;
+
+ protected String facadeName;
+
+ protected String zoneName;
+
+ protected String surveyName;
+
+ protected String comment;
+
+ protected Date creationDate;
+
+ public EchoBaseProject(File basedir) {
+ this.basedir = basedir;
+ }
+
+ public File getBasedir() {
+ return basedir;
+ }
+
+ public String getName() {
+ return getBasedir().getName();
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ public String getFacadeName() {
+ return facadeName;
+ }
+
+ public void setFacadeName(String facadeName) {
+ this.facadeName = facadeName;
+ }
+
+ public String getZoneName() {
+ return zoneName;
+ }
+
+ public void setZoneName(String zoneName) {
+ this.zoneName = zoneName;
+ }
+
+ public String getSurveyName() {
+ return surveyName;
+ }
+
+ public void setSurveyName(String surveyName) {
+ this.surveyName = surveyName;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public File getSpeciesDefinitionFile() {
+ return new File(basedir, "species.csv");
+ }
+
+ public File getPopulationIndicatorsFile() {
+ return new File(basedir, "populationIndicators.csv");
+ }
+
+ public File getCommunityIndicatorsFile() {
+ return new File(basedir, "communityIndicators.csv");
+ }
+
+ public File getMapsDirectory() {
+ return new File(basedir, "maps");
+ }
+
+ /**
+ * Load a project from his basedir.
+ *
+ * @throws IOException if could not read the meta data file
+ */
+ public void load() throws IOException {
+ File metadataFile = getMetaDataFile();
+ Reader reader = Files.newReader(metadataFile, Charsets.UTF_8);
+ try {
+ Properties p = new Properties();
+ p.load(reader);
+ reader.close();
+ fromProperties(p);
+ } finally {
+ IOUtils.closeQuietly(reader);
+ }
+ }
+
+ /**
+ * Save the project.
+ *
+ * @throws IOException if could not write the meta-data file
+ */
+ public void save() throws IOException {
+
+ File metadataFile = getMetaDataFile();
+ Writer writer = Files.newWriter(metadataFile, Charsets.UTF_8);
+ try {
+ Properties p = toProperties();
+ p.store(writer, "Saved by " + EchoBaseProject.class.getName());
+ writer.close();
+ } finally {
+ IOUtils.closeQuietly(writer);
+ }
+ }
+
+ protected File getMetaDataFile() {
+ return new File(basedir, METADATA_FILE);
+ }
+
+ protected Properties toProperties() {
+ Properties props = new Properties();
+ if (author != null) {
+ props.setProperty("project.author", author);
+ }
+ if (facadeName != null) {
+ props.setProperty("project.facadeName", facadeName);
+ }
+ if (zoneName != null) {
+ props.setProperty("project.zoneName", zoneName);
+ }
+ if (surveyName!= null) {
+ props.setProperty("project.surveyName", surveyName);
+ }
+ if (comment != null) {
+ props.setProperty("project.comment", comment);
+ }
+ if (creationDate != null) {
+ props.setProperty("project.creationDate", String.valueOf(creationDate.getTime()));
+ }
+ return props;
+ }
+
+ protected void fromProperties(Properties props) {
+ if (props.containsKey("project.author")) {
+ setAuthor(props.getProperty("project.author"));
+ }
+ if (props.containsKey("project.facadeName")) {
+ setFacadeName(props.getProperty("project.facadeName"));
+ }
+ if (props.containsKey("project.zoneName")) {
+ setZoneName(props.getProperty("project.zoneName"));
+ }
+ if (props.containsKey("project.surveyName")) {
+ setSurveyName(props.getProperty("project.surveyName"));
+ }
+ if (props.containsKey("project.comment")) {
+ setComment(props.getProperty("project.comment"));
+ }
+ if (props.containsKey("project.creationDate")) {
+ Date date = new Date(Long.parseLong(props.getProperty("project.creationDate")));
+ setCreationDate(date);
+ }
+ }
+
+ public static FilenameFilter newMapSpeciesFilenameFilter(String surveyName) {
+ OrFileFilter result = new OrFileFilter();
+ result.addFileFilter(new PrefixFileFilter(surveyName + "_"));
+ result.addFileFilter(new SuffixFileFilter(".png"));
+ return result;
+ }
+
+ public static Function<File, String> newMapFileToSpeciesCode(String surveyName) {
+ return new MapFileToSpeciesCodeFunction(surveyName);
+ }
+
+ public static Function<String, String> newSpeciesCodeToMapFileName(String surveyName) {
+ return new SpeciesCodeToMapFileNameFunction(surveyName);
+ }
+
+ protected static class MapFileToSpeciesCodeFunction implements Function<File, String> {
+
+ private final String zoneName;
+
+ public MapFileToSpeciesCodeFunction(String zoneName) {
+ this.zoneName = zoneName;
+ }
+
+ @Override
+ public String apply(File input) {
+ String fileName = input.getName();
+ String species = fileName.substring(zoneName.length() + 1);
+ species = StringUtils.substringBefore(species, ".");
+ return species;
+ }
+ }
+
+ protected static class SpeciesCodeToMapFileNameFunction implements Function<String, String> {
+
+ private final String zoneName;
+
+ public SpeciesCodeToMapFileNameFunction(String zoneName) {
+ this.zoneName = zoneName;
+ }
+
+ @Override
+ public String apply(String input) {
+
+ String fileName = zoneName + "_" + input + ".png";
+ return fileName;
+ }
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/EchoBaseProject.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/IndicatorMap.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/IndicatorMap.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/IndicatorMap.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,130 @@
+package fr.ifremer.coser.bean;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Maps;
+import fr.ifremer.coser.storage.DataStorage;
+import fr.ifremer.coser.storage.DataStorages;
+import org.apache.commons.collections4.map.MultiKeyMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * Contains the localized indicator definitions.
+ * <p/>
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class IndicatorMap {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(IndicatorMap.class);
+
+ /**
+ * Indicator map (id, locale > translation, id, "unit" > unit) (etat du service).
+ */
+ protected final MultiKeyMap<String, String> map;
+
+ public IndicatorMap(File indicatorsFile) {
+ Preconditions.checkNotNull(indicatorsFile);
+
+ if (log.isInfoEnabled()) {
+ log.info("Loading Indicator file: " + indicatorsFile);
+ }
+ this.map = new MultiKeyMap<String, String>();
+ DataStorage indicatorsStorage;
+ indicatorsStorage = DataStorages.load(indicatorsFile);
+ Iterator<String[]> iteratorInd = indicatorsStorage.iterator(true);
+ while (iteratorInd.hasNext()) {
+ // "id";"label_fr";"label_en";"label_es";"unit"
+ String[] indicator = iteratorInd.next();
+ map.put(indicator[0], "fr", indicator[1]);
+ map.put(indicator[0], "en", indicator[2]);
+ map.put(indicator[0], "es", indicator[3]);
+ map.put(indicator[0], "unit", indicator[4]);
+ }
+ }
+
+ public String getIndicatorValue(String indicator, Locale locale) {
+ Preconditions.checkNotNull(indicator);
+ Preconditions.checkNotNull(locale);
+ String translations = getIndicatorValue(indicator, locale.getLanguage());
+ if (translations == null) {
+ translations = "##" + indicator + "##" + locale.getLanguage();
+ }
+ return translations;
+ }
+
+ public String getIndicatorUnit(String indicator) {
+ Preconditions.checkNotNull(indicator);
+ return getIndicatorValue(indicator, "unit");
+ }
+
+ /**
+ * Get indicator translation by checking correct locale.
+ *
+ * @param indicator indicator code
+ * @param localeCode locale
+ * @return indicator translation
+ */
+ public String getIndicatorValue(String indicator, String localeCode) {
+ Preconditions.checkNotNull(indicator);
+ Preconditions.checkNotNull(localeCode);
+ String localLocaleCode = localeCode;
+ if (!"fr".equals(localLocaleCode) && !"es".equals(localLocaleCode)
+ && !"unit".equals(localLocaleCode)) {
+ localLocaleCode = "en"; // en by default
+ }
+ return map.get(indicator, localLocaleCode);
+ }
+
+ public Map<String, String> getIndicatorsValues(Collection<String> indicatorList, Locale locale) {
+
+ Map<String, String> result = Maps.newTreeMap();
+
+ if (indicatorList != null) {
+
+ for (String indicator : indicatorList) {
+ String indicatorLabel = getIndicatorValue(indicator, locale);
+ result.put(indicator, indicatorLabel);
+ }
+ }
+
+ return result;
+ }
+
+ protected MultiKeyMap<String, String> getMap() {
+ return map;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/IndicatorMap.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResult.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/RSufiResultPath.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/SpeciesFieldType.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/ZoneMap.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/ZoneMap.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/ZoneMap.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,213 @@
+package fr.ifremer.coser.bean;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.collect.Lists;
+import fr.ifremer.coser.storage.DataStorage;
+import fr.ifremer.coser.storage.DataStorages;
+import fr.ifremer.coser.storage.MemoryDataStorage;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * Contains all usefull methods on zone definitions.
+ * <p/>
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class ZoneMap {
+
+ protected final DataStorage storage;
+
+ public ZoneMap(File zonesFile) {
+ // l'operation n'est pas obligatoire pour tous les clients
+ // lourd, le fichier peut donc ne pas exister
+ if (zonesFile == null || zonesFile.isFile()) {
+ storage = DataStorages.load(zonesFile);
+ } else {
+ storage = new MemoryDataStorage();
+ }
+ }
+
+ /**
+ * Retourne les nom d'une zone (avec la facade, l'année et la serie) en
+ * fonction de l'id de la zone.
+ *
+ * @param zoneId zone id
+ * @return zone name (or {@code null} if not found)
+ */
+ public String getZoneFullName(String zoneId) {
+ String resultName = null;
+ // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+ int zoneIndex = storage.indexOf(zoneId);
+ if (zoneIndex != -1) {
+ String[] tuple = storage.get(zoneIndex);
+ resultName = tuple[2];
+ resultName += " - " + tuple[3];
+ resultName += " - " + tuple[4];
+ resultName += " - " + tuple[5];
+ }
+ return resultName;
+ }
+
+ /**
+ * Retourne les nom d'une zone (avec l'année et la serie) en
+ * fonction de l'id de la zone.
+ *
+ * @param zoneId zone id
+ * @return zone name (or {@code null} if not found)
+ */
+ public String getZoneFullNameWithNoFacade(String zoneId) {
+ String resultName = null;
+ // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+ int zoneIndex = storage.indexOf(zoneId);
+ if (zoneIndex != -1) {
+ String[] tuple = storage.get(zoneIndex);
+ resultName = tuple[3];
+ resultName += " - " + tuple[4];
+ resultName += " - " + tuple[5];
+ }
+ return resultName;
+ }
+
+ /**
+ * Recupere la liste des meta info pour chaque id de zone sous forme de Map.
+ *
+ * @param locale locale
+ * @return zone meta info map
+ */
+ public Map<String, String> getZoneMetaInfo(Locale locale) {
+ Map<String, String> result = new HashMap<String, String>();
+
+ Iterator<String[]> itZone = storage.iterator(true);
+ while (itZone.hasNext()) {
+ // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+ String[] tuple = itZone.next();
+ if (locale != null && "fr".equals(locale.getLanguage())) {
+ result.put(tuple[0], tuple[6]);
+ } else if (locale != null && "es".equals(locale.getLanguage())) {
+ result.put(tuple[0], tuple[8]);
+ } else {
+ result.put(tuple[0], tuple[7]);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Recupere la liste des cartes pour chaque id de zone sous forme de Map.
+ *
+ * @return zone images map
+ */
+ public Map<String, String> getZonePictures() {
+ Map<String, String> result = new HashMap<String, String>();
+
+ Iterator<String[]> itZone = storage.iterator(true);
+ while (itZone.hasNext()) {
+ // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+ String[] tuple = itZone.next();
+ result.put(tuple[0], tuple[9]);
+ }
+
+ return result;
+ }
+
+ /**
+ * Retourne les zones disponible par facade.
+ *
+ * @return couple facadeid/list<zoneid>
+ */
+ public Map<String, List<String>> getZoneByFacade() {
+ Map<String, List<String>> zonesByFacade = new HashMap<String, List<String>>();
+
+ // get subzone for main zone
+ Iterator<String[]> itZone = storage.iterator(true);
+ while (itZone.hasNext()) {
+ // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+ String[] tuple = itZone.next();
+ String facadeid = tuple[1];
+ String zoneid = tuple[0];
+ List<String> zones = zonesByFacade.get(facadeid);
+ if (zones == null) {
+ zones = new ArrayList<String>();
+ zonesByFacade.put(facadeid, zones);
+ }
+ zones.add(zoneid);
+ }
+
+ return zonesByFacade;
+ }
+
+ /**
+ * Get facades list (as facadeid/facadename).
+ *
+ * @return facades map
+ */
+ public Map<String, String> getFacades() {
+ Map<String, String> facades = new LinkedHashMap<String, String>();
+ // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+ Iterator<String[]> itZone = storage.iterator(true);
+ while (itZone.hasNext()) {
+ String[] tuple = itZone.next();
+ // on a pas d'id pour les facades
+ facades.put(tuple[1], tuple[2]);
+ }
+ return facades;
+ }
+
+ /**
+ * Get all zones for a given facade.
+ * <p/>
+ * If no facade is given, then return all zones.
+ *
+ * @return zones for the given facade (or all zones if no facade is given)
+ */
+ public List<String> getZonesForFacade(String facade) {
+ List<String> facades = Lists.newArrayList();
+ // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+ Iterator<String[]> itZone = storage.iterator(true);
+ while (itZone.hasNext()) {
+ String[] tuple = itZone.next();
+ if (facade == null || tuple[1].equals(facade)) {
+ facades.add(tuple[0]);
+ }
+ }
+ return facades;
+ }
+
+ public DataStorage getStorage() {
+ return storage;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/ZoneMap.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/command/CategoryLineCommand.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/command/Command.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/command/MergeSpeciesCommand.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/command/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/control/ControlError.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/control/ControlErrorGroup.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/control/DiffCatchLengthControlError.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/control/SpeciesControlError.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/control/SpeciesLengthControlError.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/control/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/data/AbstractDataEntity.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/data/Catch.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/data/Haul.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/data/Length.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/data/Strata.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/data/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserRequest.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserRequest.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserRequest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,45 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import java.io.Serializable;
+import java.util.Locale;
+
+/**
+ * Request to obtain results.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public interface CoserRequest extends Serializable{
+
+ Locale getLocale();
+
+ void setLocale(Locale locale);
+
+ boolean isFilled();
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserRequest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResult.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResult.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResult.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,45 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import java.io.Serializable;
+
+/**
+ * Result of a request.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public interface CoserResult extends Serializable {
+
+ /**
+ * @return the name of the repository which produces the result.
+ */
+ String getSource();
+
+ Object getResult();
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResult.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResultEngine.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResultEngine.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResultEngine.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,204 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import fr.ifremer.coser.CoserBusinessConfig;
+import fr.ifremer.coser.result.repository.ResultRepository;
+import fr.ifremer.coser.result.repository.ResultRepositoryProvider;
+import fr.ifremer.coser.result.repository.echobase.EchoBaseResultRepositoryProvider;
+import fr.ifremer.coser.result.repository.legacy.LegacyResultRepositoryProvider;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * To request some results on the web server side.
+ * <p/>
+ * This new API will let us to define any result format to be queried.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @see ResultRepositoryProvider
+ * @see ResultRepository
+ * @see CoserResult
+ * @since 1.5
+ */
+public class CoserResultEngine {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(CoserResultEngine.class);
+
+ /**
+ * List of result repository providers.
+ */
+ protected final Set<ResultRepositoryProvider<?>> repositoryProviders;
+
+ /**
+ * Result repositories loaded lazy from their provider.
+ *
+ * @see #getRepositories()
+ */
+ protected Set<ResultRepository> repositories;
+
+ public static Set<ResultRepositoryProvider<?>> createDefaultRepositoryProviders(CoserBusinessConfig config) {
+ Preconditions.checkNotNull(config);
+ Set<ResultRepositoryProvider<?>> result = Sets.newHashSet();
+
+ // add legacy map repository
+ Preconditions.checkNotNull(config.getWebMapsProjectsDirectory());
+ result.add(new LegacyResultRepositoryProvider(config, config.getWebMapsProjectsDirectory()));
+
+ // add legacy indicators repository
+ Preconditions.checkNotNull(config.getWebIndicatorsProjectsDirectory());
+ result.add(new LegacyResultRepositoryProvider(config, config.getWebIndicatorsProjectsDirectory()));
+
+ // add EchoBase repository
+ Preconditions.checkNotNull(config.getWebEchobaseProjectsDirectory());
+ result.add(new EchoBaseResultRepositoryProvider(config, config.getWebEchobaseProjectsDirectory()));
+ return result;
+ }
+
+ public CoserResultEngine(Set<ResultRepositoryProvider<?>> repositoryProviders) {
+ Preconditions.checkNotNull(repositoryProviders);
+ this.repositoryProviders = repositoryProviders;
+ }
+
+ public void resetRepositories() {
+ this.repositories = null;
+ }
+
+ public Map<String, String> getAvailableZones(CoserRequest request) {
+ Map<String, String> result = Maps.newHashMap();
+ for (ResultRepository repository : getRepositories()) {
+ Map<String, String> resultForRepository = repository.getAvailableZones(request);
+ if (MapUtils.isNotEmpty(resultForRepository)) {
+ result.putAll(resultForRepository);
+ }
+ }
+ return result;
+ }
+
+ public Map<String, String> getAvailableSpecies(CoserRequest request) {
+ Map<String, String> result = Maps.newHashMap();
+ for (ResultRepository repository : getRepositories()) {
+ Map<String, String> resultForRepository = repository.getAvailableSpecies(request);
+ if (MapUtils.isNotEmpty(resultForRepository)) {
+ result.putAll(resultForRepository);
+ }
+ }
+ return result;
+ }
+
+ public Map<String, String> getAvailableIndicators(IndicatorRequest request) {
+ Map<String, String> result = Maps.newHashMap();
+ for (ResultRepository repository : getRepositories()) {
+ Map<String, String> resultForRepository = repository.getAvailableIndicators(request);
+ if (MapUtils.isNotEmpty(resultForRepository)) {
+ result.putAll(resultForRepository);
+ }
+ }
+ return result;
+ }
+
+ public CoserResult getResult(CoserRequest request) throws DuplicatedResultException {
+
+ Preconditions.checkArgument(request.isFilled());
+
+ ResultRepository repository = getMatchingRepository(request);
+
+ if (repository == null) {
+ throw new NoResultRepositoryFoundException("No result repository matching request", request);
+ }
+ CoserResult result = repository.getResult(request);
+ if (result == null) {
+ throw new NoResultFoundException(repository.getId(), request);
+ }
+ return result;
+ }
+
+ protected Set<ResultRepository> getRepositories() {
+ if (repositories == null) {
+ Set<String> ids = Sets.newHashSet();
+ repositories = Sets.newHashSet();
+ for (ResultRepositoryProvider repositoryProvider : repositoryProviders) {
+ Set<ResultRepository> resultRepositories = repositoryProvider.loadRepositories();
+
+ // check all repository use a unique id
+ for (ResultRepository resultRepository : resultRepositories) {
+ String id = resultRepository.getId();
+ if (log.isDebugEnabled()) {
+ log.debug("Try to register resultrepository: " + id);
+ }
+ if (!ids.add(id)) {
+
+ // there is already a repository with this id
+ throw new ResultRepositoryInitializationException(repositoryProvider, "Duplicate result repository with id: " + id, null);
+ }
+ }
+ repositories.addAll(resultRepositories);
+ }
+ if (log.isInfoEnabled()) {
+ log.info("Found " + repositories.size() + " result repository(ies).");
+ }
+ }
+ return repositories;
+ }
+
+ protected ResultRepository getMatchingRepository(CoserRequest request) throws DuplicatedResultException {
+
+ List<ResultRepository> repositoryList = Lists.newArrayList();
+
+ for (ResultRepository resultRepository : getRepositories()) {
+
+ if (resultRepository.acceptResult(request)) {
+ repositoryList.add(resultRepository);
+ }
+ }
+
+ ResultRepository repository;
+ switch (repositoryList.size()) {
+ case 0:
+ repository = null;
+ break;
+ case 1:
+ repository = repositoryList.get(0);
+ break;
+ default:
+ throw new DuplicatedResultException(
+ repositoryList.toArray(new ResultRepository[repositoryList.size()]));
+ }
+ return repository;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/CoserResultEngine.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/DuplicatedResultException.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/DuplicatedResultException.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/DuplicatedResultException.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,52 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.CoserTechnicalException;
+import fr.ifremer.coser.result.repository.ResultRepository;
+
+/**
+ * When multiple result repository can offer a result.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class DuplicatedResultException extends CoserTechnicalException {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final ResultRepository[] availableRepositories;
+
+ public DuplicatedResultException(ResultRepository... availableRepositories) {
+ super("There is " + availableRepositories.length + " repositories that can offer the result...");
+ this.availableRepositories = availableRepositories;
+ }
+
+ public ResultRepository[] getAvailableRepositories() {
+ return availableRepositories;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/DuplicatedResultException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/FileResult.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/FileResult.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/FileResult.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,76 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.CoserTechnicalException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+/**
+ * A result with only one file.
+ * <p/>
+ * A useful method is offered to obtain directly a {@link InputStream} from the result file ({@link #getInputStream()}).
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class FileResult implements CoserResult {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final String source;
+
+ protected final File file;
+
+ public FileResult(String source, File file) {
+ this.file = file;
+ this.source = source;
+ }
+
+ @Override
+ public String getSource() {
+ return source;
+ }
+
+ @Override
+ public File getResult() {
+ return file;
+ }
+
+ public InputStream getInputStream() {
+ try {
+ InputStream inputStream = new FileInputStream(file);
+ return inputStream;
+ } catch (FileNotFoundException e) {
+ // should never happen ?
+ throw new CoserTechnicalException("Could not find file: " + file, e);
+ }
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/FileResult.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultFoundException.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultFoundException.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultFoundException.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,55 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+/**
+ * When no result was found for a matching repository.
+ * <p/>
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class NoResultFoundException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final String repositoryId;
+
+ protected final CoserRequest request;
+
+ public NoResultFoundException(String repositoryId, CoserRequest request) {
+ this.repositoryId = repositoryId;
+ this.request = request;
+ }
+
+ public String getRepositoryId() {
+ return repositoryId;
+ }
+
+ public CoserRequest getRequest() {
+ return request;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultFoundException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultRepositoryFoundException.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultRepositoryFoundException.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultRepositoryFoundException.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,46 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.CoserTechnicalException;
+
+/**
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class NoResultRepositoryFoundException extends CoserTechnicalException {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final CoserRequest request;
+
+ public NoResultRepositoryFoundException(String message, CoserRequest request) {
+ super(message);
+ this.request = request;
+ }
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/NoResultRepositoryFoundException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/Reports.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/Reports.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/Reports.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,73 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import java.util.Iterator;
+import java.util.Locale;
+
+/**
+ * Created on 3/7/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class Reports {
+
+ public static String getYearChartTitle(Locale locale) {
+ String yearAxis = "Year";
+ if ("fr".equals(locale.getLanguage())) {
+ yearAxis = "Ann\u00E9e";
+ } else if ("es".equals(locale.getLanguage())) {
+ yearAxis = "A\u00F1o";
+ }
+ return yearAxis;
+ }
+
+ /**
+ * Retourne le nom d'affichage d'une especes pour les rapports.
+ *
+ * @param reftax species data storage
+ * @param species species code
+ * @return species display name
+ * @since 1.5
+ */
+ public static String getReportDisplayName(Iterator<String[]> reftax, String species) {
+ String displayName = null;
+
+ while (reftax.hasNext()) {
+ String[] tuple = reftax.next();
+
+ // "C_Perm","NumSys","NivSys","C_VALIDE","L_VALIDE","AA_VALIDE","C_TxP\u00E8re","Taxa"
+ String speciesCode = tuple[3];
+ if (speciesCode.equals(species)) {
+ // nom + auteur (sans ajout de parenthese : important)
+ displayName = tuple[4] + " " + tuple[5];
+ break;
+ }
+ }
+
+ return displayName;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/Reports.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/ResultRepositoryInitializationException.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/ResultRepositoryInitializationException.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/ResultRepositoryInitializationException.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,47 @@
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.CoserTechnicalException;
+import fr.ifremer.coser.result.repository.ResultRepositoryProvider;
+
+/**
+ * When an eror occurs while init a result repository.
+ * <p/>
+ * Created on 3/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class ResultRepositoryInitializationException extends CoserTechnicalException {
+ private static final long serialVersionUID = 1L;
+
+ protected final ResultRepositoryProvider source;
+
+ public ResultRepositoryInitializationException(ResultRepositoryProvider source, String message, Throwable cause) {
+ super(message, cause);
+ this.source = source;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/ResultRepositoryInitializationException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/package-info.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/package-info.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/package-info.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+/**
+ * Result unified query API.
+ *
+ * @since 1.5
+ */
+package fr.ifremer.coser.result;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepository.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepository.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepository.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,88 @@
+package fr.ifremer.coser.result.repository;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.result.CoserRequest;
+import fr.ifremer.coser.result.CoserResult;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+
+import java.util.Map;
+
+/**
+ * General contract of a repository of results in CoserWeb.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public interface ResultRepository {
+
+ /**
+ * @return the unique id of the repository
+ */
+ String getId();
+
+ /**
+ * Get all available zones for the given request.
+ *
+ * @param request request
+ * @return all available zones for the given request
+ */
+ Map<String, String> getAvailableZones(CoserRequest request);
+
+ /**
+ * Get all available species (or speciesList) for the given request.
+ *
+ * @param request request
+ * @return all available species for the given request.
+ */
+ Map<String, String> getAvailableSpecies(CoserRequest request);
+
+ /**
+ * Get all available indicators for the given request.
+ *
+ * @param request request
+ * @return all available indicators for the given request.
+ */
+ Map<String, String> getAvailableIndicators(IndicatorRequest request);
+
+ /**
+ * @param request request to test
+ * @return {@code true} if this repository has some result for the given
+ * request, {@code false} otherwise
+ */
+ boolean acceptResult(CoserRequest request);
+
+ /**
+ * Get result for the given request.
+ * <p/>
+ * We assume here that the repository has a result for the given request.
+ *
+ * @param request request to obtain result
+ * @return the result for the given request
+ */
+ CoserResult getResult(CoserRequest request);
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepository.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepositoryProvider.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepositoryProvider.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepositoryProvider.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,45 @@
+package fr.ifremer.coser.result.repository;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.result.ResultRepositoryInitializationException;
+
+import java.util.Set;
+
+/**
+ * Provides some {@link ResultRepository}.
+ * <p/>
+ * Created on 3/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public interface ResultRepositoryProvider<R extends ResultRepository> {
+
+ /**
+ * @return the set of provided result repositories.
+ */
+ Set<R> loadRepositories() throws ResultRepositoryInitializationException;
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/ResultRepositoryProvider.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepository.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepository.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepository.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,1050 @@
+package fr.ifremer.coser.result.repository.echobase;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Function;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import fr.ifremer.coser.CoserBusinessConfig;
+import fr.ifremer.coser.CoserTechnicalException;
+import fr.ifremer.coser.bean.EchoBaseProject;
+import fr.ifremer.coser.bean.IndicatorMap;
+import fr.ifremer.coser.bean.ZoneMap;
+import fr.ifremer.coser.result.CoserRequest;
+import fr.ifremer.coser.result.CoserResult;
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.Reports;
+import fr.ifremer.coser.result.repository.ResultRepository;
+import fr.ifremer.coser.result.request.CommunityIndicatorRequest;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.result.request.MapRequest;
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
+import fr.ifremer.coser.result.request.RawDataRequest;
+import fr.ifremer.coser.storage.DataStorage;
+import fr.ifremer.coser.storage.DataStorages;
+import fr.ifremer.coser.storage.MemoryDataStorage;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jfree.chart.ChartUtilities;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.axis.CategoryAxis;
+import org.jfree.chart.axis.CategoryLabelPositions;
+import org.jfree.chart.axis.NumberAxis;
+import org.jfree.chart.axis.ValueAxis;
+import org.jfree.chart.plot.CategoryPlot;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.chart.renderer.category.CategoryItemRenderer;
+import org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer;
+import org.jfree.data.statistics.DefaultStatisticalCategoryDataset;
+
+import java.awt.Color;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class EchoBaseResultRepository implements ResultRepository {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(EchoBaseResultRepository.class);
+
+ /**
+ * Id of result source.
+ */
+ public static final String ID = "echobase";
+
+ /**
+ * Project definition.
+ */
+ protected final EchoBaseProject project;
+
+ /**
+ * Maps directory.
+ */
+ protected final File mapsDirectory;
+
+ /**
+ * Application config.
+ */
+ protected final CoserBusinessConfig config;
+
+ /**
+ * Transform a map result species file to the species code.
+ */
+ protected final Function<File, String> mapFileToSpeciesCode;
+
+ /**
+ * Transform a species code to his map result species filename.
+ */
+ protected final Function<String, String> speciesCodeToMapFile;
+
+ /**
+ * Filter map result species file.
+ */
+ protected final FilenameFilter mapSpeciesFilenameFilter;
+
+ /**
+ * Cache of species definition.
+ */
+ protected Map<String, String> speciesMap;
+
+ /**
+ * Cache of indicator definition.
+ */
+ protected IndicatorMap indicatorsMap;
+
+ /**
+ * Cache of zone definition.
+ */
+ protected ZoneMap zonesMap;
+
+ /**
+ * Cache of species definition.
+ */
+ protected DataStorage speciesDefinition;
+
+ public EchoBaseResultRepository(CoserBusinessConfig config, EchoBaseProject project) {
+ Preconditions.checkNotNull(config);
+ Preconditions.checkNotNull(project);
+ this.config = config;
+ this.project = project;
+ this.mapsDirectory = project.getMapsDirectory();
+ if (log.isInfoEnabled()) {
+ log.info("New result repository: " + getId());
+ }
+ String surveyName = project.getSurveyName();
+ this.mapFileToSpeciesCode = EchoBaseProject.newMapFileToSpeciesCode(surveyName);
+ this.speciesCodeToMapFile = EchoBaseProject.newSpeciesCodeToMapFileName(surveyName);
+ this.mapSpeciesFilenameFilter = EchoBaseProject.newMapSpeciesFilenameFilter(surveyName);
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Public API ------------------------------------------------------ //
+ // --------------------------------------------------------------------- //
+
+ @Override
+ public String getId() {
+ return ID + "::" + project.getBasedir();
+ }
+
+ @Override
+ public Map<String, String> getAvailableZones(CoserRequest request) {
+
+ List<String> allowedZones = null;
+
+ if (request instanceof MapRequest) {
+ MapRequest r = (MapRequest) request;
+
+ boolean match = matchFacade(r);
+ if (match) {
+ allowedZones = getZonesMap().getZonesForFacade(r.getFacade());
+ }
+ } else if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ boolean match = matchFacade(r);
+ if (match) {
+ allowedZones = getZonesMap().getZonesForFacade(r.getFacade());
+ }
+ } else if (request instanceof CommunityIndicatorRequest) {
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ boolean match = matchFacade(r);
+ if (match) {
+ allowedZones = getZonesMap().getZonesForFacade(r.getFacade());
+ }
+ }
+
+ Map<String, String> result = Maps.newHashMap();
+
+ if (allowedZones != null) {
+
+ String zoneId = project.getZoneName();
+ if (allowedZones.contains(zoneId)) {
+ String zoneFullName = getZonesMap().getZoneFullNameWithNoFacade(zoneId);
+ result.put(zoneId, zoneFullName);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Map<String, String> getAvailableSpecies(CoserRequest request) {
+
+ Set<String> speciesList = null;
+
+ if (request instanceof MapRequest) {
+ MapRequest r = (MapRequest) request;
+
+ boolean match = matchFacade(r) && matchZone(r);
+ if (match) {
+ // get all map species for given facade + zone
+ speciesList = getMapSpecies();
+ }
+ } else if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ boolean match = matchFacade(r) && matchZone(r);
+
+ if (match) {
+ // get all population indicator species for given facade + zone
+ speciesList = getPopulationIndicatorSpecies();
+ }
+ } else if (request instanceof CommunityIndicatorRequest) {
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ Preconditions.checkNotNull(r.getIndicator());
+
+ boolean match = matchFacade(r) &&
+ matchZone(r) &&
+ matchIndicator(r);
+
+ if (match) {
+ // get all speciesList for given facade + zone + indicator
+ speciesList = getCommunityIndicatorSpecies(r.getIndicator());
+ }
+ }
+
+ Map<String, String> result = getSpeciesSubMap(speciesList);
+ return result;
+ }
+
+ @Override
+ public Map<String, String> getAvailableIndicators(IndicatorRequest request) {
+
+ Set<String> indicatorList = null;
+
+ if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ Preconditions.checkNotNull(r.getSpecies());
+
+ boolean match = matchFacade(request) && matchZone(request) && matchSpecies(r);
+
+ if (match) {
+
+ // get all indicators for given facade + zone + species
+ indicatorList = getPopulationIndicators(r.getSpecies());
+ }
+
+ } else if (request instanceof CommunityIndicatorRequest) {
+
+ boolean match = matchFacade(request) && matchZone(request);
+ if (match) {
+
+ // get all indicators for given facade + zone
+ indicatorList = getCommunityIndicators();
+ }
+ }
+
+ Map<String, String> result = getIndicatorsMap().getIndicatorsValues(indicatorList, request.getLocale());
+ return result;
+ }
+
+ @Override
+ public boolean acceptResult(CoserRequest request) {
+
+ Preconditions.checkArgument(request.isFilled());
+
+ boolean result = false;
+
+ if (request instanceof MapRequest) {
+
+ // must match facade + zone + species
+ MapRequest r = (MapRequest) request;
+
+ result = matchFacade(r) &&
+ matchZone(r) &&
+ matchSpecies(r);
+ } else if (request instanceof RawDataRequest) {
+
+ // must match facade + zone
+ RawDataRequest r = (RawDataRequest) request;
+ result = matchFacade(r) && matchZone(r);
+
+ } else if (request instanceof CommunityIndicatorRequest) {
+
+ // must match facade + zone + (indicator + speciesList)
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ result = matchFacade(r) &&
+ matchZone(r) &&
+ matchIndicatorAndSpeciesList(r);
+ } else if (request instanceof PopulationIndicatorRequest) {
+
+ // must match facade + zone + (species + indicator)
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ result = matchFacade(r) &&
+ matchZone(r) &&
+ matchSpeciesAndIndicator(r);
+ }
+ return result;
+ }
+
+ @Override
+ public CoserResult getResult(CoserRequest request) {
+
+ Preconditions.checkArgument(request.isFilled());
+ Preconditions.checkArgument(acceptResult(request));
+
+ CoserResult result = null;
+
+ if (request instanceof MapRequest) {
+ MapRequest r = (MapRequest) request;
+
+ String species = r.getSpecies();
+
+ File mapFile = getMapSpeciesFile(species);
+ result = new FileResult(getId(), mapFile);
+
+ } else if (request instanceof RawDataRequest) {
+
+ // No such result for echobase at the moment
+ if (log.isDebugEnabled()) {
+ log.debug("No result for RawDataRequest");
+ }
+
+ } else if (request instanceof CommunityIndicatorRequest) {
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ File file = null;
+ switch (r.getResultType()) {
+ case DATA:
+ file = getCommunityIndicatorDataFile(r.getIndicator(),
+ r.getSpecies());
+ break;
+
+ case GRAPH:
+ file = getCommunityIndicatorGraphFile(r.getLocale(),
+ r.getZone(),
+ r.getIndicator(),
+ r.getSpecies());
+ break;
+ }
+ if (file != null) {
+ result = new FileResult(getId(), file);
+ }
+
+ } else if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ File file = null;
+ switch (r.getResultType()) {
+ case DATA:
+ file = getPopulationIndicatorDataFile(r.getSpecies(),
+ r.getIndicator());
+ break;
+
+ case GRAPH:
+ file = getPopulationIndicatorGraphFile(r.getLocale(),
+ r.getZone(),
+ r.getSpecies(),
+ r.getIndicator());
+ break;
+ }
+ if (file != null) {
+ result = new FileResult(getId(), file);
+ }
+ }
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- MapRequest matchers --------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchFacade(MapRequest request) {
+ return project.getFacadeName().equals(request.getFacade());
+ }
+
+ protected boolean matchZone(MapRequest request) {
+ return project.getZoneName().equals(request.getZone());
+ }
+
+ protected boolean matchSpecies(MapRequest request) {
+ String species = request.getSpecies();
+ File file = getMapSpeciesFile(species);
+ return file != null && file.exists();
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- RawDataRequest matchers ----------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchFacade(RawDataRequest request) {
+ return project.getFacadeName().equals(request.getFacade());
+ }
+
+ protected boolean matchZone(RawDataRequest request) {
+ return project.getZoneName().equals(request.getZone());
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- IndicatorRequest matchers --------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchFacade(IndicatorRequest request) {
+ return project.getFacadeName().equals(request.getFacade());
+ }
+
+ protected boolean matchZone(IndicatorRequest request) {
+ return project.getZoneName().equals(request.getZone());
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- PopulationIndicatorRequest matchers ----------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchSpecies(PopulationIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getSpecies());
+
+ String species = request.getSpecies();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchPopulationSpecies(tuple, species)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchSpeciesAndIndicator(PopulationIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getSpecies());
+ Preconditions.checkNotNull(request.getIndicator());
+
+ String species = request.getSpecies();
+ String indicator = request.getIndicator();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchPopulationSpeciesAndIndicator(tuple, species, indicator)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchPopulationSpecies(String[] tuple, String species) {
+ String speciesCode = tuple[3];
+ boolean result = species.equals(speciesCode);
+ return result;
+ }
+
+ protected boolean matchPopulationSpeciesAndIndicator(String[] tuple, String species, String indicator) {
+ String speciesCode = tuple[3];
+ String indicatorCode = tuple[1];
+ boolean result = species.equals(speciesCode) && indicator.equals(indicatorCode);
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- CommunityIndicatorRequest matchers ------------------------------ //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchIndicator(CommunityIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getIndicator());
+
+ String indicator = request.getIndicator();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchCommunityIndicator(tuple, indicator)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchIndicatorAndSpeciesList(CommunityIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getIndicator());
+ Preconditions.checkNotNull(request.getSpecies());
+
+ String indicator = request.getIndicator();
+ String speciesList = request.getSpecies();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchCommunityIndicatorAndSpeciesList(tuple, indicator, speciesList)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchCommunityIndicator(String[] tuple, String indicator) {
+ String indicatorCode = tuple[1];
+ boolean result = indicator.equals(indicatorCode);
+ return result;
+ }
+
+ protected boolean matchCommunityIndicatorAndSpeciesList(String[] tuple, String indicator, String speciesList) {
+ String indicatorCode = tuple[1];
+ String speciesListCode = tuple[2];
+ boolean result = indicator.equals(indicatorCode) && speciesList.equals(speciesListCode);
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get Map result -------------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected File getMapSpeciesFile(String species) {
+ String fileName = speciesCodeToMapFile.apply(species);
+ File file = fileName == null ? null : new File(mapsDirectory, fileName);
+ return file;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get Raw Data result --------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ // None for the moment
+
+ // --------------------------------------------------------------------- //
+ // --- Get Community indicator result ---------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected File getCommunityIndicatorDataFile(String indicator, String speciesList) {
+
+ DataStorage dataStorage = new MemoryDataStorage();
+
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(false);
+
+ // add header
+ dataStorage.add(iterator.next());
+
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchCommunityIndicatorAndSpeciesList(tuple, indicator, speciesList)) {
+ dataStorage.add(tuple);
+ }
+ }
+ File result = DataStorages.save("coser-chart-community-indicator",
+ ".csv",
+ dataStorage);
+ return result;
+ }
+
+ protected File getCommunityIndicatorGraphFile(Locale locale, String zone,
+ String indicator,
+ String speciesList) {
+
+ // indicator list to take care
+ // pour avoir une valeur non nulle si list est null
+ // on prend dans ce cas la premiere valeur trouvée
+ String localList = speciesList;
+
+ if (log.isDebugEnabled()) {
+ log.debug("Searching list for indicator : " + indicator);
+ }
+
+ int multiplicator = 1;
+ int minYear = Integer.MAX_VALUE;
+ int maxYear = Integer.MIN_VALUE;
+ boolean indicatorFound = false;
+ Map<Integer, Double[]> graphData = new HashMap<Integer, Double[]>();
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ // Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+ String[] tuple = iterator.next();
+ String indicatorList = tuple[2];
+
+ if (matchCommunityIndicator(tuple, indicator)) {
+ indicatorFound = true;
+
+ // si pas de list selectionnée, on prend la premiere
+ if (StringUtils.isBlank(localList)) {
+ localList = indicatorList;
+ }
+
+ if (indicatorList.equals(localList)) {
+ Double estimation = Double.parseDouble(tuple[5]);
+ Double ecart = Double.parseDouble(tuple[6]);
+ int year = Integer.parseInt(tuple[4]);
+
+ if (year < minYear) {
+ minYear = year;
+ }
+ if (year > maxYear) {
+ maxYear = year;
+ }
+ graphData.put(year, new Double[]{estimation, ecart});
+
+ // si les données sont énormes, on affiche les données
+ // / multiplicator et on le mentionne dans la légende
+ if (estimation > 1e9) {
+ multiplicator = 1000000;
+ }
+ if (estimation > 1e6 && multiplicator < 1000000) {
+ multiplicator = 1000;
+ }
+ }
+ }
+ }
+
+ File result = null;
+
+ // avec l'extraction des données, on peut demander a générer un graphique
+ // sur un indicateur qui n'est pas présent dans le projet courant,
+ // dans ce cas, on retourne null
+ if (indicatorFound) {
+
+ String zoneDisplayName = getZonesMap().getZoneFullName(zone);
+ String indicatorName = getIndicatorsMap().getIndicatorValue(indicator, locale);
+ String unit = getIndicatorsMap().getIndicatorUnit(indicator);
+
+ // get graph title
+ String chartTitle = zoneDisplayName;
+ chartTitle += " - " + indicatorName;
+
+ // ajout de la traduction de la liste d'indicateur
+ // les liste sont a1, T1, T2 ...
+ String listLetter = String.valueOf(localList.charAt(0));
+ Iterator<String[]> typeIterator = loadSpeciesFileStorage(true);
+ while (typeIterator.hasNext()) {
+ // "Types";"Commentaire";"NumSys min";"NumSys max";"Code"
+ String[] tuple = typeIterator.next();
+ if (tuple[4].equals(listLetter)) {
+ /// gestion du groupe "Tous"
+ // cas special, c'est la seule valeur du fichier
+ // code type espece qui a besoin d'une traduction
+ if (tuple[4].equalsIgnoreCase("T")) {
+ if ("fr".equals(locale.getLanguage())) {
+ chartTitle += " - " + "Tous Liste " + localList.charAt(1);
+ } else if ("es".equals(locale.getLanguage())) {
+ chartTitle += " - " + "Todo Lista " + localList.charAt(1);
+ } else {
+ chartTitle += " - " + "All List " + localList.charAt(1);
+ }
+ } else {
+ // ajout de la traduction du nom de liste plus le numéro
+ if ("fr".equals(locale.getLanguage())) {
+ chartTitle += " - " + tuple[0] + " Liste " + localList.charAt(1);
+ } else if ("es".equals(locale.getLanguage())) {
+ chartTitle += " - " + tuple[0] + " Lista " + localList.charAt(1);
+ } else {
+ chartTitle += " - " + tuple[0] + " List " + localList.charAt(1);
+ }
+ }
+ break;
+ }
+ }
+
+ // generate dataset with sorted data
+ DefaultStatisticalCategoryDataset statisticalDataset = new DefaultStatisticalCategoryDataset();
+ for (int indexYear = minYear; indexYear <= maxYear; ++indexYear) {
+ Double[] entry = graphData.get(indexYear);
+ if (entry != null) {
+ Double estimation = entry[0] / multiplicator;
+ Double ecart = entry[1] / multiplicator;
+ statisticalDataset.add(estimation, ecart, "Serie1", (Comparable) indexYear);
+ } else {
+ statisticalDataset.add(null, null, "Serie1", indexYear);
+ }
+ }
+
+ // configure chart
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
+ String yearAxis = Reports.getYearChartTitle(locale);
+
+ CategoryAxis categoryAxis = new CategoryAxis(yearAxis);
+ categoryAxis.setCategoryMargin(0);
+ categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
+ // label horizontaux
+ String legendY = indicatorName;
+ if (multiplicator != 1) {
+ // affiche par exemple : cm * 1000
+ legendY += " (" + unit + "*" + multiplicator + ")";
+ } else if (StringUtils.isNotEmpty(unit)) {
+ legendY += " (" + unit + ")";
+ }
+ ValueAxis valueAxis = new NumberAxis(legendY);
+ valueAxis.setUpperMargin(0.1);
+
+ CategoryItemRenderer renderer = new StatisticalLineAndShapeRenderer(false, true);
+
+ // n'affiche pas les nombre sur le graphique
+ //StandardCategoryItemLabelGenerator itemLabelGenerator = new StandardCategoryItemLabelGenerator();
+ //renderer.setBaseItemLabelGenerator(itemLabelGenerator);
+ //renderer.setBaseItemLabelsVisible(true);
+
+ CategoryPlot plot = new CategoryPlot(statisticalDataset, categoryAxis, valueAxis, renderer);
+ plot.setOrientation(PlotOrientation.VERTICAL);
+ JFreeChart chart = new JFreeChart(chartTitle,
+ JFreeChart.DEFAULT_TITLE_FONT, plot, true);
+
+ // remove series legend
+ chart.removeLegend();
+ // white background
+ chart.setBackgroundPaint(Color.WHITE);
+
+ try {
+ result = File.createTempFile("coser-chart-community-indicator-", ".png");
+ result.deleteOnExit();
+ ChartUtilities.saveChartAsPNG(result, chart, 800, 400);
+ } catch (IOException ex) {
+ throw new CoserTechnicalException("Can't save chart", ex);
+ }
+ }
+
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get Population indicator result --------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected File getPopulationIndicatorDataFile(String species, String indicator) {
+
+ DataStorage dataStorage = new MemoryDataStorage();
+
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(false);
+
+ // add header
+ dataStorage.add(iterator.next());
+
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchPopulationSpeciesAndIndicator(tuple, species, indicator)) {
+ dataStorage.add(tuple);
+ }
+ }
+ File result = DataStorages.save("coser-chart-population-indicator",
+ ".csv",
+ dataStorage);
+ return result;
+ }
+
+ protected File getPopulationIndicatorGraphFile(Locale locale, String zone, String species, String indicator) {
+
+
+ int multiplicator = 1;
+ int minYear = Integer.MAX_VALUE;
+ int maxYear = Integer.MIN_VALUE;
+ boolean indicatorFound = false;
+ Map<Integer, Double[]> graphData = new HashMap<Integer, Double[]>();
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+
+ if (matchPopulationSpeciesAndIndicator(tuple, species, indicator)) {
+ indicatorFound = true;
+
+ // XXX echatellier, maybe take care of list here ?
+
+ Double estimation = Double.parseDouble(tuple[6]);
+ Double ecart = Double.parseDouble(tuple[7]);
+ int year = Integer.parseInt(tuple[5]);
+
+ if (year < minYear) {
+ minYear = year;
+ }
+ if (year > maxYear) {
+ maxYear = year;
+ }
+ graphData.put(year, new Double[]{estimation, ecart});
+
+ // si les données sont énormes, on affiche les données
+ // / multiplicator et on le mentionne dans la légende
+ if (estimation > 1e9) {
+ multiplicator = 1000000;
+ }
+ if (estimation > 1e6 && multiplicator < 1000000) {
+ multiplicator = 1000;
+ }
+ }
+ }
+
+ File result = null;
+
+ // avec l'extraction des données, on peut demander a générer un graphique
+ // sur un indicateur qui n'est pas présent dans le projet courant,
+ // dans ce cas, on retourne null
+ if (indicatorFound) {
+
+ String zoneDisplayName = getZonesMap().getZoneFullName(zone);
+ String indicatorName = getIndicatorsMap().getIndicatorValue(indicator, locale);
+ String unit = getIndicatorsMap().getIndicatorUnit(indicator);
+
+ // get graph title
+ String title = zoneDisplayName;
+ title += " - " + indicatorName;
+ title += " - " + Reports.getReportDisplayName(loadSpeciesFileStorage(true), species);
+
+ // generate dataset with sorted data
+ DefaultStatisticalCategoryDataset statisticalDataset = new DefaultStatisticalCategoryDataset();
+ for (int indexYear = minYear; indexYear <= maxYear; ++indexYear) {
+ Double[] entry = graphData.get(indexYear);
+ if (entry != null) {
+ Double estimation = entry[0] / multiplicator;
+ Double ecart = entry[1] / multiplicator;
+ statisticalDataset.add(estimation, ecart, "Serie1", (Comparable) indexYear);
+ } else {
+ statisticalDataset.add(null, null, "Serie1", indexYear);
+ }
+ }
+
+ // configure chart
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
+ String yearAxis = Reports.getYearChartTitle(locale);
+ CategoryAxis categoryAxis = new CategoryAxis(yearAxis);
+ categoryAxis.setCategoryMargin(0);
+ categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
+ // label horizontaux
+ String legendY = indicatorName;
+ if (multiplicator != 1) {
+ // affiche par exemple : cm * 1000
+ legendY += " (" + unit + "*" + multiplicator + ")";
+ } else if (StringUtils.isNotEmpty(unit)) {
+ legendY += " (" + unit + ")";
+ }
+ ValueAxis valueAxis = new NumberAxis(legendY);
+ valueAxis.setUpperMargin(0.1);
+
+ CategoryItemRenderer renderer = new StatisticalLineAndShapeRenderer(false, true);
+
+ // n'affiche pas les nombre sur le graphique
+ //StandardCategoryItemLabelGenerator itemLabelGenerator = new StandardCategoryItemLabelGenerator();
+ //renderer.setBaseItemLabelGenerator(itemLabelGenerator);
+ //renderer.setBaseItemLabelsVisible(true);
+
+ CategoryPlot plot = new CategoryPlot(statisticalDataset, categoryAxis, valueAxis, renderer);
+ plot.setOrientation(PlotOrientation.VERTICAL);
+ JFreeChart chart = new JFreeChart(title,
+ JFreeChart.DEFAULT_TITLE_FONT, plot, true);
+
+ // remove series legend
+ chart.removeLegend();
+ // white background
+ chart.setBackgroundPaint(Color.WHITE);
+
+ try {
+ result = File.createTempFile("coser-chart-population-indicator-", ".png");
+ result.deleteOnExit();
+ ChartUtilities.saveChartAsPNG(result, chart, 800, 400);
+ } catch (IOException ex) {
+ throw new CoserTechnicalException("Can't save chart", ex);
+ }
+ }
+
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get species lists ----------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Set<String> getMapSpecies() {
+ File[] files = project.getMapsDirectory().listFiles(mapSpeciesFilenameFilter);
+ Set<String> result = Sets.newHashSet();
+ if (files != null) {
+ List<String> transform = Lists.transform(Lists.newArrayList(files), mapFileToSpeciesCode);
+ result.addAll(transform);
+ }
+ return result;
+ }
+
+ protected Set<String> getPopulationIndicatorSpecies() {
+ Set<String> result = Sets.newHashSet();
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ String specyCode = tuple[3];
+ result.add(specyCode);
+ }
+ return result;
+ }
+
+ protected Set<String> getCommunityIndicatorSpecies(String indicator) {
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ Set<String> result = Sets.newHashSet();
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchCommunityIndicator(tuple, indicator)) {
+ String specyCode = tuple[2];
+ result.add(specyCode);
+ }
+ }
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get indicator lists --------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Set<String> getCommunityIndicators() {
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ Set<String> result = Sets.newHashSet();
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ String indicatorCode = tuple[1];
+ result.add(indicatorCode);
+ }
+ return result;
+ }
+
+ protected Set<String> getPopulationIndicators(String species) {
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ Set<String> result = Sets.newHashSet();
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchPopulationSpecies(tuple, species)) {
+ String indicatorCode = tuple[1];
+ result.add(indicatorCode);
+ }
+ }
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get species definition maps ------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Map<String, String> getSpeciesMap() {
+ if (speciesMap == null) {
+ speciesMap = Maps.newTreeMap();
+
+ // load species file
+ Iterator<String[]> iterator = loadSpeciesFileStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ String speciesCode = tuple[3];
+ String speciesLabel = tuple[4] + " " + tuple[5];
+ speciesMap.put(speciesCode, speciesLabel);
+ }
+ }
+ return speciesMap;
+ }
+
+ protected Map<String, String> getSpeciesSubMap(Collection<String> speciesList) {
+
+ Map<String, String> result = Maps.newTreeMap();
+
+ if (speciesList != null) {
+
+ Map<String, String> map = getSpeciesMap();
+ for (String species : speciesList) {
+ String speciesLabel = map.get(species);
+ result.put(species, speciesLabel);
+ }
+ }
+
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get indicator definition maps ----------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected IndicatorMap getIndicatorsMap() {
+ if (indicatorsMap == null) {
+ indicatorsMap = new IndicatorMap(config.getWebIndicatorsFile());
+ }
+ return indicatorsMap;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get zone definition maps ---------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public ZoneMap getZonesMap() {
+ if (zonesMap == null) {
+ zonesMap = new ZoneMap(config.getWebZonesFile());
+ }
+ return zonesMap;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- storage util methods -------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Iterator<String[]> loadPopulationIndicatorStorage(boolean skipFirstLine) {
+ File file = project.getPopulationIndicatorsFile();
+ // Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = DataStorages.load(file);
+ Iterator<String[]> iterator = dataStorage.iterator(skipFirstLine);
+ return iterator;
+ }
+
+ protected Iterator<String[]> loadCommunityIndicatorStorage(boolean skipFirstLine) {
+ File file = project.getCommunityIndicatorsFile();
+ // Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = DataStorages.load(file);
+ Iterator<String[]> iterator = dataStorage.iterator(skipFirstLine);
+ return iterator;
+ }
+
+
+ protected Iterator<String[]> loadSpeciesFileStorage(boolean skipFirstLine) {
+ // "C_Perm","NumSys","NivSys","C_VALIDE","L_VALIDE","AA_VALIDE","C_TxP\u00E8re","Taxa"
+ Iterator<String[]> iterator = getSpeciesDefinition().iterator(skipFirstLine);
+ return iterator;
+ }
+
+ protected DataStorage getSpeciesDefinition() throws CoserTechnicalException {
+ if (speciesDefinition == null) {
+ File file = project.getSpeciesDefinitionFile();
+ speciesDefinition = DataStorages.load(file);
+ }
+
+ return speciesDefinition;
+ }
+
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepository.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProvider.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProvider.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProvider.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,109 @@
+package fr.ifremer.coser.result.repository.echobase;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import fr.ifremer.coser.CoserBusinessConfig;
+import fr.ifremer.coser.bean.EchoBaseProject;
+import fr.ifremer.coser.result.ResultRepositoryInitializationException;
+import fr.ifremer.coser.result.repository.ResultRepositoryProvider;
+import org.apache.commons.io.filefilter.AbstractFileFilter;
+import org.apache.commons.io.filefilter.AndFileFilter;
+import org.apache.commons.io.filefilter.FileFilterUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.util.Set;
+
+/**
+ * Created on 3/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class EchoBaseResultRepositoryProvider implements ResultRepositoryProvider<EchoBaseResultRepository> {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(EchoBaseResultRepositoryProvider.class);
+
+ /**
+ * Directory where are stored all echobase projects.
+ */
+ protected final File basedir;
+
+ protected final CoserBusinessConfig config;
+
+ public EchoBaseResultRepositoryProvider(CoserBusinessConfig config, File basedir) {
+ this.config = config;
+ Preconditions.checkNotNull(config);
+ Preconditions.checkNotNull(basedir);
+ this.basedir = basedir;
+ }
+
+ @Override
+ public Set<EchoBaseResultRepository> loadRepositories() {
+
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Scan for projects from basedir: %s", basedir));
+ }
+ Set<EchoBaseResultRepository> result = Sets.newHashSet();
+
+ AndFileFilter projectFilter = new AndFileFilter();
+ projectFilter.addFileFilter(FileFilterUtils.directoryFileFilter());
+ projectFilter.addFileFilter(new AbstractFileFilter() {
+
+ @Override
+ public boolean accept(File pathname) {
+ return new File(pathname, EchoBaseProject.METADATA_FILE).exists();
+ }
+ });
+
+ File[] projects = basedir.listFiles((FileFilter) projectFilter);
+ if (projects != null) {
+ for (File projectDirectory : projects) {
+
+ EchoBaseProject project = new EchoBaseProject(projectDirectory);
+
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Detected result: %s", project.getName()));
+ }
+ try {
+ project.load();
+ } catch (IOException e) {
+ throw new ResultRepositoryInitializationException(this, "Could not load project file", e);
+ }
+ result.add(new EchoBaseResultRepository(config, project));
+ }
+ }
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Found %s result repository(ies) from basedir: %s", result.size(), basedir));
+ }
+ return result;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProvider.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/package-info.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/package-info.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/package-info.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+/**
+ * Implementation for EchoBase results.
+ *
+ * @since 1.5
+ */
+package fr.ifremer.coser.result.repository.echobase;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/echobase/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepository.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepository.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepository.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,1140 @@
+package fr.ifremer.coser.result.repository.legacy;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Function;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import fr.ifremer.coser.CoserBusinessConfig;
+import fr.ifremer.coser.CoserConstants;
+import fr.ifremer.coser.CoserTechnicalException;
+import fr.ifremer.coser.bean.EchoBaseProject;
+import fr.ifremer.coser.bean.IndicatorMap;
+import fr.ifremer.coser.bean.RSufiResultPath;
+import fr.ifremer.coser.bean.ZoneMap;
+import fr.ifremer.coser.result.CoserRequest;
+import fr.ifremer.coser.result.CoserResult;
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.Reports;
+import fr.ifremer.coser.result.repository.ResultRepository;
+import fr.ifremer.coser.result.request.CommunityIndicatorRequest;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.result.request.MapRequest;
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
+import fr.ifremer.coser.result.request.RawDataRequest;
+import fr.ifremer.coser.storage.DataStorage;
+import fr.ifremer.coser.storage.DataStorages;
+import fr.ifremer.coser.storage.MemoryDataStorage;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jfree.chart.ChartUtilities;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.axis.CategoryAxis;
+import org.jfree.chart.axis.CategoryLabelPositions;
+import org.jfree.chart.axis.NumberAxis;
+import org.jfree.chart.axis.ValueAxis;
+import org.jfree.chart.plot.CategoryPlot;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.chart.renderer.category.CategoryItemRenderer;
+import org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer;
+import org.jfree.data.statistics.DefaultStatisticalCategoryDataset;
+
+import java.awt.Color;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class LegacyResultRepository implements ResultRepository {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(LegacyResultRepository.class);
+
+ /**
+ * Id of result source.
+ */
+ public static final String ID = "rsufi";
+
+ /**
+ * Project basedir.
+ */
+ protected final File basedir;
+
+ /**
+ * Results directory.
+ */
+ protected final File resultDirectory;
+
+ /**
+ * Maps directory.
+ */
+ protected final File mapsDirectory;
+
+
+ /**
+ * Project definition.
+ */
+ protected final RSufiResultPath path;
+
+ /**
+ * Transform a map result species file to the species code.
+ */
+ protected final Function<File, String> mapFileToSpeciesCode;
+
+ /**
+ * Transform a species code to his map result species filename.
+ */
+ protected final Function<String, String> speciesCodeToMapFile;
+
+ /**
+ * Filter map result species file.
+ */
+ protected final FilenameFilter mapSpeciesFilenameFilter;
+
+ /**
+ * Application config.
+ */
+ protected final CoserBusinessConfig config;
+
+ /**
+ * Survey name (used to get maps).
+ */
+ protected final String surveyName;
+
+ /**
+ * Cache of species definition.
+ */
+ protected Map<String, String> speciesMap;
+
+ /**
+ * Cache of indicator definition.
+ */
+ protected IndicatorMap indicatorsMap;
+
+ /**
+ * Cache of zone definition.
+ */
+ protected ZoneMap zonesMap;
+
+ protected final boolean mapsResult;
+
+ protected final boolean indicatorsResult;
+
+ protected final boolean dataResult;
+
+ public LegacyResultRepository(CoserBusinessConfig config,
+ File basedir,
+ RSufiResultPath path,
+ String surveyName) {
+ Preconditions.checkNotNull(config);
+ Preconditions.checkNotNull(basedir);
+ Preconditions.checkNotNull(path);
+ Preconditions.checkNotNull(surveyName);
+ this.config = config;
+ this.basedir = basedir;
+ this.surveyName = surveyName;
+ this.resultDirectory = FileUtils.getFile(
+ basedir,
+ CoserConstants.STORAGE_SELECTION_DIRECTORY,
+ path.getSelection().getName(),
+ CoserConstants.STORAGE_RESULTS_DIRECTORY,
+ path.getRsufiResult().getName());
+ this.mapsDirectory = new File(resultDirectory, CoserConstants.STORAGE_MAPS_DIRECTORY);
+ this.path = path;
+ this.mapsResult = path.getRsufiResult().isMapsResult();
+ this.indicatorsResult = path.getRsufiResult().isIndicatorsResult();
+ this.dataResult = path.getRsufiResult().isDataAllowed();
+
+ if (log.isInfoEnabled()) {
+ log.info("New result repository: " + getId());
+ }
+
+ this.mapFileToSpeciesCode = EchoBaseProject.newMapFileToSpeciesCode(surveyName);
+ this.speciesCodeToMapFile = EchoBaseProject.newSpeciesCodeToMapFileName(surveyName);
+ this.mapSpeciesFilenameFilter = EchoBaseProject.newMapSpeciesFilenameFilter(surveyName);
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Public API ------------------------------------------------------ //
+ // --------------------------------------------------------------------- //
+
+ @Override
+ public String getId() {
+ return String.format("%s::%s::%s",
+ ID,
+ resultDirectory,
+ path.getRsufiResult().isMapsResult() ? "Map" : "Indicator"
+ );
+ }
+
+ @Override
+ public Map<String, String> getAvailableZones(CoserRequest request) {
+
+ List<String> allowedZones = null;
+
+ if (request instanceof MapRequest) {
+ MapRequest r = (MapRequest) request;
+
+
+ boolean match = mapsResult && matchFacade(r);
+ if (match) {
+ allowedZones = getZonesMap().getZonesForFacade(r.getFacade());
+ }
+ } else if (request instanceof RawDataRequest) {
+ RawDataRequest r = (RawDataRequest) request;
+
+ boolean match = dataResult && matchFacade(r);
+ if (match) {
+ allowedZones = getZonesMap().getZonesForFacade(r.getFacade());
+ }
+ } else if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ boolean match = indicatorsResult && matchFacade(r);
+ if (match) {
+ allowedZones = getZonesMap().getZonesForFacade(r.getFacade());
+ }
+ } else if (request instanceof CommunityIndicatorRequest) {
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ boolean match = indicatorsResult && matchFacade(r);
+ if (match) {
+ allowedZones = getZonesMap().getZonesForFacade(r.getFacade());
+ }
+ }
+
+ Map<String, String> result = Maps.newHashMap();
+
+ if (allowedZones != null) {
+
+ String zoneId = path.getRsufiResult().getZone();
+ if (allowedZones.contains(zoneId)) {
+ String zoneFullName = getZonesMap().getZoneFullNameWithNoFacade(zoneId);
+ result.put(zoneId, zoneFullName);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Map<String, String> getAvailableSpecies(CoserRequest request) {
+
+ Map<String, String> result = null;
+
+ if (request instanceof MapRequest) {
+ MapRequest r = (MapRequest) request;
+
+ boolean match = mapsResult &&
+ matchFacade(r) &&
+ matchZone(r);
+ if (match) {
+ // get all map species for given facade + zone
+ result = getPopulationIndicatorSpecies();
+ }
+ } else if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ boolean match = indicatorsResult &&
+ matchFacade(r) &&
+ matchZone(r);
+
+ if (match) {
+ // get all population indicator species for given facade + zone
+ result = getPopulationIndicatorSpecies();
+ }
+ } else if (request instanceof CommunityIndicatorRequest) {
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ Preconditions.checkNotNull(r.getIndicator());
+
+ boolean match = indicatorsResult &&
+ matchFacade(r) &&
+ matchZone(r) &&
+ matchIndicator(r);
+
+ if (match) {
+ // get all speciesList for given facade + zone + indicator
+ result = getCommunityIndicatorSpecies(r.getLocale(), r.getIndicator());
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Map<String, String> getAvailableIndicators(IndicatorRequest request) {
+ Set<String> indicatorList = null;
+
+ if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ Preconditions.checkNotNull(r.getSpecies());
+
+ boolean match = indicatorsResult &&
+ matchFacade(request) &&
+ matchZone(request) &&
+ matchSpecies(r);
+
+ if (match) {
+
+ // get all indicators for given facade + zone + species
+ indicatorList = getPopulationIndicators(r.getSpecies());
+ }
+
+ } else if (request instanceof CommunityIndicatorRequest) {
+
+ boolean match = indicatorsResult &&
+ matchFacade(request) &&
+ matchZone(request);
+ if (match) {
+
+ // get all indicators for given facade + zone
+ indicatorList = getCommunityIndicators();
+ }
+ }
+
+ Map<String, String> result = getIndicatorsMap().getIndicatorsValues(indicatorList, request.getLocale());
+ return result;
+ }
+
+ @Override
+ public boolean acceptResult(CoserRequest request) {
+
+ Preconditions.checkArgument(request.isFilled());
+
+ boolean result = false;
+
+ if (request instanceof MapRequest) {
+
+ // must match facade + zone + species
+ MapRequest r = (MapRequest) request;
+
+ result = mapsResult &&
+ matchFacade(r) &&
+ matchZone(r) &&
+ matchSpecies(r);
+ } else if (request instanceof RawDataRequest) {
+
+ // must match facade + zone
+ RawDataRequest r = (RawDataRequest) request;
+ result = dataResult && matchFacade(r) && matchZone(r);
+
+ } else if (request instanceof CommunityIndicatorRequest) {
+
+ // must match facade + zone + (indicator + speciesList)
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ result = indicatorsResult &&
+ matchFacade(r) &&
+ matchZone(r) &&
+ matchIndicatorAndSpeciesList(r);
+ } else if (request instanceof PopulationIndicatorRequest) {
+
+ // must match facade + zone + (species + indicator)
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ result = indicatorsResult &&
+ matchFacade(r) &&
+ matchZone(r) &&
+ matchSpeciesAndIndicator(r);
+ }
+ return result;
+ }
+
+ @Override
+ public CoserResult getResult(CoserRequest request) {
+ Preconditions.checkArgument(request.isFilled());
+ Preconditions.checkArgument(acceptResult(request));
+
+ CoserResult result = null;
+
+ if (request instanceof MapRequest) {
+ MapRequest r = (MapRequest) request;
+
+ String species = r.getSpecies();
+
+ File mapFile = getMapSpeciesFile(species);
+ result = new FileResult(getId(), mapFile);
+
+ } else if (request instanceof RawDataRequest) {
+
+ // No such result for echobase at the moment
+ if (log.isDebugEnabled()) {
+ log.debug("No result for RawDataRequest");
+ }
+
+ } else if (request instanceof CommunityIndicatorRequest) {
+ CommunityIndicatorRequest r = (CommunityIndicatorRequest) request;
+
+ File file = null;
+ switch (r.getResultType()) {
+ case DATA:
+ file = getCommunityIndicatorDataFile(r.getIndicator(),
+ r.getSpecies());
+ break;
+
+ case GRAPH:
+ file = getCommunityIndicatorGraphFile(r.getLocale(),
+ r.getZone(),
+ r.getIndicator(),
+ r.getSpecies());
+ break;
+ }
+ if (file != null) {
+ result = new FileResult(getId(), file);
+ }
+
+ } else if (request instanceof PopulationIndicatorRequest) {
+ PopulationIndicatorRequest r = (PopulationIndicatorRequest) request;
+
+ File file = null;
+ switch (r.getResultType()) {
+ case DATA:
+ file = getPopulationIndicatorDataFile(r.getSpecies(),
+ r.getIndicator());
+ break;
+
+ case GRAPH:
+ file = getPopulationIndicatorGraphFile(r.getLocale(),
+ r.getZone(),
+ r.getSpecies(),
+ r.getIndicator());
+ break;
+ }
+ if (file != null) {
+ result = new FileResult(getId(), file);
+ }
+ }
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- MapRequest matchers --------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchFacade(MapRequest request) {
+ return true;
+ }
+
+ protected boolean matchZone(MapRequest request) {
+ return path.getRsufiResult().getZone().equals(request.getZone());
+ }
+
+ protected boolean matchSpecies(MapRequest request) {
+ String species = request.getSpecies();
+ File file = getMapSpeciesFile(species);
+ return file != null;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- RawDataRequest matchers ----------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchFacade(RawDataRequest request) {
+ return true;
+ }
+
+ protected boolean matchZone(RawDataRequest request) {
+ return path.getRsufiResult().getZone().equals(request.getZone());
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- IndicatorRequest matchers --------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchFacade(IndicatorRequest request) {
+ return true;
+ }
+
+ protected boolean matchZone(IndicatorRequest request) {
+ return path.getRsufiResult().getZone().equals(request.getZone());
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- PopulationIndicatorRequest matchers ----------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchSpecies(PopulationIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getSpecies());
+
+ String species = request.getSpecies();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchPopulationSpecies(tuple, species)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchSpeciesAndIndicator(PopulationIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getSpecies());
+ Preconditions.checkNotNull(request.getIndicator());
+
+ String species = request.getSpecies();
+ String indicator = request.getIndicator();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchPopulationSpeciesAndIndicator(tuple, species, indicator)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchPopulationSpecies(String[] tuple, String species) {
+ String speciesCode = tuple[3];
+ boolean result = species.equals(speciesCode);
+ return result;
+ }
+
+ protected boolean matchPopulationSpeciesAndIndicator(String[] tuple, String species, String indicator) {
+ String indicatorCode = tuple[1];
+ boolean result = matchPopulationSpecies(tuple, species) && indicator.equals(indicatorCode);
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- CommunityIndicatorRequest matchers ------------------------------ //
+ // --------------------------------------------------------------------- //
+
+ protected boolean matchIndicator(CommunityIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getIndicator());
+
+ String indicator = request.getIndicator();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchCommunityIndicator(tuple, indicator)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchIndicatorAndSpeciesList(CommunityIndicatorRequest request) {
+ Preconditions.checkNotNull(request.getIndicator());
+ Preconditions.checkNotNull(request.getSpecies());
+
+ String indicator = request.getIndicator();
+ String speciesList = request.getSpecies();
+
+ boolean result = false;
+
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchCommunityIndicatorAndSpeciesList(tuple, indicator, speciesList)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected boolean matchCommunityIndicator(String[] tuple, String indicator) {
+ String indicatorCode = tuple[1];
+ boolean result = indicator.equals(indicatorCode);
+ return result;
+ }
+
+ protected boolean matchCommunityIndicatorAndSpeciesList(String[] tuple, String indicator, String speciesList) {
+ String indicatorCode = tuple[1];
+ String speciesListCode = tuple[2];
+ boolean result = indicator.equals(indicatorCode) && speciesList.equals(speciesListCode);
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get Map result -------------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected File getMapSpeciesFile(String species) {
+ String fileName = speciesCodeToMapFile.apply(species);
+ File file = fileName == null ? null : new File(mapsDirectory, fileName);
+ return file;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get Raw Data result --------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ // None for the moment
+
+ // --------------------------------------------------------------------- //
+ // --- Get Community indicator result ---------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected File getCommunityIndicatorDataFile(String indicator, String speciesList) {
+
+ DataStorage dataStorage = new MemoryDataStorage();
+
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(false);
+
+ // add header
+ dataStorage.add(iterator.next());
+
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchCommunityIndicatorAndSpeciesList(tuple, indicator, speciesList)) {
+ dataStorage.add(tuple);
+ }
+ }
+ File result = DataStorages.save("coser-chart-community-indicator",
+ ".csv",
+ dataStorage);
+ return result;
+ }
+
+ protected File getCommunityIndicatorGraphFile(Locale locale, String zone,
+ String indicator,
+ String speciesList) {
+
+ // indicator list to take care
+ // pour avoir une valeur non nulle si list est null
+ // on prend dans ce cas la premiere valeur trouvée
+ String localList = speciesList;
+
+ if (log.isDebugEnabled()) {
+ log.debug("Searching list for indicator : " + indicator);
+ }
+
+ int multiplicator = 1;
+ int minYear = Integer.MAX_VALUE;
+ int maxYear = Integer.MIN_VALUE;
+ boolean indicatorFound = false;
+ Map<Integer, Double[]> graphData = new HashMap<Integer, Double[]>();
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ // Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+ String[] tuple = iterator.next();
+ String indicatorList = tuple[2];
+
+ if (matchCommunityIndicator(tuple, indicator)) {
+ indicatorFound = true;
+
+ // si pas de list selectionnée, on prend la premiere
+ if (StringUtils.isBlank(localList)) {
+ localList = indicatorList;
+ }
+
+ if (indicatorList.equals(localList)) {
+ Double estimation = Double.parseDouble(tuple[5]);
+ Double ecart = Double.parseDouble(tuple[6]);
+ int year = Integer.parseInt(tuple[4]);
+
+ if (year < minYear) {
+ minYear = year;
+ }
+ if (year > maxYear) {
+ maxYear = year;
+ }
+ graphData.put(year, new Double[]{estimation, ecart});
+
+ // si les données sont énormes, on affiche les données
+ // / multiplicator et on le mentionne dans la légende
+ if (estimation > 1e9) {
+ multiplicator = 1000000;
+ }
+ if (estimation > 1e6 && multiplicator < 1000000) {
+ multiplicator = 1000;
+ }
+ }
+ }
+ }
+
+ File result = null;
+
+ // avec l'extraction des données, on peut demander a générer un graphique
+ // sur un indicateur qui n'est pas présent dans le projet courant,
+ // dans ce cas, on retourne null
+ if (indicatorFound) {
+
+ String zoneDisplayName = getZonesMap().getZoneFullName(zone);
+ String indicatorName = getIndicatorsMap().getIndicatorValue(indicator, locale);
+ String unit = getIndicatorsMap().getIndicatorUnit(indicator);
+
+ // get graph title
+ String chartTitle = zoneDisplayName;
+ chartTitle += " - " + indicatorName;
+
+ // ajout de la traduction de la liste d'indicateur
+ // les liste sont a1, T1, T2 ...
+ String listLetter = String.valueOf(localList.charAt(0));
+ Iterator<String[]> typeIterator = loadSpeciesFileStorage(true);
+ while (typeIterator.hasNext()) {
+ // "Types";"Commentaire";"NumSys min";"NumSys max";"Code"
+ String[] tuple = typeIterator.next();
+ if (tuple[4].equals(listLetter)) {
+ /// gestion du groupe "Tous"
+ // cas special, c'est la seule valeur du fichier
+ // code type espece qui a besoin d'une traduction
+ if (tuple[4].equalsIgnoreCase("T")) {
+ if ("fr".equals(locale.getLanguage())) {
+ chartTitle += " - " + "Tous Liste " + localList.charAt(1);
+ } else if ("es".equals(locale.getLanguage())) {
+ chartTitle += " - " + "Todo Lista " + localList.charAt(1);
+ } else {
+ chartTitle += " - " + "All List " + localList.charAt(1);
+ }
+ } else {
+ // ajout de la traduction du nom de liste plus le numéro
+ if ("fr".equals(locale.getLanguage())) {
+ chartTitle += " - " + tuple[0] + " Liste " + localList.charAt(1);
+ } else if ("es".equals(locale.getLanguage())) {
+ chartTitle += " - " + tuple[0] + " Lista " + localList.charAt(1);
+ } else {
+ chartTitle += " - " + tuple[0] + " List " + localList.charAt(1);
+ }
+ }
+ break;
+ }
+ }
+
+ // generate dataset with sorted data
+ DefaultStatisticalCategoryDataset statisticalDataset = new DefaultStatisticalCategoryDataset();
+ for (int indexYear = minYear; indexYear <= maxYear; ++indexYear) {
+ Double[] entry = graphData.get(indexYear);
+ if (entry != null) {
+ Double estimation = entry[0] / multiplicator;
+ Double ecart = entry[1] / multiplicator;
+ statisticalDataset.add(estimation, ecart, "Serie1", (Comparable) indexYear);
+ } else {
+ statisticalDataset.add(null, null, "Serie1", indexYear);
+ }
+ }
+
+ // configure chart
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
+ String yearAxis = Reports.getYearChartTitle(locale);
+
+ CategoryAxis categoryAxis = new CategoryAxis(yearAxis);
+ categoryAxis.setCategoryMargin(0);
+ categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
+ // label horizontaux
+ String legendY = indicatorName;
+ if (multiplicator != 1) {
+ // affiche par exemple : cm * 1000
+ legendY += " (" + unit + "*" + multiplicator + ")";
+ } else if (StringUtils.isNotEmpty(unit)) {
+ legendY += " (" + unit + ")";
+ }
+ ValueAxis valueAxis = new NumberAxis(legendY);
+ valueAxis.setUpperMargin(0.1);
+
+ CategoryItemRenderer renderer = new StatisticalLineAndShapeRenderer(false, true);
+
+ // n'affiche pas les nombre sur le graphique
+ //StandardCategoryItemLabelGenerator itemLabelGenerator = new StandardCategoryItemLabelGenerator();
+ //renderer.setBaseItemLabelGenerator(itemLabelGenerator);
+ //renderer.setBaseItemLabelsVisible(true);
+
+ CategoryPlot plot = new CategoryPlot(statisticalDataset, categoryAxis, valueAxis, renderer);
+ plot.setOrientation(PlotOrientation.VERTICAL);
+ JFreeChart chart = new JFreeChart(chartTitle,
+ JFreeChart.DEFAULT_TITLE_FONT, plot, true);
+
+ // remove series legend
+ chart.removeLegend();
+ // white background
+ chart.setBackgroundPaint(Color.WHITE);
+
+ try {
+ result = File.createTempFile("coser-chart-community-indicator-", ".png");
+ result.deleteOnExit();
+ ChartUtilities.saveChartAsPNG(result, chart, 800, 400);
+ } catch (IOException ex) {
+ throw new CoserTechnicalException("Can't save chart", ex);
+ }
+ }
+
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get Population indicator result --------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected File getPopulationIndicatorDataFile(String species, String indicator) {
+
+ DataStorage dataStorage = new MemoryDataStorage();
+
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(false);
+
+ // add header
+ dataStorage.add(iterator.next());
+
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (matchPopulationSpeciesAndIndicator(tuple, species, indicator)) {
+ dataStorage.add(tuple);
+ }
+ }
+ File result = DataStorages.save("coser-chart-population-indicator",
+ ".csv",
+ dataStorage);
+ return result;
+ }
+
+ protected File getPopulationIndicatorGraphFile(Locale locale, String zone, String species, String indicator) {
+
+
+ int multiplicator = 1;
+ int minYear = Integer.MAX_VALUE;
+ int maxYear = Integer.MIN_VALUE;
+ boolean indicatorFound = false;
+ Map<Integer, Double[]> graphData = new HashMap<Integer, Double[]>();
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+
+ if (matchPopulationSpeciesAndIndicator(tuple, species, indicator)) {
+ indicatorFound = true;
+
+ // XXX echatellier, maybe take care of list here ?
+
+ Double estimation = Double.parseDouble(tuple[6]);
+ Double ecart = Double.parseDouble(tuple[7]);
+ int year = Integer.parseInt(tuple[5]);
+
+ if (year < minYear) {
+ minYear = year;
+ }
+ if (year > maxYear) {
+ maxYear = year;
+ }
+ graphData.put(year, new Double[]{estimation, ecart});
+
+ // si les données sont énormes, on affiche les données
+ // / multiplicator et on le mentionne dans la légende
+ if (estimation > 1e9) {
+ multiplicator = 1000000;
+ }
+ if (estimation > 1e6 && multiplicator < 1000000) {
+ multiplicator = 1000;
+ }
+ }
+ }
+
+ File result = null;
+
+ // avec l'extraction des données, on peut demander a générer un graphique
+ // sur un indicateur qui n'est pas présent dans le projet courant,
+ // dans ce cas, on retourne null
+ if (indicatorFound) {
+
+ String zoneDisplayName = getZonesMap().getZoneFullName(zone);
+ String indicatorName = getIndicatorsMap().getIndicatorValue(indicator, locale);
+ String unit = getIndicatorsMap().getIndicatorUnit(indicator);
+
+ // get graph title
+ String title = zoneDisplayName;
+ title += " - " + indicatorName;
+ title += " - " + Reports.getReportDisplayName(loadSpeciesFileStorage(true), species);
+
+ // generate dataset with sorted data
+ DefaultStatisticalCategoryDataset statisticalDataset = new DefaultStatisticalCategoryDataset();
+ for (int indexYear = minYear; indexYear <= maxYear; ++indexYear) {
+ Double[] entry = graphData.get(indexYear);
+ if (entry != null) {
+ Double estimation = entry[0] / multiplicator;
+ Double ecart = entry[1] / multiplicator;
+ statisticalDataset.add(estimation, ecart, "Serie1", (Comparable) indexYear);
+ } else {
+ statisticalDataset.add(null, null, "Serie1", indexYear);
+ }
+ }
+
+ // configure chart
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
+ String yearAxis = Reports.getYearChartTitle(locale);
+ CategoryAxis categoryAxis = new CategoryAxis(yearAxis);
+ categoryAxis.setCategoryMargin(0);
+ categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
+ // label horizontaux
+ String legendY = indicatorName;
+ if (multiplicator != 1) {
+ // affiche par exemple : cm * 1000
+ legendY += " (" + unit + "*" + multiplicator + ")";
+ } else if (StringUtils.isNotEmpty(unit)) {
+ legendY += " (" + unit + ")";
+ }
+ ValueAxis valueAxis = new NumberAxis(legendY);
+ valueAxis.setUpperMargin(0.1);
+
+ CategoryItemRenderer renderer = new StatisticalLineAndShapeRenderer(false, true);
+
+ // n'affiche pas les nombre sur le graphique
+ //StandardCategoryItemLabelGenerator itemLabelGenerator = new StandardCategoryItemLabelGenerator();
+ //renderer.setBaseItemLabelGenerator(itemLabelGenerator);
+ //renderer.setBaseItemLabelsVisible(true);
+
+ CategoryPlot plot = new CategoryPlot(statisticalDataset, categoryAxis, valueAxis, renderer);
+ plot.setOrientation(PlotOrientation.VERTICAL);
+ JFreeChart chart = new JFreeChart(title,
+ JFreeChart.DEFAULT_TITLE_FONT, plot, true);
+
+ // remove series legend
+ chart.removeLegend();
+ // white background
+ chart.setBackgroundPaint(Color.WHITE);
+
+ try {
+ result = File.createTempFile("coser-chart-population-indicator-", ".png");
+ result.deleteOnExit();
+ ChartUtilities.saveChartAsPNG(result, chart, 800, 400);
+ } catch (IOException ex) {
+ throw new CoserTechnicalException("Can't save chart", ex);
+ }
+ }
+
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get species lists ----------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Map<String, String> getPopulationIndicatorSpecies() {
+ Map<String, String> result = Maps.newHashMap();
+
+ Map<String, String> speciesNames = getSpeciesMap();
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ String speciesCode = tuple[3];
+
+ String speciesName = speciesNames.get(speciesCode);
+
+ if (StringUtils.isNotEmpty(speciesName)) {
+ result.put(speciesCode, speciesName);
+ }
+ result.put(speciesCode, speciesName);
+ }
+ return result;
+ }
+
+ protected Map<String, String> getCommunityIndicatorSpecies(Locale locale, String indicator) {
+
+ // linked hash map (doit respecter l'ordre d'insertion)
+ Map<String, String> result = new LinkedHashMap<String, String>();
+
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+
+ if (matchCommunityIndicator(tuple, indicator)) {
+ String list = tuple[2];
+
+ // recherche de la traduction de l'id de liste
+ // les liste sont a1, T1, T2 ...
+ String listLetter = String.valueOf(list.charAt(0));
+ String translation = "## " + list + " not found ##";
+ Iterator<String[]> typeIterator = loadSpeciesListFileStorage(true);
+ while (typeIterator.hasNext()) {
+ // "Types";"Commentaire";"NumSys min";"NumSys max";"Code"
+ String[] tupleType = typeIterator.next();
+ if (tupleType[4].equals(listLetter)) {
+
+ // gestion du groupe "Tous"
+ // cas special, c'est la seule valeur du fichier
+ // code type espece qui a besoin d'une traduction
+ if (tupleType[4].equalsIgnoreCase("T")) {
+ if (locale != null && "fr".equals(locale.getLanguage())) {
+ translation = "Tous Liste " + list.charAt(1);
+ } else if (locale != null && "en".equals(locale.getLanguage())) {
+ translation = "Todo Lista " + list.charAt(1);
+ } else {
+ translation = "All List " + list.charAt(1);
+ }
+ } else {
+ // ajout de la traduction du nom de liste plus le numéro
+ if (locale != null && "fr".equals(locale.getLanguage())) {
+ translation = tupleType[0] + " Liste " + list.charAt(1);
+ } else if (locale != null && "en".equals(locale.getLanguage())) {
+ translation = tupleType[0] + " Lista " + list.charAt(1);
+ } else {
+ translation = tupleType[0] + " List " + list.charAt(1);
+ }
+ }
+ break;
+ }
+ }
+ result.put(list, translation);
+ }
+ }
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get indicator lists --------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Set<String> getCommunityIndicators() {
+ Iterator<String[]> iterator = loadCommunityIndicatorStorage(true);
+ Set<String> result = Sets.newHashSet();
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ String indicatorCode = tuple[1];
+ result.add(indicatorCode);
+ }
+ return result;
+ }
+
+ protected Set<String> getPopulationIndicators(String species) {
+ Iterator<String[]> iterator = loadPopulationIndicatorStorage(true);
+ Set<String> result = Sets.newHashSet();
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ if (species == null || matchPopulationSpecies(tuple, species)) {
+ String indicatorCode = tuple[1];
+ result.add(indicatorCode);
+ }
+ }
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get species definition maps ------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Map<String, String> getSpeciesMap() {
+ if (speciesMap == null) {
+ speciesMap = Maps.newTreeMap();
+
+ // load species file
+ Iterator<String[]> iterator = loadSpeciesFileStorage(true);
+ while (iterator.hasNext()) {
+ String[] tuple = iterator.next();
+ String speciesCode = tuple[3];
+ String speciesLabel = tuple[4] + " " + tuple[5];
+ speciesMap.put(speciesCode, speciesLabel);
+ }
+ }
+ return speciesMap;
+ }
+
+ protected Map<String, String> getSpeciesSubMap(Collection<String> speciesList) {
+
+ Map<String, String> result = Maps.newTreeMap();
+
+ if (speciesList != null) {
+
+ Map<String, String> map = getSpeciesMap();
+ for (String species : speciesList) {
+ String speciesLabel = map.get(species);
+ result.put(species, speciesLabel);
+ }
+ }
+
+ return result;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get indicator definition maps ----------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected IndicatorMap getIndicatorsMap() {
+ if (indicatorsMap == null) {
+ indicatorsMap = new IndicatorMap(config.getWebIndicatorsFile());
+ }
+ return indicatorsMap;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Get zone definition maps ---------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public ZoneMap getZonesMap() {
+ if (zonesMap == null) {
+ zonesMap = new ZoneMap(config.getWebZonesFile());
+ }
+ return zonesMap;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- storage util methods -------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ protected Iterator<String[]> loadPopulationIndicatorStorage(boolean skipFirstLine) {
+ File file = new File(resultDirectory, path.getRsufiResult().getEstPopIndName());
+ // Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = DataStorages.load(file, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+ Iterator<String[]> iterator = dataStorage.iterator(skipFirstLine);
+ return iterator;
+ }
+
+ protected Iterator<String[]> loadCommunityIndicatorStorage(boolean skipFirstLine) {
+ File file = new File(resultDirectory, path.getRsufiResult().getEstComIndName());
+ // Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = DataStorages.load(file, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+ Iterator<String[]> iterator = dataStorage.iterator(skipFirstLine);
+ return iterator;
+ }
+
+ protected Iterator<String[]> loadSpeciesFileStorage(boolean skipFirstLine) {
+ // "C_Perm","NumSys","NivSys","C_VALIDE","L_VALIDE","AA_VALIDE","C_TxP\u00E8re","Taxa"
+ Iterator<String[]> iterator = path.getProject().getRefTaxSpecies().iterator(skipFirstLine);
+ return iterator;
+ }
+
+ protected Iterator<String[]> loadSpeciesListFileStorage(boolean skipFirstLine) {
+ // "Types";"Commentaire";"NumSys min";"NumSys max";"Code"
+ Iterator<String[]> iterator = path.getProject().getTypeEspeces().iterator(skipFirstLine);
+ return iterator;
+ }
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepository.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProvider.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProvider.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProvider.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,155 @@
+package fr.ifremer.coser.result.repository.legacy;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import fr.ifremer.coser.CoserBusinessConfig;
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.CoserConstants;
+import fr.ifremer.coser.bean.Project;
+import fr.ifremer.coser.bean.RSufiResult;
+import fr.ifremer.coser.bean.RSufiResultPath;
+import fr.ifremer.coser.bean.Selection;
+import fr.ifremer.coser.result.ResultRepositoryInitializationException;
+import fr.ifremer.coser.result.repository.ResultRepositoryProvider;
+import fr.ifremer.coser.services.ProjectService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+import java.util.Set;
+
+/**
+ * Created on 3/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class LegacyResultRepositoryProvider implements ResultRepositoryProvider<LegacyResultRepository> {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(LegacyResultRepositoryProvider.class);
+
+ /**
+ * Directory where are stored all legacy results.
+ */
+ protected final File basedir;
+
+ protected final ProjectService projectService;
+
+ protected final CoserBusinessConfig config;
+
+ public LegacyResultRepositoryProvider(CoserBusinessConfig config, File basedir) {
+ this.config = config;
+ Preconditions.checkNotNull(config);
+ Preconditions.checkNotNull(basedir);
+ this.projectService = new ProjectService(config);
+ this.basedir = basedir;
+ }
+
+ @Override
+ public Set<LegacyResultRepository> loadRepositories() {
+
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Scan for projects from basedir: %s", basedir));
+ }
+ Set<LegacyResultRepository> result;
+ try {
+ result = findAllProjectWithResult();
+ } catch (CoserBusinessException e) {
+ throw new ResultRepositoryInitializationException(this, "Could not find projects", e);
+ }
+
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Found %s result repository(ies) from basedir: %s", result.size(), basedir));
+ }
+ return result;
+ }
+
+ /**
+ * Retourne tous les projets qui ont des résultats.
+ * <p/>
+ * De la forme d'une liste de de path (à la tree path) :
+ * ProjetName/SelectionName/ResultName
+ *
+ * @return results paths
+ * @throws CoserBusinessException
+ */
+ public Set<LegacyResultRepository> findAllProjectWithResult() throws CoserBusinessException {
+ Set<LegacyResultRepository> result = Sets.newHashSet();
+ // loop on projets
+ File[] projects = basedir.listFiles();
+ if (projects != null) {
+ for (File existingProject : projects) {
+ if (existingProject.isDirectory()) {
+ String projectName = existingProject.getName();
+ // need to open project
+ Project p = projectService.openProject(projectName, basedir);
+
+ // loop on selections
+ File selectionsDirectory = new File(existingProject, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selections = selectionsDirectory.listFiles();
+ if (selections != null) {
+ for (File existingSelection : selections) {
+ if (existingSelection.isDirectory()) {
+ String selectionName = existingSelection.getName();
+ Selection s = new Selection(selectionName);
+
+ // loop on result
+ File rsufisDirectory = new File(existingSelection, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] rSufiResults = rsufisDirectory.listFiles();
+ if (rSufiResults != null) {
+ for (File rSufiResult : rSufiResults) {
+ if (rSufiResult.isDirectory()) {
+ RSufiResult r = projectService.getRSufiResult(rSufiResult);
+ boolean candidate = r.isPubliableResult();
+ if (candidate) {
+ RSufiResultPath path = new RSufiResultPath(p, s, r);
+ if (log.isDebugEnabled()) {
+ log.debug("Detected result: " + result);
+ }
+ String surveyName = projectService.getProjectSurveyName(rSufiResult, r);
+
+ LegacyResultRepository repository = new LegacyResultRepository(config, existingProject, path, surveyName);
+
+
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Detected result: %s - %s", path.getProject().getName(), path.getRsufiResult().getName()));
+ }
+ result.add(repository);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProvider.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/package-info.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/package-info.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/package-info.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+/**
+ * Implementation for legacy results.
+ *
+ * @since 1.5
+ */
+package fr.ifremer.coser.result.repository.legacy;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/legacy/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/package-info.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/package-info.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/package-info.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+/**
+ * Result repository API.
+ *
+ * @since 1.5
+ */
+package fr.ifremer.coser.result.repository;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/repository/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CommunityIndicatorRequest.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CommunityIndicatorRequest.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CommunityIndicatorRequest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,58 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+
+/**
+ * Request to obtain community indicator results.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class CommunityIndicatorRequest extends IndicatorRequest {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String species;
+
+ @Override
+ public String getSpecies() {
+ return species;
+ }
+
+ @Override
+ public void setSpecies(String species) {
+ Preconditions.checkNotNull(facade);
+ this.species = species;
+ }
+
+ @Override
+ public boolean isFilled() {
+ return super.isFilled() && species != null;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CommunityIndicatorRequest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestBuilder.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestBuilder.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestBuilder.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,134 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.result.CoserRequest;
+
+import java.util.Locale;
+
+/**
+ * To build requests.
+ * <p/>
+ * Created on 3/7/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class CoserRequestBuilder {
+
+ protected final Locale locale;
+
+ protected String facade;
+
+ protected String zone;
+
+ protected String species;
+
+ protected String indicator;
+
+ protected IndicatorRequest.ResultType resultType;
+
+ public CoserRequestBuilder(Locale locale) {
+ this.locale = locale;
+ }
+
+ public CoserRequestBuilder addFacade(String facade) {
+ this.facade = facade;
+ return this;
+ }
+
+ public CoserRequestBuilder addZone(String zone) {
+ this.zone = zone;
+ return this;
+ }
+
+ public CoserRequestBuilder addSpecies(String species) {
+ this.species = species;
+ return this;
+ }
+
+ public CoserRequestBuilder addIndicator(String indicator) {
+ this.indicator = indicator;
+ return this;
+ }
+
+ public CoserRequestBuilder addResultType(IndicatorRequest.ResultType resultType) {
+ this.resultType = resultType;
+ return this;
+ }
+
+ public MapRequest toMapRequest() {
+ MapRequest request = new MapRequest();
+ flush(request);
+ return request;
+ }
+
+ public RawDataRequest toRawDataRequest() {
+ RawDataRequest request = new RawDataRequest();
+ flush(request);
+ return request;
+ }
+
+ public PopulationIndicatorRequest toPopulationIndicatorRequest() {
+ PopulationIndicatorRequest request = new PopulationIndicatorRequest();
+ flush(request);
+ return request;
+ }
+
+ public CommunityIndicatorRequest toCommunityIndicatorRequest() {
+ CommunityIndicatorRequest request = new CommunityIndicatorRequest();
+ flush(request);
+ return request;
+ }
+
+ protected <R extends CoserRequest> void flush(R request) {
+ request.setLocale(locale);
+ if (request instanceof CoserRequestFacadeAware) {
+ if (facade != null) {
+ ((CoserRequestFacadeAware) request).setFacade(facade);
+ }
+ }
+ if (request instanceof CoserRequestZoneAware) {
+ if (zone != null) {
+ ((CoserRequestZoneAware) request).setZone(zone);
+ }
+ }
+ if (request instanceof CoserRequestSpeciesAware) {
+ if (species != null) {
+ ((CoserRequestSpeciesAware) request).setSpecies(species);
+ }
+ }
+
+ if (request instanceof IndicatorRequest) {
+ if (indicator != null) {
+ ((IndicatorRequest) request).setIndicator(indicator);
+ }
+ if (resultType != null) {
+ ((IndicatorRequest) request).setResultType(resultType);
+ }
+ }
+ }
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestBuilder.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestFacadeAware.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestFacadeAware.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestFacadeAware.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,42 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.result.CoserRequest;
+
+/**
+ * Place this on any request which involve a {@code facade}.
+ * <p/>
+ * Created on 3/7/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public interface CoserRequestFacadeAware extends CoserRequest {
+
+ String getFacade();
+
+ void setFacade(String facade);
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestFacadeAware.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestSpeciesAware.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestSpeciesAware.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestSpeciesAware.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,42 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.result.CoserRequest;
+
+/**
+ * Place this on any request which involve a {@code species}.
+ * <p/>
+ * Created on 3/7/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public interface CoserRequestSpeciesAware extends CoserRequest {
+
+ String getSpecies();
+
+ void setSpecies(String species);
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestSpeciesAware.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestZoneAware.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestZoneAware.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestZoneAware.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,42 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.result.CoserRequest;
+
+/**
+ * Place this on any request which involve a {@code zone}.
+ * <p/>
+ * Created on 3/7/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since XXX
+ */
+public interface CoserRequestZoneAware extends CoserRequest {
+
+ String getZone();
+
+ void setZone(String zone);
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/CoserRequestZoneAware.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/IndicatorRequest.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/IndicatorRequest.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/IndicatorRequest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,117 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.coser.result.CoserRequest;
+
+import java.util.Locale;
+
+/**
+ * Request to obtain indicator results.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public abstract class IndicatorRequest implements CoserRequest, CoserRequestFacadeAware, CoserRequestZoneAware, CoserRequestSpeciesAware {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Type of result.
+ */
+ public enum ResultType {
+ DATA,
+ GRAPH
+ }
+
+ protected Locale locale;
+
+ protected String facade;
+
+ protected String zone;
+
+ protected String indicator;
+
+ protected ResultType resultType;
+
+ @Override
+ public Locale getLocale() {
+ return locale;
+ }
+
+ @Override
+ public void setLocale(Locale locale) {
+ Preconditions.checkNotNull(locale);
+ this.locale = locale;
+ }
+
+ @Override
+ public boolean isFilled() {
+ return !(locale == null || facade == null || zone == null || resultType == null || indicator == null);
+ }
+
+ @Override
+ public String getFacade() {
+ return facade;
+ }
+
+ @Override
+ public void setFacade(String facade) {
+ Preconditions.checkNotNull(facade);
+ this.facade = facade;
+ }
+
+ @Override
+ public String getZone() {
+ return zone;
+ }
+
+ @Override
+ public void setZone(String zone) {
+ Preconditions.checkNotNull(zone);
+ this.zone = zone;
+ }
+
+ public ResultType getResultType() {
+ return resultType;
+ }
+
+ public void setResultType(ResultType resultType) {
+ Preconditions.checkNotNull(resultType);
+ this.resultType = resultType;
+ }
+
+ public String getIndicator() {
+ return indicator;
+ }
+
+ public void setIndicator(String indicator) {
+ this.indicator = indicator;
+ }
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/IndicatorRequest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/MapRequest.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/MapRequest.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/MapRequest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,107 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.coser.result.CoserRequest;
+
+import java.util.Locale;
+
+/**
+ * Request to obtain map results.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class MapRequest implements CoserRequest, CoserRequestFacadeAware, CoserRequestZoneAware, CoserRequestSpeciesAware {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Used to have map with no species, we prefer to keep a not null value
+ * to still make request consistent.
+ */
+ public static final String NULL_SPECIES = "Repartition-stations";
+
+ protected Locale locale;
+
+ protected String facade;
+
+ protected String zone;
+
+ protected String species;
+
+ @Override
+ public boolean isFilled() {
+ return !(locale == null || facade == null || zone == null && species == null);
+ }
+
+ @Override
+ public Locale getLocale() {
+ return locale;
+ }
+
+ @Override
+ public void setLocale(Locale locale) {
+ Preconditions.checkNotNull(locale);
+ this.locale = locale;
+ }
+
+ @Override
+ public String getFacade() {
+ return facade;
+ }
+
+ @Override
+ public void setFacade(String facade) {
+ Preconditions.checkNotNull(facade);
+ this.facade = facade;
+ }
+
+ @Override
+ public String getZone() {
+ return zone;
+ }
+
+ @Override
+ public void setZone(String zone) {
+ Preconditions.checkNotNull(zone);
+ this.zone = zone;
+ }
+
+ @Override
+ public String getSpecies() {
+ return species;
+ }
+
+ @Override
+ public void setSpecies(String species) {
+ Preconditions.checkNotNull(species);
+ this.species = species;
+ }
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/MapRequest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/PopulationIndicatorRequest.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/PopulationIndicatorRequest.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/PopulationIndicatorRequest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,58 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+
+/**
+ * Request to obtain population indicator results.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class PopulationIndicatorRequest extends IndicatorRequest {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String species;
+
+ @Override
+ public String getSpecies() {
+ return species;
+ }
+
+ @Override
+ public void setSpecies(String species) {
+ Preconditions.checkNotNull(facade);
+ this.species = species;
+ }
+
+ @Override
+ public boolean isFilled() {
+ return super.isFilled() && species != null;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/PopulationIndicatorRequest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/RawDataRequest.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/RawDataRequest.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/RawDataRequest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,87 @@
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.coser.result.CoserRequest;
+
+import java.util.Locale;
+
+/**
+ * Request to obtain raw data results.
+ * <p/>
+ * Created on 3/4/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class RawDataRequest implements CoserRequest, CoserRequestFacadeAware, CoserRequestZoneAware {
+
+ private static final long serialVersionUID = 1L;
+
+ protected Locale locale;
+
+ protected String facade;
+
+ protected String zone;
+
+ @Override
+ public Locale getLocale() {
+ return locale;
+ }
+
+ @Override
+ public void setLocale(Locale locale) {
+ Preconditions.checkNotNull(locale);
+ this.locale = locale;
+ }
+
+ @Override
+ public boolean isFilled() {
+ return !(locale == null || facade == null || zone == null);
+ }
+
+ @Override
+ public String getFacade() {
+ return facade;
+ }
+
+ @Override
+ public void setFacade(String facade) {
+ Preconditions.checkNotNull(facade);
+ this.facade = facade;
+ }
+
+ @Override
+ public String getZone() {
+ return zone;
+ }
+
+ @Override
+ public void setZone(String zone) {
+ Preconditions.checkNotNull(zone);
+ this.zone = zone;
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/RawDataRequest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/package-info.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/package-info.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/package-info.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+/**
+ * Differents implementations of {@link fr.ifremer.coser.result.CoserRequest}.
+ *
+ * @since 1.5
+ */
+package fr.ifremer.coser.result.request;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/result/request/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommandService.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ControlService.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1502,7 +1502,8 @@
return indicators;
}
-
+
+ // Pour extraction
/**
* Retourne les indicateurs calculés avec leurs traductions scientifique
* pour les zones souhaitées. Retournes les indicateurs de populations
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService2.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService2.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService2.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,3030 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2013 Ifremer, Codelutin, Chatellier Eric
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package fr.ifremer.coser.services;
+
+import static org.nuiton.i18n.I18n.t;
+import static org.nuiton.i18n.I18n.l;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.regex.Matcher;
+
+import fr.ifremer.coser.bean.IndicatorMap;
+import fr.ifremer.coser.bean.ZoneMap;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.collections4.keyvalue.MultiKey;
+import org.apache.commons.collections4.map.MultiKeyMap;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.mail.EmailException;
+import org.apache.commons.mail.MultiPartEmail;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.mime.HttpMultipartMode;
+import org.apache.http.entity.mime.MultipartEntity;
+import org.apache.http.entity.mime.content.StringBody;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.nuiton.util.FileUtil;
+import org.nuiton.util.StringUtil;
+import org.nuiton.util.ZipUtil;
+import org.w3c.dom.Document;
+import org.xhtmlrenderer.pdf.ITextRenderer;
+
+import com.itextpdf.text.DocumentException;
+
+import fr.ifremer.coser.CoserBusinessConfig;
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.CoserConstants;
+import fr.ifremer.coser.CoserConstants.Category;
+import fr.ifremer.coser.CoserUtils;
+import fr.ifremer.coser.bean.Project;
+import fr.ifremer.coser.bean.RSufiResult;
+import fr.ifremer.coser.bean.RSufiResultPath;
+import fr.ifremer.coser.bean.Selection;
+import fr.ifremer.coser.storage.DataStorage;
+import fr.ifremer.coser.util.DataType;
+import fr.ifremer.coser.util.InputStreamKnownSizeBody;
+import fr.ifremer.coser.util.ProgressMonitor;
+import fr.ifremer.coser.util.ProgressStream;
+import freemarker.cache.ClassTemplateLoader;
+import freemarker.ext.beans.BeansWrapper;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+
+/**
+ * Service specifique à l'interface web de visualisation et à la partie UI
+ * qui sert a envoyer les resultats vers l'interface web.
+ *
+ * Ce service, contrairement aux autres a un état, les indicateurs et zones
+ * chargées persistent après chargement, car elle ne peuvent pas changer
+ * tant que l'application est en cours d'utilisation.
+ *
+ * Il faut garder à l'esprit que les projets n'ont pas forcement
+ * de données publiées, donc le chargement du projet est possible, mais
+ * pas les données de controle et les données de selection (donc plutot
+ * travailler sur les fichiers estcomind/estpopind que sur les 4 tables).
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class WebService2 {
+
+ private static final Log log = LogFactory.getLog(WebService.class);
+
+ protected CoserBusinessConfig config;
+
+ protected CommonService commonService;
+
+ protected ProjectService projectService;
+
+ protected PublicationService publicationService;
+
+ /** Indicator map (id, locale > translation, id, "unit" > unit) (etat du service). */
+// protected MultiKeyMap indicatorsMap;
+ protected IndicatorMap indicatorsMap;
+
+ /** Zones map (etat du service). */
+// protected DataStorage zonesMap;
+ protected ZoneMap zonesMap;
+
+ /** Freemarker */
+ protected Configuration freemarkerConfiguration;
+
+ public WebService2(CoserBusinessConfig config) {
+ this.config = config;
+
+ commonService = new CommonService(config);
+ projectService = new ProjectService(config);
+ publicationService = new PublicationService(config);
+
+ freemarkerConfiguration = new Configuration();
+
+ // needed to overwrite "Defaults to default system encoding."
+ // fix encoding issue on some systems
+ freemarkerConfiguration.setEncoding(Locale.getDefault(), "UTF-8");
+
+ // specific template loader to get template from jars (classpath)
+ ClassTemplateLoader templateLoader = new ClassTemplateLoader(WebService.class, "/ftl");
+ freemarkerConfiguration.setTemplateLoader(templateLoader);
+
+ // pour les maps dans les template (entre autre)
+ freemarkerConfiguration.setObjectWrapper(new BeansWrapper());
+ }
+
+ protected IndicatorMap getIndicatorsMap() {
+ if (indicatorsMap == null) {
+ indicatorsMap = new IndicatorMap(config.getWebIndicatorsFile());
+ }
+ return indicatorsMap;
+ }
+// /**
+// * Charge les indicateurs disponible depuis le fichier des indicateurs.
+// * (indid, indname)
+// *
+// * @return indicators map
+// * @throws CoserBusinessException
+// */
+// protected MultiKeyMap getIndicatorsMap() throws CoserBusinessException {
+//
+// if (indicatorsMap == null) {
+// indicatorsMap = new MultiKeyMap();
+// File indicatorsFile = config.getWebIndicatorsFile();
+// DataStorage indicatorsStorage = commonService.loadCSVFile(indicatorsFile);
+// Iterator<String[]> iteratorInd = indicatorsStorage.iterator(true);
+// while (iteratorInd.hasNext()) {
+// // "id";"label_fr";"label_en";"label_es";"unit"
+// String[] indicator = iteratorInd.next();
+// indicatorsMap.put(indicator[0], "fr", indicator[1]);
+// indicatorsMap.put(indicator[0], "en", indicator[2]);
+// indicatorsMap.put(indicator[0], "es", indicator[3]);
+// indicatorsMap.put(indicator[0], "unit", indicator[4]);
+// }
+// }
+//
+// return indicatorsMap;
+// }
+
+// /**
+// * Get indicator translation by checking correct locale.
+// *
+// * @param indicator indicator code
+// * @param localeCode locale
+// * @return indicator translation
+// */
+// protected String getIndicatorValue(String indicator, String localeCode) throws CoserBusinessException {
+// String localLocaleCode = localeCode;
+// if (!"fr".equals(localLocaleCode) && !"es".equals(localLocaleCode)
+// && !"unit".equals(localLocaleCode)) {
+// localLocaleCode = "en"; // en by default
+// }
+// return (String)getIndicatorsMap().get(indicator, localLocaleCode);
+// }
+
+// /**
+// * Charge les zones disponibles depuis le fichier des zones.
+// * (zoneid, zonename)
+// *
+// * @return zones map
+// * @throws CoserBusinessException
+// */
+// public DataStorage getZonesMap() throws CoserBusinessException {
+//
+// if (zonesMap == null) {
+// File zoneFile = config.getWebZonesFile();
+//
+// // l'operation n'est pas obligatoire pour tous les clients
+// // lourd, le fichier peut donc ne pas exister
+// if (zoneFile.isFile()) {
+// zonesMap = commonService.loadCSVFile(zoneFile);
+// }
+// else {
+// // fait volontairement un return new, n'affecte pas l'etat du
+// // service
+// return new MemoryDataStorage();
+// }
+// }
+//
+// return zonesMap;
+// }
+
+ /**
+ * Charge les zones disponibles depuis le fichier des zones.
+ * (zoneid, zonename)
+ *
+ * @return zones map
+ */
+ public ZoneMap getZonesMap() {
+
+ if (zonesMap == null) {
+ File zoneFile = config.getWebZonesFile();
+
+ // l'operation n'est pas obligatoire pour tous les clients
+ // lourd, le fichier peut donc ne pas exister
+ if (zoneFile.isFile()) {
+ zonesMap = new ZoneMap(zoneFile);
+ }
+ else {
+ // fait volontairement un return new, n'affecte pas l'etat du
+ // service
+ return new ZoneMap(null);
+ }
+ }
+
+ return zonesMap;
+ }
+
+ /**
+ * Retourne les nom d'une zone (avec la facade, l'année et la serie) en
+ * fonction de l'id de la zone.
+ *
+ * @param zoneId zone id
+ * @return zone name (or {@code null} if not found)
+ */
+ public String getZoneFullName(String zoneId) {
+ return getZonesMap().getZoneFullName(zoneId);
+ }
+
+ /**
+ * Retourne les zones disponible par facade.
+ *
+ * @return couple facadeid/list<zoneid>
+ */
+ public Map<String, List<String>> getZoneByFacade() {
+ return getZonesMap().getZoneByFacade();
+ }
+
+ /**
+ * Recupere la liste des cartes pour chaque id de zone sous forme de Map.
+ *
+ * @return zone images map
+ */
+ public Map<String, String> getZonePictures() {
+ return getZonesMap().getZonePictures();
+ }
+
+ /**
+ * Recupere la liste des meta info pour chaque id de zone sous forme de Map.
+ *
+ * @param locale locale
+ * @return zone meta info map
+ */
+ public Map<String, String> getZoneMetaInfo(Locale locale) {
+ return getZonesMap().getZoneMetaInfo(locale);
+ }
+
+ /**
+ * Get facades list (as facadeid/facadename).
+ *
+ * @return facades map
+ */
+ public Map<String, String> getFacades() {
+ return getZonesMap().getFacades();
+ }
+
+ /**
+ * Pour une zone principale, recupere la liste des couples sous-zone /
+ * campagne qui sont disponible dans cette zone principale.
+ *
+ * @param facade facade (le nom de la facade principale) (can be {@code null} : don't filter on facade)
+ * @param onlyWithSource retourn zone liste with available source data
+ * @param forMap look in map directory
+ * @return couple subzoneid/sub
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getZoneForFacade(String facade, boolean onlyWithSource, boolean forMap) throws CoserBusinessException {
+ Map<String, String> zonesForFacade = new HashMap<String, String>();
+
+ // get subzone for main zone
+ Collection<String> subZones = getZonesMap().getZonesForFacade(facade);
+// Collection<String> subZones = new ArrayList<String>();
+// Iterator<String[]> itZone = getZonesMap().storage.iterator(true);
+// while (itZone.hasNext()) {
+// // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+// String[] tuple = itZone.next();
+// if (facade == null || tuple[1].equals(facade)) {
+// subZones.add(tuple[0]);
+// }
+// }
+
+ File projectsDirectory = null;
+ if (forMap) {
+ projectsDirectory = config.getWebMapsProjectsDirectory();
+ }
+ else {
+ projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ }
+
+ // get survey names in subZones collection
+ File[] projectFiles = projectsDirectory.listFiles();
+
+ // project iteration
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ if (!onlyWithSource || rsufiResult.isDataAllowed()) {
+ String resultZoneId = rsufiResult.getZone();
+ if (subZones.contains(resultZoneId)) {
+ String zoneid = resultZoneId;
+ // get zone name
+// // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"map"
+// int zoneIndex = getZonesMap().indexOf(zoneid);
+// String[] zoneData = getZonesMap().get(zoneIndex);
+// String zoneName = zoneData[3] + " - " + zoneData[4] + " - " + zoneData[5];
+ String zoneName = getZonesMap().getZoneFullNameWithNoFacade(zoneid);
+
+ zonesForFacade.put(zoneid, zoneName);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return zonesForFacade;
+ }
+
+// /**
+// * Get facades list (as facadeid/facadename).
+// *
+// * @return facades map
+// * @throws CoserBusinessException
+// */
+// public Map<String, String> getFacades() throws CoserBusinessException {
+// Map<String, String> facades = new LinkedHashMap<String, String>();
+// // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+// DataStorage zonesMap = getZonesMap();
+// Iterator<String[]> itZone = zonesMap.iterator(true);
+// while (itZone.hasNext()) {
+// String[] tuple = itZone.next();
+// // on a pas d'id pour les facades
+// facades.put(tuple[1], tuple[2]);
+// }
+// return facades;
+// }
+// /**
+// * Retourne les zones disponible par facade.
+// *
+// * @return couple facadeid/list<zoneid>
+// * @throws CoserBusinessException
+// */
+// public Map<String, List<String>> getZoneByFacade() throws CoserBusinessException {
+// Map<String, List<String>> zonesByFacade = new HashMap<String, List<String>>();
+//
+// // get subzone for main zone
+// Iterator<String[]> itZone = getZonesMap().iterator(true);
+// while (itZone.hasNext()) {
+// // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+// String[] tuple = itZone.next();
+// String facadeid = tuple[1];
+// String zoneid = tuple[0];
+// List<String> zones = zonesByFacade.get(facadeid);
+// if (zones == null) {
+// zones = new ArrayList<String>();
+// zonesByFacade.put(facadeid, zones);
+// }
+// zones.add(zoneid);
+// }
+//
+// return zonesByFacade;
+// }
+//
+// /**
+// * Recupere la liste des cartes pour chaque id de zone sous forme de Map.
+// *
+// * @return zone images map
+// * @throws CoserBusinessException
+// */
+// public Map<String, String> getZonePictures() throws CoserBusinessException {
+// Map<String, String> result = new HashMap<String, String>();
+//
+// Iterator<String[]> itZone = getZonesMap().iterator(true);
+// while (itZone.hasNext()) {
+// // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+// String[] tuple = itZone.next();
+// result.put(tuple[0], tuple[9]);
+// }
+//
+// return result;
+// }
+//
+// /**
+// * Recupere la liste des meta info pour chaque id de zone sous forme de Map.
+// *
+// * @param locale locale
+// * @return zone meta info map
+// * @throws CoserBusinessException
+// */
+// public Map<String, String> getZoneMetaInfo(Locale locale) throws CoserBusinessException {
+// Map<String, String> result = new HashMap<String, String>();
+//
+// Iterator<String[]> itZone = getZonesMap().iterator(true);
+// while (itZone.hasNext()) {
+// // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+// String[] tuple = itZone.next();
+// if (locale != null && "fr".equals(locale.getLanguage())) {
+// result.put(tuple[0], tuple[6]);
+// } else if (locale != null && "es".equals(locale.getLanguage())) {
+// result.put(tuple[0], tuple[8]);
+// } else {
+// result.put(tuple[0], tuple[7]);
+// }
+// }
+//
+// return result;
+// }
+
+// /**
+// * Retourne les nom d'une zone (avec la facade, l'année et la serie) en
+// * fonction de l'id de la zone.
+// *
+// * @param zoneId zone id
+// * @return zone name (or {@code null} if not found)
+// * @throws CoserBusinessException
+// */
+// public String getZoneFullName(String zoneId) throws CoserBusinessException {
+// DataStorage localZoneMap = getZonesMap();
+// String resultName = null;
+// // "id";"facadeid";"facade";"zone";"periode";"serie";"comment";"comment_en";"comment_es";"map"
+// int zoneIndex = localZoneMap.indexOf(zoneId);
+// if (zoneIndex != -1) {
+// resultName = localZoneMap.get(zoneIndex)[2];
+// resultName += " - " + localZoneMap.get(zoneIndex)[3];
+// resultName += " - " + localZoneMap.get(zoneIndex)[4];
+// resultName += " - " + localZoneMap.get(zoneIndex)[5];
+// }
+// return resultName;
+// }
+
+ /**
+ * Retourne tous les projets qui ont des résultats.
+ *
+ * De la forme d'une liste de de path (à la tree path) :
+ * ProjetName/SelectionName/ResultName
+ *
+ * @param beginDate begin date (can be null)
+ * @param endDate end date (can be null)
+ * @param onlyPubliableResult select only publiable results
+ *
+ * @return results paths
+ * @throws CoserBusinessException
+ */
+ public List<RSufiResultPath> findAllProjectWithResult(Date beginDate, Date endDate, boolean onlyPubliableResult) throws CoserBusinessException {
+ List<RSufiResultPath> results = findAllProjectWithResult(config.getProjectsDirectory(),
+ beginDate,
+ endDate,
+ onlyPubliableResult);
+ return results;
+ }
+
+ /**
+ * Retourne tous les projets qui ont des résultats.
+ *
+ * De la forme d'une liste de de path (à la tree path) :
+ * ProjetName/SelectionName/ResultName
+ *
+ * @param projectsDirectory where to search for projects
+ * @param beginDate begin date (can be null)
+ * @param endDate end date (can be null)
+ * @param onlyPubliableResult select only publiable results
+ *
+ * @return results paths
+ * @throws CoserBusinessException
+ */
+ public List<RSufiResultPath> findAllProjectWithResult(File projectsDirectory, Date beginDate, Date endDate, boolean onlyPubliableResult) throws CoserBusinessException {
+ List<RSufiResultPath> results = new ArrayList<RSufiResultPath>();
+
+ // loop on projets
+ File[] projects = projectsDirectory.listFiles();
+ if (projects != null) {
+ for (File existingProject : projects) {
+ if (existingProject.isDirectory()) {
+ String projectName = existingProject.getName();
+ Project p = new Project(projectName);
+
+ // loop on selections
+ File selectionsDirectory = new File(existingProject, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selections = selectionsDirectory.listFiles();
+ if (selections != null) {
+ for (File existingSelection : selections) {
+ if (existingSelection.isDirectory()) {
+ String selectionName = existingSelection.getName();
+ Selection s = new Selection(selectionName);
+
+ // loop on result
+ File rsufisDirectory = new File(existingSelection, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] rSufiResults = rsufisDirectory.listFiles();
+ if (rSufiResults != null) {
+ for (File rSufiResult : rSufiResults) {
+ if (rSufiResult.isDirectory()) {
+ RSufiResult r = projectService.getRSufiResult(rSufiResult);
+
+ boolean candidate = isCandidateResult(r, beginDate, endDate, onlyPubliableResult);
+ if (candidate) {
+ RSufiResultPath result = new RSufiResultPath(p, s, r);
+ results.add(result);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return results;
+ }
+
+ /**
+ * Test if result is valid with filtering.
+ *
+ * @param rsufiResult rsufi result to test
+ * @param beginDate begin date (can be null)
+ * @param endDate end date (can be null)
+ * @param onlyPubliableResult select only publiable results
+ * @return if result is valid candidate
+ */
+ protected boolean isCandidateResult(RSufiResult rsufiResult, Date beginDate,
+ Date endDate, boolean onlyPubliableResult) {
+
+ boolean result = true;
+
+ if (beginDate != null) {
+ result &= rsufiResult.getCreationDate().compareTo(beginDate) >= 0;
+ }
+
+ if (endDate != null) {
+ result &= rsufiResult.getCreationDate().compareTo(endDate) <= 0;
+ }
+
+ if (onlyPubliableResult) {
+ result &= rsufiResult.isPubliableResult();
+ }
+
+ return result;
+ }
+
+ /**
+ * Extract directory to custom directory.
+ *
+ * @param selectedResults selected result paths
+ * @param extractDirectory extract directory (can be null)
+ * @param publishDataResults result paths flaged with results export
+ * @return extracted file (no automatically deleted)
+ * @throws CoserBusinessException
+ */
+ public File performResultExtract(Collection<RSufiResultPath> selectedResults, Collection<RSufiResultPath> publishDataResults, File extractDirectory) throws CoserBusinessException {
+ File prepareZip = null;
+ try {
+
+ // create zip file name not random name
+ if (extractDirectory == null) {
+ prepareZip = File.createTempFile("Coserextract-", ".zip");
+ }
+ else {
+ // cas extraction vers un répertoire specifique
+ DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
+ String zipName = "Coserextract" + dateFormat.format(new Date()) + ".zip";
+ prepareZip = new File(extractDirectory, zipName);
+ }
+
+ // copy selectively all data to target directory
+ MultipleFileFilter mFileFilters = new MultipleFileFilter();
+ for (RSufiResultPath path : selectedResults) {
+ // load projet, needed to known source data file name
+ Project project = path.getProject();
+ project = projectService.openProject(project.getName());
+
+ OneResultFileFilter oneRFF = new OneResultFileFilter(config.getProjectsDirectory(),
+ project, path.getSelection(), path.getRsufiResult(), publishDataResults.contains(path));
+ mFileFilters.add(oneRFF);
+ }
+
+ // create zip temp file
+ File projectsDirectory = config.getProjectsDirectory();
+
+ //ZipUtil.compress(prepareZip, projectsDirectory, mFileFilters);
+ // compress les projets à la racines de l'archive
+ // sans le dossier "projects"
+ Collection<File> files = FileUtil.getFilteredElements(projectsDirectory, mFileFilters, true);
+ ZipUtil.compressFiles(prepareZip, projectsDirectory, files, false);
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't prepare upload data", ex);
+ }
+
+ return prepareZip;
+ }
+
+ /**
+ * Upload user selected result to coser web front-end using common http
+ * client.
+ *
+ * TODO remove les 4 listes s'il y a mieux.
+ *
+ * @param selectedResults selected result (collection of project/selection/rsufiresult)
+ * @param indicatorsResults results selected as indicator results
+ * @param mapResults results selected as map result
+ * @param publishDataResults results selected as results published with data
+ * @param login remote admin login
+ * @param password remote admin password
+ * @param progress progress monitor
+ * @return upload error status or {@code null} if no error
+ * @throws CoserBusinessException
+ */
+ public String performResultUpload(Collection<RSufiResultPath> selectedResults,
+ Collection<RSufiResultPath> indicatorsResults, Collection<RSufiResultPath> mapResults,
+ Collection<RSufiResultPath> publishDataResults, String login,
+ String password, ProgressMonitor progress) throws CoserBusinessException {
+
+ String uploadStatus = null;
+
+ // first copy prepare directory with only necessary data
+ // ie project with only selected selections
+ // and selection with only selected results
+
+ progress.setCurrent(0);
+ progress.setText(t("coser.business.uploadresult.modifyResultOptions"));
+ modifyRSufiResults(selectedResults, indicatorsResults, mapResults, publishDataResults);
+
+ progress.setText(t("coser.business.uploadresult.checkcollision"));
+ checkDataCollision(selectedResults);
+
+ progress.setText(t("coser.business.uploadresult.preparezip"));
+
+ // default extract to temp directory with data sources
+ File prepareZip = performResultExtract(selectedResults, publishDataResults, null);
+
+ progress.setText(t("coser.business.uploadresult.sendzip"));
+ progress.setTotal((int)prepareZip.length());
+
+ // then upload zip file to website
+ try {
+ HttpClient httpclient = new DefaultHttpClient();
+ MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
+
+ // login/password param (password encoded)
+ StringBody loginBody = new StringBody(login, Charset.forName("UTF-8"));
+ reqEntity.addPart("login", loginBody);
+ String sha1password = StringUtil.encodeSHA1(password);
+ StringBody passwordBody = new StringBody(sha1password, Charset.forName("UTF-8"));
+ reqEntity.addPart("sha1Password", passwordBody);
+
+ // file param
+ ProgressStream stream = new ProgressStream(new FileInputStream(prepareZip), progress);
+ InputStreamKnownSizeBody fileBody = new InputStreamKnownSizeBody(stream, prepareZip.length(),
+ "application/zip", prepareZip.getName());
+ reqEntity.addPart("resultFile", fileBody);
+
+ HttpPost httppost = new HttpPost(config.getWebUploadURL());
+ httppost.setEntity(reqEntity);
+
+ if (log.isInfoEnabled()) {
+ log.info("Uploading " + prepareZip + " to " + httppost.getURI());
+ }
+
+ HttpResponse response = httpclient.execute(httppost);
+
+ if (response.getStatusLine().getStatusCode() != 200) {
+ uploadStatus = response.getStatusLine().getReasonPhrase();
+ }
+ } catch (ClientProtocolException ex) {
+ throw new CoserBusinessException("Can't upload file", ex);
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't upload file", ex);
+ }
+
+ prepareZip.delete();
+
+ return uploadStatus;
+ }
+
+ /**
+ * Modifie les types et options de certains résultats rsufi (map result,
+ * data sources result).
+ *
+ * @param selectedResults selected result (collection of project/selection/rsufiresult)
+ * @param indicatorsResults results selected as indicator results
+ * @param mapResults map results
+ * @param publishDataResults publish data results
+ * @throws CoserBusinessException
+ */
+ protected void modifyRSufiResults(Collection<RSufiResultPath> selectedResults,
+ Collection<RSufiResultPath> indicatorsResults, Collection<RSufiResultPath> mapResults,
+ Collection<RSufiResultPath> publishDataResults) throws CoserBusinessException {
+
+ // TODO echatellier 20110117 revoir ce code
+
+ // attention, il faut sauver tout les resultats, sinon, les
+ // decochage de type map / publish result ne seront pas pris en compte
+
+ // reset type map and data source for all
+ for (RSufiResultPath selectedResult : selectedResults) {
+ RSufiResult rsufiResult = selectedResult.getRsufiResult();
+ rsufiResult.setIndicatorsResult(false);
+ rsufiResult.setMapsResult(false);
+ rsufiResult.setDataAllowed(false);
+ }
+
+ // set map type
+ for (RSufiResultPath indicatorsResult : indicatorsResults) {
+ RSufiResult rsufiResult = indicatorsResult.getRsufiResult();
+ rsufiResult.setIndicatorsResult(true);
+ }
+
+ // set map type
+ for (RSufiResultPath mapResult : mapResults) {
+ RSufiResult rsufiResult = mapResult.getRsufiResult();
+ rsufiResult.setMapsResult(true);
+ }
+
+ // set data type
+ for (RSufiResultPath publishDataResult : publishDataResults) {
+ RSufiResult rsufiResult = publishDataResult.getRsufiResult();
+ rsufiResult.setDataAllowed(true);
+ }
+
+ // save all selected results
+ for (RSufiResultPath selectedResult : selectedResults) {
+ Project project = selectedResult.getProject();
+ Selection selection = selectedResult.getSelection();
+ RSufiResult rsufiResult = selectedResult.getRsufiResult();
+
+ File projectDirectory = new File(config.getProjectsDirectory(), project.getName());
+ File selectionsDirectory = new File(projectDirectory, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File selectionDirectory = new File(selectionsDirectory, selection.getName());
+ File resultsDirectory = new File(selectionDirectory, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File resultDirectory = new File(resultsDirectory, rsufiResult.getName());
+
+ projectService.saveRSufiResult(resultDirectory, rsufiResult);
+ }
+ }
+
+ /**
+ * Met à jour les fichiers de propriétés des resultats (maps, dataSource)
+ * and check for duplicated couple (zoneid/resulttype (map) upload).
+ *
+ * @param selectedResults result id to check
+ * @throws CoserBusinessException
+ */
+ protected void checkDataCollision(Collection<RSufiResultPath> selectedResults) throws CoserBusinessException {
+
+ Collection<String> resultZoneTypeIds = new ArrayList<String>();
+
+ for (RSufiResultPath selectedResult : selectedResults) {
+ Project project = selectedResult.getProject();
+ Selection selection = selectedResult.getSelection();
+ RSufiResult rsufiResult = selectedResult.getRsufiResult();
+
+ // on creer une clé composé pour l'id du resultat
+ String resultZoneTypeId = rsufiResult.getZone() + String.valueOf(rsufiResult.isMapsResult());
+ if (resultZoneTypeIds.contains(resultZoneTypeId)) {
+ throw new CoserBusinessException(t("coser.business.resultupload.duplicatedresult",
+ project.getName(), selection.getName(), rsufiResult.getName(), rsufiResult.getZone()));
+ } else {
+ resultZoneTypeIds.add(resultZoneTypeId);
+ }
+ }
+ }
+
+ /**
+ * Aggrege plusieurs file filters.
+ */
+ protected static class MultipleFileFilter implements FileFilter {
+ protected Collection<FileFilter> fileFilters = new ArrayList<FileFilter>();
+
+ public void add(FileFilter f) {
+ fileFilters.add(f);
+ }
+
+ /*
+ * @see java.io.FileFilter#accept(java.io.File)
+ */
+ @Override
+ public boolean accept(File pathname) {
+
+ boolean result = false;
+ Iterator<FileFilter> it = fileFilters.iterator();
+ while (it.hasNext() && !result) {
+ result = it.next().accept(pathname);
+ }
+ return result;
+ }
+ }
+
+ /**
+ * Filter pour un resultat donné.
+ *
+ * Attention, implémentation que ne doit fonctionner que avec ZipUtil
+ * car meme si on refuse en répertoire, il redemande quand même
+ * les fils (et il faut qu'il les demande)
+ */
+ protected class OneResultFileFilter implements FileFilter {
+ protected File projectsDirectory;
+
+ /** Doit etre un project chargé avec nom de fichier originaux. */
+ protected Project project;
+ protected Selection selection;
+ protected RSufiResult rsufi;
+ protected boolean exportWithData;
+
+ public OneResultFileFilter(File projectsDirectory, Project project, Selection selection, RSufiResult rsufi, boolean exportWithData) {
+ this.projectsDirectory = projectsDirectory;
+ this.project = project;
+ this.selection = selection;
+ this.rsufi = rsufi;
+ this.exportWithData = exportWithData;
+ }
+
+ /*
+ * @see java.io.FileFilter#accept(java.io.File)
+ */
+ @Override
+ public boolean accept(File pathname) {
+
+ boolean result = false;
+
+ try {
+ String currentPathName = pathname.getCanonicalPath() + File.separator;
+
+ File projectDirectory = new File(projectsDirectory, project.getName());
+ File selectionsDirectory = new File(projectDirectory, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File selectionDirectory = new File(selectionsDirectory, selection.getName());
+ File resultsDirectory = new File(selectionDirectory, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File resultDirectory = new File(resultsDirectory, rsufi.getName());
+
+ String projectPath = projectDirectory.getCanonicalPath() + File.separator;
+ String selectionsPath = selectionsDirectory.getCanonicalPath() + File.separator;
+ String selectionPath = selectionDirectory.getCanonicalPath() + File.separator;
+ String resultsPath = resultsDirectory.getCanonicalPath() + File.separator;
+ String resultPath = resultDirectory.getCanonicalPath() + File.separator;
+
+ // on prend
+ // - tout ce qu'il y a dans le projet
+ // - sauf le répertoire "selections"
+ // - ou la selection entierement
+ // - sauf le répertoire result
+ // - ou le resultat entierrement
+ result = (currentPathName.startsWith(projectPath)
+ && !currentPathName.startsWith(selectionsPath))
+ || (currentPathName.startsWith(selectionPath)
+ && !currentPathName.startsWith(resultsPath))
+ || currentPathName.startsWith(resultPath);
+
+ // cas ou les données sources ne doivent pas être exporter
+ // condition sur les noms de fichiers ?
+ if (!exportWithData) {
+ String fileName = pathname.getName();
+
+ // on exclu tout les fichiers qui commencent
+ // par les memes noms de fichiers que ceux du projet
+ // (les noms de fichiers sont personnalisables)
+ for (Category category : Category.values()) {
+ if (category.isDataCategory()) {
+ String sourceFileName = commonService.getDataStorageFileName(project, category, null);
+ Matcher matcher = CoserUtils.FILENAME_SUFFIX_PATTERN.matcher(sourceFileName);
+ if (matcher.matches()) {
+ result &= !(fileName.startsWith(matcher.group(1)) && fileName.endsWith(matcher.group(2)));
+ } else {
+ result &= !fileName.startsWith(sourceFileName);
+ }
+ }
+ }
+ }
+ } catch (IOException ex) {
+ throw new RuntimeException("Can't get system canonical path");
+ }
+
+ return result;
+ }
+ }
+
+ /**
+ * Traite le fichier uploade par l'application client et l'enregistre
+ * dans le stockage coté web.
+ *
+ * Le nouveau fichier uploadé est mergé avec l'ancien, c'est à dire:
+ * <ul>
+ * <li>dezipage dans un fichier temporaire
+ * <li>recuperation des noms de zones des nouveau fichiers (par type, carte/indicateur)
+ * <li>suppression dans l'ancien répertoire des resultats deja presents dans le nouveau (pour les conflits zone)
+ * <li>suppression des selections vides
+ * <li>suppression des projets vides
+ * <li>copie (avec ecrasement) des nouveaux fichiers dans l'ancien répertoire
+ * mais seulement pour ceux des zones concernés (partie difficile)
+ * </ul>
+ *
+ * TODO chatellier 20110125 l'algorithme n'est pour l'instant pas performant
+ * et contient pas mal de code dupliqué, mais pour la v1.0 ca ira.
+ *
+ * @param login user login
+ * @param archiveFile uploaded file
+ * @throws CoserBusinessException
+ */
+ public void registerNewUploadedResults(String login, File archiveFile) throws CoserBusinessException {
+
+ try {
+
+ // dezipage dans un fichier temporaire
+ File tempDirectory = FileUtil.createTempDirectory("coser-upload-", "-tmp");
+ ZipUtil.uncompress(archiveFile, tempDirectory);
+
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File mapsDirectory = config.getWebMapsProjectsDirectory();
+
+ // recuperer les resultats actuels pour le mail de mise à jour
+ Map<String, String> indicatorResults = getZonesIds(projectsDirectory, true, null, null);
+ Map<String, String> mapsResults = getZonesIds(mapsDirectory, null, true, null);
+ Map<String, String> dataResults = getZonesIds(projectsDirectory, null, null, true);
+
+ // suppression des resultats qui ont été envoyé mais
+ // ne sont ni maps result, ni indicator result
+ Map<String, String> noIndicatorsResultZoneIds = getZonesIds(tempDirectory, false, null, null);
+ cleanCurrentProjectDirectory(projectsDirectory, noIndicatorsResultZoneIds.keySet());
+ Map<String, String> noMapsResultZoneIds = getZonesIds(tempDirectory, null, false, null);
+ cleanCurrentProjectDirectory(mapsDirectory, noMapsResultZoneIds.keySet());
+ Map<String, String> noDataResultZoneIds = getZonesIds(tempDirectory, null, null, false);
+
+ // recuperation des noms zone des nouveau fichiers
+ Map<String, String> indicatorsResultZoneIds = getZonesIds(tempDirectory, true, null, null);
+ // suppression dans l'ancien répertoire des resultat deja present
+ // dans le nouveau (pour les conflits)
+ cleanCurrentProjectDirectory(projectsDirectory, indicatorsResultZoneIds.keySet());
+ // creation du filter qui copiera juste ce qu'il faut
+ FileFilter indicatorsFileFilter = getCopyFileFilter(tempDirectory, false);
+ // copie (avec ecrasement) des nouveaux fichiers dans l'ancien répertoire
+ customCopyDirectory(tempDirectory, projectsDirectory, indicatorsFileFilter);
+
+ // recuperation des noms zone des nouveau fichiers
+ Map<String, String> mapsResultZoneIds = getZonesIds(tempDirectory, null, true, null);
+ // suppression dans l'ancien répertoire des resultat deja present
+ // dans le nouveau (pour les conflits)
+ cleanCurrentProjectDirectory(mapsDirectory, mapsResultZoneIds.keySet());
+ // creation du filter qui copiera juste ce qu'il faut
+ FileFilter mapsFileFilter = getCopyFileFilter(tempDirectory, true);
+ // copie (avec ecrasement) des nouveaux fichiers dans l'ancien répertoire
+ customCopyDirectory(tempDirectory, mapsDirectory, mapsFileFilter);
+
+ // recuperation des nom de resultat data
+ Map<String, String> dataResultZoneIds = getZonesIds(tempDirectory, null, null, true);
+
+ FileUtils.deleteDirectory(tempDirectory);
+
+ if (log.isInfoEnabled()) {
+ log.info("Unzipping file " + archiveFile + " to " + projectsDirectory);
+ }
+
+ // generate email content
+ StringBuilder content = new StringBuilder();
+
+ int count = 0;
+ content.append(t("coser.business.notificationmail.mapsresults") + "\n");
+ for (Map.Entry<String, String> noMapsResultZoneId : noMapsResultZoneIds.entrySet()) {
+ if (mapsResults.containsValue(noMapsResultZoneId.getValue())) {
+ content.append(" - " + t("coser.business.notificationmail.deleted",
+ getZoneFullName(noMapsResultZoneId.getKey()),
+ noMapsResultZoneId.getValue()) + "\n");
+ count++;
+ }
+ }
+ for (Map.Entry<String, String> mapsResultZoneId : mapsResultZoneIds.entrySet()) {
+ if (!mapsResults.containsValue(mapsResultZoneId.getValue())) {
+ content.append(" - " + t("coser.business.notificationmail.added",
+ getZoneFullName(mapsResultZoneId.getKey()),
+ mapsResultZoneId.getValue()) + "\n");
+ count++;
+ }
+ }
+ content.append("\n");
+
+ content.append(t("coser.business.notificationmail.indicatorsresults") + "\n");
+ for (Map.Entry<String, String> noIndicatorsResultZoneId : noIndicatorsResultZoneIds.entrySet()) {
+ if (indicatorResults.containsValue(noIndicatorsResultZoneId.getValue())) {
+ content.append(" - " + t("coser.business.notificationmail.deleted",
+ getZoneFullName(noIndicatorsResultZoneId.getKey()),
+ noIndicatorsResultZoneId.getValue()) + "\n");
+ count++;
+ }
+
+ }
+ for (Map.Entry<String, String> indicatorsResultZoneId : indicatorsResultZoneIds.entrySet()) {
+ if (!indicatorResults.containsValue(indicatorsResultZoneId.getValue())) {
+ content.append(" - " + t("coser.business.notificationmail.added",
+ getZoneFullName(indicatorsResultZoneId.getKey()),
+ indicatorsResultZoneId.getValue()) + "\n");
+ count++;
+ }
+ }
+ content.append("\n");
+
+ content.append(t("coser.business.notificationmail.dataresults") + "\n");
+ for (Map.Entry<String, String> noDataResultZoneId : noDataResultZoneIds.entrySet()) {
+ if (dataResults.containsValue(noDataResultZoneId.getValue())) {
+ content.append(" - " + t("coser.business.notificationmail.deleted",
+ getZoneFullName(noDataResultZoneId.getKey()),
+ noDataResultZoneId.getValue()) + "\n");
+ count++;
+ }
+
+ }
+ for (Map.Entry<String, String> dataResultZoneId : dataResultZoneIds.entrySet()) {
+ if (!dataResults.containsValue(dataResultZoneId.getValue())) {
+ content.append(" - " + t("coser.business.notificationmail.added",
+ getZoneFullName(dataResultZoneId.getKey()),
+ dataResultZoneId.getValue()) + "\n");
+ count++;
+ }
+ }
+ content.append("\n");
+
+ // send notification mails
+ sendNewResultNotifications(login, count, content.toString());
+
+ // update data date
+ updateDataProperties();
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't uncompress file", ex);
+ }
+ }
+
+ /**
+ * N'utilise pas la methode de commons-fileutils, car lorsqu'un répertoire
+ * est refusé, il ne descend pas dans les sous répertoire alors que dans
+ * notre cas il le faut.
+ *
+ * @param srcDir source directory to copy
+ * @param destDir destination directory
+ * @param indicatorsFileFilter file filter for file to copy
+ * @throws IOException
+ */
+ protected void customCopyDirectory(File srcDir,
+ File destDir, FileFilter indicatorsFileFilter) throws IOException {
+ List<File> files = FileUtil.getFilteredElements(srcDir, null, true);
+ for (File file : files) {
+ if (indicatorsFileFilter.accept(file)) {
+ String path = file.getPath().substring(srcDir.getPath().length());
+
+ File destFile = new File(destDir, path);
+ if (file.isDirectory()) {
+ destFile.mkdirs();
+ }
+ else {
+ FileUtils.copyFile(file, destFile);
+ }
+ }
+ }
+ }
+
+ /**
+ * Met à jour certaines proprietes apres la mise à jour des données.
+ *
+ * @throws CoserBusinessException
+ */
+ protected void updateDataProperties() throws CoserBusinessException {
+
+ File webProperties = config.getWebPropertiesFile();
+
+ Properties props = new Properties();
+ InputStream iStream = null;
+ OutputStream oStream = null;
+ try {
+ if (webProperties.isFile()) {
+ iStream = new FileInputStream(webProperties);
+ props.load(iStream);
+ }
+
+ props.setProperty("updateDate", String.valueOf(new Date().getTime()));
+ oStream = new FileOutputStream(webProperties);
+ props.store(oStream, "Update data");
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't save properties file", ex);
+ }
+ finally {
+ IOUtils.closeQuietly(iStream);
+ IOUtils.closeQuietly(oStream);
+ }
+ }
+
+ /**
+ * Retourne la date de dernière mise à jour des données du site web.
+ *
+ * Retourne une date bidon, si pas de dernière mise à jour.
+ *
+ * @return last data update date
+ * @throws CoserBusinessException
+ */
+ public Date getLastDataUpdateDate() throws CoserBusinessException {
+ Date dataUpdateDate = null;
+ File webProperties = config.getWebPropertiesFile();
+ if (webProperties.isFile()) {
+ // get update date
+ Properties props = new Properties();
+ InputStream stream = null;
+ try {
+ stream = new FileInputStream(webProperties);
+ props.load(stream);
+
+ if (props.containsKey("updateDate")) {
+ String date = props.getProperty("updateDate");
+ long time = Long.parseLong(date);
+ dataUpdateDate = new Date(time);
+ }
+
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't read properties file", ex);
+ }
+ finally {
+ IOUtils.closeQuietly(stream);
+ }
+ }
+
+ if (dataUpdateDate == null) {
+ dataUpdateDate = new Date(0);
+ }
+
+ return dataUpdateDate;
+ }
+
+ /**
+ * Recupere dans un repertoire donné, les zoneid des resultat avec
+ * pour chaque id, le nom du projet associé.
+ *
+ * Les boolean sont des grands {@code Boolean} car si la valeur
+ * est {@code null}, on ne tient pas compte du critere lors de la recherche.
+ *
+ * @param scanDirectory le repertoire a scanner
+ * @param indicatorResults if true get indicator results
+ * @param mapResults if true get map results
+ * @param dataResults if true get data allowed result
+ * @return une map de resultid/nom visuel des projets
+ * @throws CoserBusinessException
+ */
+ protected Map<String, String> getZonesIds(File scanDirectory, Boolean indicatorResults,
+ Boolean mapResults, Boolean dataResults) throws CoserBusinessException {
+
+ Map<String, String> resultIds = new HashMap<String, String>();
+ File[] projectFiles = scanDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // return result depending on result type
+ if ( ( indicatorResults == null || rsufiResult.isIndicatorsResult() == indicatorResults )
+ &&
+ ( mapResults == null || rsufiResult.isMapsResult() == mapResults )
+ &&
+ ( dataResults == null || rsufiResult.isDataAllowed() == dataResults)) {
+ String resultResultId = rsufiResult.getZone();
+ if (StringUtils.isNotBlank(resultResultId)) {
+ String resultPath = projectFile.getName() + "/" +
+ selectionFile.getName() + "/" +
+ resultFile.getName();
+ resultIds.put(resultResultId, resultPath);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return resultIds;
+ }
+
+ /**
+ * Retourne un file filter qui ne copiera que les dossiers resultat
+ * correspondant au type demandé. Pour un resultat, le filtre devra
+ * egalement copier les dossiers projet et selection correspondants.
+ *
+ * @param scanDirectory directory containing result to copy
+ * @param mapResults result type to get
+ * @return aggragated file filter
+ * @throws CoserBusinessException
+ */
+ protected FileFilter getCopyFileFilter(File scanDirectory, boolean mapResults) throws CoserBusinessException {
+
+ MultipleFileFilter aggregateFileFilter = new MultipleFileFilter();
+
+ File[] projectFiles = scanDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // return result depending on result type
+ if ( (mapResults && rsufiResult.isMapsResult()) ||
+ (!mapResults && rsufiResult.isIndicatorsResult())) {
+
+ Project p = new Project(projectFile.getName());
+ Selection s = new Selection(selectionFile.getName());
+
+ OneResultFileFilter resultFileFilter = new OneResultFileFilter(scanDirectory, p, s, rsufiResult, true);
+ aggregateFileFilter.add(resultFileFilter);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return aggregateFileFilter;
+ }
+
+ /**
+ * Fait le menage dans le dossier courant des projets en supprimant
+ * tout les resulat qui ont un result id present dans la liste
+ * {@code newResultIds}.
+ *
+ * Supprime egalement les selections qui n'ont plus de résultats et
+ * les projets qui n'ont plus de selection.
+ *
+ * @param projectsDirectory projectsDirectory
+ * @param newResultIds new ids
+ * @throws CoserBusinessException
+ */
+ protected void cleanCurrentProjectDirectory(File projectsDirectory, Collection<String> newResultIds) throws CoserBusinessException {
+
+ try {
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ int projectSelectionCount = 0;
+
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ int selectionResultCount = 0;
+
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+ String resultResultId = rsufiResult.getZone();
+ if (newResultIds.contains(resultResultId)) {
+ // un nouveau resulat utilsera ce resultid
+ FileUtils.deleteDirectory(resultFile);
+ } else {
+ // un resultat valid trouvé, selection non a supprimer
+ selectionResultCount++;
+ }
+ }
+ }
+ }
+
+ // si aucun resultat valide, suppression de la seletion
+ if (selectionResultCount == 0) {
+ FileUtils.deleteDirectory(selectionFile);
+ } else {
+ projectSelectionCount++;
+ }
+ }
+ }
+ }
+
+ // si aucune selection avec resultat, suppression du projet
+ if (projectSelectionCount == 0) {
+ FileUtils.deleteDirectory(projectFile);
+ }
+ }
+ }
+ }
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't delete directory", ex);
+ }
+ }
+
+ /**
+ * Envoi un mail de notification apres la publication des resultat à la
+ * liste des adresses email renseignées dans la configuration.
+ *
+ * @param login user login
+ * @param count updated data count
+ * @param detail body mail detail
+ */
+ protected void sendNewResultNotifications(String login, int count, String detail) {
+ List<String> emails = config.getNewResultNotificationList();
+
+ for (String email : emails) {
+ try {
+ MultiPartEmail emailPart = new MultiPartEmail();
+ emailPart.setHostName(config.getSmtpHost());
+ emailPart.addTo(email);
+ emailPart.setFrom("noreply-coser(a)ifremer.fr", "Coser");
+ emailPart.setSubject(t("coser.business.notificationmail.subject", count));
+ emailPart.setContent(t("coser.business.notificationmail.body", login, detail), "text/plain; charset=ISO-8859-9");
+
+ // send mail
+ emailPart.send();
+ } catch (EmailException ex) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't send mail", ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Recuperer la liste des populations pour une zone donnée.
+ *
+ * @param zone zone id
+ * @return map species nom info>nom officiel
+ * @param forMap for map directory
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getSpecies(String zone, boolean forMap) throws CoserBusinessException {
+ return getSpecies(Collections.singleton(zone), forMap);
+ }
+
+ /**
+ * Recuperer la liste des populations pour un ensemble de zones donnée.
+ *
+ * @param zones zones ids
+ * @return map species nom info>nom officiel
+ * @param forMap for map directory
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getSpecies(Collection<String> zones, boolean forMap) throws CoserBusinessException {
+
+ Map<String, String> result = new TreeMap<String, String>();
+
+ File projectsDirectory = null;
+ if (forMap) {
+ projectsDirectory = config.getWebMapsProjectsDirectory();
+ }
+ else {
+ projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ }
+
+ File[] projectFiles = projectsDirectory.listFiles();
+
+ // parcours des resultats disponibles
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.getZone() != null && zones.contains(rsufiResult.getZone())) {
+
+ // load project (without data to get reftax data)
+ Project project = projectService.openProject(projectFile.getName(), projectsDirectory);
+
+ Map<String, String> resultSpecies = getRsufiResultSpecies(project, resultFile, rsufiResult);
+ result.putAll(resultSpecies);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Recupere la liste de toutes les especes nom sci et nom off à partir
+ * d'un resultat.
+ *
+ * @param project project
+ * @param resultDirectory rsufi result directory
+ * @param rsufiResult rsufi result
+ * @return map with each species code/species name
+ * @throws CoserBusinessException
+ */
+ protected Map<String, String> getRsufiResultSpecies(Project project, File resultDirectory, RSufiResult rsufiResult) throws CoserBusinessException {
+ Map<String, String> result = new HashMap<String, String>();
+
+ // load reftax in memory
+ Map<String, String> speciesNames = new HashMap<String, String>();
+ Iterator<String[]> reftax = project.getRefTaxSpecies().iterator(true);
+ while (reftax.hasNext()) {
+ String[] tuple = reftax.next();
+
+ // "C_Perm","NumSys","NivSys","C_VALIDE","L_VALIDE","AA_VALIDE","C_TxP\u00E8re","Taxa"
+ String speciesCode = tuple[3];
+ // nom + auteur (sans ajout de parenthese : important)
+ String speciesName = tuple[4] + " " + tuple[5];
+
+ speciesNames.put(speciesCode, speciesName);
+ }
+
+ // un peu lourd mais reconstruit le path jusqu'au fichier estcomind
+ File estPopIndFile = new File(resultDirectory, rsufiResult.getEstPopIndName());
+
+ // Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = commonService.loadCSVFile(estPopIndFile, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+
+ Iterator<String[]> estPopIndIterator = dataStorage.iterator(true);
+ while (estPopIndIterator.hasNext()) {
+ String[] tuple = estPopIndIterator.next();
+
+ String specyCode = tuple[3];
+ String specyName = speciesNames.get(specyCode);
+
+ if (StringUtils.isNotEmpty(specyName)) {
+ result.put(specyCode, specyName);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Retourne les indicateurs calculés avec leurs traductions scientifique
+ * pour la zone et l'especes souhaitées.
+ *
+ * @param zone zone id
+ * @param species especes (if {@code null} look for com indicators)
+ * @param locale locale
+ * @return la liste des indicateurs
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getIndicators(String zone, String species, Locale locale) throws CoserBusinessException {
+ Map<String, String> indicators = new TreeMap<String, String>();
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
+
+ Map<String, String> resultIndicators = null;
+
+ if (species == null) {
+ resultIndicators = getRsufiResultComIndicators(resultFile, rsufiResult, locale);
+ }
+ else {
+ resultIndicators = getRsufiResultPopIndicators(resultFile, rsufiResult, species, locale);
+ }
+ indicators.putAll(resultIndicators);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return indicators;
+ }
+
+ /**
+ * Retourne les indicateurs calculés avec leurs traductions scientifique
+ * pour les zones souhaitées. Retournes les indicateurs de populations
+ * de de communauté à la fois.
+ *
+ * @param zones zones id
+ * @param dataType data type
+ * @param locale locale
+ * @return la liste des indicateurs
+ * @throws CoserBusinessException
+ * @since 1.4
+ */
+ public Map<String, String> getIndicators(Collection<String> zones, DataType dataType, Locale locale) throws CoserBusinessException {
+ Map<String, String> indicators = new TreeMap<String, String>();
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (zones.contains(rsufiResult.getZone())) {
+
+ Map<String, String> resultIndicators = null;
+ if (dataType == DataType.COMMUNITY) {
+ resultIndicators = getRsufiResultComIndicators(resultFile, rsufiResult, locale);
+ indicators.putAll(resultIndicators);
+ }
+ if (dataType == DataType.POPULATION) {
+ resultIndicators = getRsufiResultPopIndicators(resultFile, rsufiResult, null, locale);
+ indicators.putAll(resultIndicators);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return indicators;
+ }
+
+ /**
+ * Recupere la liste de toutes les especes nom sci et nom off à partir
+ * d'un resultat.
+ *
+ * @param resultDirectory rsufi result directory
+ * @param rsufiResult result
+ * @param species to get indicator (can be {@code null} to not filter on species)
+ * @param locale locale
+ * @return indicator for species
+ * @throws CoserBusinessException
+ */
+ protected Map<String, String> getRsufiResultPopIndicators(File resultDirectory, RSufiResult rsufiResult, String species, Locale locale) throws CoserBusinessException {
+
+ Map<String, String> result = new HashMap<String, String>();
+
+ IndicatorMap indicatorsMap = getIndicatorsMap();
+
+ // le fichier estcomind
+ File estPopIndFile = new File(resultDirectory, rsufiResult.getEstPopIndName());
+
+ // Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = commonService.loadCSVFile(estPopIndFile, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+
+ Iterator<String[]> estPopIndIterator = dataStorage.iterator(true);
+ while (estPopIndIterator.hasNext()) {
+ String[] tuple = estPopIndIterator.next();
+
+ String specyCode = tuple[3];
+ if (species == null || specyCode.equals(species)) {
+
+ String indicatorCode = tuple[1];
+ String translations = indicatorsMap.getIndicatorValue(indicatorCode, locale);
+// String translations = getIndicatorValue(indicatorCode, locale.getLanguage());
+// if (translations == null) {
+// translations = "##" + indicatorCode + "##" + locale.getLanguage();
+// }
+ result.put(indicatorCode, translations);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Recupere la liste de toutes les especes nom sci et nom off à partir
+ * d'un resultat.
+ *
+ * @param resultDirectory rsufi result directory
+ * @param rsufiResult result
+ * @param locale locale
+ * @return indicator for species
+ * @throws CoserBusinessException
+ */
+ protected Map<String, String> getRsufiResultComIndicators(File resultDirectory, RSufiResult rsufiResult, Locale locale) throws CoserBusinessException {
+
+ Map<String, String> result = new HashMap<String, String>();
+
+ IndicatorMap indicatorsMap = getIndicatorsMap();
+
+ // le fichier estcomind
+ File estComIndFile = new File(resultDirectory, rsufiResult.getEstComIndName());
+
+ // Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = commonService.loadCSVFile(estComIndFile, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+
+ Iterator<String[]> estPopIndIterator = dataStorage.iterator(true);
+ while (estPopIndIterator.hasNext()) {
+ String[] tuple = estPopIndIterator.next();
+
+ String indicatorCode = tuple[1];
+ String translations = indicatorsMap.getIndicatorValue(indicatorCode, locale);
+// String translations = getIndicatorValue(indicatorCode, locale.getLanguage());
+// if (translations == null) {
+// translations = "##" + indicatorCode + "##" + locale.getLanguage();
+// }
+ result.put(indicatorCode, translations);
+ }
+
+ return result;
+ }
+
+ /**
+ * Retourne les listes sur lequel l'indicateur fournit a ete calculé.
+ *
+ * @param zone zone id
+ * @param indicator indicator
+ * @param locale locale
+ * @return la liste des indicateurs
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getIndicatorLists(String zone, String indicator, Locale locale) throws CoserBusinessException {
+ // linked hash map (doit respecter l'ordre d'insertion)
+ Map<String, String> indicators = new LinkedHashMap<String, String>();
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
+
+ // le fichier contenant le code type espece (utile
+ // pour les traductions des list d'indicateur)
+ File codeTypeEspecesFile = new File(projectFile, CoserConstants.Category.TYPE_ESPECES.getStorageFileName());
+
+ Map<String, String> resultIndicators = getRsufiResultComIndicatorLists(resultFile,
+ rsufiResult, codeTypeEspecesFile, indicator, locale);
+ indicators.putAll(resultIndicators);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return indicators;
+ }
+
+ /**
+ * Recupere les nom des listes sur lesquelle ont été calculé les
+ * indicateurs avec leurs traductions.
+ *
+ * @param resultDirectory rsufi result directory
+ * @param rsufiResult result
+ * @param indicator indicator
+ * @param locale locale
+ * @return indicator for species
+ * @throws CoserBusinessException
+ */
+ protected Map<String, String> getRsufiResultComIndicatorLists(File resultDirectory,
+ RSufiResult rsufiResult, File codeTypeEspecesFile, String indicator, Locale locale) throws CoserBusinessException {
+
+ // linked hash map (doit respecter l'ordre d'insertion)
+ Map<String, String> result = new LinkedHashMap<String, String>();
+
+ // le fichier estcomind
+ File estComIndFile = new File(resultDirectory, rsufiResult.getEstComIndName());
+
+ // Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = commonService.loadCSVFile(estComIndFile, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+ DataStorage dataStorageType = commonService.loadCSVFile(codeTypeEspecesFile, CoserConstants.CSV_SEPARATOR_CHAR);
+
+ Iterator<String[]> estPopIndIterator = dataStorage.iterator(true);
+ while (estPopIndIterator.hasNext()) {
+ String[] tuple = estPopIndIterator.next();
+
+ String indicatorCode = tuple[1];
+ if (indicatorCode.equals(indicator)) {
+ String list = tuple[2];
+
+ // recherche de la traduction de l'id de liste
+ // les liste sont a1, T1, T2 ...
+ String listLetter = String.valueOf(list.charAt(0));
+ String translation = "## " + list + " not found ##";
+ Iterator<String[]> typeIterator = dataStorageType.iterator(true);
+ while (typeIterator.hasNext()) {
+ // "Types";"Commentaire";"NumSys min";"NumSys max";"Code"
+ String[] tupleType = typeIterator.next();
+ if (tupleType[4].equals(listLetter)) {
+
+ // gestion du groupe "Tous"
+ // cas special, c'est la seule valeur du fichier
+ // code type espece qui a besoin d'une traduction
+ if (tupleType[4].equalsIgnoreCase("T")) {
+ if (locale != null && "fr".equals(locale.getLanguage())) {
+ translation = "Tous Liste " + list.charAt(1);
+ } else if (locale != null && "en".equals(locale.getLanguage())) {
+ translation = "Todo Lista " + list.charAt(1);
+ } else {
+ translation = "All List " + list.charAt(1);
+ }
+ }
+ else {
+ // ajout de la traduction du nom de liste plus le numéro
+ if (locale != null && "fr".equals(locale.getLanguage())) {
+ translation = tupleType[0] + " Liste " + list.charAt(1);
+ } else if (locale != null && "en".equals(locale.getLanguage())) {
+ translation = tupleType[0] + " Lista " + list.charAt(1);
+ } else {
+ translation = tupleType[0] + " List " + list.charAt(1);
+ }
+ }
+ break;
+ }
+ }
+ result.put(list, translation);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Retourne les indicateurs calculés avec leurs traductions scientifique
+ * pour la zone et l'especes souhaitées.
+ *
+ * @param zone zone id
+ * @param species especes (if {@code null} look for com indicators
+ * @param indicator indicator
+ * @param list indicator's list (if {@code null} look for pop indicators or no list selected
+ * @param locale locale
+ * @return la liste des indicateurs
+ * @throws CoserBusinessException
+ */
+ public File getChart(String zone, String species, String indicator, String list, Locale locale) throws CoserBusinessException {
+ File result = null;
+
+ IndicatorMap indicatorsMap = getIndicatorsMap();
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
+
+ // load project (without data to get reftax data)
+ Project project = projectService.openProject(projectFile.getName(), projectsDirectory);
+// String indicatorName = getIndicatorValue(indicator, locale.getLanguage());
+// String unit = getIndicatorValue(indicator, "unit");
+ String indicatorName = indicatorsMap.getIndicatorValue(indicator, locale);
+ String unit = indicatorsMap.getIndicatorUnit(indicator);
+
+// String zoneDisplayName = getZoneFullName(zone);
+ String zoneDisplayName = getZonesMap().getZoneFullName(zone);
+
+ if (species == null) {
+ // le fichier contenant le code type espece (utile
+ // pour les traductions des list d'indicateur)
+ File codeTypeEspecesFile = new File(projectFile, CoserConstants.Category.TYPE_ESPECES.getStorageFileName());
+
+ // title = surveyName - indicateur
+ result = publicationService.getRsufiResultComChart(project, resultFile,
+ rsufiResult, codeTypeEspecesFile, indicator, list,
+ zoneDisplayName, indicatorName, unit, locale);
+ }
+ else {
+ // title = surveyName - indicateur - species
+ result = publicationService.getRsufiResultPopChart(project, resultFile,
+ rsufiResult, species, indicator, zoneDisplayName, indicatorName,
+ unit, locale);
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Retourne les indicateurs calculés avec leurs traductions scientifique
+ * pour la zone et l'especes souhaitées.
+ *
+ * @param zone zone id
+ * @param species especes (if {@code null} look for com indicators
+ * @param indicator indicator
+ * @param list indicator's list (if {@code null} look for pop indicators or no list selected
+ * @param locale locale
+ * @return la liste des indicateurs
+ * @throws CoserBusinessException
+ */
+ public File getChartData(String zone, String species, String indicator, String list, Locale locale) throws CoserBusinessException {
+ File result = null;
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
+ result = getChartDataFile(projectsDirectory, projectFile, selectionFile, resultFile, rsufiResult, species, indicator, list, locale);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Generate chart data (as csv for population and as zip for community).
+ *
+ * @param projectsDirectory projects storage directory
+ * @param projectDirectory current project directory
+ * @param selectionDirectory selection directory
+ * @param resultDirectory rsufi result directory
+ * @param rSufiResult rsufi result
+ * @param species species (can be null for community)
+ * @param indicator indicator
+ * @param list indicator's list (if {@code null} look for pop indicators or no list selected
+ * @param locale locale
+ * @return generated file (auto delete when jvm shutdown)
+ * @throws CoserBusinessException
+ */
+ protected File getChartDataFile(File projectsDirectory, File projectDirectory, File selectionDirectory,
+ File resultDirectory, RSufiResult rSufiResult, String species, String indicator, String list,
+ Locale locale) throws CoserBusinessException {
+
+ File result = null;
+
+ try {
+ // cas community (zip avec fichier meta)
+ if (species == null) {
+ File tempDir = FileUtil.createTempDirectory("coser-chartdata-", "-tmp");
+
+ String surveyName = projectService.getProjectSurveyName(resultDirectory, rSufiResult);
+ File baseDir = new File(tempDir, surveyName);
+ baseDir.mkdirs();
+
+ File csvFile = publicationService.getRsufiResultComChartData(resultDirectory, rSufiResult, indicator, list);
+ File csvFileCopied = new File(baseDir, indicator + ".csv");
+ FileUtils.copyFile(csvFile, csvFileCopied);
+ csvFile.delete();
+
+ // ajout du fichier d'information sur les espèces incluses dans
+ // les calculs des indicateurs de communautés
+ // load project (without data to get reftax data)
+ Project project = projectService.openProject(projectDirectory.getName(), projectsDirectory);
+ Selection selection = project.getSelections().get(selectionDirectory.getName());
+ File metaFile = generateMetaFilePDF(project, selection, resultDirectory, rSufiResult, indicator, locale);
+ File metaFileCopied = new File(baseDir, "Information.pdf");
+ FileUtils.copyFile(metaFile, metaFileCopied);
+
+ // make zip
+ result = File.createTempFile("coser-chartdata-", ".zip");
+ result.deleteOnExit();
+ ZipUtil.compress(result, baseDir);
+
+ // clean directory
+ FileUtils.deleteDirectory(tempDir);
+ }
+ else {
+ // cas pop, fichier csv brut
+ result = publicationService.getRsufiResultPopChartData(resultDirectory, rSufiResult, species, indicator);
+ }
+
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't generate chart data file", ex);
+ }
+
+ return result;
+ }
+
+ /**
+ * Recupere le fichier image de la carte demandées en fonction de la zone
+ * et de l'espece.
+ *
+ * Retourne également la repartition globale sur la zone si le nom de
+ * l'espece est {@code null}.
+ *
+ * @param zone zone (zoneid)
+ * @param species species or (null to get <survey>_Repartition-stations.png map file)
+ * @return map file
+ * @throws CoserBusinessException
+ */
+ public File getMapFile(String zone, String species) throws CoserBusinessException {
+
+ File result = null;
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebMapsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone) && rsufiResult.isMapsResult()) {
+ // get survey name (other condition)
+ String surveyName = projectService.getProjectSurveyName(resultFile, rsufiResult);
+
+ String mapName = null;
+ if (species != null) {
+ mapName = surveyName + "_" + species.toUpperCase() + ".png";
+ }
+ else {
+ mapName = surveyName + "_Repartition-stations.png";
+ }
+
+ File mapsDirectory = new File(resultFile, CoserConstants.STORAGE_MAPS_DIRECTORY);
+ result = new File(mapsDirectory, mapName);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Genere un fichier zip des sources d'un projet.
+ *
+ * Contient:
+ * <ul>
+ * <li>les 4 fichiers apres sélection
+ * <li>un fichier de décharge (pdf)
+ * </ul>
+ *
+ * @param zone zone (zoneid-surveyname)
+ * @param locale locale
+ * @return zip source file (auto delete when jvm shutdown)
+ * @throws CoserBusinessException
+ */
+ public File getSourceZip(String zone, Locale locale) throws CoserBusinessException {
+
+ File result = null;
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.getZone() != null && rsufiResult.getZone().equals(zone)) {
+
+ // load project (with data to get original file names)
+ Project project = projectService.openProject(projectFile.getName(), projectsDirectory);
+
+ // load selection data (to do data export rsufi)
+ Selection selection = project.getSelections().get(selectionFile.getName());
+
+ // be sure that data are available for this project
+ // or it will fail
+ projectService.loadSelectionData(projectsDirectory, project, selection);
+
+ result = generateSourceZip(project, selection, resultFile, rsufiResult, locale);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Generate zip for selection.
+ *
+ * Be sure that data are available for this project.
+ *
+ * @param project project
+ * @param selection selection with loaded data
+ * @param resultDirectory rsufi result directory
+ * @param rSufiResult rsufi result
+ * @param locale generated pdf locale
+ * @return generated zip file (auto delete when jvm shutdown)
+ * @throws CoserBusinessException
+ */
+ protected File generateSourceZip(Project project, Selection selection, File resultDirectory,
+ RSufiResult rSufiResult, Locale locale) throws CoserBusinessException {
+
+ if (!rSufiResult.isDataAllowed()) {
+ throw new CoserBusinessException("Can't download source for non allowed result");
+ }
+
+ File resultZip = null;
+
+ try {
+ File tempDir = FileUtil.createTempDirectory("coser-source-", "-tmp");
+
+ // il ne faut pas les fichiers de selection, mais leurs
+ // export rsufi (sans les lignes, et les quotes)
+ File archiveDir = projectService.extractRSUfiData(project, selection, tempDir, true);
+
+ // add decharge file
+ String filename = null;
+ if (locale != null && "fr".equals(locale.getLanguage())) {
+ filename = "DechargeDonnees.pdf";
+ } else if (locale != null && "es".equals(locale.getLanguage())) {
+ filename = "DatosDeExencionDeResponsabilidad.pdf";
+ } else {
+ filename = "DataDisclaimer.pdf";
+ }
+ File dechargePDF = new File(archiveDir, filename);
+ generateDechargePDF(dechargePDF, resultDirectory, rSufiResult, locale);
+
+ // ajout du reftax dans le zip
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File projectDirectory = new File(projectsDirectory, project.getName());
+ File reftaxFile = new File(projectDirectory, CoserConstants.Category.REFTAX_SPECIES.getStorageFileName());
+ FileUtils.copyFileToDirectory(reftaxFile, archiveDir);
+
+ // make zip
+ resultZip = File.createTempFile("coser-source-", ".zip");
+ resultZip.deleteOnExit();
+ ZipUtil.compress(resultZip, archiveDir);
+
+ // clean directory
+ FileUtils.deleteDirectory(tempDir);
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't create zip file", ex);
+ }
+
+ return resultZip;
+ }
+
+ /**
+ * Genere le PDF dynamique de decharge à partir du template freemarker.
+ *
+ * @param disclamerPdf pdf file to generate
+ * @param resultDirectory rsufi result directory
+ * @param rSufiResult rsufi result
+ * @param locale generated pdf locale
+ * @return le fichier généré
+ * @throws CoserBusinessException
+ */
+ protected File generateDechargePDF(File disclamerPdf, File resultDirectory, RSufiResult rSufiResult, Locale locale) throws CoserBusinessException {
+
+ File result = null;
+
+ OutputStream os = null;
+
+ try {
+ // get some info to put into pdf
+ Date updateDate = getLastDataUpdateDate();
+
+ // il se peut que pour l'extraction un fichier de décharge ne soit
+ // pas généré pour une campagne en particulier
+ // on passe un nom vide a freemarker
+ String surveyName = "";
+ if (resultDirectory != null && rSufiResult != null) {
+ surveyName = projectService.getProjectSurveyName(resultDirectory, rSufiResult);
+ }
+
+ // render freemarker template
+ Template mapTemplate = freemarkerConfiguration.getTemplate("decharge.ftl", locale);
+
+ Map<String, Object> root = new HashMap<String, Object>();
+ root.put("updateDate", updateDate);
+ root.put("surveyName", surveyName);
+
+ Writer out = new StringWriter();
+ mapTemplate.process(root, out);
+ out.flush();
+
+ // get content as w3c document
+ Document document = CoserUtils.parseDocument(out.toString());
+
+ // render template output as pdf
+ os = new FileOutputStream(disclamerPdf);
+
+ ITextRenderer renderer = new ITextRenderer();
+ renderer.setDocument(document, null);
+ renderer.layout();
+ renderer.createPDF(os);
+
+ os.close();
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't generate decharge file", ex);
+ } catch (TemplateException ex) {
+ throw new CoserBusinessException("Can't generate decharge file", ex);
+ } catch (DocumentException ex) {
+ throw new CoserBusinessException("Can't generate decharge file", ex);
+ } finally {
+ IOUtils.closeQuietly(os);
+ }
+
+ return result;
+ }
+
+ /**
+ * Genere le fichier PDF d'information sur les espèces incluses dans les
+ * calculs des indicateurs de communautés, à jointe à chaque téléchargement.
+ *
+ * @param project project
+ * @param selection selection
+ * @param resultDirectory result directory
+ * @param rsufiResult rsufi result
+ * @param indicator indicator
+ * @param locale locale
+ * @return generated pdf file
+ * @throws CoserBusinessException
+ */
+ protected File generateMetaFilePDF(Project project, Selection selection, File resultDirectory,
+ RSufiResult rsufiResult, String indicator, Locale locale) throws CoserBusinessException {
+
+ File result = null;
+
+ // chargement du reftax et des code types especes pour connaitre
+ // le type des especes de poissons
+ // parcourt du fichier des types de données
+ Map<String, Integer> refTaxSpeciesNumSys = new HashMap<String, Integer>();
+ Map<String, String> refTaxSpeciesName = new HashMap<String, String>();
+ Iterator<String[]> itReftax = project.getRefTaxSpecies().iterator(true);
+ while (itReftax.hasNext() ) {
+ String[] tuple = itReftax.next();
+ // "C_Perm","NumSys","NivSys","C_VALIDE","L_VALIDE","AA_VALIDE","C_TxP\u00E8re","Taxa"
+ String speciesCode = tuple[3];
+ Integer iNumSys = Integer.valueOf(tuple[1]);
+ refTaxSpeciesNumSys.put(speciesCode, iNumSys);
+
+ // fix html entities bug
+ String speciesSciName = StringEscapeUtils.escapeXml(tuple[4]);
+ String speciesAuthor = StringEscapeUtils.escapeXml(tuple[5]);
+
+ // TODO little hack for italic species
+ refTaxSpeciesName.put(speciesCode, "<span style='font-style:italic'>" + speciesSciName + "</span> " + speciesAuthor);
+ }
+
+ // code type / especes
+ Map<String, Integer[]> specyTypes = new HashMap<String, Integer[]>();
+ Iterator<String[]> itTypeSpecies = project.getTypeEspeces().iterator(true);
+ while (itTypeSpecies.hasNext()) {
+ // "Types";"Commentaire";"NumSys min";"NumSys max","Code"
+ String[] tuple = itTypeSpecies.next();
+ String specyTypeCode = tuple[4];
+
+ Integer iMinNumSys = Integer.valueOf(tuple[2]);
+ Integer iMaxNumSys = Integer.valueOf(tuple[3]);
+ specyTypes.put(specyTypeCode, new Integer[]{iMinNumSys, iMaxNumSys});
+ }
+
+ // le fichier estpopind
+ File estComIndFile = new File(resultDirectory, rsufiResult.getEstComIndName());
+
+ // donnees intermediare (map liste id > liste des indicateurs)
+ Map<String, SortedSet<String>> indicatorMap = new HashMap<String, SortedSet<String>>();
+
+ // le resutat sera une map complexe
+ // map liste id > liste des especes (nom complet)
+ Map<String, SortedSet<String>> speciesMap = new HashMap<String, SortedSet<String>>();
+
+ IndicatorMap indicatorsMap = getIndicatorsMap();
+
+ // Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+ DataStorage dataStorage = commonService.loadCSVFile(estComIndFile, CoserConstants.CSV_RESULT_SEPARATOR_CHAR);
+ Iterator<String[]> estComIndIterator = dataStorage.iterator(true);
+ while (estComIndIterator.hasNext()) {
+ String[] tuple = estComIndIterator.next();
+
+ String indicatorCode = tuple[1];
+ String listIdCode = tuple[2]; // c1, p2, T3 ...
+
+ String listNumber = listIdCode.substring(1); // 1, 2, 3
+
+ // get indicator list
+ SortedSet<String> indicatorList = indicatorMap.get(listNumber);
+ if (indicatorList == null) {
+ indicatorList = new TreeSet<String>();
+ indicatorMap.put(listNumber, indicatorList);
+ }
+
+ // get indicator full name
+ String indicatorName = indicatorsMap.getIndicatorValue(indicatorCode, locale.getLanguage());
+// String indicatorName = getIndicatorValue(indicatorCode, locale.getLanguage());
+ // peut arriver pour les indicateurs inconnu par coser
+ if (indicatorName != null) {
+ indicatorList.add(indicatorName);
+ }
+ }
+
+ // seconde pass, remplit la map speciesMap avec les listes configurées
+ // dans la selection
+ for (String listNumber : indicatorMap.keySet()) {
+ List<String> selectionSpeciesList = null;
+ if ("1".equals(listNumber)) {
+ selectionSpeciesList = selection.getSelectedSpecies();
+ }
+ else if ("2".equals(listNumber)) {
+ selectionSpeciesList = selection.getSelectedSpeciesOccDens();
+ }
+ else if ("3".equals(listNumber)) {
+ selectionSpeciesList = selection.getSelectedSpeciesSizeAllYear();
+ }
+ else if ("4".equals(listNumber)) {
+ selectionSpeciesList = selection.getSelectedSpeciesMaturity();
+ }
+
+ if (selectionSpeciesList != null) {
+ SortedSet<String> speciesList = new TreeSet<String>();
+
+ for (String speciesCode : selectionSpeciesList) {
+ // get species full name
+ String speciesName = refTaxSpeciesName.get(speciesCode);
+
+ // recupere le code type de l'espece, "m", "c", "p" ...
+ Integer speciesNumSys = refTaxSpeciesNumSys.get(speciesCode);
+ for (Map.Entry<String, Integer[]> speciesTypeEntry : specyTypes.entrySet()) {
+ String speciesTypeCode = speciesTypeEntry.getKey();
+ Integer[] bound = speciesTypeEntry.getValue();
+
+ if (speciesNumSys >= bound[0] && speciesNumSys <= bound[1]) {
+ speciesName = "(" + speciesTypeCode + ") " + speciesName;
+ break;
+ }
+ }
+ // end code type espece
+
+ speciesList.add(speciesName);
+ }
+ speciesMap.put(listNumber, speciesList);
+ }
+ else {
+ if (log.isWarnEnabled()) {
+ log.warn("Can't get species list for list id " + listNumber);
+ }
+ }
+ }
+
+ OutputStream os = null;
+ try {
+ // render freemarker template
+ Template mapTemplate = freemarkerConfiguration.getTemplate("metainfo.ftl", locale);
+
+ Map<String, Object> root = new HashMap<String, Object>();
+ root.put("indicatorsMap", indicatorMap);
+ root.put("speciesMap", speciesMap);
+
+ Writer out = new StringWriter();
+ mapTemplate.process(root, out);
+ out.flush();
+
+ // get content as w3c document
+ Document document = CoserUtils.parseDocument(out.toString());
+
+ // render template output as pdf
+ result = File.createTempFile("coser-metainfo-", ".pdf");
+ result.deleteOnExit();
+ os = new FileOutputStream(result);
+
+ ITextRenderer renderer = new ITextRenderer();
+ renderer.setDocument(document, null);
+ renderer.layout();
+ renderer.createPDF(os);
+
+ os.close();
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't generate meta info file", ex);
+ } catch (TemplateException ex) {
+ throw new CoserBusinessException("Can't generate meta info file", ex);
+ } catch (DocumentException ex) {
+ throw new CoserBusinessException("Can't generate meta info file", ex);
+ } finally {
+ IOUtils.closeQuietly(os);
+ }
+
+ return result;
+ }
+
+ /**
+ * Recupere dans le repertoire des projets d'indicateur les resultats
+ * disponible par zone (il ne peut y en avoir qu'un par zone).
+ *
+ * @return une map avec par zone, son resultat associé (ProjectName/SelectionName)
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getIndicatorsResultsPerZone() throws CoserBusinessException {
+ return getResultsPerZone(config.getWebIndicatorsProjectsDirectory());
+ }
+
+ /**
+ * Recupere dans le repertoire des projets d'indicateur les resultats
+ * disponible par zone (il ne peut y en avoir qu'un par zone).
+ *
+ * @return une map avec par zone, son resultat associé (ProjectName/SelectionName)
+ * @throws CoserBusinessException
+ */
+ public Map<String, String> getMapsResultsPerZone() throws CoserBusinessException {
+ return getResultsPerZone(config.getWebMapsProjectsDirectory());
+ }
+
+ /**
+ * Recupere dans le repertoire des projets d'indicateur les resultats
+ * disponible par zone (il ne peut y en avoir qu'un par zone).
+ *
+ * @param scanDirectory le repertoire a scanner
+ * @return une map avec par zone, son resultat associé (ProjectName/SelectionName/RSUfiName)
+ * @throws CoserBusinessException
+ */
+ protected Map<String, String> getResultsPerZone(File scanDirectory) throws CoserBusinessException {
+
+ Map<String, String> resultIds = new HashMap<String, String>();
+ File[] projectFiles = scanDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+ String resultResultId = rsufiResult.getZone();
+ String name = projectFile.getName() + "/" + selectionFile.getName()
+ + "/" + resultFile.getName();
+ resultIds.put(resultResultId, name);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return resultIds;
+ }
+
+ /**
+ * Supprime des résultats par leur identifiant de zone de ratachement (car
+ * un seul resultat par zone).
+ *
+ * Utilisé par l'interface d'admin.
+ * @param deleteZoneId
+ * @throws CoserBusinessException
+ */
+ public void deleteIndicatorsResult(List<String> deleteZoneId) throws CoserBusinessException {
+ cleanCurrentProjectDirectory(config.getWebIndicatorsProjectsDirectory(), deleteZoneId);
+ }
+
+ /**
+ * Supprime des résultats par leur identifiant de zone de ratachement (car
+ * un seul resultat par zone).
+ *
+ * Utilisé par l'interface d'admin.
+ * @param deleteZoneId
+ * @throws CoserBusinessException
+ */
+ public void deleteMapsResult(List<String> deleteZoneId) throws CoserBusinessException {
+ cleanCurrentProjectDirectory(config.getWebMapsProjectsDirectory(), deleteZoneId);
+ }
+
+// /**
+// * Extrait de toutes les données les informations demandées restreintes
+// * sur certaines zone, certaines espèces et certains indicateurs.
+// *
+// * Ajout en plus dans le zip les cartes, les sources... suivant les
+// * types selectionnés.
+// *
+// * @param zones zones
+// * @param types types
+// * @param species species
+// * @param comIndicators indicators
+// * @param popIndicators indicators
+// * @return le zip
+// * @since 1.4
+// */
+// public File extractData(List<String> zones, List<DataType> types, List<String> species,
+// List<String> comIndicators, List<String> popIndicators, Locale locale) throws CoserBusinessException {
+//
+// File resultZip = null;
+// File tempDir = null;
+// try {
+// tempDir = FileUtil.createTempDirectory("coser-extract-", "-tmp");
+//
+// File subDir = new File(tempDir, "Indicateurs_Ifremer");
+// subDir.mkdirs();
+//
+// // les sources se retrouve dans le zip a cote du pdf
+// if (types.contains(DataType.SOURCE)) {
+// if (log.isDebugEnabled()) {
+// log.debug("Extracting sources");
+// }
+// File srcDir = new File(subDir, "sources");
+// extractSource(zones, srcDir);
+// }
+//
+// // les cartes doivent se retrouver dans le pdf
+// MultiKeyMap pdfMaps = null;
+// if (types.contains(DataType.MAP)) {
+// if (log.isDebugEnabled()) {
+// log.debug("Extracting maps");
+// }
+// pdfMaps = extractDataMap(zones, species);
+// }
+//
+// // les graphiques sont également dans le pdf
+// MultiKeyMap pdfCharts = null;
+// if (CollectionUtils.isNotEmpty(comIndicators) || CollectionUtils.isNotEmpty(popIndicators)) {
+// if (log.isDebugEnabled()) {
+// log.debug("Extracting charts");
+// }
+// pdfCharts = extractCharts(zones, species, comIndicators, popIndicators, locale);
+// }
+//
+// // generate pdf if necessary
+// if (MapUtils.isNotEmpty(pdfMaps) || MapUtils.isNotEmpty(pdfCharts)) {
+// generateExtractPDF(subDir, zones, pdfMaps, pdfCharts, locale);
+// }
+//
+// // fichier de décharge en pdf
+// String filename = null;
+// if (locale != null && "fr".equals(locale.getLanguage())) {
+// filename = "DechargeDonnees.pdf";
+// } else if (locale != null && "es".equals(locale.getLanguage())) {
+// filename = "DatosDeExencionDeResponsabilidad.pdf";
+// } else {
+// filename = "DataDisclaimer.pdf";
+// }
+// File dechargePDF = new File(subDir, filename);
+// generateDechargePDF(dechargePDF, null, null, locale);
+//
+// // make zip
+// resultZip = File.createTempFile("coser-extract-", ".zip");
+// resultZip.deleteOnExit();
+// ZipUtil.compress(resultZip, subDir);
+//
+// // clean directory
+// FileUtils.deleteDirectory(tempDir);
+// } catch (IOException ex) {
+// throw new CoserBusinessException("Can't create zip file", ex);
+// } finally {
+// // clean directory
+// FileUtils.deleteQuietly(tempDir);
+// }
+// return resultZip;
+// }
+
+ /**
+ * Extrait les cartes.
+ *
+ * @param zones zones (zoneid)
+ * @param species species
+ * @return map file (zone/speciesname/mapfile)
+ * @throws CoserBusinessException
+ * @throws IOException
+ * @since 1.4
+ */
+ protected MultiKeyMap extractDataMap(Collection<String> zones, Collection<String> species) throws CoserBusinessException, IOException {
+
+ MultiKeyMap mapForZoneAndSpecies = new MultiKeyMap();
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebMapsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.isMapsResult() && zones.contains(rsufiResult.getZone())) {
+
+ // load project (to get user display species name)
+ Project project = projectService.openProject(projectFile.getName(), projectsDirectory);
+
+ // get survey name (other condition)
+ String surveyName = projectService.getProjectSurveyName(resultFile, rsufiResult);
+
+ File mapsDirectory = new File(resultFile, CoserConstants.STORAGE_MAPS_DIRECTORY);
+ for (String aSpecies : species) {
+ String mapName = surveyName + "_" + aSpecies.toUpperCase() + ".png";
+ File mapFile = new File(mapsDirectory, mapName);
+ if (mapFile.isFile()) {
+ String speciesName = project.getDisplaySpeciesText(aSpecies);
+ mapForZoneAndSpecies.put(rsufiResult.getZone(), speciesName, mapFile);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return mapForZoneAndSpecies;
+ }
+
+ /**
+ * Genere un fichier zip des sources d'un projet.
+ *
+ * Contient:
+ * <ul>
+ * <li>les 4 fichiers apres sélection
+ * </ul>
+ *
+ * @param zones zone (zoneid-surveyname)
+ * @return zip source file (auto delete when jvm shutdown)
+ * @throws CoserBusinessException
+ * @since 1.4
+ */
+ protected File extractSource(Collection<String> zones, File directory) throws CoserBusinessException {
+
+ File result = null;
+
+ // parcours des resultats disponibles
+ File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+ File[] projectFiles = projectsDirectory.listFiles();
+ if (projectFiles != null) {
+ for (File projectFile : projectFiles) {
+ if (projectFile.isDirectory()) {
+ File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+ File[] selectionFiles = selectionsDirectory.listFiles();
+
+ // selection iteration
+ if (selectionFiles != null) {
+ for (File selectionFile : selectionFiles) {
+ if (selectionFile.isDirectory()) {
+ File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+ File[] resultFiles = resultsDirectory.listFiles();
+
+ // result iteration
+ if (resultFiles != null) {
+ for (File resultFile : resultFiles) {
+ if (resultFile.isDirectory()) {
+ RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+
+ // extraction des especes pour le résultat demandé
+ if (rsufiResult.isDataAllowed() && zones.contains(rsufiResult.getZone())) {
+
+ // load project (with data to get original file names)
+ Project project = projectService.openProject(projectFile.getName(), projectsDirectory);
+
+ // load selection data (to do data export rsufi)
+ Selection selection = project.getSelections().get(selectionFile.getName());
+
+ // be sure that data are available for this project
+ // or it will fail
+ projectService.loadSelectionData(projectsDirectory, project, selection);
+
+ // il ne faut pas les fichiers de selection, mais leurs
+ // export rsufi (sans les lignes, et les quotes)
+ File zoneDirectory = new File(directory, rsufiResult.getZone());
+ zoneDirectory.mkdirs();
+ projectService.extractRSUfiData(project, selection, zoneDirectory, true);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+// /**
+// * Retourne les indicateurs calculés avec leurs traductions scientifique
+// * pour la zone et l'especes souhaitées.
+// *
+// * @param zones zones
+// * @param species especes (if {@code null} look for com indicators
+// * @param comIndicators comIndicators
+// * @param popIndicators popIndicators
+// * @param locale locale
+// * @return la liste des indicateurs (zone, speciesname, [graphfile, graphdata])
+// * @throws CoserBusinessException
+// */
+// protected MultiKeyMap extractCharts(Collection<String> zones, Collection<String> species,
+// Collection<String> comIndicators, Collection<String> popIndicators, Locale locale) throws CoserBusinessException {
+//
+// MultiKeyMap chartFileAndDatas = new MultiKeyMap();
+//
+// // parcours des resultats disponibles
+// File projectsDirectory = config.getWebIndicatorsProjectsDirectory();
+// File[] projectFiles = projectsDirectory.listFiles();
+// if (projectFiles != null) {
+// for (File projectFile : projectFiles) {
+// if (projectFile.isDirectory()) {
+// File selectionsDirectory = new File(projectFile, CoserConstants.STORAGE_SELECTION_DIRECTORY);
+// File[] selectionFiles = selectionsDirectory.listFiles();
+//
+// // selection iteration
+// if (selectionFiles != null) {
+// for (File selectionFile : selectionFiles) {
+// if (selectionFile.isDirectory()) {
+// File resultsDirectory = new File(selectionFile, CoserConstants.STORAGE_RESULTS_DIRECTORY);
+// File[] resultFiles = resultsDirectory.listFiles();
+//
+// // result iteration
+// if (resultFiles != null) {
+// for (File resultFile : resultFiles) {
+// if (resultFile.isDirectory()) {
+// RSufiResult rsufiResult = projectService.getRSufiResult(resultFile);
+//
+// // extraction des especes pour le résultat demandé
+// if (zones.contains(rsufiResult.getZone())) {
+//
+// if (log.isDebugEnabled()) {
+// log.debug("Extracting charts for result " + resultFile);
+// }
+//
+// // load project (without data to get reftax data)
+// Project project = projectService.openProject(projectFile.getName(), projectsDirectory);
+// String zone = rsufiResult.getZone();
+//// String zoneDisplayName = getZoneFullName(zone);
+// String zoneDisplayName = getZonesMap().getZoneFullName(zone);
+//
+// // le fichier contenant le code type espece (utile
+// // pour les traductions des list d'indicateur)
+// File codeTypeEspecesFile = new File(projectFile, CoserConstants.Category.TYPE_ESPECES.getStorageFileName());
+//
+// if (CollectionUtils.isNotEmpty(comIndicators)) {
+// Map<String, Object[]> chartFileAndDataCom = publicationService.getRsufiResultComCharts(project,
+// resultFile, rsufiResult, codeTypeEspecesFile, comIndicators,
+// zoneDisplayName, getIndicatorsMap(), locale, 650, 430);
+// // put in multimap as zone,speciesname, data
+// for (Entry<String, Object[]> entry : chartFileAndDataCom.entrySet()) {
+// chartFileAndDatas.put(zone, entry.getKey(), entry.getValue());
+// }
+// }
+//
+// if (CollectionUtils.isNotEmpty(popIndicators)) {
+// Map<String, Object[]> chartFileAndDataPop = publicationService.getRsufiResultPopCharts(project,
+// resultFile, rsufiResult, species, popIndicators,
+// zoneDisplayName, getIndicatorsMap(), locale, 650, 430);
+// // put in multimap as zone,speciesname, data
+// for (Entry<String, Object[]> entry : chartFileAndDataPop.entrySet()) {
+// chartFileAndDatas.put(zone, entry.getKey(), entry.getValue());
+// }
+// }
+// }
+// }
+// }
+// }
+// }
+// }
+// }
+// }
+// }
+// }
+//
+// return chartFileAndDatas;
+// }
+
+ /**
+ * Generate pdf file filled with maps and charts.
+ *
+ * @param directory directory to generate pdf to
+ * @param zones zones ids
+ * @param pdfMaps pdf maps (can be {@code null})
+ * @param pdfCharts pdf charts (can be {@code null})
+ * @throws CoserBusinessException
+ */
+ protected void generateExtractPDF(File directory, List<String> zones,
+ MultiKeyMap pdfMaps, MultiKeyMap pdfCharts, Locale locale) throws CoserBusinessException {
+
+ for (String zone : zones) {
+ Collection<File> toDelete = new ArrayList<File>();
+ OutputStream os = null;
+
+ try {
+ StringBuilder htmlContent = new StringBuilder();
+ htmlContent.append("<html><head>");
+ htmlContent.append("<title>" + l(locale, "coser.business.extract.extracttitle")+ "</title>");
+ htmlContent.append("<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />");
+ htmlContent.append("</head><body>");
+
+ if (pdfMaps != null) {
+ for (Entry<MultiKey, File> mapEntry : (Set<Entry<MultiKey, File>>)pdfMaps.entrySet()) {
+ String zoneId = (String)mapEntry.getKey().getKey(0);
+ if (zoneId.equals(zone)) {
+ String speciesName = (String)mapEntry.getKey().getKey(1);
+ File file = mapEntry.getValue();
+
+// String zoneName = getZoneFullName(zoneId);
+ String zoneName = getZonesMap().getZoneFullName(zoneId);
+ htmlContent.append("<div style='page-break-after: always'>");
+ htmlContent.append("<p>" + zoneName + " - " + speciesName + "</p>");
+ htmlContent.append("<img src='file://" + file.getAbsolutePath() + "' />");
+ htmlContent.append("</div>");
+ }
+ }
+ }
+
+ if (pdfCharts != null) {
+ for (Entry<MultiKey, Object[]> chartFileAndData : (Set<Entry<MultiKey, Object[]>>)pdfCharts.entrySet()) {
+ String zoneId = (String)chartFileAndData.getKey().getKey(0);
+ if (zoneId.equals(zone)) {
+ File chartFile = (File)chartFileAndData.getValue()[0];
+ String content = (String)chartFileAndData.getValue()[1];
+
+ htmlContent.append("<div style='page-break-after: always'>");
+ htmlContent.append("<img src='file://" + chartFile.getAbsolutePath() + "' />");
+ htmlContent.append("<br />");
+ htmlContent.append(l(locale, "coser.business.extract.extractdata") + " :");
+ htmlContent.append("<pre>").append(content).append("</pre>");
+ htmlContent.append("</div>");
+
+ // les graphiques ont été générés, a supprimer donc
+ // a ne surtout pas faire avec les cartes !!!
+ toDelete.add(chartFile);
+ }
+ }
+ }
+
+ htmlContent.append("</body></html>");
+
+ // get content as w3c document
+ Document document = CoserUtils.parseDocument(htmlContent.toString());
+
+ // render template output as pdf
+ // remove accents and strange characters from zone display name
+// String zoneDisplay = getZoneFullName(zone);
+ String zoneDisplay = getZonesMap().getZoneFullName(zone);
+ zoneDisplay = StringUtils.stripAccents(zoneDisplay);
+ zoneDisplay = zoneDisplay.replaceAll("[^\\w- ]", "_");
+ File pdfFile = new File(directory, zoneDisplay + ".pdf");
+ os = new FileOutputStream(pdfFile);
+
+ ITextRenderer renderer = new ITextRenderer();
+ renderer.setDocument(document, null);
+ renderer.layout();
+ renderer.createPDF(os);
+
+ os.close();
+ } catch (IOException ex) {
+ throw new CoserBusinessException("Can't generate log pdf", ex);
+ } catch (DocumentException ex) {
+ throw new CoserBusinessException("Can't generate log pdf", ex);
+ } finally {
+ IOUtils.closeQuietly(os);
+
+ // delete file collection
+ for (File file : toDelete) {
+ file.delete();
+ }
+ }
+ }
+ }
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService2.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/services/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/storage/DataStorage.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/main/java/fr/ifremer/coser/storage/DataStorages.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/storage/DataStorages.java (rev 0)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/storage/DataStorages.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,163 @@
+package fr.ifremer.coser.storage;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import au.com.bytecode.opencsv.CSVReader;
+import fr.ifremer.coser.CoserConstants;
+import fr.ifremer.coser.CoserTechnicalException;
+import fr.ifremer.coser.services.CommonService;
+import org.apache.commons.io.IOUtils;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
+
+import static org.nuiton.i18n.I18n.t;
+
+/**
+ * Useful methods around {@link DataStorage}.
+ * <p/>
+ * TODO Should move here all others methods storage-centric from {@link CommonService}.
+ * <p/>
+ * Created on 3/7/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class DataStorages {
+
+ /**
+ * Load a csv file using the default csv char separator
+ * ({@link CoserConstants#CSV_SEPARATOR_CHAR}).
+ *
+ * @param file file to load
+ * @return data storage with file content
+ */
+ public static DataStorage load(File file) {
+ return load(file, CoserConstants.CSV_SEPARATOR_CHAR);
+ }
+
+ /**
+ * Load a csv file using the given csv char separator.
+ *
+ * @param file file to load
+ * @param separator separator to use to load file
+ * @return data storage with file content
+ */
+ public static DataStorage load(File file, char separator) {
+
+ DataStorage content = new MemoryDataStorage();
+
+ CSVReader csvReader = null;
+ try {
+
+ InputStream stream = new FileInputStream(file);
+ Reader reader = new BufferedReader(new InputStreamReader(stream, CoserConstants.CSV_FILE_ENCODING));
+ csvReader = new CSVReader(reader, separator);
+
+ // check header
+ String[] line = csvReader.readNext();
+ if (line == null || line.length <= 1) {
+ throw new CoserTechnicalException(t("Can't read file '%s'. Check CSV file separator",
+ file.getAbsolutePath()));
+ } else {
+ content.add(line);
+ }
+
+ while ((line = csvReader.readNext()) != null) {
+ if (line.length > 1) {
+ content.add(line);
+ }
+ }
+ } catch (IOException ex) {
+ throw new CoserTechnicalException("Can't read file", ex);
+ } finally {
+ IOUtils.closeQuietly(csvReader);
+ }
+
+ return content;
+ }
+
+ /**
+ * Save a datastorage to a file and return its.
+ * <p/>
+ * The file is temporary file (will be deleted at the end life of the jvm),
+ * his name is generated then using the {@link File#createTempFile(String, String)} using the given {@code prefix}
+ * and {@code suffix}.
+ *
+ * @param prefix prefix of generated file name
+ * @param suffix suffix of generated file name
+ * @param dataStorage the storage to save
+ * @return the file where the storage was saved
+ */
+ public static File save(String prefix, String suffix, DataStorage dataStorage) throws CoserTechnicalException {
+
+ File file;
+ try {
+ file = File.createTempFile(prefix, suffix);
+ } catch (IOException e) {
+ throw new CoserTechnicalException("Could not create temp file", e);
+ }
+ file.deleteOnExit();
+ Writer writer = null;
+ try {
+ writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), CoserConstants.CSV_FILE_ENCODING));
+
+ for (String[] contentDatas : dataStorage) {
+ // start at 1 to not output "line" column
+ for (int i = 1; i < contentDatas.length; i++) {
+
+ if (i != 1) {
+ writer.write(CoserConstants.CSV_SEPARATOR_CHAR);
+ }
+
+ String contentData = contentDatas[i];
+
+ if (contentData.indexOf(CoserConstants.CSV_SEPARATOR_CHAR) > -1) {
+ writer.write("\"" + contentData + "\"");
+ } else {
+ writer.write(contentData);
+ }
+ }
+ writer.write("\n");
+ }
+ writer.close();
+ } catch (IOException ex) {
+ throw new CoserTechnicalException("Can't save data", ex);
+ } finally {
+ IOUtils.closeQuietly(writer);
+ }
+ return file;
+ }
+
+}
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/storage/DataStorages.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/storage/MemoryDataStorage.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/storage/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/util/Coordinate.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/util/DataType.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/util/InputStreamKnownSizeBody.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/util/ProgressMonitor.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/util/ProgressReader.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/util/ProgressStream.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/util/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/validators/AbstractFieldValidator.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/validators/CoserCheckDoubleValidator.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/validators/CoserDoubleValidator.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/validators/CoserExpressionValidator.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/validators/RegexFieldValidator.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/validators/package-info.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/ftl/decharge_en.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/ftl/decharge_fr.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/ftl/map.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/ftl/metainfo_en.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/ftl/metainfo_fr.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties
===================================================================
--- trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -158,6 +158,7 @@
coser.config.selection.occurrenceFilter.description=Default occurrence filter value
coser.config.smtp.host.description=SMTP host address
coser.config.validator.directory.description=Controls files directory location
+coser.config.web.echobase.projects.directory.description=Web echobase projects storage directory
coser.config.web.frontend.description=Coser server url
coser.config.web.indicators.file.description=Indicators match file
coser.config.web.indicators.projects.directory.description=Web indicators projects storage directory
Property changes on: trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties
===================================================================
--- trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -158,6 +158,7 @@
coser.config.selection.occurrenceFilter.description=Filtre par défaut sur la moyenne des occurrences
coser.config.smtp.host.description=Adresse du serveur SMTP pour envoyer les mails
coser.config.validator.directory.description=Emplacement des fichiers de contrôles
+coser.config.web.echobase.projects.directory.description=Dossier de stockage des projets echobase pour le Web
coser.config.web.frontend.description=Adresse du serveur web coser
coser.config.web.indicators.file.description=Fichier de correspondance des indicateurs
coser.config.web.indicators.projects.directory.description=Dossier de stockage des projets indicateurs pour le Web
Property changes on: trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Catch-error-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-error-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-fatal-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Haul-warning-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Length-error-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/validators/fr/ifremer/coser/data/Strata-error-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/main/resources/validators.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/CoserUtilsTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/java/fr/ifremer/coser/bean/IndicatorMapTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/bean/IndicatorMapTest.java (rev 0)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/bean/IndicatorMapTest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,56 @@
+package fr.ifremer.coser.bean;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.services.CoserTestAbstract;
+import org.apache.commons.collections4.map.MultiKeyMap;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class IndicatorMapTest extends CoserTestAbstract {
+
+ @Override
+ public void initProjectDatabase() {
+ // no project to init
+ }
+
+
+ /**
+ * Test de lecture du fichier des indicateurs des resources de test.
+ */
+ @Test
+ public void getIndicators() {
+ IndicatorMap indicatorMap = new IndicatorMap(config.getWebIndicatorsFile());
+ MultiKeyMap<String, String> map = indicatorMap.getMap();
+ Assert.assertNotNull(map);
+ Assert.assertEquals(200, map.size());
+ }
+}
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/bean/IndicatorMapTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/java/fr/ifremer/coser/bean/ZoneMapTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/bean/ZoneMapTest.java (rev 0)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/bean/ZoneMapTest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,55 @@
+package fr.ifremer.coser.bean;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.services.CoserTestAbstract;
+import fr.ifremer.coser.storage.DataStorage;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class ZoneMapTest extends CoserTestAbstract {
+
+ @Override
+ public void initProjectDatabase() {
+ // no project to init
+ }
+
+ /**
+ * Test de lecture du fichier de zones de resources de test.
+ */
+ @Test
+ public void getZones() {
+ ZoneMap zoneMap = new ZoneMap(config.getWebZonesFile());
+ DataStorage zones = zoneMap.getStorage();
+ Assert.assertNotNull(zones);
+ Assert.assertEquals(25, zones.size());
+ }
+}
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/bean/ZoneMapTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProviderTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProviderTest.java (rev 0)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProviderTest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,59 @@
+package fr.ifremer.coser.result.repository.echobase;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.services.CoserTestAbstract;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Set;
+
+/**
+ * Created on 3/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class EchoBaseResultRepositoryProviderTest extends CoserTestAbstract {
+
+ @Override
+ public void initProjectDatabase() throws IOException {
+ copyDirectoryContent("src.test.resources.web.echobaseprojects", config.getWebEchobaseProjectsDirectory());
+ }
+
+ @Test
+ public void loadRepositories() throws Exception {
+
+ File basedir = config.getWebEchobaseProjectsDirectory();
+
+ EchoBaseResultRepositoryProvider provider = new EchoBaseResultRepositoryProvider(config, basedir);
+
+ Set<EchoBaseResultRepository> resultRepositories = provider.loadRepositories();
+ Assert.assertNotNull(resultRepositories);
+ Assert.assertEquals(2, resultRepositories.size());
+ }
+}
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryProviderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryTest.java (rev 0)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryTest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,154 @@
+package fr.ifremer.coser.result.repository.echobase;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.result.request.CommunityIndicatorRequest;
+import fr.ifremer.coser.result.request.MapRequest;
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
+import fr.ifremer.coser.result.repository.echobase.EchoBaseResultRepository;
+import fr.ifremer.coser.result.repository.echobase.EchoBaseResultRepositoryProvider;
+import fr.ifremer.coser.services.CoserTestAbstract;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class EchoBaseResultRepositoryTest extends CoserTestAbstract {
+
+ protected EchoBaseResultRepository repository1;
+
+ protected EchoBaseResultRepository repository2;
+
+ @Override
+ public void initProjectDatabase() throws IOException {
+ File projectsDirectory = config.getWebEchobaseProjectsDirectory();
+ copyDirectoryContent("src.test.resources.web.echobaseprojects", projectsDirectory);
+
+ EchoBaseResultRepositoryProvider repositoryProvider = new EchoBaseResultRepositoryProvider(config, projectsDirectory);
+
+ Set<EchoBaseResultRepository> repositories = repositoryProvider.loadRepositories();
+
+ for (EchoBaseResultRepository repository : repositories) {
+ String projectName = repository.project.getName();
+ if ("project1".equals(projectName)) {
+ repository1 = repository;
+ } else if ("project2".equals(projectName)) {
+ repository2 = repository;
+ }
+ }
+ Assume.assumeTrue("Could not find repository named *project1*", repository1 != null);
+ Assume.assumeTrue("Could not find repository named *project2*", repository2 != null);
+ }
+
+ @Test
+ public void getAvailableZones() throws Exception {
+
+ // Map request
+
+ MapRequest mapRequest = new MapRequest();
+ mapRequest.setLocale(Locale.FRANCE);
+ mapRequest.setFacade("atlantique");
+
+ Map<String, String> availableZones;
+
+ availableZones = repository1.getAvailableZones(mapRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertEquals(1, availableZones.size());
+ Assert.assertTrue(availableZones.containsKey("gdgciem8"));
+ Assert.assertTrue(availableZones.containsValue("2000 > - Pelgas - La limite nord de la zone VIII du CIEM (48 °N) constitue aussi une limite de régions de la DCSMM"));
+
+ // pas de zones pour la facade
+ mapRequest.setFacade("mediteranee");
+ availableZones = repository1.getAvailableZones(mapRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertTrue(availableZones.isEmpty());
+
+ // facade inconnue
+ mapRequest.setFacade("mediteranee2");
+ availableZones = repository1.getAvailableZones(mapRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertTrue(availableZones.isEmpty());
+
+ // Population request
+
+ PopulationIndicatorRequest popRequest = new PopulationIndicatorRequest();
+ popRequest.setLocale(Locale.FRANCE);
+ popRequest.setFacade("atlantique");
+
+ availableZones = repository1.getAvailableZones(popRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertEquals(1, availableZones.size());
+ Assert.assertTrue(availableZones.containsKey("gdgciem8"));
+ Assert.assertTrue(availableZones.containsValue("2000 > - Pelgas - La limite nord de la zone VIII du CIEM (48 °N) constitue aussi une limite de régions de la DCSMM"));
+
+ // pas de zones pour la facade
+ popRequest.setFacade("mediteranee");
+ availableZones = repository1.getAvailableZones(popRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertTrue(availableZones.isEmpty());
+
+ // facade inconnue
+ popRequest.setFacade("mediteranee2");
+ availableZones = repository1.getAvailableZones(popRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertTrue(availableZones.isEmpty());
+
+ // Community request
+
+ CommunityIndicatorRequest comRequest = new CommunityIndicatorRequest();
+ comRequest.setLocale(Locale.FRANCE);
+ comRequest.setFacade("atlantique");
+
+ availableZones = repository1.getAvailableZones(comRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertEquals(1, availableZones.size());
+ Assert.assertTrue(availableZones.containsKey("gdgciem8"));
+ Assert.assertTrue(availableZones.containsValue("2000 > - Pelgas - La limite nord de la zone VIII du CIEM (48 °N) constitue aussi une limite de régions de la DCSMM"));
+
+ // pas de zones pour la facade
+ comRequest.setFacade("mediteranee");
+ availableZones = repository1.getAvailableZones(comRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertTrue(availableZones.isEmpty());
+
+ // facade inconnue
+ comRequest.setFacade("mediteranee2");
+ availableZones = repository1.getAvailableZones(comRequest);
+ Assert.assertNotNull(availableZones);
+ Assert.assertTrue(availableZones.isEmpty());
+ }
+
+}
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/echobase/EchoBaseResultRepositoryTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProviderTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProviderTest.java (rev 0)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProviderTest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,60 @@
+package fr.ifremer.coser.result.repository.legacy;
+
+/*
+ * #%L
+ * Coser :: Business
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin
+ * %%
+ * This program 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.
+ *
+ * This program 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 General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.coser.services.CoserTestAbstract;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Set;
+
+/**
+ * Created on 3/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class LegacyResultRepositoryProviderTest extends CoserTestAbstract {
+
+ @Override
+ public void initProjectDatabase() throws IOException {
+
+ copyDirectoryContent("src.test.resources.web.legacyprojects", config.getWebIndicatorsProjectsDirectory());
+ }
+
+ @Test
+ public void loadRepositories() throws Exception {
+
+ File basedir = config.getWebIndicatorsProjectsDirectory();
+
+ LegacyResultRepositoryProvider provider = new LegacyResultRepositoryProvider(config, basedir);
+
+ Set<LegacyResultRepository> resultRepositories = provider.loadRepositories();
+ Assert.assertNotNull(resultRepositories);
+ Assert.assertEquals(2, resultRepositories.size());
+ }
+}
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/result/repository/legacy/LegacyResultRepositoryProviderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/services/CommandServiceTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/services/CommonServiceTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/services/ControlServiceTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -46,6 +46,7 @@
import fr.ifremer.coser.CoserClassLoader;
import fr.ifremer.coser.CoserConstants.Category;
import fr.ifremer.coser.bean.Project;
+import org.nuiton.util.FileUtil;
/**
* Common coser test code.
@@ -77,9 +78,7 @@
public static void initConfig() throws IOException {
String tmpDir = System.getProperty("java.io.tmpdir");
testDirectory = new File(tmpDir, "coser");
- if (!testDirectory.isDirectory()) {
- testDirectory.mkdirs();
- }
+ FileUtil.createDirectoryIfNecessary(testDirectory);
config = new CoserBusinessConfig();
config.setDatabaseDirectory(testDirectory.getAbsolutePath());
@@ -103,19 +102,7 @@
@Before
public void initProjectDatabase() throws IOException {
FileUtils.cleanDirectory(config.getDatabaseDirectory());
- FileUtils.copyDirectory(new File("src" + File.separator +
- "test" + File.separator + "resources", "projects"),
- config.getProjectsDirectory(), new FileFilter() {
- @Override
- public boolean accept(File pathname) {
- boolean result = true;
- if (pathname.getAbsolutePath().indexOf(
- File.separator + ".svn") != -1) {
- result = false;
- }
- return result;
- }
- });
+ copyDirectoryContent("src.test.resources.projects", config.getProjectsDirectory());
}
/**
@@ -198,4 +185,20 @@
}
return localFile;
}
+
+ protected void copyDirectoryContent(String path, File target) throws IOException {
+ File basedir = new File(new File("").getAbsolutePath());
+ File source = FileUtil.getFileFromFQN(basedir, path);
+ FileFilter fileterWithNoSvn = new FileFilter() {
+ @Override
+ public boolean accept(File pathname) {
+ boolean result = true;
+ if (pathname.getAbsolutePath().contains(File.separator + ".svn")) {
+ result = false;
+ }
+ return result;
+ }
+ };
+ FileUtils.copyDirectory(source, target, fileterWithNoSvn);
+ }
}
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/services/CoserTestAbstract.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/services/PublicationServiceTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -94,7 +94,7 @@
@Test
public void testGetIndicators() throws CoserBusinessException {
MultiKeyMap indicators = webService.getIndicatorsMap();
- Assert.assertEquals(124, indicators.size());
+ Assert.assertEquals(200, indicators.size());
}
/**
@@ -105,7 +105,7 @@
@Test
public void testGetZones() throws CoserBusinessException {
DataStorage zones = webService.getZonesMap();
- Assert.assertEquals(24, zones.size());
+ Assert.assertEquals(25, zones.size());
}
/**
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/java/fr/ifremer/coser/storage/MemoryDataStorageTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/resources/csv/badformat/capturesbadseparator.csv
===================================================================
--- trunk/coser-business/src/test/resources/csv/badformat/capturesbadseparator.csv 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/csv/badformat/capturesbadseparator.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,6 +1,6 @@
-Campagne,Annee,Trait,Espece,Nombre,Poids
-IBTS,1983,SWE1ARG6,CALMMAC,4.00,0.100000001490116
-IBTS,1983,SWE1ARG6,CLUPHAR,1771.00,118.400001525879
-IBTS,1983,SWE1ARG6,CYCPLUM,4.00,24
-IBTS,1983,SWE1ARG6,ENCHCIM,4.00,1.20000004768372
-IBTS,1983,SWE1ARG6,GADUMOR,102.00,32
+Campagne,Annee,Trait,Espece,Nombre,Poids
+IBTS,1983,SWE1ARG6,CALMMAC,4.00,0.100000001490116
+IBTS,1983,SWE1ARG6,CLUPHAR,1771.00,118.400001525879
+IBTS,1983,SWE1ARG6,CYCPLUM,4.00,24
+IBTS,1983,SWE1ARG6,ENCHCIM,4.00,1.20000004768372
+IBTS,1983,SWE1ARG6,GADUMOR,102.00,32
Property changes on: trunk/coser-business/src/test/resources/csv/badformat/capturesbadseparator.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/resources/csv/badformat/stratesheadername.csv
===================================================================
--- trunk/coser-business/src/test/resources/csv/badformat/stratesheadername.csv 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/csv/badformat/stratesheadername.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,8 +1,8 @@
-Campagne;Stratus;Surface
-IBTS;31F1;2907.326
-IBTS;31F2;3126.436
-IBTS;32F1;3343.147
-IBTS;32F2;3827.383
-IBTS;32F3;3337.560
-IBTS;33F1;1315.192
-IBTS;33F2;3784.871
+Campagne;Stratus;Surface
+IBTS;31F1;2907.326
+IBTS;31F2;3126.436
+IBTS;32F1;3343.147
+IBTS;32F2;3827.383
+IBTS;32F3;3337.560
+IBTS;33F1;1315.192
+IBTS;33F2;3784.871
Property changes on: trunk/coser-business/src/test/resources/csv/badformat/stratesheadername.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/resources/csv/badformat/traitsheaderorder.csv
===================================================================
--- trunk/coser-business/src/test/resources/csv/badformat/traitsheaderorder.csv 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/csv/badformat/traitsheaderorder.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,4 +1,4 @@
-Campagne;Annee;Trait;Mois;SurfaceBalayee;Strate;Lat;Long;ProfMoy
-IBTS;1983;DEN1DAN21;2;43F7;0.0500040;57.11670;7.250000;45
-IBTS;1983;DEN1DAN210;2;45F3;0.0633420;58.10000;3.216700;73
-IBTS;1983;DEN1DAN214;2;47F0;0.0566640;59.21670;0.8000000;130
+Campagne;Annee;Trait;Mois;SurfaceBalayee;Strate;Lat;Long;ProfMoy
+IBTS;1983;DEN1DAN21;2;43F7;0.0500040;57.11670;7.250000;45
+IBTS;1983;DEN1DAN210;2;45F3;0.0633420;58.10000;3.216700;73
+IBTS;1983;DEN1DAN214;2;47F0;0.0566640;59.21670;0.8000000;130
Property changes on: trunk/coser-business/src/test/resources/csv/badformat/traitsheaderorder.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/csv/correct/testcatch.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/csv/correct/testhaul.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/csv/correct/testlength.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/csv/correct/testreftax.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/csv/correct/teststrata.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/csv/correct/testtypeespeces.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/resources/log4j.properties
===================================================================
--- trunk/coser-business/src/test/resources/log4j.properties 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/log4j.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -32,4 +32,4 @@
log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %-5p %c:%L - %m%n
# Categories
-#log4j.category.fr.ifremer.coser=DEBUG
+log4j.category.fr.ifremer.coser=INFO
Property changes on: trunk/coser-business/src/test/resources/log4j.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/codeTypeEspeces.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/control/control.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/control/testcatch_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/control/testhaul_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/control/testlength_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/control/testlength_del.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/control/teststrata_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/original/testcatch.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/original/testhaul.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/original/testlength.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/original/teststrata.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/project.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/reftaxSpecies.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testcatch_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testhaul_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testlength_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/testselection2.selection
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/project2/selections/testselection2/teststrata_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/codeTypeEspeces.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/control.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/testcatch_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/testhaul_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/testlength_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/control/teststrata_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/testcatch.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/testhaul.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/testlength.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/original/teststrata.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/project.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/reftaxSpecies.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt
===================================================================
--- trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,8 +1,8 @@
-Campagne Indicateur Liste Strate Annee Estimation EcartType CV
-COSER_TEST Delta m1 Total 2005 0.00158515572607873 0.000984730247180753 0.621219878261882
-COSER_TEST Delta m1 Total 2009 0.0476283033138584 0.0151443086213752 0.317968677607053
-COSER_TEST Delta c1 Total 2005 0.00646357387617557 0.00215034288588182 0.332686363160152
-COSER_TEST Delta c1 Total 2009 0.0695548460030265 0.0185708842538978 0.266996267277908
-COSER_TEST Delta p1 Total 1983 0.737241187520257 0.00659773901507874 0.00894922737194123
-COSER_TEST Delta p1 Total 1986 0.730696719394954 0.0192883714063304 0.0263972327976263
-
+Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+COSER_TEST Delta m1 Total 2005 0.00158515572607873 0.000984730247180753 0.621219878261882
+COSER_TEST Delta m1 Total 2009 0.0476283033138584 0.0151443086213752 0.317968677607053
+COSER_TEST Delta c1 Total 2005 0.00646357387617557 0.00215034288588182 0.332686363160152
+COSER_TEST Delta c1 Total 2009 0.0695548460030265 0.0185708842538978 0.266996267277908
+COSER_TEST Delta p1 Total 1983 0.737241187520257 0.00659773901507874 0.00894922737194123
+COSER_TEST Delta p1 Total 1986 0.730696719394954 0.0192883714063304 0.0263972327976263
+
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt
===================================================================
--- trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,7 +1,7 @@
-Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
-COSER_TEST lnN L2 COSER_SPECIES1 Total 2001 16.5576325818007 0.1654168567871 0.00999036885073279
-COSER_TEST lnN L3 COSER_SPECIES2 Total 1999 18.4833935818621 0.0287121599216956 0.00155340304768877
-COSER_TEST Wbar L2 COSER_SPECIES1 Total 1983 0.0220057182719674 0.000818725789680143 0.0372051382082402
-COSER_TEST Abundance L2 COSER_SPECIES2 Total 1983 6334938.17950327 235692.250509076 0.0372051382082401
-COSER_TEST Biomass L2 COSER_SPECIES1 Total 2007 4634200.30159478 2761107.91858038 0.595811086894581
-
+Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+COSER_TEST lnN L2 COSER_SPECIES1 Total 2001 16.5576325818007 0.1654168567871 0.00999036885073279
+COSER_TEST lnN L3 COSER_SPECIES2 Total 1999 18.4833935818621 0.0287121599216956 0.00155340304768877
+COSER_TEST Wbar L2 COSER_SPECIES1 Total 1983 0.0220057182719674 0.000818725789680143 0.0372051382082402
+COSER_TEST Abundance L2 COSER_SPECIES2 Total 1983 6334938.17950327 235692.250509076 0.0372051382082401
+COSER_TEST Biomass L2 COSER_SPECIES1 Total 2007 4634200.30159478 2761107.91858038 0.595811086894581
+
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/results/testresult1/result.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testcatch_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testhaul_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testlength_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/testselection1.selection
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/projects/projectctrvalidated/selections/testselection1/teststrata_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project1/communityIndicators.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project1/populationIndicators.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/echobaseprojects/project1/project.properties
===================================================================
--- trunk/coser-business/src/test/resources/web/echobaseprojects/project1/project.properties (rev 0)
+++ trunk/coser-business/src/test/resources/web/echobaseprojects/project1/project.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,29 @@
+###
+# #%L
+# Coser :: Business
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2010 - 2014 Ifremer, Codelutin
+# %%
+# This program 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.
+#
+# This program 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 General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
+project.author=tc
+project.facadeName=atlantique
+project.zoneName=gdgciem8
+project.surveyName=PELGAS
+project.comment=PELGAS-ATL
+project.creationDate=1394126084855
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project1/project.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project1/species.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project2/communityIndicators.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project2/populationIndicators.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/echobaseprojects/project2/project.properties
===================================================================
--- trunk/coser-business/src/test/resources/web/echobaseprojects/project2/project.properties (rev 0)
+++ trunk/coser-business/src/test/resources/web/echobaseprojects/project2/project.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,29 @@
+###
+# #%L
+# Coser :: Business
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2010 - 2014 Ifremer, Codelutin
+# %%
+# This program 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.
+#
+# This program 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 General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
+project.author=tc
+project.facadeName=atlantique
+project.zoneName=gdgciem8-2
+project.surveyName=PELGAS
+project.comment=PELGASSE-ATL
+project.creationDate=1394126084855
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project2/project.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/web/echobaseprojects/project2/species.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/codeTypeEspeces.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/codeTypeEspeces.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/codeTypeEspeces.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,4 @@
+"Types";"Commentaire";"NumSys min";"NumSys max";"Code"
+"Type1";;"00001";"00002";"a"
+"Type2";;"00003";"00005";"m"
+"Type3";;"00006";"00010";"p"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/codeTypeEspeces.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/control.properties
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/control.properties (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/control.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,26 @@
+###
+# #%L
+# Coser :: Business
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2010 Ifremer, Codelutin
+# %%
+# This program 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.
+#
+# This program 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 General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
+#Fri Nov 26 11:37:55 CET 2010
+control.validated=true
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/control.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testcatch_co.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testcatch_co.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testcatch_co.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,25 @@
+"coser.business.line";"Survey";"Year";"Haul";"Species";"Number";"Weight"
+"1";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES1";"234.33";"4.55"
+"2";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES2";"4.33";"1.12"
+"3";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"859.04";"22.16"
+"4";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES4";"251.86";"59.34"
+"5";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES1";"407.54";"81.37"
+"6";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES2";"472.91";"59.38"
+"7";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES3";"38.36";"41.60"
+"8";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES4";"146.76";"76.15"
+"9";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES1";"737.53";"32.27"
+"10";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES2";"715.54";"91.42"
+"11";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES3";"256.31";"55.32"
+"12";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES4";"308.81";"85.96"
+"13";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES1";"326.53";"0.55"
+"14";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES2";"965.46";"75.30"
+"15";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES3";"187.44";"45.04"
+"16";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES4";"714.22";"25.60"
+"17";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES1";"475.71";"51.42"
+"18";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES2";"661.88";"82.41"
+"19";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES3";"378.28";"27.32"
+"20";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES4";"139.31";"11.74"
+"21";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES1";"810.68";"67.38"
+"22";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES2";"783.03";"40.36"
+"23";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES3";"244.24";"87.85"
+"24";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES4";"52.71";"22.93"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testcatch_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testhaul_co.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testhaul_co.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testhaul_co.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,7 @@
+"coser.business.line";"Survey";"Year";"Haul";"Month";"Stratum";"SweptSurface";"Lat";"Long";"Depth"
+"1";"COSER_TEST";"2010";"TRAIT1";"10";"STR1";"0.06";"43.75";"-1.50";"45.50"
+"2";"COSER_TEST";"2010";"TRAIT2";"10";"STR2";"0.06";"43.81";"-1.45";"31.00"
+"3";"COSER_TEST";"2010";"TRAIT3";"10";"STR3";"0.06";"43.89";"-1.73";"115.00"
+"4";"COSER_TEST";"2011";"TRAIT10";"10";"STR4";"0.06";"43.96";"-2.03";"143.00"
+"5";"COSER_TEST";"2011";"TRAIT20";"10";"STR5";"0.06";"43.91";"-2.09";"185.00"
+"6";"COSER_TEST";"2011";"TRAIT30";"10";"STR6";"0.06";"43.88";"-2.12";"295.00"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testhaul_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testlength_co.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testlength_co.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testlength_co.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+"coser.business.line";"Survey";"Year";"Haul";"Species";"Sex";"Maturity";"Length";"Number";"Weight";"Age"
+"1";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES1";"i";"NA";"29.19";"1.00";"0.45";"NA"
+"2";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES2";"i";"NA";"19.60";"2.00";"0.34";"NA"
+"3";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES2";"i";"NA";"19.60";"3.00";"0.78";"NA"
+"4";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"i";"NA";"32.93";"5.00";"0.87";"NA"
+"5";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"f";"NA";"26.27";"3.00";"0.03";"NA"
+"6";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"m";"NA";"35.25";"4.00";"";"NA"
+"7";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES4";"i";"NA";"37.82";"4.00";"0.61";"NA"
+"8";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES1";"i";"NA";"20.07";"2.00";"0.12";"NA"
+"9";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES1";"i";"NA";"27.18";"2.00";"0.92";"NA"
+"10";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES2";"i";"NA";"21.14";"1.00";"0.34";"NA"
+"11";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES3";"i";"NA";"1.82";"4.00";"0.1";"NA"
+"12";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES4";"i";"NA";"36.55";"4.00";"0.39";"NA"
+"13";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES1";"i";"NA";"20.39";"3.00";"0.28";"NA"
+"14";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES2";"i";"NA";"19.88";"3.00";"0.31";"NA"
+"15";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES3";"i";"NA";"18.16";"1.00";"0.34";"NA"
+"16";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES4";"i";"NA";"10.22";"2.00";"0.31";"NA"
+"17";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES4";"f";"NA";"33.03";"5.00";"0.26";"NA"
+"18";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES1";"i";"NA";"1.00";"4.00";"0.81";"NA"
+"19";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES2";"i";"NA";"27.61";"3.00";"NA"
+"20";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES3";"i";"NA";"20.44";"3.00";"0.43";"NA"
+"21";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES4";"i";"NA";"6.86";"1.00";"0.23";"NA"
+"22";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES1";"i";"NA";"15.04";"4.00";"0.95";"NA"
+"23";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES2";"i";"NA";"35.03";"1.00";"0.26";"NA"
+"24";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES3";"i";"NA";"19.41";"1.00";"0.51";"NA"
+"25";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES4";"i";"NA";"24.58";"2.00";"NA"
+"26";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES1";"i";"NA";"2.46";"3.00";"0.32";"NA"
+"27";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES2";"i";"NA";"18.93";"5.00";"0.22";"NA"
+"28";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES3";"i";"NA";"23.77";"5.00";"0.12";"NA"
+"29";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES4";"i";"NA";"0.94";"3.00";"0.77";"NA"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/testlength_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/teststrata_co.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/teststrata_co.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/teststrata_co.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,11 @@
+"coser.business.line";"Survey";"Stratum";"Surface"
+"1";"COSER_TEST";"STR1";"15909.15"
+"2";"COSER_TEST";"STR2";"11184.27"
+"3";"COSER_TEST";"STR3";"5200.96"
+"4";"COSER_TEST";"STR4";"15573.19"
+"5";"COSER_TEST";"STR5";"8625.07"
+"6";"COSER_TEST";"STR6";"10.20"
+"7";"COSER_TEST";"STR7";"19683.28"
+"8";"COSER_TEST";"STR8";"6053.53"
+"9";"COSER_TEST";"STR9";"993.49"
+"10";"COSER_TEST";"STR10";"5975.14"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/control/teststrata_co.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testcatch.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testcatch.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testcatch.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,25 @@
+"Survey";"Year";"Haul";"Species";"Number";"Weight"
+COSER_TEST;2010;TRAIT1;COSER_SPECIES1;234.33;4.55
+COSER_TEST;2010;TRAIT1;COSER_SPECIES2;4.33;1.12
+COSER_TEST;2010;TRAIT1;COSER_SPECIES3;859.04;22.16
+COSER_TEST;2010;TRAIT1;COSER_SPECIES4;251.86;59.34
+COSER_TEST;2010;TRAIT2;COSER_SPECIES1;407.54;81.37
+COSER_TEST;2010;TRAIT2;COSER_SPECIES2;472.91;59.38
+COSER_TEST;2010;TRAIT2;COSER_SPECIES3;38.36;41.60
+COSER_TEST;2010;TRAIT2;COSER_SPECIES4;146.76;76.15
+COSER_TEST;2010;TRAIT3;COSER_SPECIES1;737.53;32.27
+COSER_TEST;2010;TRAIT3;COSER_SPECIES2;715.54;91.42
+COSER_TEST;2010;TRAIT3;COSER_SPECIES3;256.31;55.32
+COSER_TEST;2010;TRAIT3;COSER_SPECIES4;308.81;85.96
+COSER_TEST;2011;TRAIT10;COSER_SPECIES1;326.53;0.55
+COSER_TEST;2011;TRAIT10;COSER_SPECIES2;965.46;75.30
+COSER_TEST;2011;TRAIT10;COSER_SPECIES3;187.44;45.04
+COSER_TEST;2011;TRAIT10;COSER_SPECIES4;714.22;25.60
+COSER_TEST;2011;TRAIT20;COSER_SPECIES1;475.71;51.42
+COSER_TEST;2011;TRAIT20;COSER_SPECIES2;661.88;82.41
+COSER_TEST;2011;TRAIT20;COSER_SPECIES3;378.28;27.32
+COSER_TEST;2011;TRAIT20;COSER_SPECIES4;139.31;11.74
+COSER_TEST;2011;TRAIT30;COSER_SPECIES1;810.68;67.38
+COSER_TEST;2011;TRAIT30;COSER_SPECIES2;783.03;40.36
+COSER_TEST;2011;TRAIT30;COSER_SPECIES3;244.24;87.85
+COSER_TEST;2011;TRAIT30;COSER_SPECIES4;52.71;22.93
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testcatch.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testhaul.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testhaul.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testhaul.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,7 @@
+Survey;Year;Haul;Month;Stratum;SweptSurface;Lat;Long;Depth
+COSER_TEST;2010;TRAIT1;10;STR1;0.06;43.75;-1.50;45.50
+COSER_TEST;2010;TRAIT2;10;STR2;0.06;43.81;-1.45;31.00
+COSER_TEST;2010;TRAIT3;10;STR3;0.06;43.89;-1.73;115.00
+COSER_TEST;2011;TRAIT10;10;STR4;0.06;43.96;-2.03;143.00
+COSER_TEST;2011;TRAIT20;10;STR5;0.06;43.91;-2.09;185.00
+COSER_TEST;2011;TRAIT30;10;STR6;0.06;43.88;-2.12;295.00
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testhaul.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testlength.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testlength.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testlength.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+Survey;Year;Haul;Species;Sex;Maturity;Length;Number;Weight;Age
+COSER_TEST;2010;TRAIT1;COSER_SPECIES1;i;NA;29.19;1.00;0.45;NA
+COSER_TEST;2010;TRAIT1;COSER_SPECIES2;i;NA;19.60;2.00;0.34;NA
+COSER_TEST;2010;TRAIT1;COSER_SPECIES2;i;NA;19.60;3.00;0.78;NA
+COSER_TEST;2010;TRAIT1;COSER_SPECIES3;i;NA;32.93;5.00;0.87;NA
+COSER_TEST;2010;TRAIT1;COSER_SPECIES3;f;NA;26.27;3.00;0.03;NA
+COSER_TEST;2010;TRAIT1;COSER_SPECIES3;m;NA;35.25;4.00;;NA
+COSER_TEST;2010;TRAIT1;COSER_SPECIES4;i;NA;37.82;4.00;0.61;NA
+COSER_TEST;2010;TRAIT2;COSER_SPECIES1;i;NA;20.07;2.00;0.12;NA
+COSER_TEST;2010;TRAIT2;COSER_SPECIES1;i;NA;27.18;2.00;0.92;NA
+COSER_TEST;2010;TRAIT2;COSER_SPECIES2;i;NA;21.14;1.00;0.34;NA
+COSER_TEST;2010;TRAIT2;COSER_SPECIES3;i;NA;1.82;4.00;0.1;NA
+COSER_TEST;2010;TRAIT2;COSER_SPECIES4;i;NA;36.55;4.00;0.39;NA
+COSER_TEST;2010;TRAIT3;COSER_SPECIES1;i;NA;20.39;3.00;0.28;NA
+COSER_TEST;2010;TRAIT3;COSER_SPECIES2;i;NA;19.88;3.00;0.31;NA
+COSER_TEST;2010;TRAIT3;COSER_SPECIES3;i;NA;18.16;1.00;0.34;NA
+COSER_TEST;2010;TRAIT3;COSER_SPECIES4;i;NA;10.22;2.00;0.31;NA
+COSER_TEST;2010;TRAIT3;COSER_SPECIES4;f;NA;33.03;5.00;0.26;NA
+COSER_TEST;2011;TRAIT1;COSER_SPECIES1;i;NA;1.00;4.00;0.81;NA
+COSER_TEST;2011;TRAIT1;COSER_SPECIES2;i;NA;27.61;3.00;NA
+COSER_TEST;2011;TRAIT1;COSER_SPECIES3;i;NA;20.44;3.00;0.43;NA
+COSER_TEST;2011;TRAIT1;COSER_SPECIES4;i;NA;6.86;1.00;0.23;NA
+COSER_TEST;2011;TRAIT2;COSER_SPECIES1;i;NA;15.04;4.00;0.95;NA
+COSER_TEST;2011;TRAIT2;COSER_SPECIES2;i;NA;35.03;1.00;0.26;NA
+COSER_TEST;2011;TRAIT2;COSER_SPECIES3;i;NA;19.41;1.00;0.51;NA
+COSER_TEST;2011;TRAIT2;COSER_SPECIES4;i;NA;24.58;2.00;NA
+COSER_TEST;2011;TRAIT3;COSER_SPECIES1;i;NA;2.46;3.00;0.32;NA
+COSER_TEST;2011;TRAIT3;COSER_SPECIES2;i;NA;18.93;5.00;0.22;NA
+COSER_TEST;2011;TRAIT3;COSER_SPECIES3;i;NA;23.77;5.00;0.12;NA
+COSER_TEST;2011;TRAIT3;COSER_SPECIES4;i;NA;0.94;3.00;0.77;NA
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/testlength.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/teststrata.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/teststrata.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/teststrata.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,11 @@
+Survey;Stratum;Surface
+COSER_TEST;STR1;15909.15
+COSER_TEST;STR2;11184.27
+COSER_TEST;STR3;5200.96
+COSER_TEST;STR4;15573.19
+COSER_TEST;STR5;8625.07
+COSER_TEST;STR6;10.20
+COSER_TEST;STR7;19683.28
+COSER_TEST;STR8;6053.53
+COSER_TEST;STR9;993.49
+COSER_TEST;STR10;5975.14
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/original/teststrata.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/project.properties
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/project.properties (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/project.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,29 @@
+###
+# #%L
+# Coser :: Business
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2010 Ifremer, Codelutin
+# %%
+# This program 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.
+#
+# This program 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 General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
+#Fri Nov 26 11:37:55 CET 2010
+project.catchFileName=testcatch.csv
+project.strataFileName=teststrata.csv
+project.haulFileName=testhaul.csv
+project.lengthFileName=testlength.csv
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/project.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/reftaxSpecies.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/reftaxSpecies.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/reftaxSpecies.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,6 @@
+"C_Perm";"NumSys";"NivSys";"C_VALIDE";"L_VALIDE";"AA_VALIDE";"C_TxPère";"Taxa"
+"1";"000001";"1";"COSER_SPECIES1";"L'espece de test coser 1";"";"";"";
+"2";"000002";"2";"COSER_SPECIES2";"L'espece de test coser 2";"";"";"";
+"3";"000003";"3";"COSER_SPECIES3";"L'espece de test coser 3";"";"";"";
+"4";"000004";"4";"COSER_SPECIES4";"L'espece de test coser 4";"";"";"";
+"5";"000005";"5";"COSER_SPECIES_MERGE";"L'espece de test coser pour fusion";"";"";"";
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/reftaxSpecies.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,8 @@
+Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+COSER_TEST Delta m1 Total 2005 0.00158515572607873 0.000984730247180753 0.621219878261882
+COSER_TEST Delta m1 Total 2009 0.0476283033138584 0.0151443086213752 0.317968677607053
+COSER_TEST Delta c1 Total 2005 0.00646357387617557 0.00215034288588182 0.332686363160152
+COSER_TEST Delta c1 Total 2009 0.0695548460030265 0.0185708842538978 0.266996267277908
+COSER_TEST Delta p1 Total 1983 0.737241187520257 0.00659773901507874 0.00894922737194123
+COSER_TEST Delta p1 Total 1986 0.730696719394954 0.0192883714063304 0.0263972327976263
+
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstComInd_test.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,7 @@
+Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+COSER_TEST lnN L2 COSER_SPECIES1 Total 2001 16.5576325818007 0.1654168567871 0.00999036885073279
+COSER_TEST lnN L3 COSER_SPECIES2 Total 1999 18.4833935818621 0.0287121599216956 0.00155340304768877
+COSER_TEST Wbar L2 COSER_SPECIES1 Total 1983 0.0220057182719674 0.000818725789680143 0.0372051382082402
+COSER_TEST Abundance L2 COSER_SPECIES2 Total 1983 6334938.17950327 235692.250509076 0.0372051382082401
+COSER_TEST Biomass L2 COSER_SPECIES1 Total 2007 4634200.30159478 2761107.91858038 0.595811086894581
+
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/EstPopInd_test.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/result.properties
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/result.properties (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/result.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,29 @@
+###
+# #%L
+# Coser :: Business
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+# %%
+# This program 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.
+#
+# This program 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 General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
+result.rsufiversion=1.2.3
+result.zone=myzone
+result.estPopIndName=EstPopInd_test.txt
+result.estComIndName=EstComInd_test.txt
+result.publiableResult=true
\ No newline at end of file
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult1/result.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstComInd_test.txt
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstComInd_test.txt (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstComInd_test.txt 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,8 @@
+Campagne Indicateur Liste Strate Annee Estimation EcartType CV
+COSER_TEST Delta m1 Total 2005 0.00158515572607873 0.000984730247180753 0.621219878261882
+COSER_TEST Delta m1 Total 2009 0.0476283033138584 0.0151443086213752 0.317968677607053
+COSER_TEST Delta c1 Total 2005 0.00646357387617557 0.00215034288588182 0.332686363160152
+COSER_TEST Delta c1 Total 2009 0.0695548460030265 0.0185708842538978 0.266996267277908
+COSER_TEST Delta p1 Total 1983 0.737241187520257 0.00659773901507874 0.00894922737194123
+COSER_TEST Delta p1 Total 1986 0.730696719394954 0.0192883714063304 0.0263972327976263
+
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstComInd_test.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstPopInd_test.txt
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstPopInd_test.txt (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstPopInd_test.txt 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,7 @@
+Campagne Indicateur Liste Espece Strate Annee Estimation EcartType CV
+COSER_TEST lnN L2 COSER_SPECIES1 Total 2001 16.5576325818007 0.1654168567871 0.00999036885073279
+COSER_TEST lnN L3 COSER_SPECIES2 Total 1999 18.4833935818621 0.0287121599216956 0.00155340304768877
+COSER_TEST Wbar L2 COSER_SPECIES1 Total 1983 0.0220057182719674 0.000818725789680143 0.0372051382082402
+COSER_TEST Abundance L2 COSER_SPECIES2 Total 1983 6334938.17950327 235692.250509076 0.0372051382082401
+COSER_TEST Biomass L2 COSER_SPECIES1 Total 2007 4634200.30159478 2761107.91858038 0.595811086894581
+
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/EstPopInd_test.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/result.properties
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/result.properties (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/result.properties 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,29 @@
+###
+# #%L
+# Coser :: Business
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+# %%
+# This program 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.
+#
+# This program 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 General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
+result.rsufiversion=1.2.3
+result.zone=myzone
+result.estPopIndName=EstPopInd_test.txt
+result.estComIndName=EstComInd_test.txt
+result.publiableResult=true
\ No newline at end of file
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/results/testresult2/result.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testcatch_se.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testcatch_se.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testcatch_se.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,25 @@
+"coser.business.line";"Survey";"Year";"Haul";"Species";"Number";"Weight"
+"1";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES1";"234.33";"4.55"
+"2";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES2";"4.33";"1.12"
+"3";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"859.04";"22.16"
+"4";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES4";"251.86";"59.34"
+"5";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES1";"407.54";"81.37"
+"6";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES2";"472.91";"59.38"
+"7";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES3";"38.36";"41.60"
+"8";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES4";"146.76";"76.15"
+"9";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES1";"737.53";"32.27"
+"10";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES2";"715.54";"91.42"
+"11";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES3";"256.31";"55.32"
+"12";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES4";"308.81";"85.96"
+"13";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES1";"326.53";"0.55"
+"14";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES2";"965.46";"75.30"
+"15";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES3";"187.44";"45.04"
+"16";"COSER_TEST";"2011";"TRAIT10";"COSER_SPECIES4";"714.22";"25.60"
+"17";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES1";"475.71";"51.42"
+"18";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES2";"661.88";"82.41"
+"19";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES3";"378.28";"27.32"
+"20";"COSER_TEST";"2011";"TRAIT20";"COSER_SPECIES4";"139.31";"11.74"
+"21";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES1";"810.68";"67.38"
+"22";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES2";"783.03";"40.36"
+"23";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES3";"244.24";"87.85"
+"24";"COSER_TEST";"2011";"TRAIT30";"COSER_SPECIES4";"52.71";"22.93"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testcatch_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testhaul_se.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testhaul_se.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testhaul_se.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,7 @@
+"coser.business.line";"Survey";"Year";"Haul";"Month";"Stratum";"SweptSurface";"Lat";"Long";"Depth"
+"1";"COSER_TEST";"2010";"TRAIT1";"10";"STR1";"0.06";"43.75";"-1.50";"45.50"
+"2";"COSER_TEST";"2010";"TRAIT2";"10";"STR2";"0.06";"43.81";"-1.45";"31.00"
+"3";"COSER_TEST";"2010";"TRAIT3";"10";"STR3";"0.06";"43.89";"-1.73";"115.00"
+"4";"COSER_TEST";"2011";"TRAIT10";"10";"STR4";"0.06";"43.96";"-2.03";"143.00"
+"5";"COSER_TEST";"2011";"TRAIT20";"10";"STR5";"0.06";"43.91";"-2.09";"185.00"
+"6";"COSER_TEST";"2011";"TRAIT30";"10";"STR6";"0.06";"43.88";"-2.12";"295.00"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testhaul_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testlength_se.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testlength_se.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testlength_se.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,30 @@
+"coser.business.line";"Survey";"Year";"Haul";"Species";"Sex";"Maturity";"Length";"Number";"Weight";"Age"
+"1";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES1";"i";"NA";"29.19";"1.00";"0.45";"NA"
+"2";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES2";"i";"NA";"19.60";"2.00";"0.34";"NA"
+"3";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES2";"i";"NA";"19.60";"3.00";"0.78";"NA"
+"4";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"i";"NA";"32.93";"5.00";"0.87";"NA"
+"5";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"f";"NA";"26.27";"3.00";"0.03";"NA"
+"6";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES3";"m";"NA";"35.25";"4.00";"";"NA"
+"7";"COSER_TEST";"2010";"TRAIT1";"COSER_SPECIES4";"i";"NA";"37.82";"4.00";"0.61";"NA"
+"8";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES1";"i";"NA";"20.07";"2.00";"0.12";"NA"
+"9";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES1";"i";"NA";"27.18";"2.00";"0.92";"NA"
+"10";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES2";"i";"NA";"21.14";"1.00";"0.34";"NA"
+"11";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES3";"i";"NA";"1.82";"4.00";"0.1";"NA"
+"12";"COSER_TEST";"2010";"TRAIT2";"COSER_SPECIES4";"i";"NA";"36.55";"4.00";"0.39";"NA"
+"13";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES1";"i";"NA";"20.39";"3.00";"0.28";"NA"
+"14";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES2";"i";"NA";"19.88";"3.00";"0.31";"NA"
+"15";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES3";"i";"NA";"18.16";"1.00";"0.34";"NA"
+"16";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES4";"i";"NA";"10.22";"2.00";"0.31";"NA"
+"17";"COSER_TEST";"2010";"TRAIT3";"COSER_SPECIES4";"f";"NA";"33.03";"5.00";"0.26";"NA"
+"18";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES1";"i";"NA";"1.00";"4.00";"0.81";"NA"
+"19";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES2";"i";"NA";"27.61";"3.00";"NA"
+"20";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES3";"i";"NA";"20.44";"3.00";"0.43";"NA"
+"21";"COSER_TEST";"2011";"TRAIT1";"COSER_SPECIES4";"i";"NA";"6.86";"1.00";"0.23";"NA"
+"22";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES1";"i";"NA";"15.04";"4.00";"0.95";"NA"
+"23";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES2";"i";"NA";"35.03";"1.00";"0.26";"NA"
+"24";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES3";"i";"NA";"19.41";"1.00";"0.51";"NA"
+"25";"COSER_TEST";"2011";"TRAIT2";"COSER_SPECIES4";"i";"NA";"24.58";"2.00";"NA"
+"26";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES1";"i";"NA";"2.46";"3.00";"0.32";"NA"
+"27";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES2";"i";"NA";"18.93";"5.00";"0.22";"NA"
+"28";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES3";"i";"NA";"23.77";"5.00";"0.12";"NA"
+"29";"COSER_TEST";"2011";"TRAIT3";"COSER_SPECIES4";"i";"NA";"0.94";"3.00";"0.77";"NA"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testlength_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testselection1.selection
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testselection1.selection (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testselection1.selection 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,7 @@
+#Fri Nov 26 11:37:55 CET 2010
+selection.validated=false
+selection.densityFilter=3.5
+selection.occurrenceFilter=3.75
+selection.commands.0=(57dc29ae-9991-4f0c-9233-9ab0a5a4ccf4);(MergeSpeciesCommand);();((newSpecyName\=COSER_SPECIES_MERGE);(speciesNames\=(COSER_SPECIES1);(COSER_SPECIES2)))
+selection.selectedSpeciesOccDensComment=Test selectedSpeciesOccDensComment
+selection.comment=Selection test
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/testselection1.selection
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/teststrata_se.csv
===================================================================
--- trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/teststrata_se.csv (rev 0)
+++ trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/teststrata_se.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,11 @@
+"coser.business.line";"Survey";"Stratum";"Surface"
+"1";"COSER_TEST";"STR1";"15909.15"
+"2";"COSER_TEST";"STR2";"11184.27"
+"3";"COSER_TEST";"STR3";"5200.96"
+"4";"COSER_TEST";"STR4";"15573.19"
+"5";"COSER_TEST";"STR5";"8625.07"
+"6";"COSER_TEST";"STR6";"10.20"
+"7";"COSER_TEST";"STR7";"19683.28"
+"8";"COSER_TEST";"STR8";"6053.53"
+"9";"COSER_TEST";"STR9";"993.49"
+"10";"COSER_TEST";"STR10";"5975.14"
Property changes on: trunk/coser-business/src/test/resources/web/legacyprojects/projectctrvalidated/selections/testselection1/teststrata_se.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-business/src/test/resources/web/upload1.zip
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-business/src/test/resources/web/upload2.zip
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/coser-business/src/test/resources/webindicators.csv
===================================================================
--- trunk/coser-business/src/test/resources/webindicators.csv 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/webindicators.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -30,4 +30,22 @@
"Shannonmod";"Indice de Shannon normalisé / première année";"Shannon index normalized wrt the first year";;""
"Wbcomm";"Poids moyen d'un individu)";"Average weight of an individual";;"kg"
"Wtot";"Biomasse totale dans la zone (valeur relative)";"Total biomass in the area (relative value)";;""
-
+"xcg";"Longitude du centre de gravité de la population";"Longitude of the center of gravity";"";""
+"ycg";"Latitude du centre de gravité de la population";"Latitude of the center of gravity";"";""
+"I";"Inertie (ou dispersion moyenne) de la population autour du centre de gravité";"The population inertia (i.e. mean dispersion) around the gravity center";"";""
+"Imax";"La valeur d'inertie le long du premier axe principal d'inertie";"The value of the inertia according to the first principal axis of inertia";"";""
+"Imin";"La valeur d'inertie le long du second axe principal d'inertie";"The value of the inertia according to the first principal axis of inertia";"";""
+"Iso";"La valeur de l'isotropie (régularité de distribution dans l'espace) de la population.";"The population isotropy value";"";""
+"xaxe1.1";"La longitude de la première extrémité du premier axe principal d'inertie";"The longitude of the first end-point of the first principal axis of inertia";"";""
+"xaxe1.2";"La longitude de la seconde extrémité du premier axe principal d'inertie";"The longitude of the second end-point of the first principal axis of inertia";"";""
+"yaxe1.1";"La latitude de la première extrémité du premier axe principal d'inertie";"The latitude of the first end-point of the first principal axis of inertia";"";""
+"yaxe1.2";"La latitude de la seconde extrémité du premier axe principal d'inertie";"The latitude of the second end-point of the first principal axis of inertia";"";""
+"xaxe2.1";"La longitude de la première extrémité du second axe principal d'inertie";"The longitude of the first end-point of the second principal axis of inertia";"";""
+"xaxe2.2";"La longitude de la seconde extrémité du second axe principal d'inertie";"The longitude of the second end-point of the second principal axis of inertia";"";""
+"yaxe2.1";"La latitude de la première extrémité du second axe principal d'inertie";"The latitude of the first end-point of the second principal axis of inertia";"";""
+"yaxe2.2";"La latitude de la seconde extrémité du second axe principal d'inertie";"The latitude of the second end-point of the second principal axis of inertia";"";""
+"Npatch";"Le nombre d'agrégats spatiaux dans la population";"The number of spatial patches in the population";"";""
+"PA";"Aire positive de la population : aire de présence de la population, même à faible densité";"The positive area measures the area of presence occupied by a population, even if the density is low.";"";""
+"SA";"L'aire de distribution de la population. Elle mesure la distribution géographique de la population en prenant en compte les variations de densité.";"The spreading area of the population. It measures how a population occupy the geographical space by taking into account the variation of densities";"";""
+"EA";"L'aire équivalente de la population, qui mesure la surface qui serait occupée par la population si tous ses échantillons avaient la même valeur, égale à la densité moyenne par individu";"The equivalent area of the population. It measures the area that would be occupied by the population, if all the samples had the same density equal to the mean density per individual.";"";""
+"microS";"L'indice de microstructure de la population. Il mesure l'importance relative des structures spatiales de la population à une échelle inférieure à la résolution d'échantillonnage (incluant le bruit aléatoire). ";"The microstructure index measures the relative importance of structural components that have a smaller scale than the sampling lag (including random noise).";"";""
\ No newline at end of file
Property changes on: trunk/coser-business/src/test/resources/webindicators.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-business/src/test/resources/webzones.csv
===================================================================
--- trunk/coser-business/src/test/resources/webzones.csv 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-business/src/test/resources/webzones.csv 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,3 +22,4 @@
"gdl";"mediteranee";"Méditerranée";"Golfe du Lion";"1994 >";"Medits";;;;"C_GdL.png"
"ecorse";"mediteranee";"Méditerranée";"Est-Corse";"1994 >";"Medits";"1997 exclue (couverture incomplète)";"1997 excluded (only partial coverage)";;"C_E-Corse.png"
"solper";"atlantique";"Atlantique";"Pertuis";"2005 >";"Solper";"Limitation aux Pertuis Charentais";"Limited to Pertuis Charentais";;
+"gdgciem8";"atlantique";"Golfe de Gascogne (zone VIII du CIEM)";"2000 >";"Pelgas";"La limite nord de la zone VIII du CIEM (48 °N) constitue aussi une limite de régions de la DCSMM";"The northern limit of ICES division VIII (48 °N) corresponds to a regional limit of the MSFD.";;;
Property changes on: trunk/coser-business/src/test/resources/webzones.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/assembly/bin.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/assembly/coser
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/assembly/coser.bat
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserException.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserExceptionHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ContainerRedoMenu.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ContainerUndoMenu.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/HomeView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenu.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixFilter.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesListRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesTableCellRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDuplicatedLineTableModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlErrorTreeRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlFindReplaceDialog.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlGraphFrame.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlTableModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/GlobalControlErrorModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/SpecyComboModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/Freize.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/HaulLocationHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectMapsListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectNamesListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectSummaryView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/SpeciesFieldTypeListRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ExportUploadDialog.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTableModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultZoneRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/SelectUploadResultView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/SelectionAddResultDialog.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/SelectionEditResultDialog.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ZoneComboBoxModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ZoneComboBoxRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SamplingEffortRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionFilesView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionRsufiView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesFusionDialog.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesListOccDensRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesTypesRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/FileListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/MaturitySpeciesListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/OccurrenceDensitySpeciesListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/SizeAllYearSpeciesListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/SpeciesListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/SpeciesTypesListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/StrataListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/model/YearListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/CommandListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/CommandListRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionByProjectTreeModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayView.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserListModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserListSelectionModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserProgressBar.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/ErrorHelper.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionLayout.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionPane.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionPane.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionPane.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,269 +1,269 @@
-/* %%Ignore-License
- * Copyright (C) 2007 Craig Knudsen
- *
- * AccordionPane 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 2.1 of the
- * License, or (at your option) any later version.
- *
- * This program 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.
- *
- * A copy of the GNU Lesser General Public License can be found at www.gnu.org.
- * To receive a hard copy, you can write to:
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307 USA.
- */
-
-package fr.ifremer.coser.ui.widgets;
-
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Graphics;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.Icon;
-import javax.swing.JPanel;
-import javax.swing.Timer;
-
-/**
- * The AccordionPane class implements a vertical accordion container, similar to
- * those seen in many AJAX/DHTML frameworks. Multiple child panels are added,
- * but only one of those will be visible at a time. The user can switch between
- * visible panels by clicking on the title area of one of the inactive panels.
- *
- * @author Craig Knudsen, craig(a)k5n.us
- */
-// TODO: add/remove ChangeListener support
-// TODO: add support for setting icons
-// TODO: tooltip text for titles
-// TODO: enable/disable panels
-public class AccordionPane extends JPanel {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = -4266521429712806753L;
-
- protected List<AccordionPaneSubPanel> children;
- protected int selected = -1;
- protected int previouslySelected = -1; // used in animation transition
- // background color for pane title
- protected Color paneBackgroundColor;
- // background color for current pane title
- protected Color activePaneBackgroundColor;
- protected Timer timer;
- protected int transitionStep = 0;
- protected int remainder = -1;
-
- /**
- * Create a new AccordionPane object. After creating the AccordionPane, you
- * will need to call addPanel to add UI components to it.
- */
- public AccordionPane() {
- this.children = new ArrayList<AccordionPaneSubPanel>();
- this.selected = -1;
- this.setLayout(new AccordionLayout(this));
- this.paneBackgroundColor = super.getBackground();
- this.activePaneBackgroundColor = new Color(255, 255, 200);
- }
-
- /**
- * Set the background color for the active and inactive pane title areas.
- *
- * @param normalColor
- * The color to use for the non-active panels
- * @param activeColor
- * The color to use for the currently selected panel
- */
- public void setTitleBackgroundColors(Color normalColor, Color activeColor) {
- this.paneBackgroundColor = normalColor;
- this.activePaneBackgroundColor = activeColor;
- repaint();
- }
-
- public void add(AccordionPaneSubPanel subPanel) {
- subPanel.setAccordionPane(this);
- subPanel.setIndex(this.children.size());
- this.children.add(subPanel);
- super.add(subPanel);
- }
-
- public void paint(Graphics g) {
- // Do some initializing on the first paint call
- if (this.selected < 0 && this.children.size() > 0) {
- this.setSelected(0, false);
- }
- if (this.transitionStep >= this.remainder && this.remainder > 0
- && timer != null) {
- this.timer.stop();
- this.timer = null;
- System.out.println("Killed timer.");
- }
- super.paint(g);
- }
-
- /**
- * Set the currently active/selected pane.
- *
- * @param num
- * The pane number to select (0 is first)
- */
- public void setSelected(int num) {
- setSelected(num, false);
- }
-
- /**
- * Set the currently active/selected pane.
- *
- * @param num
- * The pane number to select (0 is first)
- * @param showAnimation
- * Show the animation transition from the previously selected pane to
- * the newly selected pane.
- */
- public void setSelected(int num, boolean showAnimation) {
- if (num == selected)
- return;
- if (!showAnimation) {
- this.previouslySelected = -1;
- }
- else {
- this.previouslySelected = selected;
- }
- this.selected = num;
- for (int i = 0; i < children.size(); i++) {
- AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) children
- .get(i);
- // subPanel.child.setVisible ( i == num
- // || ( i == this.previouslySelected && showAnimation ) );
- subPanel.titlePanel
- .setBackground(i == num ? this.activePaneBackgroundColor
- : this.paneBackgroundColor);
- }
- if (this.previouslySelected >= 0 && showAnimation) {
- ActionListener a = new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- // Add another step in the animation transition
- if (remainder - transitionStep < 10) {
- transitionStep++;
- } else if (remainder - transitionStep < 25) {
- transitionStep += 3;
- } else {
- transitionStep += 10;
- }
- // System.out.println ( "transitionStep=" + transitionStep );
- if (transitionStep >= remainder) {
- // We're done with the animation
- transitionStep = -1;
- timer.stop();
- } else {
- timer.setInitialDelay(1);
- timer.restart();
- }
- doLayout();
- validate();
- repaint();
- }
- };
-
- if (timer != null) {
- timer.stop();
- timer = null;
- }
-
- // Animate the transition from one panel to another panel.
- this.transitionStep = 0;
- timer = new Timer(1, a);
- timer.start();
- }
- doLayout(); // ec-20101202 : par moment ca fonctionne mal
- validate();
- repaint();
- }
-
- /**
- * Get the index of the currently selected pane.
- *
- * @return the index of the currently selected pane
- */
- public int getSelectedIndex() {
- return this.selected;
- }
-
- /**
- * Get the number of panes in the AccordionPane.
- *
- * @return the number of panes
- */
- public int getPaneCount() {
- return this.children.size();
- }
-
- /**
- * Set the text title at the specified location
- *
- * @param index
- * the index number of the pane
- * @param newTitle
- * the new title for the specified pane.
- */
- public void setTitleAt(int index, String newTitle) {
- AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
- .get(index);
- subPanel.titleLabel.setText(newTitle);
- }
-
- /**
- * Get the text title at the specified location
- *
- * @param index
- * the index number of the pane
- * @return the text title of the specified pane
- */
- public String getTitleAt(int index) {
- AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
- .get(index);
- return subPanel.titleLabel.getText();
- }
-
- /**
- * Set the icon for the specified location.
- *
- * @param index
- * @param icon
- */
- public void setIconAt(int index, Icon icon) {
- AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
- .get(index);
- subPanel.titleLabel.setIcon(icon);
- }
-
- /**
- * Returns the component at index.
- *
- * @param index
- * the index of the item being queried
- * @return component
- */
- public Component getComponentAt(int index) {
- AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
- .get(index);
- return subPanel.child;
- }
-
- /**
- * Returns the currently selected component for this AccordionPane.
- *
- * @return the currently selected component
- */
- public Component getSelectedComponent() {
- AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
- .get(this.selected);
- return subPanel.child;
- }
-
+/* %%Ignore-License
+ * Copyright (C) 2007 Craig Knudsen
+ *
+ * AccordionPane 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 2.1 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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.
+ *
+ * A copy of the GNU Lesser General Public License can be found at www.gnu.org.
+ * To receive a hard copy, you can write to:
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA.
+ */
+
+package fr.ifremer.coser.ui.widgets;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.Icon;
+import javax.swing.JPanel;
+import javax.swing.Timer;
+
+/**
+ * The AccordionPane class implements a vertical accordion container, similar to
+ * those seen in many AJAX/DHTML frameworks. Multiple child panels are added,
+ * but only one of those will be visible at a time. The user can switch between
+ * visible panels by clicking on the title area of one of the inactive panels.
+ *
+ * @author Craig Knudsen, craig(a)k5n.us
+ */
+// TODO: add/remove ChangeListener support
+// TODO: add support for setting icons
+// TODO: tooltip text for titles
+// TODO: enable/disable panels
+public class AccordionPane extends JPanel {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -4266521429712806753L;
+
+ protected List<AccordionPaneSubPanel> children;
+ protected int selected = -1;
+ protected int previouslySelected = -1; // used in animation transition
+ // background color for pane title
+ protected Color paneBackgroundColor;
+ // background color for current pane title
+ protected Color activePaneBackgroundColor;
+ protected Timer timer;
+ protected int transitionStep = 0;
+ protected int remainder = -1;
+
+ /**
+ * Create a new AccordionPane object. After creating the AccordionPane, you
+ * will need to call addPanel to add UI components to it.
+ */
+ public AccordionPane() {
+ this.children = new ArrayList<AccordionPaneSubPanel>();
+ this.selected = -1;
+ this.setLayout(new AccordionLayout(this));
+ this.paneBackgroundColor = super.getBackground();
+ this.activePaneBackgroundColor = new Color(255, 255, 200);
+ }
+
+ /**
+ * Set the background color for the active and inactive pane title areas.
+ *
+ * @param normalColor
+ * The color to use for the non-active panels
+ * @param activeColor
+ * The color to use for the currently selected panel
+ */
+ public void setTitleBackgroundColors(Color normalColor, Color activeColor) {
+ this.paneBackgroundColor = normalColor;
+ this.activePaneBackgroundColor = activeColor;
+ repaint();
+ }
+
+ public void add(AccordionPaneSubPanel subPanel) {
+ subPanel.setAccordionPane(this);
+ subPanel.setIndex(this.children.size());
+ this.children.add(subPanel);
+ super.add(subPanel);
+ }
+
+ public void paint(Graphics g) {
+ // Do some initializing on the first paint call
+ if (this.selected < 0 && this.children.size() > 0) {
+ this.setSelected(0, false);
+ }
+ if (this.transitionStep >= this.remainder && this.remainder > 0
+ && timer != null) {
+ this.timer.stop();
+ this.timer = null;
+ System.out.println("Killed timer.");
+ }
+ super.paint(g);
+ }
+
+ /**
+ * Set the currently active/selected pane.
+ *
+ * @param num
+ * The pane number to select (0 is first)
+ */
+ public void setSelected(int num) {
+ setSelected(num, false);
+ }
+
+ /**
+ * Set the currently active/selected pane.
+ *
+ * @param num
+ * The pane number to select (0 is first)
+ * @param showAnimation
+ * Show the animation transition from the previously selected pane to
+ * the newly selected pane.
+ */
+ public void setSelected(int num, boolean showAnimation) {
+ if (num == selected)
+ return;
+ if (!showAnimation) {
+ this.previouslySelected = -1;
+ }
+ else {
+ this.previouslySelected = selected;
+ }
+ this.selected = num;
+ for (int i = 0; i < children.size(); i++) {
+ AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) children
+ .get(i);
+ // subPanel.child.setVisible ( i == num
+ // || ( i == this.previouslySelected && showAnimation ) );
+ subPanel.titlePanel
+ .setBackground(i == num ? this.activePaneBackgroundColor
+ : this.paneBackgroundColor);
+ }
+ if (this.previouslySelected >= 0 && showAnimation) {
+ ActionListener a = new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ // Add another step in the animation transition
+ if (remainder - transitionStep < 10) {
+ transitionStep++;
+ } else if (remainder - transitionStep < 25) {
+ transitionStep += 3;
+ } else {
+ transitionStep += 10;
+ }
+ // System.out.println ( "transitionStep=" + transitionStep );
+ if (transitionStep >= remainder) {
+ // We're done with the animation
+ transitionStep = -1;
+ timer.stop();
+ } else {
+ timer.setInitialDelay(1);
+ timer.restart();
+ }
+ doLayout();
+ validate();
+ repaint();
+ }
+ };
+
+ if (timer != null) {
+ timer.stop();
+ timer = null;
+ }
+
+ // Animate the transition from one panel to another panel.
+ this.transitionStep = 0;
+ timer = new Timer(1, a);
+ timer.start();
+ }
+ doLayout(); // ec-20101202 : par moment ca fonctionne mal
+ validate();
+ repaint();
+ }
+
+ /**
+ * Get the index of the currently selected pane.
+ *
+ * @return the index of the currently selected pane
+ */
+ public int getSelectedIndex() {
+ return this.selected;
+ }
+
+ /**
+ * Get the number of panes in the AccordionPane.
+ *
+ * @return the number of panes
+ */
+ public int getPaneCount() {
+ return this.children.size();
+ }
+
+ /**
+ * Set the text title at the specified location
+ *
+ * @param index
+ * the index number of the pane
+ * @param newTitle
+ * the new title for the specified pane.
+ */
+ public void setTitleAt(int index, String newTitle) {
+ AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
+ .get(index);
+ subPanel.titleLabel.setText(newTitle);
+ }
+
+ /**
+ * Get the text title at the specified location
+ *
+ * @param index
+ * the index number of the pane
+ * @return the text title of the specified pane
+ */
+ public String getTitleAt(int index) {
+ AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
+ .get(index);
+ return subPanel.titleLabel.getText();
+ }
+
+ /**
+ * Set the icon for the specified location.
+ *
+ * @param index
+ * @param icon
+ */
+ public void setIconAt(int index, Icon icon) {
+ AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
+ .get(index);
+ subPanel.titleLabel.setIcon(icon);
+ }
+
+ /**
+ * Returns the component at index.
+ *
+ * @param index
+ * the index of the item being queried
+ * @return component
+ */
+ public Component getComponentAt(int index) {
+ AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
+ .get(index);
+ return subPanel.child;
+ }
+
+ /**
+ * Returns the currently selected component for this AccordionPane.
+ *
+ * @return the currently selected component
+ */
+ public Component getSelectedComponent() {
+ AccordionPaneSubPanel subPanel = (AccordionPaneSubPanel) this.children
+ .get(this.selected);
+ return subPanel.child;
+ }
+
}
\ No newline at end of file
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionPane.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/AccordionPaneSubPanel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/ComponentTitledBorder.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/widgets/LookAndFeelViewMenuItem.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/jnlp/coser-jnlp.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/coser.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/fr/ifremer/coser/bean/Project-error-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/fr/ifremer/coser/bean/RSufiResult-error-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/fr/ifremer/coser/bean/Selection-error-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/icons/accept.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/agt_action_fail.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/arrow_jion_up.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/arrow_left.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/arrow_right.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/arrow_rotate_clockwise.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/button_ok.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/cancel.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/chart_bar.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/chart_curve.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/coser.ico
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/disk.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/logo.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/logo300.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/map.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/report.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/spellcheck.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/stock_lock.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/stock_select_clear.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/stock_select_table.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/table.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/icons/warning.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/log4j.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-ui/src/main/resources/maps/vmap_area_thin.shp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-ui/src/main/resources/maps/vmap_area_thin.ssx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserApplicationListener.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserApplicationListener.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserApplicationListener.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,69 @@
+package fr.ifremer.coser.web;
+
+/*
+ * #%L
+ * Coser :: Web
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.util.Date;
+
+/**
+ * To listen start and end of the application.
+ * <p/>
+ * On start we will init the service helper ({@link ServiceHelper#init()}).
+ * <p/>
+ * On stop, just release close the service helper ({@link ServiceHelper#close()}).
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class CoserApplicationListener implements ServletContextListener {
+
+ /** Logger. */
+ protected static final Log log =
+ LogFactory.getLog(CoserApplicationListener.class);
+
+ @Override
+ public void contextInitialized(ServletContextEvent sce) {
+
+ if (log.isInfoEnabled()) {
+ log.info("Application starting at " + new Date() + "...");
+ }
+
+ ServiceHelper.init();
+
+ }
+
+ @Override
+ public void contextDestroyed(ServletContextEvent sce) {
+ if (log.isInfoEnabled()) {
+ log.info("Application is ending at " + new Date() + "...");
+ }
+
+ ServiceHelper.close();
+
+ }
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserApplicationListener.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -25,6 +25,7 @@
import static org.nuiton.i18n.I18n.t;
import fr.ifremer.coser.CoserBusinessConfig;
+import org.nuiton.config.ConfigOptionDef;
/**
* Coser web configuration.
@@ -39,11 +40,12 @@
public CoserWebConfig() {
// init configuration with default options
- for (CoserWebOption o : CoserWebOption.values()) {
- if (o.defaultValue != null) {
- setDefaultOption(o.key, o.defaultValue);
- }
- }
+ loadDefaultOptions(CoserWebOption.values());
+// for (CoserWebOption o : CoserWebOption.values()) {
+// if (o.defaultValue != null) {
+// setDefaultOption(o.key, o.defaultValue);
+// }
+// }
}
public String getApplicationVersion() {
@@ -91,7 +93,7 @@
return result;
}
- public enum CoserWebOption {
+ public enum CoserWebOption implements ConfigOptionDef {
/** Context name for multiple deployment. */
CONTEXT_NAME(APP_NAME, null, "coser"),
@@ -117,7 +119,32 @@
public String getDefaultValue() {
return defaultValue;
}
-
+
+ @Override
+ public boolean isTransient() {
+ return false;
+ }
+
+ @Override
+ public boolean isFinal() {
+ return false;
+ }
+
+ @Override
+ public void setDefaultValue(String defaultValue) {
+
+ }
+
+ @Override
+ public void setTransient(boolean isTransient) {
+
+ }
+
+ @Override
+ public void setFinal(boolean isFinal) {
+
+ }
+
public String getDescription() {
return description;
}
@@ -125,5 +152,12 @@
public String getKey() {
return key;
}
+
+ @Override
+ public Class<?> getType() {
+ return null;
+ }
+
+
}
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebException.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebException.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebException.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,6 +22,8 @@
package fr.ifremer.coser.web;
+import fr.ifremer.coser.CoserTechnicalException;
+
/**
* Coser web runtime exception.
*
@@ -31,7 +33,7 @@
* Last update : $Date$
* By : $Author$
*/
-public class CoserWebException extends RuntimeException {
+public class CoserWebException extends CoserTechnicalException {
/** serialVersionUID. */
private static final long serialVersionUID = -1002725698959514244L;
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebException.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -38,6 +38,7 @@
* Last update : $Date$
* By : $Author$
*/
+@Deprecated
public class ServiceFactory {
protected static CoserWebConfig coserConfig;
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceHelper.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceHelper.java (rev 0)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceHelper.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -0,0 +1,324 @@
+package fr.ifremer.coser.web;
+
+/*
+ * #%L
+ * Coser :: Web
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 - 2014 Ifremer, Codelutin, Chemit Tony
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.coser.CoserBusinessException;
+import fr.ifremer.coser.result.CoserRequest;
+import fr.ifremer.coser.result.CoserResult;
+import fr.ifremer.coser.result.CoserResultEngine;
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.repository.ResultRepositoryProvider;
+import fr.ifremer.coser.result.repository.legacy.LegacyResultRepository;
+import fr.ifremer.coser.result.request.CoserRequestSpeciesAware;
+import fr.ifremer.coser.result.request.CoserRequestZoneAware;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.services.WebService;
+import fr.ifremer.coser.util.DataType;
+import fr.ifremer.coser.web.actions.common.CoserAction;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.config.ArgumentsParserException;
+import org.nuiton.i18n.I18n;
+
+import java.io.File;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Wrap any call to business layer.
+ * <p/>
+ * This was the easiest way to see also what's is really used from the business layer
+ * and refactor Cobol-style (or Turbo-Pascal maybe?) previous code...
+ * <p/>
+ * Created on 3/6/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 1.5
+ */
+public class ServiceHelper {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(ServiceHelper.class);
+
+ private static WebService webService;
+
+ private static CoserResultEngine resultService;
+
+ private static CoserWebConfig config;
+
+
+ // --------------------------------------------------------------------- //
+ // --- Application context methods ------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public static void init() {
+
+ // on a pas trop de locale là :(
+ I18n.init(null, null);
+
+ config = new CoserWebConfig();
+ try {
+ config.parse();
+ } catch (ArgumentsParserException ex) {
+ throw new CoserWebException("Can't read configuration", ex);
+ }
+
+ webService = new WebService(config);
+
+ Set<ResultRepositoryProvider<?>> providers =
+ CoserResultEngine.createDefaultRepositoryProviders(config);
+ resultService = new CoserResultEngine(providers);
+ }
+
+ public static void close() {
+ webService = null;
+ resultService = null;
+ config = null;
+ }
+
+ private final CoserAction action;
+
+ public ServiceHelper(CoserAction action) {
+ Preconditions.checkNotNull(config);
+ Preconditions.checkNotNull(webService);
+ Preconditions.checkNotNull(resultService);
+ Preconditions.checkNotNull(action);
+ this.action = action;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Facade methods -------------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public Map<String, String> getFacades() {
+ try {
+ return webService.getFacades();
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain facades", e);
+ }
+ }
+
+ public String getFacadeDisplayName(String facade) {
+ Map<String, String> facades = getFacades();
+ return facades.get(facade);
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Zone methods ---------------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public Map<String, List<String>> getZoneByFacade() {
+ try {
+ return webService.getZoneByFacade();
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain zone by facade", e);
+ }
+ }
+
+ public Map<String, String> getZonePictures() {
+ try {
+ return webService.getZonePictures();
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain zone pictures", e);
+ }
+ }
+
+ public Map<String, String> getZoneMetaInfo(Locale locale) {
+ try {
+ return webService.getZoneMetaInfo(locale);
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain zone meta infos", e);
+ }
+ }
+
+ public Map<String, String> getAvailableZones(CoserRequest request) {
+ return resultService.getAvailableZones(request);
+ }
+
+ public Map<String, String> getZoneForFacade() {
+ try {
+ return webService.getZoneForFacade(null, false, false);
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain zone for facades", e);
+ }
+ }
+
+ public String getZoneFullName(String zoneId) {
+ try {
+ return webService.getZoneFullName(zoneId);
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain zone full name", e);
+ }
+ }
+
+ public String getZoneDisplayName(CoserRequestZoneAware request) {
+ Map<String, String> availableZones = getAvailableZones(request);
+ String displayName = availableZones.get(request.getZone());
+ return displayName;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Species methods ------------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public Map<String, String> getAvailableSpecies(CoserRequest request) {
+ return resultService.getAvailableSpecies(request);
+ }
+
+ public String getSpeciesDisplayName(CoserRequestSpeciesAware request) {
+ Map<String, String> availableSpecies = getAvailableSpecies(request);
+ String displayName = availableSpecies.get(request.getSpecies());
+ return displayName;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Indicator methods ----------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public Map<String, String> getAvailableIndicators(IndicatorRequest request) {
+ return resultService.getAvailableIndicators(request);
+ }
+
+ public Map<String, String> getIndicators(List<String> selectZones, DataType dataType) {
+ try {
+ return webService.getIndicators(selectZones, dataType, action.getLocale());
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain indicators", e);
+ }
+ }
+
+ public Map<String, String> getSpecies(List<String> selectZones) {
+ try {
+ return webService.getSpecies(selectZones, false);
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not obtain species", e);
+ }
+ }
+
+ public String getIndicatorDisplayName(IndicatorRequest request) {
+ Map<String, String> availableIndicators = getAvailableIndicators(request);
+ String displayName = availableIndicators.get(request.getIndicator());
+ return displayName;
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Result methods -------------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public Map<String, String> getIndicatorsResultsPerZone() {
+ try {
+ return webService.getIndicatorsResultsPerZone();
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not get indicators results per zone", e);
+ }
+ }
+
+ public Map<String, String> getMapsResultsPerZone() {
+ try {
+ return webService.getMapsResultsPerZone();
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not get map results per zone", e);
+ }
+ }
+
+ public FileResult getFileResult(CoserRequest request) {
+
+ CoserResult result = resultService.getResult(request);
+
+ if (!(result instanceof FileResult)) {
+ throw new CoserWebException(
+ "Result should a FileResult, but was: " + result);
+ }
+ FileResult fileResult = (FileResult) result;
+ return fileResult;
+ }
+
+ public void deleteIndicatorsResult(List<String> indicatorsZonesId) {
+ try {
+ webService.deleteIndicatorsResult(indicatorsZonesId);
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not delete indicator results", e);
+ }
+ }
+
+ public void deleteMapsResult(List<String> mapsZonesId) {
+ try {
+ webService.deleteMapsResult(mapsZonesId);
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Could not delete map results", e);
+ }
+ }
+
+ public void registerNewUploadedResults(String login, File resultFile) {
+ try {
+ webService.registerNewUploadedResults(login, resultFile);
+ } catch (CoserBusinessException ex) {
+ throw new CoserWebException("Can't register new result file", ex);
+ }
+ }
+
+ public FileResult extractData(List<String> selectZones,
+ List<DataType> selectTypes,
+ List<String> selectSpecies,
+ List<String> selectComIndicators,
+ List<String> selectPopIndicators,
+ Locale locale) {
+ try {
+ File file = webService.extractData(selectZones,
+ selectTypes,
+ selectSpecies,
+ selectComIndicators,
+ selectPopIndicators,
+ locale);
+ FileResult fileResult = new FileResult(LegacyResultRepository.ID, file);
+ return fileResult;
+ } catch (CoserBusinessException e) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't extract data", e);
+ }
+ throw new CoserWebException("Can't extract data", e);
+ }
+ }
+
+ // --------------------------------------------------------------------- //
+ // --- Misc methods ---------------------------------------------------- //
+ // --------------------------------------------------------------------- //
+
+ public Date getLastDataUpdateDate() {
+ try {
+ return webService.getLastDataUpdateDate();
+ } catch (CoserBusinessException e) {
+ throw new CoserWebException("Can't get last update date", e);
+ }
+ }
+
+ public CoserWebConfig getConfig() {
+ return config;
+ }
+
+}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceHelper.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/DocumentsAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/DocumentsAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/DocumentsAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -26,12 +26,12 @@
/**
* Documents action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class DocumentsAction extends CoserAction {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/DocumentsAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,26 +22,20 @@
package fr.ifremer.coser.web.actions;
-import java.util.Date;
+import fr.ifremer.coser.web.actions.common.CoserAction;
+import org.apache.struts2.ServletActionContext;
import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
-import org.apache.struts2.ServletActionContext;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
-
/**
* Action index, recupere la date de derniere mise à jour.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class IndexAction extends CoserAction {
@@ -56,32 +50,40 @@
/**
* Return l'url de l'application context inclut.
- *
+ *
* @return l'url du context
*/
public String getContextUrl() {
HttpServletRequest request = ServletActionContext.getRequest();
-
+
String url = request.getScheme() + "://" + request.getServerName();
if (request.getServerPort() != 80) {
url += ":" + request.getServerPort();
}
url += request.getContextPath();
-
+
return url;
}
@Override
public String execute() {
- WebService webService = ServiceFactory.getWebService();
+ dataUpdateDate = getService().getLastDataUpdateDate();
- try {
- dataUpdateDate = webService.getLastDataUpdateDate();
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get last update date", ex);
- }
-
return SUCCESS;
}
+
+ // @Override
+// public String execute() {
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// try {
+// dataUpdateDate = webService.getLastDataUpdateDate();
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get last update date", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,19 +22,18 @@
package fr.ifremer.coser.web.actions;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.web.actions.common.CoserAction;
-
/**
* Action index, recupere la liste des resultats.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class LocaleAction extends CoserAction {
@@ -42,7 +41,7 @@
private static final long serialVersionUID = 1663244944108703571L;
@Override
- @Action(results={@Result(location="index", type="redirect")})
+ @Action(results = {@Result(location = "index", type = "redirect")})
public String execute() {
return SUCCESS;
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/LocaleAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/QualityAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/QualityAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/QualityAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -26,12 +26,12 @@
/**
* Quality action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class QualityAction extends CoserAction {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/QualityAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SurveyAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SurveyAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SurveyAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -26,12 +26,12 @@
/**
* Survey description action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class SurveyAction extends CoserAction {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SurveyAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,32 +22,27 @@
package fr.ifremer.coser.web.actions;
-import java.io.File;
-
-import javax.servlet.http.HttpServletResponse;
-
+import fr.ifremer.coser.web.CoserWebConfig;
+import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.nuiton.util.StringUtil;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebConfig;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
/**
* Upload results action.
- *
+ * <p/>
* Cette action est appelée par l'interface swing cliente.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class UploadResultAction extends CoserAction {
@@ -94,31 +89,23 @@
}
// check
- CoserWebConfig config = ServiceFactory.getCoserConfig();
+ CoserWebConfig config = getService().getConfig();
if (config.getAdminPassword() == null || config.getAdminLogin() == null) {
if (log.isWarnEnabled()) {
log.warn("No admin password set, cannot enable result upload");
}
- }
- else {
+ } else {
if (config.getAdminLogin().equals(login) && equalsSHA1Password(config, sha1Password)) {
if (resultFile != null) {
- WebService webService = ServiceFactory.getWebService();
- try {
- webService.registerNewUploadedResults(login, resultFile);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't register new result file", ex);
- }
+ getService().registerNewUploadedResults(login, resultFile);
return SUCCESS;
- }
- else {
+ } else {
if (log.isWarnEnabled()) {
log.warn("File is null");
}
}
- }
- else {
+ } else {
if (log.isWarnEnabled()) {
log.warn("Wrong login/password : login = " + login);
}
@@ -126,31 +113,31 @@
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
}
}
-
+
return INPUT;
}
/**
* Check if sha1 password equals to config password.
- *
+ * <p/>
* Config password can be plain or sha1 encoded.
- *
- * @param config config
+ *
+ * @param config config
* @param sha1Password sha1 to check
* @return equality
*/
protected boolean equalsSHA1Password(CoserWebConfig config, String sha1Password) {
-
+
// first test sha1 equality
String configSha1Password = config.getAdminPassword();
boolean result = configSha1Password.equals(sha1Password);
-
+
// second test to encode sha1 of plain password
if (!result) {
configSha1Password = StringUtil.encodeSHA1(configSha1Password);
result = configSha1Password.equals(sha1Password);
}
-
+
return result;
}
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,8 +22,7 @@
package fr.ifremer.coser.web.actions.admin;
-import java.util.List;
-
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -32,27 +31,23 @@
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.util.List;
/**
* Project list action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
@ParentPackage("admin")
@InterceptorRefs({
- @InterceptorRef("loginInterceptor"),
- @InterceptorRef("defaultStack")
-})
-@Result(name="success", type="redirect", location="list-projects")
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("defaultStack")
+ })
+@Result(name = "success", type = "redirect", location = "list-projects")
public class DeleteProjectsAction extends CoserAction {
/** serialVersionUID. */
@@ -65,7 +60,7 @@
* resultat conrespondant dans le stockage indicateur.
*/
protected List<String> indicatorsZonesId;
-
+
/**
* Contient les identifiants des zones dont on souhaites supprimer le
* resultat conrespondant dans le stockage cartes.
@@ -75,32 +70,52 @@
public void setIndicatorsZonesId(List<String> indicatorsZonesId) {
this.indicatorsZonesId = indicatorsZonesId;
}
-
+
public void setMapsZonesId(List<String> mapsZonesId) {
this.mapsZonesId = mapsZonesId;
}
public String execute() {
- WebService webService = ServiceFactory.getWebService();
- try {
- if (log.isDebugEnabled()) {
- log.debug("Delete indicators zone : " + indicatorsZonesId);
- }
- if (CollectionUtils.isNotEmpty(indicatorsZonesId)) {
- webService.deleteIndicatorsResult(indicatorsZonesId);
- }
+ if (log.isDebugEnabled()) {
+ log.debug("Delete indicators zone : " + indicatorsZonesId);
+ }
+ if (CollectionUtils.isNotEmpty(indicatorsZonesId)) {
+ getService().deleteIndicatorsResult(indicatorsZonesId);
+ }
- if (log.isDebugEnabled()) {
- log.debug("Delete maps zone : " + mapsZonesId);
- }
- if (CollectionUtils.isNotEmpty(mapsZonesId)) {
- webService.deleteMapsResult(mapsZonesId);
- }
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get data from web service", ex);
+ if (log.isDebugEnabled()) {
+ log.debug("Delete maps zone : " + mapsZonesId);
}
+ if (CollectionUtils.isNotEmpty(mapsZonesId)) {
+ getService().deleteMapsResult(mapsZonesId);
+ }
return SUCCESS;
}
+
+// public String execute() {
+// WebService webService = ServiceFactory.getWebService();
+//
+// try {
+// if (log.isDebugEnabled()) {
+// log.debug("Delete indicators zone : " + indicatorsZonesId);
+// }
+// if (CollectionUtils.isNotEmpty(indicatorsZonesId)) {
+// webService.deleteIndicatorsResult(indicatorsZonesId);
+// }
+//
+// if (log.isDebugEnabled()) {
+// log.debug("Delete maps zone : " + mapsZonesId);
+// }
+// if (CollectionUtils.isNotEmpty(mapsZonesId)) {
+// webService.deleteMapsResult(mapsZonesId);
+// }
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get data from web service", ex);
+// }
+//
+// return SUCCESS;
+// }
+
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/IndexAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/IndexAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/IndexAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,26 +22,25 @@
package fr.ifremer.coser.web.actions.admin;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.ParentPackage;
-import fr.ifremer.coser.web.actions.common.CoserAction;
-
/**
* Admin index action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
@ParentPackage("admin")
@InterceptorRefs({
- @InterceptorRef("loginInterceptor"),
- @InterceptorRef("defaultStack")
-})
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("defaultStack")
+ })
public class IndexAction extends CoserAction {
/** serialVersionUID. */
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/IndexAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/ListProjectsAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/ListProjectsAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/ListProjectsAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,33 +22,28 @@
package fr.ifremer.coser.web.actions.admin;
-import java.util.List;
-import java.util.Map;
-
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.ParentPackage;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.util.List;
+import java.util.Map;
/**
* Project list action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
@ParentPackage("admin")
@InterceptorRefs({
- @InterceptorRef("loginInterceptor"),
- @InterceptorRef("defaultStack")
-})
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("defaultStack")
+ })
public class ListProjectsAction extends CoserAction {
/** serialVersionUID. */
@@ -77,28 +72,42 @@
}
public String getZoneDisplayName(String zoneId) {
- WebService webService = ServiceFactory.getWebService();
- String zoneDisplayName = null;
- try {
- zoneDisplayName = webService.getZoneFullName(zoneId);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone name", ex);
- }
- return zoneDisplayName;
+ return getService().getZoneFullName(zoneId);
}
public String execute() {
- WebService webService = ServiceFactory.getWebService();
- try {
- facades = webService.getFacades();
- zonesByFacades = webService.getZoneByFacade();
- indicatorsResults = webService.getIndicatorsResultsPerZone();
- mapsResults = webService.getMapsResultsPerZone();
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get data from web service", ex);
- }
+ facades = getService().getFacades();
+ zonesByFacades = getService().getZoneByFacade();
+ indicatorsResults = getService().getIndicatorsResultsPerZone();
+ mapsResults = getService().getMapsResultsPerZone();
return SUCCESS;
}
+
+// public String getZoneDisplayName(String zoneId) {
+// WebService webService = ServiceFactory.getWebService();
+// String zoneDisplayName = null;
+// try {
+// zoneDisplayName = webService.getZoneFullName(zoneId);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone name", ex);
+// }
+// return zoneDisplayName;
+// }
+//
+// public String execute() {
+// WebService webService = ServiceFactory.getWebService();
+//
+// try {
+// facades = webService.getFacades();
+// zonesByFacades = webService.getZoneByFacade();
+// indicatorsResults = webService.getIndicatorsResultsPerZone();
+// mapsResults = webService.getMapsResultsPerZone();
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get data from web service", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/ListProjectsAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -26,14 +26,14 @@
/**
* Login action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
-public class LoginAction extends CoserAction {
+public class LoginAction extends CoserAction {
/** serialVersionUID. */
private static final long serialVersionUID = -1576602720835497842L;
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginInterceptor.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginInterceptor.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginInterceptor.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,23 +22,22 @@
package fr.ifremer.coser.web.actions.admin;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.apache.struts2.StrutsStatics;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
+import org.apache.struts2.StrutsStatics;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
/**
* Authentication interceptor.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class LoginInterceptor implements Interceptor {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/LoginInterceptor.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/PerformLoginAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/PerformLoginAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/PerformLoginAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,27 +22,26 @@
package fr.ifremer.coser.web.actions.admin;
-import java.util.Map;
-
+import fr.ifremer.coser.web.CoserWebConfig;
+import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.interceptor.SessionAware;
import org.nuiton.util.StringUtil;
-import fr.ifremer.coser.web.CoserWebConfig;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.util.Map;
/**
* Perform login action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
-@Result(name="success", type="redirect", location="index")
-public class PerformLoginAction extends CoserAction implements SessionAware {
+@Result(name = "success", type = "redirect", location = "index")
+public class PerformLoginAction extends CoserAction implements SessionAware {
/** serialVersionUID. */
private static final long serialVersionUID = -1576602720835497842L;
@@ -70,8 +69,8 @@
}
@Override
- public String execute() throws Exception {
- CoserWebConfig config = ServiceFactory.getCoserConfig();
+ public String execute() throws Exception {
+ CoserWebConfig config = getService().getConfig();
if (config.getAdminLogin().equals(login) && equalsSHA1Password(config, password)) {
session.put("login", login);
return SUCCESS;
@@ -83,27 +82,27 @@
/**
* Check if sha1 password equals to config password.
- *
+ * <p/>
* Config password can be plain or sha1 encoded.
- *
- * @param config config
+ *
+ * @param config config
* @param password password to check
* @return equality
*/
protected boolean equalsSHA1Password(CoserWebConfig config, String password) {
-
+
// first test sha1 equality
String configSha1Password = config.getAdminPassword();
String sha1Password = StringUtil.encodeSHA1(password);
boolean result = configSha1Password.equals(sha1Password);
-
+
// second test to encode sha1 of plain password
if (!result) {
configSha1Password = StringUtil.encodeSHA1(configSha1Password);
result = configSha1Password.equals(sha1Password);
}
-
+
return result;
}
-
+
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/PerformLoginAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -26,12 +26,12 @@
/**
* Action index, affiche la liste des facades majeures.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class FacadeAction extends CommonFacade {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/FacadeAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,25 +22,21 @@
package fr.ifremer.coser.web.actions.com;
-import java.util.Locale;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
+
import java.util.Map;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
-
/**
* Affiche le graphique demandé.
- *
+ * <p/>
* Parametre : zone, species, indicator.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class GraphAction extends CoserAction {
@@ -59,6 +55,8 @@
/** La liste actuellement selectionnée (cas null géré). */
protected String list;
+ protected IndicatorRequest request;
+
public String getFacade() {
return facade;
}
@@ -96,52 +94,77 @@
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get facade display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
-
+
public String getZoneDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getZoneForFacade(facade, false, false).get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone display name", ex);
- }
- return displayName;
+ return getService().getZoneDisplayName(request);
}
-
+
public String getIndicatorDisplayName() {
-
- Locale locale = getLocale();
-
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getIndicators(zone, null, locale).get(indicator);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getIndicatorDisplayName(request);
}
@Override
public String execute() {
- Locale locale = getLocale();
-
- WebService webService = ServiceFactory.getWebService();
- try {
- lists = webService.getIndicatorLists(zone, indicator, locale);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get indicator's list names", ex);
- }
+ request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addIndicator(indicator).
+ addSpecies(list).
+ toCommunityIndicatorRequest();
+ lists = getService().getAvailableSpecies(request);
return SUCCESS;
}
+
+// public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get facade display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getZoneDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getZoneForFacade(facade, false, false).get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getIndicatorDisplayName() {
+//
+// Locale locale = getLocale();
+//
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getIndicators(zone, null, locale).get(indicator);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
+//
+// @Override
+// public String execute() {
+//
+// Locale locale = getLocale();
+//
+// WebService webService = ServiceFactory.getWebService();
+// try {
+// lists = webService.getIndicatorLists(zone, indicator, locale);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get indicator's list names", ex);
+// }
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,37 +22,32 @@
package fr.ifremer.coser.web.actions.com;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.util.Locale;
-
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.io.InputStream;
/**
* Affiche le graphique demandé.
- *
+ * <p/>
* Parametre : zone, indicator.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class GraphDataAction extends CoserAction {
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
+ protected String facade;
+
protected String zone;
protected String indicator;
@@ -60,6 +55,12 @@
/** La liste actuellement selectionnée (cas null géré). */
protected String list;
+ protected FileResult result;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
public String getZone() {
return zone;
}
@@ -84,26 +85,44 @@
this.list = list;
}
- @Action(results= {@Result(type="stream", params={"contentType", "image/png", "inputName", "inputStream"})})
+ public String getSource() {
+ return result.getSource();
+ }
+
+ // @Action(results = {@Result(type = "stream", params = {"contentType", "image/png", "inputName", "inputStream"})})
+ @Action(results = {@Result(type = "stream", params = {"contentType", "image/png"})})
public String execute() {
+ IndicatorRequest request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addIndicator(indicator).
+ addResultType(IndicatorRequest.ResultType.DATA).
+ addSpecies(list).
+ toCommunityIndicatorRequest();
+ result = getService().getFileResult(request);
return SUCCESS;
}
public InputStream getInputStream() {
- WebService webService = ServiceFactory.getWebService();
-
- Locale locale = getLocale();
-
- InputStream input = null;
- try {
- File mapImage = webService.getChart(zone, null, indicator, list, locale);
- input = new FileInputStream(mapImage);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get map file", ex);
- } catch (FileNotFoundException ex) {
- throw new CoserWebException("Can't get map file", ex);
- }
-
+ InputStream input = result.getInputStream();
return input;
}
+
+// public InputStream getInputStream() {
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// InputStream input = null;
+// try {
+// File mapImage = webService.getChart(zone, null, indicator, list, locale);
+// input = new FileInputStream(mapImage);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get map file", ex);
+// } catch (FileNotFoundException ex) {
+// throw new CoserWebException("Can't get map file", ex);
+// }
+//
+// return input;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDataAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDownloadAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDownloadAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDownloadAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,38 +22,31 @@
package fr.ifremer.coser.web.actions.com;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.Locale;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.io.InputStream;
/**
* Télécharge les données qui ont servi a généré le graph au format CSV.
- *
+ * <p/>
* Parametre : zone, indicator.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class GraphDownloadAction extends CoserAction {
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- private static final Log log = LogFactory.getLog(GraphDownloadAction.class);
+ protected String facade;
protected String zone;
@@ -62,6 +55,12 @@
/** La liste actuellement selectionnée (cas null géré). */
protected String list;
+ protected FileResult result;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
public String getZone() {
return zone;
}
@@ -86,8 +85,21 @@
this.list = list;
}
- @Action(results= {@Result(type="stream", params={"contentType", "application/zip", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ public String getSource() {
+ return result.getSource();
+ }
+
+ // @Action(results = {@Result(type = "stream", params = {"contentType", "application/zip", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ @Action(results = {@Result(type = "stream", params = {"contentType", "application/zip", "contentDisposition", "attachment; filename=\"${filename}\""})})
public String execute() {
+ IndicatorRequest request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addIndicator(indicator).
+ addResultType(IndicatorRequest.ResultType.GRAPH).
+ addSpecies(list).
+ toCommunityIndicatorRequest();
+ result = getService().getFileResult(request);
return SUCCESS;
}
@@ -96,21 +108,26 @@
}
public InputStream getInputStream() {
- WebService webService = ServiceFactory.getWebService();
-
- Locale locale = getLocale();
-
- InputStream input = null;
- try {
- File mapImage = webService.getChartData(zone, null, indicator, list, locale);
- input = new FileInputStream(mapImage);
- } catch (Exception ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't get file data", ex);
- }
- throw new CoserWebException("Can't get map file", ex);
- }
-
+ InputStream input = result.getInputStream();
return input;
}
+
+// public InputStream getInputStream() {
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// InputStream input = null;
+// try {
+// File mapImage = webService.getChartData(zone, null, indicator, list, locale);
+// input = new FileInputStream(mapImage);
+// } catch (Exception ex) {
+// if (log.isErrorEnabled()) {
+// log.error("Can't get file data", ex);
+// }
+// throw new CoserWebException("Can't get map file", ex);
+// }
+//
+// return input;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/GraphDownloadAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/IndicatorAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/IndicatorAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/IndicatorAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,20 +22,28 @@
package fr.ifremer.coser.web.actions.com;
+import fr.ifremer.coser.result.request.CommunityIndicatorRequest;
import fr.ifremer.coser.web.actions.common.CommonIndicator;
/**
* Action index, recupere la liste des indicateurs.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class IndicatorAction extends CommonIndicator {
/** serialVersionUID. */
private static final long serialVersionUID = 1663244944108703571L;
+ @Override
+ protected CommunityIndicatorRequest createRequest() {
+ return requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ toCommunityIndicatorRequest();
+ }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/IndicatorAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,20 +22,27 @@
package fr.ifremer.coser.web.actions.com;
+import fr.ifremer.coser.result.CoserRequest;
import fr.ifremer.coser.web.actions.common.CommonZone;
/**
* Affiche la liste des sous zones (zone).
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class ZoneAction extends CommonZone {
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
+ @Override
+ protected CoserRequest createRequest() {
+ return requestBuilder().
+ addFacade(facade).
+ toCommunityIndicatorRequest();
+ }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/com/ZoneAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonFacade.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonFacade.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonFacade.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -24,19 +24,14 @@
import java.util.Map;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
/**
* Facade list action.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public abstract class CommonFacade extends CoserAction {
@@ -52,15 +47,22 @@
@Override
public String execute() {
- WebService webService = ServiceFactory.getWebService();
- try {
- // renvoi la liste des facadeid et leur label associé
- facades = webService.getFacades();
-
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get facades", ex);
- }
-
+ facades = getService().getFacades();
return SUCCESS;
}
+
+// @Override
+// public String execute() {
+//
+// WebService webService = ServiceFactory.getWebService();
+// try {
+// // renvoi la liste des facadeid et leur label associé
+// facades = webService.getFacades();
+//
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get facades", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonFacade.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonIndicator.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonIndicator.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonIndicator.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,26 +22,21 @@
package fr.ifremer.coser.web.actions.common;
-import java.util.Locale;
-import java.util.Map;
-
+import fr.ifremer.coser.result.request.IndicatorRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
+import java.util.Map;
/**
* Recupere la liste des indicateurs à partir d'une zone et d'une espece (peut
* être null dans le cas des communautés).
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public abstract class CommonIndicator extends CoserAction {
@@ -55,11 +50,15 @@
protected String zone;
protected String species;
-
+
protected String zonePicture;
protected Map<String, String> indicators;
+ protected IndicatorRequest request;
+
+ protected abstract IndicatorRequest createRequest();
+
public String getFacade() {
return facade;
}
@@ -87,42 +86,21 @@
public Map<String, String> getIndicators() {
return indicators;
}
-
+
public String getZonePicture() {
return zonePicture;
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get facade display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
-
+
public String getZoneDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getZoneForFacade(facade, false, false).get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone display name", ex);
- }
- return displayName;
+ return getService().getZoneDisplayName(request);
}
-
+
public String getSpeciesDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getSpecies(zone, false).get(species);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getSpeciesDisplayName(request);
}
@Override
@@ -132,18 +110,65 @@
log.info(String.format("Looking for indicator for zone %s and species %s", zone, species));
}
- WebService webService = ServiceFactory.getWebService();
+ request = createRequest();
- Locale locale = getLocale();
+ indicators = getService().getAvailableIndicators(request);
+ zonePicture = getService().getZonePictures().get(zone);
- try {
- indicators = webService.getIndicators(zone, species, locale);
-
- zonePicture = webService.getZonePictures().get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get indicators", ex);
- }
-
return SUCCESS;
}
+
+// public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get facade display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getZoneDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getZoneForFacade(facade, false, false).get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getSpeciesDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getSpecies(zone, false).get(species);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
+// @Override
+// public String execute() {
+//
+// if (log.isInfoEnabled()) {
+// log.info(String.format("Looking for indicator for zone %s and species %s", zone, species));
+// }
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// try {
+// indicators = webService.getIndicators(zone, species, locale);
+//
+// zonePicture = webService.getZonePictures().get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get indicators", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonIndicator.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonZone.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonZone.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonZone.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,23 +22,19 @@
package fr.ifremer.coser.web.actions.common;
-import java.util.Locale;
+import fr.ifremer.coser.result.CoserRequest;
+
import java.util.Map;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-
/**
* Affiche la liste des sous zones (zone) et leurs liste des cartes
* et commentaires associés.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public abstract class CommonZone extends CoserAction {
@@ -53,6 +49,8 @@
protected Map<String, String> zonesMetaInfo;
+ protected abstract CoserRequest createRequest();
+
public String getFacade() {
return facade;
}
@@ -74,32 +72,47 @@
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
@Override
public String execute() {
- WebService webService = ServiceFactory.getWebService();
+ CoserRequest request = createRequest();
+ zones = getService().getAvailableZones(request);
+ zonesPictures = getService().getZonePictures();
+ zonesMetaInfo = getService().getZoneMetaInfo(getLocale());
- Locale locale = getLocale();
-
- try {
- // renvoi la liste des id subzone-survey et leurs label associé
- zones = webService.getZoneForFacade(facade, false, false);
- zonesPictures = webService.getZonePictures();
- zonesMetaInfo = webService.getZoneMetaInfo(locale);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
return SUCCESS;
}
+
+// public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
+//
+// @Override
+// public String execute() {
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// try {
+// // renvoi la liste des id subzone-survey et leurs label associé
+// zones = webService.getZoneForFacade(facade, false, false);
+// zonesPictures = webService.getZonePictures();
+// zonesMetaInfo = webService.getZoneMetaInfo(locale);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone map", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonZone.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CoserAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CoserAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CoserAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,9 +1,9 @@
/*
* #%L
- * $Id: CommonFacade.java 519 2011-01-17 17:03:28Z chatellier $
- * $HeadURL: svn+ssh://chatellier@labs.libre-entreprise.org/svnroot/coser/trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CommonFacade.java $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -23,20 +23,20 @@
package fr.ifremer.coser.web.actions.common;
import com.opensymphony.xwork2.ActionSupport;
-
+import fr.ifremer.coser.result.request.CoserRequestBuilder;
import fr.ifremer.coser.web.CoserWebConfig;
-import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.web.ServiceHelper;
/**
* Toutes les actions doivent étendre celle ci. Contient le code commun
* récurent, et notamment les actions utilisé par le layout et devant
* être presentes sur toutes les pages.
- *
+ *
* @author chatellier
- * @version $Revision: 519 $
- *
- * Last update : $Date: 2011-01-17 18:03:28 +0100 (lun. 17 janv. 2011) $
- * By : $Author: chatellier $
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public abstract class CoserAction extends ActionSupport {
@@ -44,35 +44,61 @@
private static final long serialVersionUID = 311574866032741326L;
/**
+ * To access business layer.
+ *
+ * @since 1.5
+ */
+ protected transient ServiceHelper service;
+
+ /**
* Recupere l'email dans la configuration.
- *
+ *
* @return admin email
*/
public String getAdminEmail() {
- CoserWebConfig config = ServiceFactory.getCoserConfig();
+ CoserWebConfig config = getService().getConfig();
String email = config.getAdminEmail();
return email;
}
-
+
/**
* Recupere l'email dans la configuration.
- *
+ *
* @return admin email
*/
public String getApplicationVersion() {
- CoserWebConfig config = ServiceFactory.getCoserConfig();
+ CoserWebConfig config = getService().getConfig();
String email = config.getApplicationVersion();
return email;
}
/**
* Get analytics id from configuration.
- *
+ *
* @return analytics id
*/
public String getAnalyticsId() {
- CoserWebConfig config = ServiceFactory.getCoserConfig();
+ CoserWebConfig config = getService().getConfig();
String id = config.getAnalyticsId();
return id;
}
+
+ /**
+ * @return a new request builder.
+ * @since 1.5
+ */
+ protected CoserRequestBuilder requestBuilder() {
+ return new CoserRequestBuilder(getLocale());
+ }
+
+ /**
+ * @return service helper for this action
+ * @since 1.5
+ */
+ protected ServiceHelper getService() {
+ if (service == null) {
+ service = new ServiceHelper(this);
+ }
+ return service;
+ }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/common/CoserAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -26,12 +26,12 @@
/**
* Action index, affiche la liste des facades majeures.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class FacadeAction extends CommonFacade {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/FacadeAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,20 +22,17 @@
package fr.ifremer.coser.web.actions.map;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.result.request.MapRequest;
import fr.ifremer.coser.web.actions.common.CoserAction;
/**
* Action index, recupere la liste des resultats.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class MapAction extends CoserAction {
@@ -48,6 +45,8 @@
protected String species;
+ protected MapRequest request;
+
public void setFacade(String facade) {
this.facade = facade;
}
@@ -73,35 +72,58 @@
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
public String getZoneDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getZoneForFacade(facade, false, true).get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone display name", ex);
- }
- return displayName;
+ return getService().getZoneDisplayName(request);
}
public String getSpeciesDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getSpecies(zone, true).get(species);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getSpeciesDisplayName(request);
}
+
+ @Override
+ public String execute() throws Exception {
+
+ request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addSpecies(species).
+ toMapRequest();
+ return SUCCESS;
+ }
+
+ // public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getZoneDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getZoneForFacade(facade, false, true).get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getSpeciesDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getSpecies(zone, true).get(species);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,38 +22,45 @@
package fr.ifremer.coser.web.actions.map;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.request.MapRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.io.InputStream;
/**
* Appelé par le navigateur pour récuperer le contenu de l'image.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class MapDataAction extends CoserAction {
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(MapDataAction.class);
+
/** serialVersionUID. */
private static final long serialVersionUID = 1663244944108703571L;
+ protected String facade;
+
protected String zone;
protected String species;
+ protected FileResult result;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
public String getZone() {
return zone;
}
@@ -65,30 +72,48 @@
public String getSpecies() {
return species;
}
-
+
public void setSpecies(String species) {
this.species = species;
}
-
- @Action(results= {@Result(type="stream", params={"contentType", "image/png", "inputName", "inputStream"})})
+
+ public String getSource() {
+ return result.getSource();
+ }
+
+ // @Action(results = {@Result(type = "stream", params = {"contentType", "image/png", "inputName", "inputStream"})})
+ @Action(results = {@Result(type = "stream", params = {"contentType", "image/png"})})
public String execute() {
+ // work with null species (get Repartition-stations map)
+ MapRequest request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addSpecies(species == null ? MapRequest.NULL_SPECIES : species).
+ toMapRequest();
+
+ if (log.isInfoEnabled()) {
+ log.info("Looking for map of species: " + request.getSpecies());
+ }
+ result = getService().getFileResult(request);
return SUCCESS;
}
-
+
public InputStream getInputStream() {
- WebService webService = ServiceFactory.getWebService();
-
- InputStream input = null;
- try {
- // work with null species (get Repartition-stations map)
- File mapImage = webService.getMapFile(zone, species);
- input = new FileInputStream(mapImage);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get map file", ex);
- } catch (FileNotFoundException ex) {
- throw new CoserWebException("Can't get map file", ex);
- }
-
+ InputStream input = result.getInputStream();
return input;
}
+
+// InputStream input = null;
+// try {
+// // work with null species (get Repartition-stations map)
+// File mapImage = webService.getMapFile(zone, species);
+// input = new FileInputStream(mapImage);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get map file", ex);
+// } catch (FileNotFoundException ex) {
+// throw new CoserWebException("Can't get map file", ex);
+// }
+//
+// return input;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/MapDataAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SpeciesAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SpeciesAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SpeciesAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,25 +22,21 @@
package fr.ifremer.coser.web.actions.map;
-import java.util.Map;
-
+import fr.ifremer.coser.result.request.MapRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.util.Map;
/**
* Recupere la liste des especes correspondant a une campagne.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class SpeciesAction extends CoserAction {
@@ -55,14 +51,16 @@
protected Map<String, String> species;
- public void setFacade(String facade) {
- this.facade = facade;
- }
+ protected MapRequest request;
public String getFacade() {
return facade;
}
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
public String getZone() {
return zone;
}
@@ -76,46 +74,76 @@
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
public String getZoneDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getZoneForFacade(facade, false, true).get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone display name", ex);
- }
- return displayName;
+ return getService().getZoneDisplayName(request);
}
@Override
public String execute() {
+ request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ toMapRequest();
+
if (log.isInfoEnabled()) {
log.info("Looking for species for zone " + zone);
}
- WebService webService = ServiceFactory.getWebService();
+ species = getService().getAvailableSpecies(request);
- try {
- species = webService.getSpecies(zone, true);
-
- if (log.isDebugEnabled()) {
- log.debug("Species are : " + species);
- }
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone species", ex);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Species are : " + species);
}
return SUCCESS;
}
+
+// public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getZoneDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getZoneForFacade(facade, false, true).get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone display name", ex);
+// }
+// return displayName;
+// }
+//
+// @Override
+// public String execute() {
+//
+// if (log.isInfoEnabled()) {
+// log.info("Looking for species for zone " + zone);
+// }
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// try {
+// species = webService.getSpecies(zone, true);
+//
+// if (log.isDebugEnabled()) {
+// log.debug("Species are : " + species);
+// }
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone species", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/SpeciesAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,22 +22,17 @@
package fr.ifremer.coser.web.actions.map;
-import java.util.Locale;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.result.request.MapRequest;
import fr.ifremer.coser.web.actions.common.CommonZone;
/**
* Affiche la liste des sous zones (zone).
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class ZoneAction extends CommonZone {
@@ -45,21 +40,26 @@
private static final long serialVersionUID = 3385467755357775199L;
@Override
- public String execute() {
+ protected MapRequest createRequest() {
+ return requestBuilder().addFacade(facade).toMapRequest();
+ }
- WebService webService = ServiceFactory.getWebService();
-
- Locale locale = getLocale();
-
- try {
- // renvoi la liste des id subzone-survey et leurs label associé
- zones = webService.getZoneForFacade(facade, false, true);
- zonesPictures = webService.getZonePictures();
- zonesMetaInfo = webService.getZoneMetaInfo(locale);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
+// @Override
+// public String execute() {
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// try {
+// // renvoi la liste des id subzone-survey et leurs label associé
+// zones = webService.getZoneForFacade(facade, false, true);
+// zonesPictures = webService.getZonePictures();
+// zonesMetaInfo = webService.getZoneMetaInfo(locale);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone map", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/map/ZoneAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -26,12 +26,12 @@
/**
* Action index, affiche la liste des facades majeures.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class FacadeAction extends CommonFacade {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/FacadeAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,24 +22,19 @@
package fr.ifremer.coser.web.actions.pop;
-import java.util.Locale;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
import fr.ifremer.coser.web.actions.common.CoserAction;
/**
* Affiche le graphique demandé.
- *
+ * <p/>
* Parametre : zone, species, indicator.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class GraphAction extends CoserAction {
@@ -49,11 +44,13 @@
protected String facade;
protected String zone;
-
+
protected String species;
-
+
protected String indicator;
+ protected PopulationIndicatorRequest request;
+
public String getFacade() {
return facade;
}
@@ -87,54 +84,77 @@
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get facade display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
public String getZoneDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getZoneForFacade(facade, false, false).get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone display name", ex);
- }
- return displayName;
+ return getService().getZoneDisplayName(request);
}
-
+
public String getSpeciesDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getSpecies(zone, false).get(species);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getSpeciesDisplayName(request);
}
-
+
public String getIndicatorDisplayName() {
-
- Locale locale = getLocale();
-
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getIndicators(zone, species, locale).get(indicator);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get species display name", ex);
- }
- return displayName;
+ return getService().getIndicatorDisplayName(request);
}
@Override
public String execute() {
+
+ request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addSpecies(species).
+ addIndicator(indicator).
+ toPopulationIndicatorRequest();
return SUCCESS;
}
+
+// public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get facade display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getZoneDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getZoneForFacade(facade, false, false).get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getSpeciesDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getSpecies(zone, false).get(species);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getIndicatorDisplayName() {
+//
+// Locale locale = getLocale();
+//
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getIndicators(zone, species, locale).get(indicator);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get species display name", ex);
+// }
+// return displayName;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,45 +22,47 @@
package fr.ifremer.coser.web.actions.pop;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.util.Locale;
-
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.io.InputStream;
/**
* Affiche le graphique demandé.
- *
+ * <p/>
* Parametre : zone, species, indicator.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class GraphDataAction extends CoserAction {
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
+ protected String facade;
+
protected String zone;
-
+
protected String species;
-
+
protected String indicator;
protected String chartUrl;
+ protected FileResult result;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
public String getZone() {
return zone;
}
@@ -84,27 +86,45 @@
public void setIndicator(String indicator) {
this.indicator = indicator;
}
-
- @Action(results= {@Result(type="stream", params={"contentType", "image/png", "inputName", "inputStream"})})
+
+ public String getSource() {
+ return result.getSource();
+ }
+
+ // @Action(results = {@Result(type = "stream", params = {"contentType", "image/png", "inputName", "inputStream"})})
+ @Action(results = {@Result(type = "stream", params = {"contentType", "image/png"})})
public String execute() {
+ PopulationIndicatorRequest request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addSpecies(species).
+ addIndicator(indicator).
+ addResultType(IndicatorRequest.ResultType.DATA).
+ toPopulationIndicatorRequest();
+ result = getService().getFileResult(request);
return SUCCESS;
}
-
+
public InputStream getInputStream() {
- WebService webService = ServiceFactory.getWebService();
-
- Locale locale = getLocale();
-
- InputStream input = null;
- try {
- File mapImage = webService.getChart(zone, species, indicator, null, locale);
- input = new FileInputStream(mapImage);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get map file", ex);
- } catch (FileNotFoundException ex) {
- throw new CoserWebException("Can't get map file", ex);
- }
-
+ InputStream input = result.getInputStream();
return input;
}
+
+// public InputStream getInputStream() {
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// InputStream input = null;
+// try {
+// File mapImage = webService.getChart(zone, species, indicator, null, locale);
+// input = new FileInputStream(mapImage);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get map file", ex);
+// } catch (FileNotFoundException ex) {
+// throw new CoserWebException("Can't get map file", ex);
+// }
+//
+// return input;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDataAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDownloadAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDownloadAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDownloadAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,38 +22,32 @@
package fr.ifremer.coser.web.actions.pop;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.Locale;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.result.request.IndicatorRequest;
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.io.InputStream;
/**
* Télécharge les données qui ont servi a généré le graph au format CSV.
- *
+ * <p/>
* Parametre : zone, species, indicator.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class GraphDownloadAction extends CoserAction {
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- private static final Log log = LogFactory.getLog(GraphDownloadAction.class);
+ protected String facade;
protected String zone;
@@ -61,6 +55,12 @@
protected String indicator;
+ protected FileResult result;
+
+ public void setFacade(String facade) {
+ this.facade = facade;
+ }
+
public String getZone() {
return zone;
}
@@ -85,8 +85,21 @@
this.species = species;
}
- @Action(results= {@Result(type="stream", params={"contentType", "text/csv", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ public String getSource() {
+ return result.getSource();
+ }
+
+ // @Action(results = {@Result(type = "stream", params = {"contentType", "text/csv", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ @Action(results = {@Result(type = "stream", params = {"contentType", "text/csv", "contentDisposition", "attachment; filename=\"${filename}\""})})
public String execute() {
+ PopulationIndicatorRequest request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addSpecies(species).
+ addIndicator(indicator).
+ addResultType( IndicatorRequest.ResultType.GRAPH).
+ toPopulationIndicatorRequest();
+ result = getService().getFileResult(request);
return SUCCESS;
}
@@ -95,21 +108,26 @@
}
public InputStream getInputStream() {
- WebService webService = ServiceFactory.getWebService();
-
- Locale locale = getLocale();
-
- InputStream input = null;
- try {
- File mapImage = webService.getChartData(zone, species, indicator, null, locale);
- input = new FileInputStream(mapImage);
- } catch (Exception ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't get file data", ex);
- }
- throw new CoserWebException("Can't get map file", ex);
- }
-
+ InputStream input = result.getInputStream();
return input;
}
+
+// public InputStream getInputStream() {
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// InputStream input = null;
+// try {
+// File mapImage = webService.getChartData(zone, species, indicator, null, locale);
+// input = new FileInputStream(mapImage);
+// } catch (Exception ex) {
+// if (log.isErrorEnabled()) {
+// log.error("Can't get file data", ex);
+// }
+// throw new CoserWebException("Can't get map file", ex);
+// }
+//
+// return input;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/GraphDownloadAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/IndicatorAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/IndicatorAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/IndicatorAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,20 +22,29 @@
package fr.ifremer.coser.web.actions.pop;
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
import fr.ifremer.coser.web.actions.common.CommonIndicator;
/**
* Action index, recupere la liste des resultats.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class IndicatorAction extends CommonIndicator {
/** serialVersionUID. */
private static final long serialVersionUID = 1663244944108703571L;
+ @Override
+ protected PopulationIndicatorRequest createRequest() {
+ return requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ addSpecies(species).
+ toPopulationIndicatorRequest();
+ }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/IndicatorAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SpeciesAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SpeciesAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SpeciesAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,25 +22,21 @@
package fr.ifremer.coser.web.actions.pop;
-import java.util.Map;
-
+import fr.ifremer.coser.result.request.PopulationIndicatorRequest;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.util.Map;
/**
* Action index, recupere la liste des resultats.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class SpeciesAction extends CoserAction {
@@ -57,6 +53,8 @@
protected String zonePicture;
+ protected PopulationIndicatorRequest request;
+
public String getFacade() {
return facade;
}
@@ -82,25 +80,11 @@
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get facade display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
public String getZoneDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getZoneForFacade(facade, false, false).get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone display name", ex);
- }
- return displayName;
+ return getService().getZoneDisplayName(request);
}
@Override
@@ -110,20 +94,64 @@
log.info("Looking for species for zone " + zone);
}
- WebService webService = ServiceFactory.getWebService();
+ request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ toPopulationIndicatorRequest();
- try {
- species = webService.getSpecies(zone, false);
+ species = getService().getAvailableSpecies(request);
+ if (log.isDebugEnabled()) {
+ log.debug("Species are : " + species);
+ }
- zonePicture = webService.getZonePictures().get(zone);
+ zonePicture = getService().getZonePictures().get(zone);
- if (log.isDebugEnabled()) {
- log.debug("Species are : " + species);
- }
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone species", ex);
- }
-
return SUCCESS;
}
+
+// public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get facade display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getZoneDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getZoneForFacade(facade, false, false).get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone display name", ex);
+// }
+// return displayName;
+// }
+//
+// @Override
+// public String execute() {
+//
+// if (log.isInfoEnabled()) {
+// log.info("Looking for species for zone " + zone);
+// }
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// try {
+// species = webService.getSpecies(zone, false);
+//
+// zonePicture = webService.getZonePictures().get(zone);
+//
+// if (log.isDebugEnabled()) {
+// log.debug("Species are : " + species);
+// }
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone species", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/SpeciesAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2010 - 2011 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,19 +22,27 @@
package fr.ifremer.coser.web.actions.pop;
+import fr.ifremer.coser.result.CoserRequest;
import fr.ifremer.coser.web.actions.common.CommonZone;
/**
* Affiche la liste des sous zones (zone).
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class ZoneAction extends CommonZone {
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
+
+ @Override
+ protected CoserRequest createRequest() {
+ return requestBuilder().
+ addFacade(facade).
+ toPopulationIndicatorRequest();
+ }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/pop/ZoneAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -3,7 +3,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2012 Ifremer, Codelutin, Chatellier Eric
+ * Copyright (C) 2012 Ifremer, Codelutin, Chatellier Eric, Chemit Tony
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -22,51 +22,42 @@
package fr.ifremer.coser.web.actions.search;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
+import fr.ifremer.coser.result.FileResult;
+import fr.ifremer.coser.util.DataType;
+import fr.ifremer.coser.web.actions.common.CoserAction;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.interceptor.ServletRequestAware;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.util.DataType;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
-import fr.ifremer.coser.web.actions.common.CoserAction;
+import javax.servlet.http.HttpServletRequest;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
/**
* Affiche le formulaire de recherche pour extraction d'un zip contenant
* les sources des projets choisit, et un pdf avec les graphiques et les données
* des graphiques.
- *
+ *
* @author echatellier
* @since 1.4
*/
@InterceptorRefs({
- @InterceptorRef("defaultStack"),
- @InterceptorRef(value="execAndWait",
- params={"excludeMethods","execute,quality"})
-})
+ @InterceptorRef("defaultStack"),
+ @InterceptorRef(value = "execAndWait",
+ params = {"excludeMethods", "execute,quality"})
+ })
public class ExtractAction extends CoserAction implements ServletRequestAware {
/** serialVersionUID. */
private static final long serialVersionUID = 8497086194191374797L;
- private static final Log log = LogFactory.getLog(ExtractAction.class);
+ public static final String DOWNLOAD = "download";
protected Map<String, String> zones;
@@ -90,50 +81,10 @@
protected boolean accepted;
- protected HttpServletRequest request;
+ protected transient HttpServletRequest request;
- /**
- * Pour le hack du execute and wait.
- * On met des choses dans la session pour pouvoir les récupérer.
- */
- @Override
- public void setServletRequest(HttpServletRequest request) {
- this.request = request;
- }
+ protected FileResult resultFile;
- @Override
- public String execute() {
-
- String result;
-
- if (StringUtils.isNotBlank(submitAction)) {
- result = SUCCESS;
- } else {
- result = INPUT;
- Locale locale = getLocale();
- WebService webService = ServiceFactory.getWebService();
-
- try {
- // renvoi la liste des id subzone-survey et leurs label associé
- zones = webService.getZoneForFacade(null, false, false);
- if (CollectionUtils.isNotEmpty(selectZones)) {
- species = webService.getSpecies(selectZones, false);
-
- if (selectTypes != null && selectTypes.contains(DataType.COMMUNITY)) {
- comIndicators = webService.getIndicators(selectZones, DataType.COMMUNITY, locale);
- }
- if (selectTypes != null && selectTypes.contains(DataType.POPULATION)) {
- popIndicators = webService.getIndicators(selectZones, DataType.POPULATION, locale);
- }
- }
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
- }
-
- return result;
- }
-
public Map<String, String> getZones() {
return zones;
}
@@ -198,22 +149,58 @@
this.accepted = accepted;
}
- @Action(value="extract-quality",
- results= {
- @Result(location="/WEB-INF/content/search/extract-success.jsp"),
- @Result(name="download", type="redirect", params={
- "location", "${location}"})})
+ /**
+ * Pour le hack du execute and wait.
+ * On met des choses dans la session pour pouvoir les récupérer.
+ */
+ @Override
+ public void setServletRequest(HttpServletRequest request) {
+ this.request = request;
+ }
+
+ @Override
+ public String execute() {
+
+ String result;
+
+ if (StringUtils.isNotBlank(submitAction)) {
+ result = SUCCESS;
+ } else {
+ result = INPUT;
+
+ // renvoi la liste des id subzone-survey et leurs label associé
+ zones = getService().getZoneForFacade();
+ if (CollectionUtils.isNotEmpty(selectZones)) {
+ species = getService().getSpecies(selectZones);
+
+ if (selectTypes != null && selectTypes.contains(DataType.COMMUNITY)) {
+ comIndicators = getService().getIndicators(selectZones, DataType.COMMUNITY);
+ }
+ if (selectTypes != null && selectTypes.contains(DataType.POPULATION)) {
+ popIndicators = getService().getIndicators(selectZones, DataType.POPULATION);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Action(value = "extract-quality",
+ results = {
+ @Result(location = "/WEB-INF/content/search/extract-success.jsp"),
+ @Result(name = DOWNLOAD, type = "redirect", params = {
+ "location", "${location}"})})
public String quality() {
String result;
if (!accepted) {
addFieldError("accepted", getText("message.quality.notaccepted"));
- result = "success";
+ result = SUCCESS;
} else {
-
+
// petit hack pour mettre la locale dans la session car
// après, on n'a plus accès au context dans le executeAndWait
request.getSession().setAttribute("locale", getLocale());
- result = "download";
+ result = DOWNLOAD;
}
return result;
}
@@ -221,7 +208,7 @@
/**
* C'est super dur des faire une redirection sur une url.
* Construction d'une url complete.
- *
+ *
* @return l'url de redirection
*/
public String getLocation() {
@@ -254,42 +241,95 @@
return url;
}
- protected File zipFile;
+ @Action(value = "extract-download",
+ results = {
+ @Result(name = "wait", location = "/WEB-INF/content/search/extract-wait.jsp"),
+// @Result(type = "stream", params = {"contentType", "application/zip", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ @Result(type = "stream", params = {"contentType", "application/zip", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ public String download() {
- @Action(value="extract-download",
- results={
- @Result(name="wait", location="/WEB-INF/content/search/extract-wait.jsp"),
- @Result(type="stream", params={"contentType", "application/zip", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
- public String download() {
- try {
- Locale locale = (Locale)request.getSession().getAttribute("locale");
- WebService webService = ServiceFactory.getWebService();
-
- zipFile = webService.extractData(selectZones, selectTypes, selectSpecies,
- selectComIndicators, selectPopIndicators, locale);
- } catch (Exception ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't extract data", ex);
- }
- throw new CoserWebException("Can't extract data", ex);
- }
- return "success";
+ Locale locale = (Locale) request.getSession().getAttribute("locale");
+
+ resultFile = getService().extractData(selectZones,
+ selectTypes,
+ selectSpecies,
+ selectComIndicators,
+ selectPopIndicators,
+ locale);
+
+ return SUCCESS;
}
public InputStream getInputStream() {
- InputStream is = null;
- try {
- is = new FileInputStream(zipFile);
- } catch (Exception ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't extract data", ex);
- }
- throw new CoserWebException("Can't extract data", ex);
- }
+ InputStream is = resultFile.getInputStream();
return is;
}
public String getFilename() {
return "Indicateurs_Ifremer.zip";
}
+
+// protected File zipFile;
+//
+// @Override
+// public String execute() {
+//
+// String result;
+//
+// if (StringUtils.isNotBlank(submitAction)) {
+// result = SUCCESS;
+// } else {
+// result = INPUT;
+// Locale locale = getLocale();
+// WebService webService = ServiceFactory.getWebService();
+//
+// try {
+// // renvoi la liste des id subzone-survey et leurs label associé
+// zones = webService.getZoneForFacade(null, false, false);
+// if (CollectionUtils.isNotEmpty(selectZones)) {
+// species = webService.getSpecies(selectZones, false);
+//
+// if (selectTypes != null && selectTypes.contains(DataType.COMMUNITY)) {
+// comIndicators = webService.getIndicators(selectZones, DataType.COMMUNITY, locale);
+// }
+// if (selectTypes != null && selectTypes.contains(DataType.POPULATION)) {
+// popIndicators = webService.getIndicators(selectZones, DataType.POPULATION, locale);
+// }
+// }
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone map", ex);
+// }
+// }
+//
+// return result;
+// }
+//
+// public String download() {
+// try {
+// Locale locale = (Locale)request.getSession().getAttribute("locale");
+// WebService webService = ServiceFactory.getWebService();
+//
+// zipFile = webService.extractData(selectZones, selectTypes, selectSpecies,
+// selectComIndicators, selectPopIndicators, locale);
+// } catch (Exception ex) {
+// if (log.isErrorEnabled()) {
+// log.error("Can't extract data", ex);
+// }
+// throw new CoserWebException("Can't extract data", ex);
+// }
+// return "success";
+// }
+//
+// public InputStream getInputStream() {
+// InputStream is = null;
+// try {
+// is = new FileInputStream(zipFile);
+// } catch (Exception ex) {
+// if (log.isErrorEnabled()) {
+// log.error("Can't extract data", ex);
+// }
+// throw new CoserWebException("Can't extract data", ex);
+// }
+// return is;
+//}
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -26,12 +26,12 @@
/**
* Action index, affiche la liste des facades majeures.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class FacadeAction extends CommonFacade {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/FacadeAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,20 +22,19 @@
package fr.ifremer.coser.web.actions.source;
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.result.request.RawDataRequest;
import fr.ifremer.coser.web.actions.common.CoserAction;
+import java.util.Map;
+
/**
* Affiche les liens de téléchargement du zip pour le projet choisit.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class SourceAction extends CoserAction {
@@ -48,6 +47,8 @@
protected String zonePicture;
+ protected RawDataRequest request;
+
public String getFacade() {
return facade;
}
@@ -69,38 +70,60 @@
}
public String getFacadeDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getFacades().get(facade);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get facade display name", ex);
- }
- return displayName;
+ return getService().getFacadeDisplayName(facade);
}
public String getZoneDisplayName() {
- WebService webService = ServiceFactory.getWebService();
- String displayName = null;
- try {
- displayName = webService.getZoneForFacade(facade, false, false).get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone display name", ex);
- }
- return displayName;
+ return getService().getZoneDisplayName(request);
}
@Override
public String execute() {
- WebService webService = ServiceFactory.getWebService();
-
- try {
- zonePicture = webService.getZonePictures().get(zone);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone picture", ex);
- }
-
+ request = requestBuilder().
+ addFacade(facade).
+ addZone(zone).
+ toRawDataRequest();
+ Map<String, String> zonePictures = getService().getZonePictures();
+ zonePicture = zonePictures.get(zone);
return SUCCESS;
}
+
+// public String getFacadeDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+//// displayName = webService.getFacades().get(facade);
+// displayName = webService.getZonesMap().getFacades().get(facade);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get facade display name", ex);
+// }
+// return displayName;
+// }
+//
+// public String getZoneDisplayName() {
+// WebService webService = ServiceFactory.getWebService();
+// String displayName = null;
+// try {
+// displayName = webService.getZoneForFacade(facade, false, false).get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone display name", ex);
+// }
+// return displayName;
+// }
+//
+// @Override
+// public String execute() {
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// try {
+//// zonePicture = webService.getZonePictures().get(zone);
+// zonePicture = webService.getZonesMap().getZonePictures().get(zone);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone picture", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,38 +22,30 @@
package fr.ifremer.coser.web.actions.source;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.Locale;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import fr.ifremer.coser.result.FileResult;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
+import java.io.InputStream;
/**
* Force le téléchargement du zip.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class SourceDataAction extends SourceAction {
/** serialVersionUID. */
private static final long serialVersionUID = 3385467755357775199L;
- private static final Log log = LogFactory.getLog(SourceDataAction.class);
-
protected boolean accepted;
+ protected FileResult result;
+
public void setAccepted(boolean accepted) {
this.accepted = accepted;
}
@@ -67,8 +59,12 @@
}
- @Action(results= {@Result(type="stream", params={"contentType", "application/zip", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ // @Action(results = {@Result(type = "stream", params = {"contentType", "application/zip", "inputName", "inputStream", "contentDisposition", "attachment; filename=\"${filename}\""})})
+ @Action(results = {@Result(type = "stream", params = {"contentType", "application/zip", "contentDisposition", "attachment; filename=\"${filename}\""})})
public String execute() {
+ super.execute();
+
+ result = getService().getFileResult(request);
return SUCCESS;
}
@@ -77,22 +73,26 @@
}
public InputStream getInputStream() {
- WebService webService = ServiceFactory.getWebService();
+ return result.getInputStream();
+ }
- Locale locale = getLocale();
-
- InputStream input = null;
- try {
-
- File sourceZip = webService.getSourceZip(zone, locale);
- input = new FileInputStream(sourceZip);
- } catch (Exception ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't get file data", ex);
- }
- throw new CoserWebException("Can't get source zip file", ex);
- }
-
- return input;
- }
+// public InputStream getInputStream() {
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// InputStream input = null;
+// try {
+//
+// File sourceZip = webService.getSourceZip(zone, locale);
+// input = new FileInputStream(sourceZip);
+// } catch (Exception ex) {
+// if (log.isErrorEnabled()) {
+// log.error("Can't get file data", ex);
+// }
+// throw new CoserWebException("Can't get source zip file", ex);
+// }
+//
+// return input;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceDataAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceQualityAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceQualityAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceQualityAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -24,12 +24,12 @@
/**
* Affiche l'avertissement qualité avant le téléchargement du zip.
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class SourceQualityAction extends SourceAction {
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/SourceQualityAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java 2014-03-07 20:41:45 UTC (rev 1133)
@@ -22,22 +22,17 @@
package fr.ifremer.coser.web.actions.source;
-import java.util.Locale;
-
-import fr.ifremer.coser.CoserBusinessException;
-import fr.ifremer.coser.services.WebService;
-import fr.ifremer.coser.web.CoserWebException;
-import fr.ifremer.coser.web.ServiceFactory;
+import fr.ifremer.coser.result.request.RawDataRequest;
import fr.ifremer.coser.web.actions.common.CommonZone;
/**
* Affiche la liste des sous zones (zone).
- *
+ *
* @author chatellier
* @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
public class ZoneAction extends CommonZone {
@@ -45,21 +40,28 @@
private static final long serialVersionUID = 3385467755357775199L;
@Override
- public String execute() {
+ protected RawDataRequest createRequest() {
+ return requestBuilder().
+ addFacade(facade).
+ toRawDataRequest();
+ }
- WebService webService = ServiceFactory.getWebService();
-
- Locale locale = getLocale();
-
- try {
- // renvoi la liste des id subzone-survey et leurs label associé
- zones = webService.getZoneForFacade(facade, true, false);
- zonesPictures = webService.getZonePictures();
- zonesMetaInfo = webService.getZoneMetaInfo(locale);
- } catch (CoserBusinessException ex) {
- throw new CoserWebException("Can't get zone map", ex);
- }
-
- return SUCCESS;
- }
+// @Override
+// public String execute() {
+//
+// WebService webService = ServiceFactory.getWebService();
+//
+// Locale locale = getLocale();
+//
+// try {
+// // renvoi la liste des id subzone-survey et leurs label associé
+// zones = webService.getZoneForFacade(facade, true, false);
+// zonesPictures = webService.getZonePictures();
+// zonesMetaInfo = webService.getZoneMetaInfo(locale);
+// } catch (CoserBusinessException ex) {
+// throw new CoserWebException("Can't get zone map", ex);
+// }
+//
+// return SUCCESS;
+// }
}
Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/source/ZoneAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/coserweb.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package_en.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package_es.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/fr/ifremer/coser/web/package_fr.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/i18n/coser-web_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/i18n/coser-web_fr_FR.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/log4j.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/resources/struts.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/admin/index.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/admin/list-projects.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/admin/login.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/admin/perform-login-input.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/com/facade.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp 2014-03-07 20:41:45 UTC (rev 1133)
@@ -73,12 +73,14 @@
</p>
<img src="<s:url action='graph-data'>
+ <s:param name="facade" value="%{facade}" />
<s:param name="zone" value="%{zone}" />
<s:param name="indicator" value="%{indicator}" />
<s:param name="list" value="%{list}" />
</s:url>" />
<p><s:a action="graph-download">
+ <s:param name="facade" value="%{facade}" />
<s:param name="zone" value="%{zone}" />
<s:param name="indicator" value="%{indicator}" />
<s:param name="list" value="%{list}" />
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/com/graph.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/com/indicator.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/com/zone.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/documents.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/map/facade.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/map/map.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/map/map.jsp 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/map/map.jsp 2014-03-07 20:41:45 UTC (rev 1133)
@@ -62,9 +62,10 @@
<h2><s:text name="message.map.title" /></h2>
<img src="<s:url action='map-data'>
+ <s:param name="facade" value="%{facade}" />
<s:param name="zone" value="%{zone}" />
<s:param name="species" value="%{species}" />
- </s:url>" style="float:right;margin-left:10px;" />
+ </s:url>" style="float:right;margin-left:10px;" width="230" height="230"/>
<h3><s:property value='facadeDisplayName' /> - <s:property value='zoneDisplayName' /> - <s:property value='speciesDisplayName' /></h3>
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/map/map.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/map/species.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/map/species.jsp 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/map/species.jsp 2014-03-07 20:41:45 UTC (rev 1133)
@@ -64,6 +64,7 @@
<h2><s:text name="message.map.title" /></h2>
<img src="<s:url action='map-data'>
+ <s:param name="facade" value="%{facade}" />
<s:param name="zone" value="%{zone}" />
</s:url>" style="float:right;margin-left:10px;" />
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/map/species.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/map/zone.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/facade.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/graph.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/pop/graph.jsp 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/pop/graph.jsp 2014-03-07 20:41:45 UTC (rev 1133)
@@ -72,12 +72,14 @@
<h2><s:text name="message.pop.title" /></h2>
<img src="<s:url action='graph-data'>
+ <s:param name="facade" value="%{facade}" />
<s:param name="zone" value="%{zone}" />
<s:param name="species" value="%{species}" />
<s:param name="indicator" value="%{indicator}" />
</s:url>" />
<p><s:a action="graph-download">
+ <s:param name="facade" value="%{facade}" />
<s:param name="zone" value="%{zone}" />
<s:param name="species" value="%{species}" />
<s:param name="indicator" value="%{indicator}" />
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/graph.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/indicator.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/species.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/pop/zone.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/quality.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/search/extract-input.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/search/extract-success.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/search/extract-wait.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/source/facade.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/source/source-data.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/source/source-quality.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/source/source.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/source/zone.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/survey.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/decorators/sublayout.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/decorators.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/web.xml 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/webapp/WEB-INF/web.xml 2014-03-07 20:41:45 UTC (rev 1133)
@@ -68,4 +68,9 @@
<listener>
<listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>
</listener>
+
+ <listener>
+ <description>Application listener</description>
+ <listener-class>fr.ifremer.coser.web.CoserApplicationListener</listener-class>
+ </listener>
</web-app>
Property changes on: trunk/coser-web/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/favicon.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/bas_page.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/bas_page2.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/carte_accueil.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/contenu_haut.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/degrade.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/es.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/facadesmap.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/fond.jpg
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/fond_02.jpg
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/fond_contenu.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/footer.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/footer_02.jpg
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/fr.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/gb.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/haut_page.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/ico_accueil.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/ico_carte.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/logo.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/logoIfremer.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/logoSIH.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/puce_liste.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/puce_liste_18.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/stock_select_clear.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/stock_select_table.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/top_contenu.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/warper_page.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/worldsmall.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4b-4c-E7d.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4b-4c.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c-E7d.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c4-E7d.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-4c4.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-7d.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Ciem-E7d.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Crustaflam.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_E-Corse.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Facades.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_GdG-Ciem-7.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_GdG-Ech.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_GdG-MC.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_GdL.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_MC-Ciem-7.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_MC-Ech.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Noursein.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Noursom.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/images/zones/C_Nurvil.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/js/coser.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/coser-web/src/main/webapp/js/jquery-1.8.2.min.js
===================================================================
--- trunk/coser-web/src/main/webapp/js/jquery-1.8.2.min.js 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/coser-web/src/main/webapp/js/jquery-1.8.2.min.js 2014-03-07 20:41:45 UTC (rev 1133)
@@ -1,2 +1,2 @@
-/*! %%Ignore-License jQuery v1.8.2 jquery.com | jquery.org/license */
-(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<q;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){i=u[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){l=i.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),j&&b.push(h);return g}function bl(a,b,c,d,e,f){return d&&!d[o]&&(d=bl(d)),e&&!e[o]&&(e=bl(e,f)),z(function(f,g,h,i){if(f&&e)return;var j,k,l,m=[],n=[],o=g.length,p=f||bo(b||"*",h.nodeType?[h]:h,[],f),q=a&&(f||!b)?bk(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;c&&c(q,r,h,i);if(d){l=bk(r,n),d(l,[],h,i),j=l.length;while(j--)if(k=l[j])r[n[j]]=!(q[n[j]]=k)}if(f){j=a&&r.length;while(j--)if(k=r[j])f[m[j]]=!(g[m[j]]=k)}else r=bk(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function bm(a){var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=bi(function(a){return a===b},h,!0),k=bi(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i<f;i++)if(c=e.relative[a[i].type])m=[bi(bj(m),c)];else{c=e.filter[a[i].type].apply(null,a[i].matches);if(c[o]){d=++i;for(;d<f;d++)if(e.relative[a[d].type])break;return bl(i>1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i<d&&bm(a.slice(i,d)),d<f&&bm(a=a.slice(d)),d<f&&a.join(""))}m.push(c)}return bj(m)}function bn(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)bc(a,b[e],c,d);return c}function bp(a,b,c,d,f){var g,h,j,k,l,m=bh(a),n=m.length;if(!d&&m.length===1){h=m[0]=m[0].slice(0);if(h.length>2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;b<c;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=b==null||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:bf(function(a,b,c){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:bf(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bg(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bg(e[j],f[j]);return j===c?bg(a,f[j],-1):bg(e[j],b,1)},[0,0].sort(j),m=!k,bc.uniqueSort=function(a){var b,c=1;k=m,a.sort(j);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},bc.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},i=bc.compile=function(a,b){var c,d=[],e=[],f=D[o][a];if(!f){b||(b=bh(a)),c=b.length;while(c--)f=bm(b[c]),f[o]?d.push(f):e.push(f);f=D(a,bn(e,d))}return f},r.querySelectorAll&&function(){var a,b=bp,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active",":focus"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(!l)return;return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(typeof k.getBoundingClientRect!="undefined"&&(j=k.getBoundingClientRect()),e=da(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
+/*! %%Ignore-License jQuery v1.8.2 jquery.com | jquery.org/license */
+(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<q;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){i=u[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){l=i.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),j&&b.push(h);return g}function bl(a,b,c,d,e,f){return d&&!d[o]&&(d=bl(d)),e&&!e[o]&&(e=bl(e,f)),z(function(f,g,h,i){if(f&&e)return;var j,k,l,m=[],n=[],o=g.length,p=f||bo(b||"*",h.nodeType?[h]:h,[],f),q=a&&(f||!b)?bk(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;c&&c(q,r,h,i);if(d){l=bk(r,n),d(l,[],h,i),j=l.length;while(j--)if(k=l[j])r[n[j]]=!(q[n[j]]=k)}if(f){j=a&&r.length;while(j--)if(k=r[j])f[m[j]]=!(g[m[j]]=k)}else r=bk(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function bm(a){var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=bi(function(a){return a===b},h,!0),k=bi(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i<f;i++)if(c=e.relative[a[i].type])m=[bi(bj(m),c)];else{c=e.filter[a[i].type].apply(null,a[i].matches);if(c[o]){d=++i;for(;d<f;d++)if(e.relative[a[d].type])break;return bl(i>1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i<d&&bm(a.slice(i,d)),d<f&&bm(a=a.slice(d)),d<f&&a.join(""))}m.push(c)}return bj(m)}function bn(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)bc(a,b[e],c,d);return c}function bp(a,b,c,d,f){var g,h,j,k,l,m=bh(a),n=m.length;if(!d&&m.length===1){h=m[0]=m[0].slice(0);if(h.length>2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;b<c;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=b==null||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:bf(function(a,b,c){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:bf(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bg(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bg(e[j],f[j]);return j===c?bg(a,f[j],-1):bg(e[j],b,1)},[0,0].sort(j),m=!k,bc.uniqueSort=function(a){var b,c=1;k=m,a.sort(j);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},bc.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},i=bc.compile=function(a,b){var c,d=[],e=[],f=D[o][a];if(!f){b||(b=bh(a)),c=b.length;while(c--)f=bm(b[c]),f[o]?d.push(f):e.push(f);f=D(a,bn(e,d))}return f},r.querySelectorAll&&function(){var a,b=bp,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active",":focus"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(!l)return;return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(typeof k.getBoundingClientRect!="undefined"&&(j=k.getBoundingClientRect()),e=da(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
Property changes on: trunk/coser-web/src/main/webapp/js/jquery-1.8.2.min.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/js/jquery.expander.min.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/coser-web/src/main/webapp/pdf/Web_EstComInd_PresentationIndic_EN.pdf
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/pdf/Web_EstComInd_PresentationIndic_FR.pdf
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/pdf/Web_EstPopInd_PresentationIndic_EN.pdf
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/pdf/Web_EstPopInd_PresentationIndic_FR.pdf
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/coser-web/src/main/webapp/styles/coser.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-03-03 11:55:47 UTC (rev 1132)
+++ trunk/pom.xml 2014-03-07 20:41:45 UTC (rev 1133)
@@ -81,7 +81,7 @@
<jaxxVersion>2.8.2-SNAPSHOT</jaxxVersion>
<nuitonI18nVersion>3.0</nuitonI18nVersion>
<nuitonMatrixVersion>2.4-SNAPSHOT</nuitonMatrixVersion>
- <struts.version>2.3.16</struts.version>
+ <struts.version>2.3.16.1</struts.version>
</properties>
<repositories>
Property changes on: trunk/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/devel/textupdate.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/download.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/index.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/configuration.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/controls.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/dataformat.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/faq.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/guide_control.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/guide_listcontrols.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/guide_project.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/guide_results.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/en/rst/user/guide_selection.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/resources/icons/logo100.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/01-noproject.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/02-createproject.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/03-openproject.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/04-projectsummary.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/10-controlmain.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/11-controlmenu1.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/12-controlmenu2.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/13-controlgraphdiff.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/14-controlgraphlength.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/20-selectiondetail.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/21-selectionyears.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/22-selectionstrata.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/23-selectionspecies.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/24-selectionlists.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/25-selectionresults.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/26-selectionaddresult.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/27-selectionmenu0.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/28-selectionmenu1.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/90-configurationpath.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/en/91-configurationvalues.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/01-noproject.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/02-createproject.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/03-openproject.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/04-projectsummary.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/10-controlmain.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/11-controlmenu1.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/12-controlmenu2.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/13-controlgraphdiff.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/14-controlgraphlength.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/20-selectiondetail.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/21-selectionyears.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/22-selectionstrata.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/23-selectionspecies.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/24-selectionlists.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/25-selectionresults.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/26-selectionaddresult.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/27-selectionmenu0.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/28-selectionmenu1.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/90-configurationpath.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/resources/images/fr/91-configurationvalues.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/rst/devel/directory.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/devel/struts.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/devel/textupdate.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/download.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/index.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/configuration.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/controls.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/dataformat.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/faq.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/guide_control.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/guide_listcontrols.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/guide_project.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/guide_results.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/rst/user/guide_selection.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/site_fr.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r1132 - in trunk: coser-business/src/license coser-ui coser-ui/src/license coser-ui/src/main/resources/i18n coser-web/src/license
by tchemit@users.forge.codelutin.com 03 Mar '14
by tchemit@users.forge.codelutin.com 03 Mar '14
03 Mar '14
Author: tchemit
Date: 2014-03-03 12:55:47 +0100 (Mon, 03 Mar 2014)
New Revision: 1132
Url: http://forge.codelutin.com/projects/coser/repository/revisions/1132
Log:
fix ui i18n + update third-parties
Modified:
trunk/coser-business/src/license/THIRD-PARTY.properties
trunk/coser-ui/pom.xml
trunk/coser-ui/src/license/THIRD-PARTY.properties
trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
trunk/coser-web/src/license/THIRD-PARTY.properties
Modified: trunk/coser-business/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/coser-business/src/license/THIRD-PARTY.properties 2014-03-03 09:56:07 UTC (rev 1131)
+++ trunk/coser-business/src/license/THIRD-PARTY.properties 2014-03-03 11:55:47 UTC (rev 1132)
@@ -1,27 +1,26 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache Software License, Version 2.0
# - BSD License
# - BSD-style license
-# - Bouncy Castle License
+# - CDDL
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
# - GNU Affero General Public License v3
# - GNU Lesser General Public Licence
# - GNU Lesser General Public License (LGPL), version 2.1
+# - GPLv2+CE
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
# - MIT License
-# - Mozilla Public License
+# - MPL 1.1
# - New BSD License
# - The Apache Software License, Version 2.0
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Mon Feb 24 15:56:47 CET 2014
+#Mon Mar 03 10:43:46 CET 2014
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
-javassist--javassist--3.8.0.GA=GNU Lesser General Public License
Modified: trunk/coser-ui/pom.xml
===================================================================
--- trunk/coser-ui/pom.xml 2014-03-03 09:56:07 UTC (rev 1131)
+++ trunk/coser-ui/pom.xml 2014-03-03 11:55:47 UTC (rev 1132)
@@ -292,98 +292,114 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>get-keystore</id>
- <goals>
- <goal>share-server-secret</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <serverId>codelutin-keystore</serverId>
- <privateKeyOut>keystorepath</privateKeyOut>
- <passwordOut>keystorepass</passwordOut>
- <usernameOut>keyalias</usernameOut>
- <passphraseOut>keypass</passphraseOut>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- <configuration>
- <libPath>lib</libPath>
- <makeArchive>false</makeArchive>
- <verbose>false</verbose>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>jnlp-profile</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <!-- <properties>
+ <jnlp.codebase>file://${project.build.directory}/jnlp</jnlp.codebase>
+ </properties> -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>get-keystore</id>
+ <goals>
+ <goal>share-server-secret</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <serverId>codelutin-keystore</serverId>
+ <privateKeyOut>keystorepath</privateKeyOut>
+ <passwordOut>keystorepass</passwordOut>
+ <usernameOut>keyalias</usernameOut>
+ <passphraseOut>keypass</passphraseOut>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <configuration>
+ <libPath>lib</libPath>
+ <makeArchive>false</makeArchive>
+ <verbose>false</verbose>
- <jnlp>
- <inputTemplateResourcePath>${project.basedir}</inputTemplateResourcePath>
- <inputTemplate>src/main/jnlp/coser-jnlp.vm</inputTemplate>
- <mainClass>${maven.jar.main.class}</mainClass>
- <allPermissions>true</allPermissions>
- <offlineAllowed>true</offlineAllowed>
- <j2seVersion>1.6+</j2seVersion>
- </jnlp>
+ <jnlp>
+ <inputTemplateResourcePath>${project.basedir}</inputTemplateResourcePath>
+ <inputTemplate>src/main/jnlp/coser-jnlp.vm</inputTemplate>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <allPermissions>true</allPermissions>
+ <offlineAllowed>true</offlineAllowed>
+ <j2seVersion>1.6+</j2seVersion>
+ </jnlp>
- <!-- Add some extensions for the already signed libs -->
- <jnlpExtensions>
- <jnlpExtension>
- <name>jxlayer</name>
- <title>Swing labs JXLayer</title>
- <vendor>Swing Labs</vendor>
- <includes>
- <include>org.swinglabs:jxlayer</include>
- </includes>
- </jnlpExtension>
- <jnlpExtension>
- <name>bouncycastle</name>
- <title>BouncyCastle</title>
- <vendor>BouncyCastle</vendor>
- <includes>
- <include>bouncycastle:bcmail-jdk14</include>
- <include>bouncycastle:bcprov-jdk14</include>
- </includes>
- </jnlpExtension>
- </jnlpExtensions>
+ <!-- Add some extensions for the already signed libs -->
+ <jnlpExtensions>
+ <jnlpExtension>
+ <name>jxlayer</name>
+ <title>Swing labs JXLayer</title>
+ <vendor>Swing Labs</vendor>
+ <includes>
+ <include>org.swinglabs:jxlayer</include>
+ </includes>
+ </jnlpExtension>
+ <!--jnlpExtension>
+ <name>bouncycastle</name>
+ <title>BouncyCastle</title>
+ <vendor>BouncyCastle</vendor>
+ <includes>
+ <include>bouncycastle:bcmail-jdk14</include>
+ <include>bouncycastle:bcprov-jdk14</include>
+ </includes>
+ </jnlpExtension-->
+ </jnlpExtensions>
- <sign>
- <keystore>${keystorepath}</keystore>
- <storepass>${keystorepass}</storepass>
- <alias>${keyalias}</alias>
- <keypass>${keypass}</keypass>
- <verify>true</verify>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </sign>
+ <sign>
+ <keystore>${keystorepath}</keystore>
+ <storepass>${keystorepass}</storepass>
+ <alias>${keyalias}</alias>
+ <keypass>${keypass}</keypass>
+ <verify>true</verify>
+ <keystoreConfig>
+ <delete>false</delete>
+ <gen>false</gen>
+ </keystoreConfig>
+ </sign>
- </configuration>
- <executions>
- <execution>
- <id>generate-jnlp</id>
- <phase>package</phase>
- <goals>
- <goal>jnlp-inline</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- <version>${webstartPluginVersion}</version>
- </plugin>
- </plugins>
- </reporting>
- </profile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-jnlp</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jnlp-inline</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <version>${webstartPluginVersion}</version>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
</profiles>
</project>
Modified: trunk/coser-ui/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/coser-ui/src/license/THIRD-PARTY.properties 2014-03-03 09:56:07 UTC (rev 1131)
+++ trunk/coser-ui/src/license/THIRD-PARTY.properties 2014-03-03 11:55:47 UTC (rev 1132)
@@ -1,10 +1,9 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache Software License, Version 2.0
# - BSD License
# - BSD-style license
-# - Bouncy Castle License
+# - CDDL
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
# - GNU Affero General Public License v3
@@ -12,14 +11,14 @@
# - GNU General Public License - Version 2 with the class path exception
# - GNU Lesser General Public Licence
# - GNU Lesser General Public License (LGPL), version 2.1
+# - GPLv2+CE
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
-# - License Agreement for JavaMail(TM) API
# - MIT License
-# - Mozilla Public License
+# - MPL 1.1
# - New BSD License
# - OpenMap Software License Agreement
# - The Apache Software License, Version 2.0
@@ -27,10 +26,7 @@
# Please fill the missing licenses for dependencies :
#
#
-#Mon Feb 24 15:58:04 CET 2014
+#Mon Mar 03 10:44:55 CET 2014
commons-jxpath--commons-jxpath--1.3=The Apache Software License, Version 2.0
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
-javassist--javassist--3.8.0.GA=GNU Lesser General Public License
-javax.mail--mail--1.4.1=License Agreement for JavaMail(TM) API
-org.apache.commons--commons-email--1.2=The Apache Software License, Version 2.0
org.nuiton.thirdparty--sdoc--0.5.0-beta-patchcl=GNU GENERAL PUBLIC LICENSE version 2 or higher
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2014-03-03 09:56:07 UTC (rev 1131)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2014-03-03 11:55:47 UTC (rev 1132)
@@ -15,9 +15,9 @@
coser.ui.common.unselectAll.short=None
coser.ui.common.valid=Valid
coser.ui.common.yes=Yes
-coser.ui.configuration.category.controlselection=
-coser.ui.configuration.category.misc=
-coser.ui.configuration.category.path=
+coser.ui.configuration.category.controlselection=Control and selection
+coser.ui.configuration.category.misc=Misc
+coser.ui.configuration.category.path=Paths
coser.ui.configuration.title=Configuration
coser.ui.control.categorylabel=Displayed data \:
coser.ui.control.checkData=Check data
@@ -123,16 +123,16 @@
coser.ui.project.createProjectMissingReftax=File 'Reftax' is not valid \!\n(check configuration \: coser.reference.species)
coser.ui.project.customReferenceSpeciesFile=New taxonomy reference file \:
coser.ui.project.displaySpeciesType=Display field \:
-coser.ui.project.editProject=
+coser.ui.project.editProject=Edit project
coser.ui.project.haulFile=Haul file \:
coser.ui.project.lValideSpeciesTypeDesc=Species latin name
coser.ui.project.lengthFile=Length file \:
coser.ui.project.maps=Maps \:
coser.ui.project.missingFile=Missing file
-coser.ui.project.newProject=
+coser.ui.project.newProject=New project
coser.ui.project.openError=Open error
coser.ui.project.openProject=Open
-coser.ui.project.openProjectTitle=
+coser.ui.project.openProjectTitle=Open existing project
coser.ui.project.outputSpeciesType=Output field \:
coser.ui.project.project=Project \:
coser.ui.project.projectauthor=Author \:
@@ -150,13 +150,13 @@
coser.ui.project.summary.resultCount=Result count \:
coser.ui.project.summary.selectionCount=Selection count \:
coser.ui.project.summary.strataFileName=Strata file name \:
-coser.ui.project.summary.title=
+coser.ui.project.summary.title=Project summary
coser.ui.project.summary.validated=Control validated \:
-coser.ui.project.useCustomReferenceSpeciesFile=
+coser.ui.project.useCustomReferenceSpeciesFile=Use custom taxonomy reference file
coser.ui.project.usedReferenceSpeciesFile=Current reference file (Reffax) \:
coser.ui.result.addNewResult=Save result
coser.ui.result.addOtherDataFile=Add file
-coser.ui.result.availableDataTitle=
+coser.ui.result.availableDataTitle=Available results \:
coser.ui.result.cancel=Cancel
coser.ui.result.confirmDeleteResult=Do you want to delete result %s ?
coser.ui.result.creationDate=Result date \:
@@ -166,7 +166,7 @@
coser.ui.result.estPopIndFile=ESTPOPind file \:
coser.ui.result.extractDataButton=Export in Rsufi format
coser.ui.result.extractDataLabel=Export directory \:
-coser.ui.result.extractDataTitle=
+coser.ui.result.extractDataTitle=Export RSufi input data
coser.ui.result.mapsDirectory=Maps directory \:
coser.ui.result.newResult=New Result
coser.ui.result.otherDataFile=Other files \:
@@ -190,7 +190,7 @@
coser.ui.result.validEditResult=Modify result
coser.ui.result.validNewResult=Add this result
coser.ui.result.zone=Zone \:
-coser.ui.selection.allSpecies=
+coser.ui.selection.allSpecies=L1 \: All species (%d/%d)
coser.ui.selection.comment=Comment \:
coser.ui.selection.detail.confirmcontrolreload=Are you sure you want to reload controled data ?\nAll modifications done on current selection will be lost.
coser.ui.selection.detail.controldatareloaded=Controled data reloaded.
@@ -206,19 +206,19 @@
coser.ui.selection.details.description=Description \:
coser.ui.selection.details.displayDiffCatchLengthGraph=Comparison catch/length graphs
coser.ui.selection.details.displayDiffCatchLengthGraphTip=Comparison catch/length graphs
-coser.ui.selection.details.filteredSpecies=
+coser.ui.selection.details.filteredSpecies=Filtered species (%d/%d) \:
coser.ui.selection.details.mergeSpeciesTip=Merge/Rename
coser.ui.selection.details.name=Selection name \:
coser.ui.selection.details.removeFromSelectedListTip=Remove selected species from selected species list
coser.ui.selection.details.saveSelection=Save selection
coser.ui.selection.details.selectAllSpeciesTip=Select all
-coser.ui.selection.details.selectedSpecies=
+coser.ui.selection.details.selectedSpecies=L1 \: Selected species (%d/%d) \:
coser.ui.selection.details.showMapTip=Display strata map
coser.ui.selection.details.showSpeciesTip=
coser.ui.selection.details.speciesDataDescription=Haul count by strata and year \:
coser.ui.selection.details.speciescontextmenu=For more options, use species lists contextual menu
-coser.ui.selection.details.strata=
-coser.ui.selection.details.type=
+coser.ui.selection.details.strata=Strata (%d/%d) \:
+coser.ui.selection.details.type=Filter by type (%d/%d) \:
coser.ui.selection.details.unSelectAllSpeciesTip=Unselect all
coser.ui.selection.details.validFilter=Valid filter
coser.ui.selection.details.validSelection=Valid selection
@@ -236,18 +236,18 @@
coser.ui.selection.fusion.name=New name \:
coser.ui.selection.fusion.rename.title=Rename
coser.ui.selection.fusion.title=Merge
-coser.ui.selection.maturitySpecies=
+coser.ui.selection.maturitySpecies=L4 \: Species with maturity (%d/%d)
coser.ui.selection.nonJustifiedMaturity=Maturity species list is not all selected.\nYou must justify this selection with a comment.
coser.ui.selection.nonJustifiedOccurenceDensity=Filtered list selection doesn't match filter selection.\nYou must justify this selection with a comment.
coser.ui.selection.nonJustifiedSizeAllYear=Size all year species list is not all selected.\nYou must justify this selection with a comment.
coser.ui.selection.nonJustifiedTitle=Unjustified selection
-coser.ui.selection.occurrenceDensitySpecies=
+coser.ui.selection.occurrenceDensitySpecies=L2 \: Filtered species (%d/%d)
coser.ui.selection.occurrencedensityrenderer=<html>%s<span style\='font-size\:85%%;color\:gray;'>(Occ\=%.2f, Dens\=%.2f)</span></html>
coser.ui.selection.option.addSelectionFile=Add
coser.ui.selection.option.editFiles=Selection files
coser.ui.selection.option.editFilesTitle=Edit files
coser.ui.selection.option.filesDetails=This files will be saved into current selection and copied into RSufi export.
-coser.ui.selection.option.optionTitle=
+coser.ui.selection.option.optionTitle=Options
coser.ui.selection.option.removeSelectionFile=Remove
coser.ui.selection.option.validSelectionFiles=Save
coser.ui.selection.reloadcontroldata=Reload controled data
@@ -261,7 +261,7 @@
coser.ui.selection.replay.missingstrata=Some strata are missing in current selection \: %s
coser.ui.selection.replay.missingyears=Some years are missing in current selection \: %s
coser.ui.selection.replay.nextstep=Next step
-coser.ui.selection.replay.noerrordetected=
+coser.ui.selection.replay.noerrordetected=No errors detected.
coser.ui.selection.replay.replayTitle=Replay selection
coser.ui.selection.replay.selectioninfos=Selection information \:
coser.ui.selection.rsufidataextracted=RSufi data extracted.
@@ -274,7 +274,7 @@
coser.ui.selection.selectionTitle=Selection step
coser.ui.selection.selectionValidated=Selection validated and saved.
coser.ui.selection.selectionreport=Selection report
-coser.ui.selection.sizeAllYearSpecies=
+coser.ui.selection.sizeAllYearSpecies=L3 \: Species with size all year (%d/%d)
coser.ui.selection.speciesMenuFusion=Merge/Rename
coser.ui.selection.speciesMerged=Species merged.
coser.ui.selection.speciesRenamed=Species renamed.
@@ -288,7 +288,7 @@
coser.ui.uploadresult.exportUploadTitle=Export/Upload
coser.ui.uploadresult.exportupload=Extract/Upload
coser.ui.uploadresult.extract=Extract
-coser.ui.uploadresult.extractChoice=
+coser.ui.uploadresult.extractChoice=Extract to directory
coser.ui.uploadresult.extractTo=Extract directory \:
coser.ui.uploadresult.filter.beginDate=Begin date \:
coser.ui.uploadresult.filter.endDate=End date \:
@@ -304,7 +304,7 @@
coser.ui.uploadresult.selectedResults=Selected results \:
coser.ui.uploadresult.title=Results publication
coser.ui.uploadresult.upload=Send results
-coser.ui.uploadresult.uploadChoice=
+coser.ui.uploadresult.uploadChoice=Upload to server
coser.ui.uploadresult.uploadLogin=Admin login \:
coser.ui.uploadresult.uploadPassword=Admin password \:
coser.ui.uploadresult.zone=Zone
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2014-03-03 09:56:07 UTC (rev 1131)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2014-03-03 11:55:47 UTC (rev 1132)
@@ -15,9 +15,9 @@
coser.ui.common.unselectAll.short=Aucun
coser.ui.common.valid=Valider
coser.ui.common.yes=Oui
-coser.ui.configuration.category.controlselection=
-coser.ui.configuration.category.misc=
-coser.ui.configuration.category.path=
+coser.ui.configuration.category.controlselection=Contrôle et sélection
+coser.ui.configuration.category.misc=Divers
+coser.ui.configuration.category.path=Chemins
coser.ui.configuration.title=Configuration
coser.ui.control.categorylabel=Données affichées \:
coser.ui.control.checkData=Vérifier les données
@@ -123,16 +123,16 @@
coser.ui.project.createProjectMissingReftax=Le fichier 'Reftax' n'est pas valide \!\n(vérifiez la configuration \: coser.reference.species)
coser.ui.project.customReferenceSpeciesFile=Nouveau fichier de référence taxonomique \:
coser.ui.project.displaySpeciesType=Champ pour affichage \:
-coser.ui.project.editProject=
+coser.ui.project.editProject=Modifier le projet
coser.ui.project.haulFile=Fichier des traits \:
coser.ui.project.lValideSpeciesTypeDesc=Nom latin des espèces
coser.ui.project.lengthFile=Fichier des tailles \:
coser.ui.project.maps=Cartes \:
coser.ui.project.missingFile=Fichier manquant
-coser.ui.project.newProject=
+coser.ui.project.newProject=Nouveau projet
coser.ui.project.openError=Erreur d'ouverture
coser.ui.project.openProject=Ouvrir
-coser.ui.project.openProjectTitle=
+coser.ui.project.openProjectTitle=Ouvrir un projet existant
coser.ui.project.outputSpeciesType=Champ de sortie \:
coser.ui.project.project=Projet \:
coser.ui.project.projectauthor=Auteur \:
@@ -150,13 +150,13 @@
coser.ui.project.summary.resultCount=Nombre de résultats \:
coser.ui.project.summary.selectionCount=Nombre de sélections \:
coser.ui.project.summary.strataFileName=Nom du fichier strates \:
-coser.ui.project.summary.title=
+coser.ui.project.summary.title=Résumé du projet
coser.ui.project.summary.validated=Contrôle validé \:
-coser.ui.project.useCustomReferenceSpeciesFile=
+coser.ui.project.useCustomReferenceSpeciesFile=Utiliser un autre fichier de référence taxonomique
coser.ui.project.usedReferenceSpeciesFile=Fichier de référence utilisé (Reftax) \:
coser.ui.result.addNewResult=Ajouter un résultat
coser.ui.result.addOtherDataFile=Ajouter un fichier
-coser.ui.result.availableDataTitle=
+coser.ui.result.availableDataTitle=Résultats disponibles
coser.ui.result.cancel=Annuler
coser.ui.result.confirmDeleteResult=Êtes vous sûr de vouloir supprimer le résultat %s ?
coser.ui.result.creationDate=Date du résultats \:
@@ -166,7 +166,7 @@
coser.ui.result.estPopIndFile=Fichier ESTPOPind \:
coser.ui.result.extractDataButton=Export au format RSufi
coser.ui.result.extractDataLabel=Dossier d'export \:
-coser.ui.result.extractDataTitle=
+coser.ui.result.extractDataTitle=Export des données en entrée de RSufi
coser.ui.result.mapsDirectory=Répertoire des cartes \:
coser.ui.result.newResult=Nouveau résultat
coser.ui.result.otherDataFile=Autre fichiers \:
@@ -190,7 +190,7 @@
coser.ui.result.validEditResult=Modifier le résultat
coser.ui.result.validNewResult=Ajouter le résultat
coser.ui.result.zone=Zone \:
-coser.ui.selection.allSpecies=
+coser.ui.selection.allSpecies=L1 \: Toutes les espèces (%d/%d)
coser.ui.selection.comment=Commentaire \:
coser.ui.selection.detail.confirmcontrolreload=Êtes vous sûr de vouloir recharger les données contrôlées ?\nToutes les modifications de la sélection en cours seront perdues.
coser.ui.selection.detail.controldatareloaded=Données contrôlées rechargées.
@@ -206,19 +206,19 @@
coser.ui.selection.details.description=Description \:
coser.ui.selection.details.displayDiffCatchLengthGraph=Graphiques des différences captures/tailles
coser.ui.selection.details.displayDiffCatchLengthGraphTip=Graphiques des différences captures/tailles
-coser.ui.selection.details.filteredSpecies=
+coser.ui.selection.details.filteredSpecies=Espèces filtrées (%d/%d) \:
coser.ui.selection.details.mergeSpeciesTip=Fusion/Renommage
coser.ui.selection.details.name=Nom de la sélection \:
coser.ui.selection.details.removeFromSelectedListTip=Retire les espèces sélectionnées de la liste des espèces sélectionnées
coser.ui.selection.details.saveSelection=Sauvegarder la sélection
coser.ui.selection.details.selectAllSpeciesTip=Sélectionner tout
-coser.ui.selection.details.selectedSpecies=
+coser.ui.selection.details.selectedSpecies=L1 \: Espèces sélectionnées (%d/%d) \:
coser.ui.selection.details.showMapTip=Afficher la carte des strates
coser.ui.selection.details.showSpeciesTip=Afficher la table de l'effort d'échantillonage
coser.ui.selection.details.speciesDataDescription=Nombre de traits par strate par année \:
coser.ui.selection.details.speciescontextmenu=Pour plus d'options, utilisez le menu contextuel sur les listes d'espèces
-coser.ui.selection.details.strata=
-coser.ui.selection.details.type=
+coser.ui.selection.details.strata=Strates (%d/%d) \:
+coser.ui.selection.details.type=Filtrer par type (%d/%d) \:
coser.ui.selection.details.unSelectAllSpeciesTip=Désélectionner tout
coser.ui.selection.details.validFilter=Valider les filtres
coser.ui.selection.details.validSelection=Valider la sélection
@@ -236,18 +236,18 @@
coser.ui.selection.fusion.name=Nouveau nom \:
coser.ui.selection.fusion.rename.title=Renommage
coser.ui.selection.fusion.title=Fusion
-coser.ui.selection.maturitySpecies=
+coser.ui.selection.maturitySpecies=L4 \: Espèces avec maturité (%d/%d)
coser.ui.selection.nonJustifiedMaturity=La liste espèces avec maturité n'est pas entièrement sélectionnée.\nVous devez justifier cette sélection par un commentaire.
coser.ui.selection.nonJustifiedOccurenceDensity=La sélection de la liste filtrée ne correspond pas à la sélection opérée par le filtre.\nVous devez justifier cette sélection par un commentaire.
coser.ui.selection.nonJustifiedSizeAllYear=La liste espèces avec des tailles pour toutes les années n'est pas entièrement sélectionnée.\nVous devez justifier cette sélection par un commentaire.
coser.ui.selection.nonJustifiedTitle=Sélection non justifiée
-coser.ui.selection.occurrenceDensitySpecies=
+coser.ui.selection.occurrenceDensitySpecies=L2 \: Espèces filtrées (%d/%d)
coser.ui.selection.occurrencedensityrenderer=<html>%s<span style\='font-size\:85%%;color\:gray;'>(Occ\=%.2f, Dens\=%.2f)</span></html>
coser.ui.selection.option.addSelectionFile=Ajouter
coser.ui.selection.option.editFiles=Fichiers de la sélection
coser.ui.selection.option.editFilesTitle=Modifier les fichiers
coser.ui.selection.option.filesDetails=Les fichiers suivants seront sauvegardés dans la sélection courante et copier dans l'export RSufi.
-coser.ui.selection.option.optionTitle=
+coser.ui.selection.option.optionTitle=Options
coser.ui.selection.option.removeSelectionFile=Supprimer
coser.ui.selection.option.validSelectionFiles=Sauver
coser.ui.selection.reloadcontroldata=Recharger les données contrôlées
@@ -261,7 +261,7 @@
coser.ui.selection.replay.missingstrata=Certaines strates de la séléction à rejouer sont manquantes \: %s
coser.ui.selection.replay.missingyears=Certaines années de la séléction à rejouer sont manquantes \: %s
coser.ui.selection.replay.nextstep=Étape suivante
-coser.ui.selection.replay.noerrordetected=
+coser.ui.selection.replay.noerrordetected=Aucune erreur détéctée.
coser.ui.selection.replay.replayTitle=Rejouer une sélection
coser.ui.selection.replay.selectioninfos=Information sur la sélection \:
coser.ui.selection.rsufidataextracted=Données RSufi extraites.
@@ -274,7 +274,7 @@
coser.ui.selection.selectionTitle=Étape de sélection
coser.ui.selection.selectionValidated=Sélection validée et sauvée.
coser.ui.selection.selectionreport=Rapport de la sélection
-coser.ui.selection.sizeAllYearSpecies=
+coser.ui.selection.sizeAllYearSpecies=L3 \: Espèces avec taille pour toutes les années (%d/%d)
coser.ui.selection.speciesMenuFusion=Fusion/Renommage
coser.ui.selection.speciesMerged=Espèces fusionnées.
coser.ui.selection.speciesRenamed=Espèce renommée.
@@ -288,7 +288,7 @@
coser.ui.uploadresult.exportUploadTitle=Exporter/Uploader
coser.ui.uploadresult.exportupload=Exporter/Uploader
coser.ui.uploadresult.extract=Extraire
-coser.ui.uploadresult.extractChoice=
+coser.ui.uploadresult.extractChoice=Extraire vers un dossier
coser.ui.uploadresult.extractTo=Dossier d'extraction \:
coser.ui.uploadresult.filter.beginDate=Date de début \:
coser.ui.uploadresult.filter.endDate=Date de fin \:
@@ -304,7 +304,7 @@
coser.ui.uploadresult.selectedResults=Résultats sélectionnés \:
coser.ui.uploadresult.title=Publication des résultats
coser.ui.uploadresult.upload=Envoyer les résultats
-coser.ui.uploadresult.uploadChoice=
+coser.ui.uploadresult.uploadChoice=Envoyer sur le serveur
coser.ui.uploadresult.uploadLogin=Login admin \:
coser.ui.uploadresult.uploadPassword=Mot de passe admin \:
coser.ui.uploadresult.zone=Zone
Modified: trunk/coser-web/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/coser-web/src/license/THIRD-PARTY.properties 2014-03-03 09:56:07 UTC (rev 1131)
+++ trunk/coser-web/src/license/THIRD-PARTY.properties 2014-03-03 11:55:47 UTC (rev 1132)
@@ -3,24 +3,24 @@
# Already used licenses in project :
# - BSD License
# - BSD-style license
-# - Bouncy Castle License
+# - CDDL
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - GNU Affero General Public License v3
# - GNU Lesser General Public Licence
# - GNU Lesser General Public License (LGPL), version 2.1
+# - GPLv2+CE
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
# - MIT License
-# - Mozilla Public License
+# - MPL 1.1
# - The Apache Software License, Version 1.1
# - The Apache Software License, Version 2.0
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Mon Feb 24 16:05:06 CET 2014
+#Mon Mar 03 11:36:13 CET 2014
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
-javassist--javassist--3.8.0.GA=GNU Lesser General Public License
javax.servlet--servlet-api--2.5=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
1
0
Author: tchemit
Date: 2014-03-03 10:56:07 +0100 (Mon, 03 Mar 2014)
New Revision: 1131
Url: http://codelutin.com/projects/coser/repository/revisions/1131
Log:
remove business module site
Removed:
trunk/coser-business/src/site/
1
0
Author: tchemit
Date: 2014-03-03 10:44:51 +0100 (Mon, 03 Mar 2014)
New Revision: 1130
Url: http://codelutin.com/projects/coser/repository/revisions/1130
Log:
refs #4546: Updates dependencies
Modified:
trunk/pom.xml
trunk/src/site/site_fr.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-03-03 09:27:09 UTC (rev 1129)
+++ trunk/pom.xml 2014-03-03 09:44:51 UTC (rev 1130)
@@ -81,7 +81,7 @@
<jaxxVersion>2.8.2-SNAPSHOT</jaxxVersion>
<nuitonI18nVersion>3.0</nuitonI18nVersion>
<nuitonMatrixVersion>2.4-SNAPSHOT</nuitonMatrixVersion>
- <struts.version>2.3.8</struts.version>
+ <struts.version>2.3.16</struts.version>
</properties>
<repositories>
@@ -176,7 +176,7 @@
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
- <version>1.0.14</version>
+ <version>1.0.17</version>
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
@@ -188,7 +188,7 @@
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jcommon</artifactId>
- <version>1.0.17</version>
+ <version>1.0.21</version>
</dependency>
<dependency>
@@ -237,7 +237,7 @@
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
- <version>3.8.0.GA</version>
+ <version>3.12.1.GA</version>
<scope>runtime</scope>
</dependency>
@@ -251,19 +251,19 @@
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
- <version>5.3.4</version>
+ <version>5.5.0</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
- <version>9.0.1</version>
+ <version>9.0.4</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
- <version>2.3.19</version>
+ <version>2.3.20</version>
</dependency>
</dependencies>
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2014-03-03 09:27:09 UTC (rev 1129)
+++ trunk/src/site/site_fr.xml 2014-03-03 09:44:51 UTC (rev 1130)
@@ -91,7 +91,7 @@
</item>
</menu>
- <menu ref="modules"/>
+ <!--<menu ref="modules"/>-->
<menu ref="reports"/>
1
0
r1129 - in trunk: . coser-ui/src coser-ui/src/main/java/fr/ifremer/coser coser-web/src coser-web/src/main/webapp/WEB-INF/decorators
by tchemit@users.forge.codelutin.com 03 Mar '14
by tchemit@users.forge.codelutin.com 03 Mar '14
03 Mar '14
Author: tchemit
Date: 2014-03-03 10:27:09 +0100 (Mon, 03 Mar 2014)
New Revision: 1129
Url: http://codelutin.com/projects/coser/repository/revisions/1129
Log:
remove module site (there is nothing in it) + add info reports in site + update doc site url
Removed:
trunk/coser-ui/src/site/
trunk/coser-web/src/site/
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp
trunk/pom.xml
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2014-02-25 15:17:40 UTC (rev 1128)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2014-03-03 09:27:09 UTC (rev 1129)
@@ -106,7 +106,7 @@
LOOKANDFEEL("coser.lookandfeel", t("coser.config.lookandfeel.description"), null, String.class, false, false),
APPLICATION_VERSION("coser.application.version", t("coser.config.application.version.description"), null, String.class, false, false),
SUPPORT_EMAIL("coser.support.email", t("coser.config.support.email.description"), "support(a)codelutin.com", String.class, false, false),
- WEBSITE_URL("coser.website", t("coser.config.website.description"), "http://maven-site.forge.codelutin.com/coser/", String.class, false, false),
+ WEBSITE_URL("coser.website", t("coser.config.website.description"), "https://doc.codelutin.com/coser/", String.class, false, false),
SWING_FONT_SIZE("coser.swingfontsize", t("coser.config.swingfontsize.description"), "12", Integer.class, false, false);
protected String key;
Modified: trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-02-25 15:17:40 UTC (rev 1128)
+++ trunk/coser-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-03 09:27:09 UTC (rev 1129)
@@ -102,12 +102,12 @@
<div id="footer">
<ul class="clearfix">
<li>
- <a href="http://maven-site.forge.codelutin.com/coser/" title="Documentation de l'application" target="_blank">
+ <a href="https://doc.codelutin.com/coser/" title="Documentation de l'application" target="_blank">
Coser
</a>
</li>
<li>
- <a href="http://forge.codelutin.com/projects/coser/roadmap?completed=1" title="Modifications faites pour cette version" target="_blank">
+ <a href="https://forge.codelutin.com/projects/coser/roadmap?completed=1" title="Modifications faites pour cette version" target="_blank">
<s:property value='applicationVersion' />
</a>
</li>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-02-25 15:17:40 UTC (rev 1128)
+++ trunk/pom.xml 2014-03-03 09:27:09 UTC (rev 1129)
@@ -304,4 +304,55 @@
</pluginManagement>
</build>
+ <reporting>
+
+ <!-- par defaut pas de report pour les sites -->
+ <excludeDefaults>true</excludeDefaults>
+
+ </reporting>
+
+ <profiles>
+
+ <profile>
+ <id>reporting</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+
+ <reporting>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>${projectInfoReportsPluginVersion}</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>project-team</report>
+ <report>mailing-list</report>
+ <report>cim</report>
+ <report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ <report>dependencies</report>
+ <report>dependency-info</report>
+ <report>dependency-convergence</report>
+ <report>plugin-management</report>
+ <report>plugins</report>
+ <report>dependency-management</report>
+ <report>summary</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+
+ </plugins>
+ </reporting>
+
+ </profile>
+ </profiles>
+
</project>
1
0
Author: tchemit
Date: 2014-02-25 09:42:30 +0100 (Tue, 25 Feb 2014)
New Revision: 1127
Url: http://codelutin.com/projects/coser/repository/revisions/1127
Log:
update scm + optimize dependencies
Modified:
trunk/coser-business/pom.xml
trunk/pom.xml
Modified: trunk/coser-business/pom.xml
===================================================================
--- trunk/coser-business/pom.xml 2014-02-24 15:56:06 UTC (rev 1126)
+++ trunk/coser-business/pom.xml 2014-02-25 08:42:30 UTC (rev 1127)
@@ -43,6 +43,7 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-02-24 15:56:06 UTC (rev 1126)
+++ trunk/pom.xml 2014-02-25 08:42:30 UTC (rev 1127)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>4.7</version>
+ <version>5.0-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer</groupId>
@@ -15,7 +15,7 @@
<name>Coser</name>
<description>Contrôle et Sélection RSufi</description>
- <url>http://maven-site.forge.codelutin.com/coser</url>
+ <url>http://doc.codelutin.com/coser</url>
<inceptionYear>2010</inceptionYear>
<organization>
<name>Ifremer</name>
@@ -59,8 +59,8 @@
</modules>
<scm>
- <connection>scm:svn:https://forge.codelutin.com/svn/coser/trunk</connection>
- <developerConnection>scm:svn:https://forge.codelutin.com/svn/coser/trunk</developerConnection>
+ <connection>scm:svn:https://svn.codelutin.com/coser/trunk</connection>
+ <developerConnection>scm:svn:https://svn.codelutin.com/coser/trunk</developerConnection>
<url>https://forge.codelutin.com/repositories/browse/coser/trunk</url>
</scm>
<distributionManagement>
@@ -101,25 +101,6 @@
<dependencies>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-math</artifactId>
- <version>2.2</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- <version>1.2</version>
- </dependency>
-
- <dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-utils</artifactId>
<version>3.0-rc-2</version>
1
0
Author: tchemit
Date: 2014-02-24 16:56:06 +0100 (Mon, 24 Feb 2014)
New Revision: 1126
Url: http://forge.codelutin.com/projects/coser/repository/revisions/1126
Log:
use the coser group nexus repository
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-02-24 15:28:04 UTC (rev 1125)
+++ trunk/pom.xml 2014-02-24 15:56:06 UTC (rev 1126)
@@ -86,8 +86,14 @@
<repositories>
<repository>
- <id>nuiton-public</id>
- <url>http://nexus.nuiton.org/nexus/content/groups/public</url>
+ <id>coser-group</id>
+ <url>https://nexus.nuiton.org/nexus/content/groups/coser-group</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
</repository>
</repositories>
1
0
See <http://ci.codelutin.com/jenkins/job/coser-ci/3/changes>
Changes:
[Tony CHEMIT] fixes #3545: Updates mavenpom to 4.7
refs #4546: Updates dependencies
------------------------------------------
Started by an SCM change
Building in workspace <http://ci.codelutin.com/jenkins/job/coser-ci/ws/>
Updating https://forge.codelutin.com/svn/coser/trunk at revision '2014-02-24T16:25:38.678 +0100'
U LICENSE.txt
U coser-business/LICENSE.txt
U coser-business/src/test/java/fr/ifremer/coser/services/PublicationServiceTest.java
U coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
U coser-business/src/license/THIRD-PARTY.properties
U coser-business/src/main/java/fr/ifremer/coser/services/ControlService.java
U coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
U coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java
U coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
U coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
U coser-business/src/main/java/fr/ifremer/coser/bean/Project.java
U coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java
U coser-business/src/main/java/fr/ifremer/coser/data/AbstractDataEntity.java
U coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java
U coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java
U coser-business/src/main/java/fr/ifremer/coser/command/MergeSpeciesCommand.java
U coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java
U coser-business/pom.xml
U coser-ui/src/license/THIRD-PARTY.properties
U coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
U coser-ui/src/main/java/fr/ifremer/coser/Coser.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDuplicatedLineTableModel.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListRenderer.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlErrorTreeRenderer.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/control/GlobalControlErrorModel.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionRsufiView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesListOccDensRenderer.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/project/SpeciesFieldTypeListRenderer.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectSummaryView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenu.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserProgressBar.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/util/ErrorHelper.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/result/ExportUploadDialog.jaxx
U coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTableModel.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableModel.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
U coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableRenderer.java
U coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
U coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
U coser-ui/pom.xml
U coser-web/LICENSE.txt
U coser-web/src/license/THIRD-PARTY.properties
U coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
U coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java
U coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java
U coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
U coser-web/pom.xml
U src/site/site_en.xml
U src/site/site_fr.xml
U pom.xml
At revision 1124
Parsing POMs
Failed to transfer Could not find metadata fr.ifremer:coser:1.4.4-SNAPSHOT/maven-metadata.xml in snapshots (http://nexus.nuiton.org/nexus/content/repositories/snapshots)
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.apache.commons:commons-collections4:jar is missing. @ line 52, column 21
[ERROR] 'dependencies.dependency.version' for org.nuiton:nuiton-config:jar is missing. @ line 60, column 21
[ERROR] 'dependencies.dependency.version' for org.nuiton.jaxx:jaxx-widgets-extra:jar is missing. @ line 108, column 21
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1284)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1081)
at hudson.FilePath.act(FilePath.java:914)
at hudson.FilePath.act(FilePath.java:887)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:943)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:671)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)
at hudson.model.Run.execute(Run.java:1670)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
1
1
Author: tchemit
Date: 2014-02-24 16:28:04 +0100 (Mon, 24 Feb 2014)
New Revision: 1125
Url: http://forge.codelutin.com/projects/coser/repository/revisions/1125
Log:
fix version
Modified:
trunk/coser-ui/pom.xml
Modified: trunk/coser-ui/pom.xml
===================================================================
--- trunk/coser-ui/pom.xml 2014-02-24 15:14:55 UTC (rev 1124)
+++ trunk/coser-ui/pom.xml 2014-02-24 15:28:04 UTC (rev 1125)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>coser</artifactId>
- <version>1.4.4-SNAPSHOT</version>
+ <version>1.5-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.coser</groupId>
1
0
24 Feb '14
Author: tchemit
Date: 2014-02-24 16:14:55 +0100 (Mon, 24 Feb 2014)
New Revision: 1124
Url: http://forge.codelutin.com/projects/coser/repository/revisions/1124
Log:
fixes #3545: Updates mavenpom to 4.7
refs #4546: Updates dependencies
Modified:
trunk/LICENSE.txt
trunk/coser-business/LICENSE.txt
trunk/coser-business/pom.xml
trunk/coser-business/src/license/THIRD-PARTY.properties
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java
trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java
trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/MergeSpeciesCommand.java
trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java
trunk/coser-business/src/main/java/fr/ifremer/coser/data/AbstractDataEntity.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/ControlService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/PublicationServiceTest.java
trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
trunk/coser-ui/pom.xml
trunk/coser-ui/src/license/THIRD-PARTY.properties
trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenu.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDuplicatedLineTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlErrorTreeRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/GlobalControlErrorModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectSummaryView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/SpeciesFieldTypeListRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ExportUploadDialog.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTableModel.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionRsufiView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesListOccDensRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserProgressBar.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/ErrorHelper.java
trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
trunk/coser-web/LICENSE.txt
trunk/coser-web/pom.xml
trunk/coser-web/src/license/THIRD-PARTY.properties
trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java
trunk/pom.xml
trunk/src/site/site_en.xml
trunk/src/site/site_fr.xml
Modified: trunk/LICENSE.txt
===================================================================
--- trunk/LICENSE.txt 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/LICENSE.txt 2014-02-24 15:14:55 UTC (rev 1124)
@@ -10,7 +10,7 @@
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
- 0. Additional Definitions.
+ 0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
@@ -111,7 +111,7 @@
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
- Version.
+ Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
@@ -163,4 +163,3 @@
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
-
Modified: trunk/coser-business/LICENSE.txt
===================================================================
--- trunk/coser-business/LICENSE.txt 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/LICENSE.txt 2014-02-24 15:14:55 UTC (rev 1124)
@@ -10,7 +10,7 @@
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
- 0. Additional Definitions.
+ 0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
@@ -111,7 +111,7 @@
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
- Version.
+ Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
@@ -163,4 +163,3 @@
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
-
Modified: trunk/coser-business/pom.xml
===================================================================
--- trunk/coser-business/pom.xml 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/pom.xml 2014-02-24 15:14:55 UTC (rev 1124)
@@ -1,23 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>coser</artifactId>
- <version>1.4.4-SNAPSHOT</version>
+ <version>1.5-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.coser</groupId>
<artifactId>coser-business</artifactId>
+ <packaging>jar</packaging>
+ <name>Coser :: Business</name>
+ <description>Coser business module</description>
+
+ <properties>
+ <license.licenseName>lgpl_v3</license.licenseName>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-utils</artifactId>
</dependency>
<dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-config</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
</dependency>
@@ -42,8 +53,8 @@
<artifactId>commons-beanutils</artifactId>
</dependency>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -107,15 +118,6 @@
</dependency>
</dependencies>
- <name>Coser :: Business</name>
- <description>Coser business module</description>
-
- <packaging>jar</packaging>
-
- <properties>
- <license.licenseName>lgpl_v3</license.licenseName>
- </properties>
-
<build>
<plugins>
<plugin>
@@ -133,4 +135,5 @@
</plugin>
</plugins>
</build>
+
</project>
Modified: trunk/coser-business/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/coser-business/src/license/THIRD-PARTY.properties 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/license/THIRD-PARTY.properties 2014-02-24 15:14:55 UTC (rev 1124)
@@ -1,7 +1,6 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache License
# - Apache Software License, Version 2.0
# - BSD License
# - BSD-style license
@@ -23,7 +22,6 @@
# Please fill the missing licenses for dependencies :
#
#
-#Tue Jan 29 16:06:34 CET 2013
-commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+#Mon Feb 24 15:56:47 CET 2014
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
javassist--javassist--3.8.0.GA=GNU Lesser General Public License
-regexp--regexp--1.3=The Apache Software License, Version 2.0
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,13 +25,14 @@
package fr.ifremer.coser;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.io.File;
import java.util.List;
import java.util.Locale;
-import org.nuiton.util.ApplicationConfig;
+import org.nuiton.config.ApplicationConfig;
+import org.nuiton.config.ConfigOptionDef;
/**
* Coser business application config.
@@ -237,36 +238,36 @@
return emails;
}
- public static enum CoserBusinessOption {
+ public static enum CoserBusinessOption implements ConfigOptionDef {
- DATABASE_DIRECTORY("coser.database.directory", _("coser.config.database.directory.description"), "${user.home}" + File.separator + "coser"),
- PROJECTS_DIRECTORY("coser.projects.directory", _("coser.config.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "projects"),
- VALIDATOR_DIRECTORY("coser.validator.directory", _("coser.config.validator.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "validators"),
+ DATABASE_DIRECTORY("coser.database.directory", t("coser.config.database.directory.description"), "${user.home}" + File.separator + "coser"),
+ PROJECTS_DIRECTORY("coser.projects.directory", t("coser.config.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "projects"),
+ VALIDATOR_DIRECTORY("coser.validator.directory", t("coser.config.validator.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "validators"),
- SMTP_HOST("coser.smtp.host", _("coser.config.smtp.host.description"), "smtp"),
- LOCALE("coser.locale", _("coser.config.locale.description"), Locale.FRANCE.toString()),
+ SMTP_HOST("coser.smtp.host", t("coser.config.smtp.host.description"), "smtp"),
+ LOCALE("coser.locale", t("coser.config.locale.description"), Locale.FRANCE.toString()),
- REFERENCE_SPECIES("coser.reference.species", _("coser.config.reference.species.description"), ""),
- REFERENCE_TYPE_ESPECES("coser.reference.typeSpecies", _("coser.config.reference.typeSpecies.description"), ""),
+ REFERENCE_SPECIES("coser.reference.species", t("coser.config.reference.species.description"), ""),
+ REFERENCE_TYPE_ESPECES("coser.reference.typeSpecies", t("coser.config.reference.typeSpecies.description"), ""),
- CONTROL_NOBSMIN("coser.control.nobsmin", _("coser.config.control.nobsmin.description"), "1.0"),
- CONTROL_DIFF_CATCH_LENGTH("coser.control.diffcatchlength", _("coser.config.control.diffcatchlength.description"), "5.0"),
- CONTROL_TYPE_FISH("coser.control.typeFish", _("coser.config.control.typeFish.description"), "Pisces + Agnatha"),
- CONTROL_STANDARD_DEVIATION_TO_AVERAGE("coser.control.standarddeviationtoaverage", _("coser.config.control.standarddeviationtoaverage.description"), "3"),
- SELECTION_FILTER_OCCURRENCE("coser.selection.occurrenceFilter", _("coser.config.selection.occurrenceFilter.description"), "5.0"),
- SELECTION_FILTER_DENSITY("coser.selection.densityFilter", _("coser.config.selection.densityFilter.description"), "5.0"),
+ CONTROL_NOBSMIN("coser.control.nobsmin", t("coser.config.control.nobsmin.description"), "1.0"),
+ CONTROL_DIFF_CATCH_LENGTH("coser.control.diffcatchlength", t("coser.config.control.diffcatchlength.description"), "5.0"),
+ CONTROL_TYPE_FISH("coser.control.typeFish", t("coser.config.control.typeFish.description"), "Pisces + Agnatha"),
+ CONTROL_STANDARD_DEVIATION_TO_AVERAGE("coser.control.standarddeviationtoaverage", t("coser.config.control.standarddeviationtoaverage.description"), "3"),
+ SELECTION_FILTER_OCCURRENCE("coser.selection.occurrenceFilter", t("coser.config.selection.occurrenceFilter.description"), "5.0"),
+ SELECTION_FILTER_DENSITY("coser.selection.densityFilter", t("coser.config.selection.densityFilter.description"), "5.0"),
/** Client side. */
- WEB_FRONT_END("coser.web.frontend", _("coser.config.web.frontend.description"), "http://www.ifremer.fr/SIH-indices-campagnes"),
- WEB_UPLOAD_URL("coser.web.uploadurl", _("coser.config.web.uploadurl.description"), "${" + WEB_FRONT_END.key + "}/upload-result.action"),
+ WEB_FRONT_END("coser.web.frontend", t("coser.config.web.frontend.description"), "http://www.ifremer.fr/SIH-indices-campagnes"),
+ WEB_UPLOAD_URL("coser.web.uploadurl", t("coser.config.web.uploadurl.description"), "${" + WEB_FRONT_END.key + "}/upload-result.action"),
/** Server side. */
- WEB_PROPERTIES_FILE("coser.web.properties.file", _("coser.config.web.properties.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "web.properties"),
- WEB_INDICATORS_PROJECTS_DIRECTORY("coser.web.indicators.projects.directory", _("coser.config.web.indicators.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webindicatorsprojects"),
- WEB_MAPS_PROJECTS_DIRECTORY("coser.web.maps.projects.directory", _("coser.config.web.maps.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webmapsprojects"),
- WEB_INDICATORS("coser.web.indicators.file", _("coser.config.web.indicators.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webindicators.csv"),
- WEB_ZONES("coser.web.zones.file", _("coser.config.web.zones.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webzones.csv"),
- WEB_PUBLICATION_EMAIL("coser.web.newresult.emails", _("coser.config.web.newresult.emails.description"), null);
+ WEB_PROPERTIES_FILE("coser.web.properties.file", t("coser.config.web.properties.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "web.properties"),
+ WEB_INDICATORS_PROJECTS_DIRECTORY("coser.web.indicators.projects.directory", t("coser.config.web.indicators.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webindicatorsprojects"),
+ WEB_MAPS_PROJECTS_DIRECTORY("coser.web.maps.projects.directory", t("coser.config.web.maps.projects.directory.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webmapsprojects"),
+ WEB_INDICATORS("coser.web.indicators.file", t("coser.config.web.indicators.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webindicators.csv"),
+ WEB_ZONES("coser.web.zones.file", t("coser.config.web.zones.file.description"), "${" + DATABASE_DIRECTORY.key + "}" + File.separator + "webzones.csv"),
+ WEB_PUBLICATION_EMAIL("coser.web.newresult.emails", t("coser.config.web.newresult.emails.description"), null);
protected String key;
protected String description;
@@ -282,6 +283,31 @@
return defaultValue;
}
+ @Override
+ public boolean isTransient() {
+ return false;
+ }
+
+ @Override
+ public boolean isFinal() {
+ return false;
+ }
+
+ @Override
+ public void setDefaultValue(String defaultValue) {
+ // not used
+ }
+
+ @Override
+ public void setTransient(boolean isTransient) {
+ // not used
+ }
+
+ @Override
+ public void setFinal(boolean isFinal) {
+ // not used
+ }
+
public String getDescription() {
return description;
}
@@ -289,5 +315,13 @@
public String getKey() {
return key;
}
+
+ @Override
+ public Class<?> getType() {
+ //FIXME use it soon...
+ return null;
+ }
+
+
}
}
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* Coser constants.
@@ -82,12 +82,12 @@
/** Categories des données manipulées. */
public static enum Category {
- CATCH(n_("coser.business.category.catch"), "catch.csv", true),
- STRATA(n_("coser.business.category.strata"), "strata.csv", true),
- HAUL(n_("coser.business.category.haul"), "haul.csv", true),
- LENGTH(n_("coser.business.category.length"), "length.csv", true),
- REFTAX_SPECIES(n_("coser.business.category.reftax.species"), "reftaxSpecies.csv", false),
- TYPE_ESPECES(n_("coser.business.category.typeEspece"), "codeTypeEspeces.csv", false);
+ CATCH(n("coser.business.category.catch"), "catch.csv", true),
+ STRATA(n("coser.business.category.strata"), "strata.csv", true),
+ HAUL(n("coser.business.category.haul"), "haul.csv", true),
+ LENGTH(n("coser.business.category.length"), "length.csv", true),
+ REFTAX_SPECIES(n("coser.business.category.reftax.species"), "reftaxSpecies.csv", false),
+ TYPE_ESPECES(n("coser.business.category.typeEspece"), "codeTypeEspeces.csv", false);
protected String translationKey;
protected String storageFileName;
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -34,7 +34,7 @@
import java.util.Map;
import java.util.Properties;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import fr.ifremer.coser.CoserUtils;
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.command;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.util.ArrayList;
import java.util.List;
@@ -84,7 +84,7 @@
}
else {
// if not found, throw business exception
- throw new CoserBusinessException(_("Can't find line %s for deletion", lineNumber));
+ throw new CoserBusinessException(t("Can't find line %s for deletion", lineNumber));
}
}
@@ -146,7 +146,7 @@
// if not found, throw business exception
else {
- throw new CoserBusinessException(_("Can't find line %s for undeletion", lineNumber));
+ throw new CoserBusinessException(t("Can't find line %s for undeletion", lineNumber));
}
}
@@ -183,12 +183,12 @@
@Override
public String getLogString(Project project, AbstractDataContainer container) {
- return _("coser.business.command.deleteline.log", _(category.getTranslationKey()), lineNumber);
+ return t("coser.business.command.deleteline.log", t(category.getTranslationKey()), lineNumber);
}
@Override
public String getDescription(Project project, AbstractDataContainer container) {
- String desc = _("coser.business.command.deleteline.desc", _(category.getTranslationKey()), lineNumber);
+ String desc = t("coser.business.command.deleteline.desc", t(category.getTranslationKey()), lineNumber);
if (StringUtils.isNotBlank(comment)) {
desc += " (" + comment + ")";
}
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/command/MergeSpeciesCommand.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/command/MergeSpeciesCommand.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/command/MergeSpeciesCommand.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.command;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.util.ArrayList;
import java.util.Arrays;
@@ -384,10 +384,10 @@
}
String log = null;
if (speciesNames.length == 1) {
- log = _("coser.business.command.mergespecies.rename.log",
+ log = t("coser.business.command.mergespecies.rename.log",
project.getDisplaySpeciesText(newSpecyName), speciesAsString.toString());
} else {
- log = _("coser.business.command.mergespecies.log",
+ log = t("coser.business.command.mergespecies.log",
project.getDisplaySpeciesText(newSpecyName), speciesAsString.toString());
}
return log;
@@ -404,10 +404,10 @@
}
String desc = null;
if (speciesNames.length == 1) {
- desc = _("coser.business.command.mergespecies.rename.desc",
+ desc = t("coser.business.command.mergespecies.rename.desc",
project.getDisplaySpeciesText(newSpecyName), speciesNames.length, speciesAsString.toString());
} else {
- desc = _("coser.business.command.mergespecies.desc",
+ desc = t("coser.business.command.mergespecies.desc",
project.getDisplaySpeciesText(newSpecyName), speciesNames.length, speciesAsString.toString());
}
if (StringUtils.isNotBlank(comment)) {
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.command;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.beans.Introspector;
import java.util.ArrayList;
@@ -128,7 +128,7 @@
dataStorage.set(lineIndex, beanData.getData());
}
else {
- throw new CoserBusinessException(_("Can't replace data value. Expected %s but was %s", currentValue, dataValue));
+ throw new CoserBusinessException(t("Can't replace data value. Expected %s but was %s", currentValue, dataValue));
}
} catch (Exception ex) {
throw new CoserBusinessException("Can't replace data field value", ex);
@@ -171,7 +171,7 @@
dataStorage.set(lineIndex, beanData.getData());
}
else {
- throw new CoserBusinessException(_("Can't replace data value. Expected %s but was %s", newValue, dataValue));
+ throw new CoserBusinessException(t("Can't replace data value. Expected %s but was %s", newValue, dataValue));
}
} catch (Exception ex) {
throw new CoserBusinessException("Can't replace data field value", ex);
@@ -224,13 +224,13 @@
@Override
public String getLogString(Project project, AbstractDataContainer container) {
String realFieldName = getRealFieldName(container);
- return _("coser.business.command.modifyfield.log", _(category.getTranslationKey()), lineNumber, realFieldName, currentValue, newValue);
+ return t("coser.business.command.modifyfield.log", t(category.getTranslationKey()), lineNumber, realFieldName, currentValue, newValue);
}
@Override
public String getDescription(Project project, AbstractDataContainer container) {
String realFieldName = getRealFieldName(container);
- String desc = _("coser.business.command.modifyfield.desc", _(category.getTranslationKey()), lineNumber, realFieldName, currentValue, newValue);
+ String desc = t("coser.business.command.modifyfield.desc", t(category.getTranslationKey()), lineNumber, realFieldName, currentValue, newValue);
if (StringUtils.isNotBlank(comment)) {
desc += " (" + comment + ")";
}
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/data/AbstractDataEntity.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/data/AbstractDataEntity.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/data/AbstractDataEntity.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.data;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
import fr.ifremer.coser.bean.AbstractEntity;
/**
@@ -43,7 +43,7 @@
private static final long serialVersionUID = 4188448448464323807L;
public static final int INDEX_LINE = 0;
- public static final String PROPERTY_LINE = n_("coser.business.line");
+ public static final String PROPERTY_LINE = n("coser.business.line");
protected String[] data;
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.services;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -44,7 +44,7 @@
import java.util.Iterator;
import java.util.Map;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.nuiton.util.ArrayUtil;
@@ -146,7 +146,7 @@
// check header
String[] line = csvReader.readNext();
if (line == null || line.length <= 1) {
- throw new CoserBusinessException(_("Can't read file '%s'. Check CSV file separator",
+ throw new CoserBusinessException(t("Can't read file '%s'. Check CSV file separator",
file.getAbsolutePath()));
} else {
if (originalLoading) {
@@ -220,7 +220,7 @@
if (frHeaders != null) {
if (!Arrays.equals(line, enHeaders) && !Arrays.equals(line, frHeaders)) {
- throw new CoserBusinessException(_("Wrong header detected in file %s. Found : %s, expected %s or %s",
+ throw new CoserBusinessException(t("Wrong header detected in file %s. Found : %s, expected %s or %s",
file.getName(),
StringUtils.join(line, ", "),
StringUtils.join(frHeaders, ", "),
@@ -228,7 +228,7 @@
}
} else {
if (!Arrays.equals(line, enHeaders)) {
- throw new CoserBusinessException(_("Wrong header detected in file %s. Found : %s, expected %s",
+ throw new CoserBusinessException(t("Wrong header detected in file %s. Found : %s, expected %s",
file.getName(),
StringUtils.join(line, ", "),
StringUtils.join(enHeaders, ", ")));
@@ -300,7 +300,7 @@
* @param category category used to replace species output field if needed (can be null)
*
* @throws CoserBusinessException
- * @deprecated since 1.4, prefer use of {@link storeDataWhithoutQuote(DataStorage, Writer, Map, Category)}
+ * @deprecated since 1.4, prefer use of {@link #storeDataWhithoutQuote(DataStorage, Writer, Map, Category)}
*/
public void storeDataWhithoutQuote(DataStorage content, File file, Map<String, String> refTaxSpecies, Category category) throws CoserBusinessException {
@@ -445,7 +445,7 @@
// check header
String[] line = csvReader.readNext();
if (line == null || line.length <= 1) {
- throw new CoserBusinessException(_("Can't read file '%s'. Check CSV file separator",
+ throw new CoserBusinessException(t("Can't read file '%s'. Check CSV file separator",
file.getAbsolutePath()));
}
else {
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ControlService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ControlService.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ControlService.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.services;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.util.ArrayList;
import java.util.Collection;
@@ -41,7 +41,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -262,7 +262,7 @@
if (validationErrors.isEmpty()) {
ControlError noErrorError = new ControlError();
noErrorError.setLevel(ValidationLevel.INFO);
- noErrorError.setMessage(_("coser.business.control.noerrorfound"));
+ noErrorError.setMessage(t("coser.business.control.noerrorfound"));
validationErrors.add(noErrorError);
}
return validationErrors;
@@ -306,7 +306,7 @@
// update progress
int total = dataToCheck.size() - 1;
if (progress != null) {
- progress.setText(_("coser.business.control.step.xworks", _(category.getTranslationKey()), 0));
+ progress.setText(t("coser.business.control.step.xworks", t(category.getTranslationKey()), 0));
progress.setTotal(total);
}
@@ -320,7 +320,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.xworks", _(category.getTranslationKey()), progressPercent));
+ progress.setText(t("coser.business.control.step.xworks", t(category.getTranslationKey()), progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -366,8 +366,8 @@
error.setLevel(ValidationLevel.ERROR);
// warning, line number must stay sorted
error.addLineNumber(uniqueDataKeys.get(uniqueDataKey));
- error.setMessage(_("coser.business.control.error.duplicatedLine", uniqueDataKey));
- error.setDetailMessage(_("coser.business.control.error.duplicatedLineDetails", uniqueDataKey));
+ error.setMessage(t("coser.business.control.error.duplicatedLine", uniqueDataKey));
+ error.setDetailMessage(t("coser.business.control.error.duplicatedLineDetails", uniqueDataKey));
validationErrors.add(error);
uniqueDataErrors.put(uniqueDataKey, error);
}
@@ -495,7 +495,7 @@
int total = control.getCatch().size() - 1;
if (progress != null) {
- progress.setText(_("coser.business.control.step.observation", _(Category.CATCH.getTranslationKey()), 0));
+ progress.setText(t("coser.business.control.step.observation", t(Category.CATCH.getTranslationKey()), 0));
progress.setTotal(total);
}
@@ -513,7 +513,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.observation", _(Category.CATCH.getTranslationKey()), progressPercent));
+ progress.setText(t("coser.business.control.step.observation", t(Category.CATCH.getTranslationKey()), progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -566,8 +566,8 @@
error.setCategory(Category.CATCH);
error.setLevel(ValidationLevel.WARNING);
error.addLineNumber(lineNumber);
- error.setMessage(_("coser.business.control.error.minObservationCount"));
- error.setDetailMessage(_("coser.business.control.error.minObservationCountDetail", key, value));
+ error.setMessage(t("coser.business.control.error.minObservationCount"));
+ error.setDetailMessage(t("coser.business.control.error.minObservationCountDetail", key, value));
validationErrors.add(error);
}
}
@@ -593,7 +593,7 @@
int total = control.getCatch().size() - 1 + control.getLength().size() - 1;
if (progress != null) {
- progress.setText(_("coser.business.control.step.diffCatchLength", 0));
+ progress.setText(t("coser.business.control.step.diffCatchLength", 0));
progress.setTotal(total);
}
@@ -612,7 +612,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.diffCatchLength", progressPercent));
+ progress.setText(t("coser.business.control.step.diffCatchLength", progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -656,7 +656,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.diffCatchLength", progressPercent));
+ progress.setText(t("coser.business.control.step.diffCatchLength", progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -722,8 +722,8 @@
SpeciesControlError error = new SpeciesControlError();
error.setSpecies(species);
error.setLevel(ValidationLevel.WARNING);
- error.setMessage(_("coser.business.control.error.diffCatchLengthMissingYear"));
- error.setDetailMessage(_("coser.business.control.error.diffCatchLengthMissingYearDetail",
+ error.setMessage(t("coser.business.control.error.diffCatchLengthMissingYear"));
+ error.setDetailMessage(t("coser.business.control.error.diffCatchLengthMissingYearDetail",
project.getDisplaySpeciesText(species)));
validationErrors.add(error);
missingYearLengthSpecies.add(species);
@@ -739,8 +739,8 @@
DiffCatchLengthControlError error = new DiffCatchLengthControlError();
error.setSpecies(species);
error.setLevel(ValidationLevel.WARNING);
- error.setMessage(_("coser.business.control.error.diffCatchLength"));
- error.setDetailMessage(_("coser.business.control.error.diffCatchLengthDetail",
+ error.setMessage(t("coser.business.control.error.diffCatchLength"));
+ error.setDetailMessage(t("coser.business.control.error.diffCatchLengthDetail",
project.getDisplaySpeciesText(species), year));
validationErrors.add(error);
}
@@ -777,7 +777,7 @@
int total = control.getLength().size() - 1;
if (progress != null) {
- progress.setText(_("coser.business.control.step.observation", _(Category.LENGTH.getTranslationKey()), 0));
+ progress.setText(t("coser.business.control.step.observation", t(Category.LENGTH.getTranslationKey()), 0));
progress.setTotal(total);
}
@@ -799,7 +799,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.observation", _(Category.LENGTH.getTranslationKey()), progressPercent));
+ progress.setText(t("coser.business.control.step.observation", t(Category.LENGTH.getTranslationKey()), progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -876,8 +876,8 @@
error.setCategory(Category.LENGTH);
error.setLevel(ValidationLevel.WARNING);
error.addLineNumber(lineNumber);
- error.setMessage(_("coser.business.control.error.minObservationCount"));
- error.setDetailMessage(_("coser.business.control.error.minObservationCountDetail", key, value));
+ error.setMessage(t("coser.business.control.error.minObservationCount"));
+ error.setDetailMessage(t("coser.business.control.error.minObservationCountDetail", key, value));
validationErrors.add(error);
}
}
@@ -904,7 +904,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 50.0);
- progress.setText(_("coser.business.control.step.lengthdeviation", _(Category.LENGTH.getTranslationKey()), progressPercent));
+ progress.setText(t("coser.business.control.step.lengthdeviation", t(Category.LENGTH.getTranslationKey()), progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -951,7 +951,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 50.0 + 50.0);
- progress.setText(_("coser.business.control.step.lengthoutliers", _(Category.LENGTH.getTranslationKey()), progressPercent));
+ progress.setText(t("coser.business.control.step.lengthoutliers", t(Category.LENGTH.getTranslationKey()), progressPercent));
progress.setCurrent(total + lineIndex);
++lineIndex;
}
@@ -977,8 +977,8 @@
error.setLevel(ValidationLevel.WARNING);
error.addLineNumber(lineNumber);
error.setSpecies(species);
- error.setMessage(_("coser.business.control.error.lengthOutliers", avg, deviation));
- error.setDetailMessage(_("coser.business.control.error.lengthOutliersDetail",
+ error.setMessage(t("coser.business.control.error.lengthOutliers", avg, deviation));
+ error.setDetailMessage(t("coser.business.control.error.lengthOutliersDetail",
project.getDisplaySpeciesText(species), avg, deviation, lengthValue));
validationErrors.add(error);
}
@@ -1039,7 +1039,7 @@
int total = control.getCatch().size() + control.getHaul().size()
+ control.getStrata().size() + control.getLength().size() - 4;
if (progress != null) {
- progress.setText(_("coser.business.control.step.crossFileChech", 0));
+ progress.setText(t("coser.business.control.step.crossFileChech", 0));
progress.setTotal(total);
progress.setCurrent(0);
}
@@ -1113,7 +1113,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.crossFileChech", progressPercent));
+ progress.setText(t("coser.business.control.step.crossFileChech", progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -1128,7 +1128,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.crossFileChech", progressPercent));
+ progress.setText(t("coser.business.control.step.crossFileChech", progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -1147,7 +1147,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.crossFileChech", progressPercent));
+ progress.setText(t("coser.business.control.step.crossFileChech", progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -1170,8 +1170,8 @@
error.setCategory(Category.CATCH);
error.addLineNumber(catchData[Catch.INDEX_LINE]);
error.setLevel(ValidationLevel.ERROR);
- error.setMessage(_("coser.business.control.error.nonExistantSpecies"));
- error.setDetailMessage(_("coser.business.control.error.nonExistantSpeciesDetail", catchData[Catch.INDEX_SPECIES]));
+ error.setMessage(t("coser.business.control.error.nonExistantSpecies"));
+ error.setDetailMessage(t("coser.business.control.error.nonExistantSpeciesDetail", catchData[Catch.INDEX_SPECIES]));
crossFilesErrors.add(error);
}
}
@@ -1181,7 +1181,7 @@
// update progress
if (progress != null) {
int progressPercent = (int)((double)lineIndex / (double)total * 100.0);
- progress.setText(_("coser.business.control.step.crossFileChech", progressPercent));
+ progress.setText(t("coser.business.control.step.crossFileChech", progressPercent));
progress.setCurrent(lineIndex);
++lineIndex;
}
@@ -1204,8 +1204,8 @@
error.setCategory(Category.LENGTH);
error.addLineNumber(lengthData[Length.INDEX_LINE]);
error.setLevel(ValidationLevel.ERROR);
- error.setMessage(_("coser.business.control.error.nonExistantSpecies"));
- error.setDetailMessage(_("coser.business.control.error.nonExistantSpeciesDetail", lengthData[Length.INDEX_SPECIES]));
+ error.setMessage(t("coser.business.control.error.nonExistantSpecies"));
+ error.setDetailMessage(t("coser.business.control.error.nonExistantSpeciesDetail", lengthData[Length.INDEX_SPECIES]));
crossFilesErrors.add(error);
}
@@ -1235,10 +1235,10 @@
error.setCategory(Category.LENGTH);
error.addLineNumber(lengthData[Length.INDEX_LINE]);
error.setLevel(ValidationLevel.WARNING);
- error.setMessage(_("coser.business.control.error.invalidLengthLengthStep"));
- error.setDetailMessage(_("coser.business.control.error.invalidLengthLengthStepDetail",
+ error.setMessage(t("coser.business.control.error.invalidLengthLengthStep"));
+ error.setDetailMessage(t("coser.business.control.error.invalidLengthLengthStepDetail",
lengthData[Length.INDEX_LENGTH], project.getDisplaySpeciesText(species)));
- error.setTipMessage(_("coser.business.control.error.invalidLengthLengthStepTip"));
+ error.setTipMessage(t("coser.business.control.error.invalidLengthLengthStepTip"));
crossFilesErrors.add(error);
}
}
@@ -1250,8 +1250,8 @@
if (!catchYear.equals(lengthYear) || !haulYear.equals(lengthYear)) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.yearsNotEquals"));
- //error.setDetailMessage(_("coser.business.control.error.yearsNotEquals"));
+ error.setMessage(t("coser.business.control.error.yearsNotEquals"));
+ //error.setDetailMessage(t("coser.business.control.error.yearsNotEquals"));
crossFilesErrors.add(error);
}
@@ -1259,8 +1259,8 @@
if (surveyNames.size() != 1) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.surveyNotEquals"));
- //error.setDetailMessage(_("coser.business.control.error.surveyNotEquals"));
+ error.setMessage(t("coser.business.control.error.surveyNotEquals"));
+ //error.setDetailMessage(t("coser.business.control.error.surveyNotEquals"));
crossFilesErrors.add(error);
}
@@ -1271,9 +1271,9 @@
for (String missingSpeciesCatchTuple : missingSpeciesCatchTuples) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.missingYearHaulSpeciesForCatchData"));
- error.setDetailMessage(_("coser.business.control.error.missingYearHaulSpeciesForCatchDataDetail", missingSpeciesCatchTuple));
- error.setTipMessage(_("coser.business.control.error.missingYearHaulSpeciesForCatchDataTip"));
+ error.setMessage(t("coser.business.control.error.missingYearHaulSpeciesForCatchData"));
+ error.setDetailMessage(t("coser.business.control.error.missingYearHaulSpeciesForCatchDataDetail", missingSpeciesCatchTuple));
+ error.setTipMessage(t("coser.business.control.error.missingYearHaulSpeciesForCatchDataTip"));
crossFilesErrors.add(error);
}
@@ -1284,9 +1284,9 @@
for (String missingHaulLengthTuple : missingHaulLengthTuples) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.missingYearHaulForLengthData"));
- error.setDetailMessage(_("coser.business.control.error.missingYearHaulForLengthDataDetail", missingHaulLengthTuple));
- error.setTipMessage(_("coser.business.control.error.missingYearHaulForLengthDataTip"));
+ error.setMessage(t("coser.business.control.error.missingYearHaulForLengthData"));
+ error.setDetailMessage(t("coser.business.control.error.missingYearHaulForLengthDataDetail", missingHaulLengthTuple));
+ error.setTipMessage(t("coser.business.control.error.missingYearHaulForLengthDataTip"));
crossFilesErrors.add(error);
}
@@ -1297,9 +1297,9 @@
for (String missingHaulCatchTuple : missingHaulCatchTuples) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.missingYearHaulForCatchData"));
- error.setDetailMessage(_("coser.business.control.error.missingYearHaulForCatchDataDetail", missingHaulCatchTuple));
- error.setTipMessage(_("coser.business.control.error.missingYearHaulForCatchDataTip"));
+ error.setMessage(t("coser.business.control.error.missingYearHaulForCatchData"));
+ error.setDetailMessage(t("coser.business.control.error.missingYearHaulForCatchDataDetail", missingHaulCatchTuple));
+ error.setTipMessage(t("coser.business.control.error.missingYearHaulForCatchDataTip"));
crossFilesErrors.add(error);
}
@@ -1310,9 +1310,9 @@
for (String missingStrataStrataName : missingStrataStrataNames) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.missingStrataStrataFromHaul"));
- error.setDetailMessage(_("coser.business.control.error.missingStrataStrataFromHaulDetail", missingStrataStrataName));
- error.setTipMessage(_("coser.business.control.error.missingStrataStrataFromHaulTip"));
+ error.setMessage(t("coser.business.control.error.missingStrataStrataFromHaul"));
+ error.setDetailMessage(t("coser.business.control.error.missingStrataStrataFromHaulDetail", missingStrataStrataName));
+ error.setTipMessage(t("coser.business.control.error.missingStrataStrataFromHaulTip"));
crossFilesErrors.add(error);
}
@@ -1323,9 +1323,9 @@
for (String missingHaulStrataStrataName : missingHaulStrataStrataNames) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.WARNING);
- error.setMessage(_("coser.business.control.error.missingHaulStrataFromStrata"));
- error.setDetailMessage(_("coser.business.control.error.missingHaulStrataFromStrataDetail", missingHaulStrataStrataName));
- error.setTipMessage(_("coser.business.control.error.missingHaulStrataFromStrataTip"));
+ error.setMessage(t("coser.business.control.error.missingHaulStrataFromStrata"));
+ error.setDetailMessage(t("coser.business.control.error.missingHaulStrataFromStrataDetail", missingHaulStrataStrataName));
+ error.setTipMessage(t("coser.business.control.error.missingHaulStrataFromStrataTip"));
crossFilesErrors.add(error);
}
@@ -1336,9 +1336,9 @@
for (String missingHaulHaulName : missingHaulHaulNames) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.missingHaulHaulFromCatch"));
- error.setDetailMessage(_("coser.business.control.error.missingHaulHaulFromCatchDetail", missingHaulHaulName));
- error.setTipMessage(_("coser.business.control.error.missingHaulHaulFromCatchTip"));
+ error.setMessage(t("coser.business.control.error.missingHaulHaulFromCatch"));
+ error.setDetailMessage(t("coser.business.control.error.missingHaulHaulFromCatchDetail", missingHaulHaulName));
+ error.setTipMessage(t("coser.business.control.error.missingHaulHaulFromCatchTip"));
crossFilesErrors.add(error);
}
@@ -1349,9 +1349,9 @@
for (String missingCatchHaulName : missingCatchHaulNames) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.WARNING);
- error.setMessage(_("coser.business.control.error.missingCatchHaulFromHaul"));
- error.setDetailMessage(_("coser.business.control.error.missingCatchHaulFromHaulDetail", missingCatchHaulName));
- error.setTipMessage(_("coser.business.control.error.missingCatchHaulFromHaulTip"));
+ error.setMessage(t("coser.business.control.error.missingCatchHaulFromHaul"));
+ error.setDetailMessage(t("coser.business.control.error.missingCatchHaulFromHaulDetail", missingCatchHaulName));
+ error.setTipMessage(t("coser.business.control.error.missingCatchHaulFromHaulTip"));
crossFilesErrors.add(error);
}
@@ -1362,9 +1362,9 @@
for (String missingCatchHaulForLengthName : missingCatchHaulForLengthNames) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.FATAL);
- error.setMessage(_("coser.business.control.error.missingCatchHaulFromLength"));
- error.setDetailMessage(_("coser.business.control.error.missingCatchHaulFromLengthDetail", missingCatchHaulForLengthName));
- error.setTipMessage(_("coser.business.control.error.missingCatchHaulFromLengthTip"));
+ error.setMessage(t("coser.business.control.error.missingCatchHaulFromLength"));
+ error.setDetailMessage(t("coser.business.control.error.missingCatchHaulFromLengthDetail", missingCatchHaulForLengthName));
+ error.setTipMessage(t("coser.business.control.error.missingCatchHaulFromLengthTip"));
crossFilesErrors.add(error);
}
@@ -1375,9 +1375,9 @@
for (String missingLengthHaulName : missingLengthHaulNames) {
ControlError error = new ControlError();
error.setLevel(ValidationLevel.WARNING);
- error.setMessage(_("coser.business.control.error.missingLengthHaulFromCatch"));
- error.setDetailMessage(_("coser.business.control.error.missingLengthHaulFromCatchDetail", missingLengthHaulName));
- error.setTipMessage(_("coser.business.control.error.missingLengthHaulFromCatchTip"));
+ error.setMessage(t("coser.business.control.error.missingLengthHaulFromCatch"));
+ error.setDetailMessage(t("coser.business.control.error.missingLengthHaulFromCatchDetail", missingLengthHaulName));
+ error.setTipMessage(t("coser.business.control.error.missingLengthHaulFromCatchTip"));
crossFilesErrors.add(error);
}
@@ -1389,10 +1389,10 @@
SpeciesControlError error = new SpeciesControlError();
error.setLevel(ValidationLevel.FATAL);
error.setSpecies(missingCatchSpeciesName);
- error.setMessage(_("coser.business.control.error.missingCatchSpeciesFromLength"));
- error.setDetailMessage(_("coser.business.control.error.missingCatchSpeciesFromLengthDetail",
+ error.setMessage(t("coser.business.control.error.missingCatchSpeciesFromLength"));
+ error.setDetailMessage(t("coser.business.control.error.missingCatchSpeciesFromLengthDetail",
project.getDisplaySpeciesText(missingCatchSpeciesName)));
- error.setTipMessage(_("coser.business.control.error.missingCatchSpeciesFromLengthTip"));
+ error.setTipMessage(t("coser.business.control.error.missingCatchSpeciesFromLengthTip"));
crossFilesErrors.add(error);
}
@@ -1404,10 +1404,10 @@
SpeciesControlError error = new SpeciesControlError();
error.setLevel(ValidationLevel.WARNING);
error.setSpecies(missingLengthSpeciesName);
- error.setMessage(_("coser.business.control.error.missingLengthSpeciesFromCatch"));
- error.setDetailMessage(_("coser.business.control.error.missingLengthSpeciesFromCatchDetail",
+ error.setMessage(t("coser.business.control.error.missingLengthSpeciesFromCatch"));
+ error.setDetailMessage(t("coser.business.control.error.missingLengthSpeciesFromCatchDetail",
project.getDisplaySpeciesText(missingLengthSpeciesName)));
- error.setTipMessage(_("coser.business.control.error.missingLengthSpeciesFromCatchTip"));
+ error.setTipMessage(t("coser.business.control.error.missingLengthSpeciesFromCatchTip"));
crossFilesErrors.add(error);
}
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,8 +25,8 @@
package fr.ifremer.coser.services;
-import static org.nuiton.i18n.I18n._;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.t;
+import static org.nuiton.i18n.I18n.n;
import java.beans.Introspector;
import java.io.BufferedOutputStream;
@@ -59,8 +59,8 @@
import java.util.regex.Pattern;
import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.ListUtils;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.ListUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
@@ -177,7 +177,7 @@
String projectName = project.getName();
File projectDirectory = new File(projectsDirectory, projectName);
if (projectDirectory.exists()) {
- throw new CoserBusinessException(_("Project %s already exist", project.getName()));
+ throw new CoserBusinessException(t("Project %s already exist", project.getName()));
}
// set project date
@@ -207,7 +207,7 @@
// test file existence
if (!dataFile.exists()) {
- throw new CoserBusinessException(_("Can't read file %s for category %s", dataFile.getAbsolutePath(), _(category.getTranslationKey())));
+ throw new CoserBusinessException(t("Can't read file %s for category %s", dataFile.getAbsolutePath(), t(category.getTranslationKey())));
}
DataStorage dataStorage = commonService.loadCSVFile(project, category, dataFile, progress, true);
@@ -250,9 +250,9 @@
try {
FileUtils.deleteDirectory(projectDirectory);
} catch (IOException e) {
- throw new CoserBusinessException(_("Can't create project"), ex);
+ throw new CoserBusinessException(t("Can't create project"), ex);
}
- throw new CoserBusinessException(_("Can't create project"), ex);
+ throw new CoserBusinessException(t("Can't create project"), ex);
}
}
@@ -401,7 +401,7 @@
}
File projectDirectory = new File(projectsDirectory, projectName);
if (!projectDirectory.isDirectory()) {
- throw new CoserBusinessException(_("Project %s doesn't exists !", projectName));
+ throw new CoserBusinessException(t("Project %s doesn't exists !", projectName));
}
Project project = new Project(projectName);
@@ -418,7 +418,7 @@
else {
// si on arrive ici et qu'un fichier de reference
// n'existe pas, c'est grave
- throw new CoserBusinessException(_("Missing file %s", inputFile));
+ throw new CoserBusinessException(t("Missing file %s", inputFile));
}
}
}
@@ -670,7 +670,7 @@
else {
// si on arrive ici et qu'un fichier original
// n'existe pas, c'est grave
- throw new CoserBusinessException(_("Missing file %s", storageDataFile));
+ throw new CoserBusinessException(t("Missing file %s", storageDataFile));
}
// deleted data
@@ -755,7 +755,7 @@
addProjectContent(project, selection, category, dataStorage, false);
}
else {
- throw new CoserBusinessException(_("Missing file %s", inputFile));
+ throw new CoserBusinessException(t("Missing file %s", inputFile));
}
}
}
@@ -912,7 +912,7 @@
// le control doit être validé
if (!project.getControl().isValidated()) {
- throw new CoserBusinessException(_("coser.business.selection.notValidatedControl"));
+ throw new CoserBusinessException(t("coser.business.selection.notValidatedControl"));
}
Project localProject = project;
@@ -1023,7 +1023,7 @@
File selectionDirectory = new File(selectionsDirectory, selection.getName());
if (selectionDirectory.isDirectory()) {
- throw new CoserBusinessException(_("Selection %s already exists", selection.getName()));
+ throw new CoserBusinessException(t("Selection %s already exists", selection.getName()));
}
else {
selectionDirectory.mkdirs();
@@ -1119,7 +1119,7 @@
// save it
if (rsufiResultDirectory.exists()) {
- throw new CoserBusinessException(_("coser.business.result.rsufiResultAlreadyExists", rsufiResult.getName()));
+ throw new CoserBusinessException(t("coser.business.result.rsufiResultAlreadyExists", rsufiResult.getName()));
} else {
rsufiResultDirectory.mkdirs();
@@ -2209,7 +2209,7 @@
public Project mergeSpecies(Project project, Selection selection, String newSpeciesName, String comment, String... speciesNames) throws CoserBusinessException {
if (!isSpeciesNameExist(project, newSpeciesName)) {
- throw new CoserBusinessException(_("Species %s doesn't exist in referential",
+ throw new CoserBusinessException(t("Species %s doesn't exist in referential",
project.getDisplaySpeciesText(newSpeciesName)));
}
@@ -2218,7 +2218,7 @@
List<String> selectionSpecies = getProjectSpecies(selection, project, null);
if (selectionSpecies.contains(newSpeciesName) &&
!ArrayUtils.contains(speciesNames, newSpeciesName)) {
- throw new CoserBusinessException(_("Species %s already exists in current selection",
+ throw new CoserBusinessException(t("Species %s already exists in current selection",
project.getDisplaySpeciesText(newSpeciesName)));
}
@@ -2289,7 +2289,7 @@
if (!lineNames2.isEmpty() && !columnsNames2.isEmpty()) {
Collections.sort(lineNames2);
Collections.sort(columnsNames2);
- matrix = MatrixFactory.getInstance().create(n_("coser.business.matrix.samplingeffort"), new List<?>[] {
+ matrix = MatrixFactory.getInstance().create(n("coser.business.matrix.samplingeffort"), new List<?>[] {
lineNames2 , columnsNames2});
for (Map.Entry<String, Map<String, Double>> dynMatrixEntry : dynMatrix.entrySet()) {
@@ -2385,7 +2385,7 @@
Collections.sort(lineNames2);
List<String> columnsNames2 = new ArrayList<String>(columns);
Collections.sort(columnsNames2);
- MatrixND matrix = MatrixFactory.getInstance().create(n_("coser.business.matrix.occurrence"), new List<?>[] {
+ MatrixND matrix = MatrixFactory.getInstance().create(n("coser.business.matrix.occurrence"), new List<?>[] {
lineNames2 , columnsNames2});
for (Map.Entry<String, Map<String, Set<String>>> dynMatrixEntry : dynMatrix.entrySet()) {
@@ -2572,7 +2572,7 @@
Collections.sort(sortedSpecies);
List<String> sortedYears = new ArrayList<String>(yearsList);
Collections.sort(sortedYears);
- MatrixND matrix = MatrixFactory.getInstance().create(n_("coser.business.matrix.density"), new List<?>[] {
+ MatrixND matrix = MatrixFactory.getInstance().create(n("coser.business.matrix.density"), new List<?>[] {
sortedSpecies , sortedYears});
for (Map.Entry<String, Map<String, Map<String, Set<Double>>>> dynMatrixEntry : densityPerSpecyStrataYear.entrySet()) {
@@ -2699,15 +2699,15 @@
Collections.sort(yearsSem);
if (log.isDebugEnabled()) {
- log.debug(_("Creating matrix : %d*%d*%d*%d", lengthSem.size(), speciesSem.size(), strataSem.size(), yearsSem.size()));
+ log.debug(t("Creating matrix : %d*%d*%d*%d", lengthSem.size(), speciesSem.size(), strataSem.size(), yearsSem.size()));
}
- MatrixND matrix = MatrixFactory.getInstance().createProxy(n_("coser.business.matrix.lengthstructure"),
+ MatrixND matrix = MatrixFactory.getInstance().createProxy(n("coser.business.matrix.lengthstructure"),
new List<?>[] { lengthSem , speciesSem, strataSem, yearsSem},
- new String[] {n_("coser.business.common.length"),
- n_("coser.business.common.species"),
- n_("coser.business.common.strata"),
- n_("coser.business.common.years")},
+ new String[] {n("coser.business.common.length"),
+ n("coser.business.common.species"),
+ n("coser.business.common.strata"),
+ n("coser.business.common.years")},
new LengthStructureMatrixProvider(project, dataContainer));
return matrix;
@@ -2888,14 +2888,14 @@
try {
out = new PrintStream(new BufferedOutputStream(new FileOutputStream(informationFile)));
- out.println(_("coser.business.extract.projectName") + project.getName());
- out.println(_("coser.business.extract.projectAuthor") + project.getAuthor());
- out.println(_("coser.business.extract.projectComment") + project.getComment());
- out.println(_("coser.business.extract.selectionName") + selection.getName());
+ out.println(t("coser.business.extract.projectName") + project.getName());
+ out.println(t("coser.business.extract.projectAuthor") + project.getAuthor());
+ out.println(t("coser.business.extract.projectComment") + project.getComment());
+ out.println(t("coser.business.extract.selectionName") + selection.getName());
// date de creation du projet
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT, config.getLocale());
- out.println(_("coser.business.extract.creationdate") + dateFormat.format(project.getCreationDate()));
+ out.println(t("coser.business.extract.creationdate") + dateFormat.format(project.getCreationDate()));
// add selection additional files
File projectsDirectory = config.getProjectsDirectory();
@@ -3026,7 +3026,7 @@
double dlat = Double.parseDouble(lat);
double dlong = Double.parseDouble(longi);
- String name = _("coser.business.map.haulname", stratum, year, haul, depth);
+ String name = t("coser.business.map.haulname", stratum, year, haul, depth);
int serieIndex = serieCache.indexOf(strata);
Coordinate coordinate = new Coordinate(serieIndex, name, dlat, dlong);
hauls.add(coordinate);
@@ -3092,12 +3092,12 @@
File projectsDirectory = config.getProjectsDirectory();
File projectDirectory = new File(projectsDirectory, projectName);
if (!projectDirectory.isDirectory()) {
- throw new CoserBusinessException(_("Project %s doesn't exists !", projectName));
+ throw new CoserBusinessException(t("Project %s doesn't exists !", projectName));
}
File selectionsDirectory = new File(projectDirectory, CoserConstants.STORAGE_SELECTION_DIRECTORY);
File selectionDirectory = new File(selectionsDirectory, selectionName);
if (!projectDirectory.isDirectory()) {
- throw new CoserBusinessException(_("Selection %s doesn't exists !", projectName));
+ throw new CoserBusinessException(t("Selection %s doesn't exists !", projectName));
}
Selection selection = new Selection();
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.services;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Color;
import java.awt.Shape;
@@ -50,9 +50,9 @@
import java.util.Set;
import java.util.TreeMap;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.keyvalue.MultiKey;
-import org.apache.commons.collections.map.MultiKeyMap;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.keyvalue.MultiKey;
+import org.apache.commons.collections4.map.MultiKeyMap;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
@@ -240,7 +240,7 @@
//if (catchNumber == null) {
// catchNumber = 0.0;
//}
- dataset.setValue(catchNumber, _(Category.CATCH.getTranslationKey()), (Integer)year);
+ dataset.setValue(catchNumber, t(Category.CATCH.getTranslationKey()), (Integer)year);
if (lengthNumbers != null) {
Double lengthNumber = lengthNumbers.get(String.valueOf(year));
@@ -248,11 +248,11 @@
//if (lengthNumber == null) {
// lengthNumber = 0.0;
//}
- dataset.setValue(lengthNumber, _(Category.LENGTH.getTranslationKey()), (Integer)year);
+ dataset.setValue(lengthNumber, t(Category.LENGTH.getTranslationKey()), (Integer)year);
}
}
- JFreeChart chart = displayGraph(dataset, _("coser.business.chart.compareCatchLengthNumberTitle",
+ JFreeChart chart = displayGraph(dataset, t("coser.business.chart.compareCatchLengthNumberTitle",
project.getDisplaySpeciesText(species)));
charts.put(species, chart);
}
@@ -262,11 +262,11 @@
protected JFreeChart displayGraph(CategoryDataset categoryDataSet, String title) {
- CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year"));
+ CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
categoryAxis.setCategoryMargin(0);
// label horizontaux
//categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
- ValueAxis valueAxis = new NumberAxis(_("coser.business.common.number"));
+ ValueAxis valueAxis = new NumberAxis(t("coser.business.common.number"));
valueAxis.setUpperMargin(0.1);
CategoryItemRenderer renderer = new LineAndShapeRenderer();
@@ -345,7 +345,7 @@
imageDirectory.deleteOnExit();
out.write("<html><head>");
- out.write("<title>" + _("coser.business.publication.errorexporttitle", project.getName())+ "</title>");
+ out.write("<title>" + t("coser.business.publication.errorexporttitle", project.getName())+ "</title>");
out.write("<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />");
out.write("</head><body>");
@@ -354,7 +354,7 @@
Map<ControlErrorGroup, List<ControlError>> validationErrorsChilds = new HashMap<ControlErrorGroup, List<ControlError>>();
for (ControlError validationError : validationErrors) {
- String category = validationError.getCategory() == null ? _("coser.business.control.error.allCategories") : _(validationError.getCategory().getTranslationKey());
+ String category = validationError.getCategory() == null ? t("coser.business.control.error.allCategories") : t(validationError.getCategory().getTranslationKey());
List<ControlErrorGroup> errorGroup = validationCategoryChild.get(category);
if (errorGroup == null) {
errorGroup = new ArrayList<ControlErrorGroup>();
@@ -378,7 +378,7 @@
Map<String, JFreeChart> charts = getCompareCatchLengthGraph(project, container, speciesGraph);
// render output html
- out.write("<h1 style='text-align:center'>" + _("coser.business.publication.errorexporttitle", project.getName()) + "</h1>");
+ out.write("<h1 style='text-align:center'>" + t("coser.business.publication.errorexporttitle", project.getName()) + "</h1>");
if (includeProjectInfo) {
// partie detail
@@ -408,16 +408,16 @@
out.write("green");
break;
}
- out.write(";font-weight:bold'>" + _(group.getMessage()));
+ out.write(";font-weight:bold'>" + t(group.getMessage()));
out.write("</span>");
out.write("<ul>");
for (ControlError error : validationErrorsChilds.get(group)) {
out.write("<li type='circle'>");
- out.write(_(error.getDetailMessage()));
+ out.write(t(error.getDetailMessage()));
List<String> lineNumbers = error.getLineNumbers();
if (CollectionUtils.isNotEmpty(lineNumbers)) {
- out.write(" (" + _("coser.business.publication.errorexportlines") + " : ");
+ out.write(" (" + t("coser.business.publication.errorexportlines") + " : ");
Iterator<String> itLineNumbers = lineNumbers.iterator();
while (itLineNumbers.hasNext()) {
out.write(itLineNumbers.next());
@@ -432,10 +432,10 @@
if (error instanceof DiffCatchLengthControlError) {
DiffCatchLengthControlError diffError = (DiffCatchLengthControlError)error;
String species = diffError.getSpecies();
- out.write(" (<a href='#graph" + species + "'>" + _("coser.business.publication.errorgraph") + "</a>)");
+ out.write(" (<a href='#graph" + species + "'>" + t("coser.business.publication.errorgraph") + "</a>)");
}
- String tipMessage = _(error.getTipMessage());
+ String tipMessage = t(error.getTipMessage());
if (StringUtils.isNotEmpty(error.getTipMessage())) {
out.write("<p style='font-style:italic'>" + tipMessage + "</p>");
}
@@ -448,7 +448,7 @@
out.write("</ul>");
}
- out.write("<h2>" + _("coser.business.publication.errorgraphs") + "</h2>");
+ out.write("<h2>" + t("coser.business.publication.errorgraphs") + "</h2>");
out.write("<ul>");
// generation des graphiques
for (Map.Entry<String, JFreeChart> chartEntry : charts.entrySet()) {
@@ -506,12 +506,12 @@
*/
protected void extractControlLogAsHTML(Project project, Control control, Writer out) throws CoserBusinessException, IOException {
out.write("<html><head>");
- out.write("<title>" + _("coser.business.publication.controllogexporttitle", project.getName())+ "</title>");
+ out.write("<title>" + t("coser.business.publication.controllogexporttitle", project.getName())+ "</title>");
out.write("<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>");
out.write("</head><body>");
// header
- out.write("<h1 style='text-align:center'>" + _("coser.business.publication.controllogexporttitle", project.getName()) + "</h1>");
+ out.write("<h1 style='text-align:center'>" + t("coser.business.publication.controllogexporttitle", project.getName()) + "</h1>");
// partie detail
extractProjectReport(project, out);
@@ -614,12 +614,12 @@
*/
protected void extractSelectionLogAsHTML(Project project, Selection selection, Writer out) throws IOException, CoserBusinessException {
out.write("<html><head>");
- out.write("<title>" + _("coser.business.publication.selectionlogexporttitle", selection.getName(), project.getName())+ "</title>");
+ out.write("<title>" + t("coser.business.publication.selectionlogexporttitle", selection.getName(), project.getName())+ "</title>");
out.write("<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>");
out.write("</head><body>");
// header
- out.write("<h1 style='text-align:center'>" + _("coser.business.publication.selectionlogexporttitle", selection.getName(), project.getName()) + "</h1>");
+ out.write("<h1 style='text-align:center'>" + t("coser.business.publication.selectionlogexporttitle", selection.getName(), project.getName()) + "</h1>");
// partie detail
extractProjectReport(project, out);
@@ -634,11 +634,11 @@
}
// partie resumé de selection
- out.write("<h2>" + _("coser.business.publication.selectionchoices") + "</h2>");
+ out.write("<h2>" + t("coser.business.publication.selectionchoices") + "</h2>");
out.write("<ul>");
- out.write("<li>" + _("coser.business.common.years") + " : " + StringUtils.join(selection.getSelectedYears(), ", ") + "</li>");
- out.write("<li>" + _("coser.business.common.strata") + " : " + StringUtils.join(selection.getSelectedStrata(), ", ") + "</li>");
- out.write("<li>" + _("coser.business.common.species") + " : " + speciesBuilder + "</li>");
+ out.write("<li>" + t("coser.business.common.years") + " : " + StringUtils.join(selection.getSelectedYears(), ", ") + "</li>");
+ out.write("<li>" + t("coser.business.common.strata") + " : " + StringUtils.join(selection.getSelectedStrata(), ", ") + "</li>");
+ out.write("<li>" + t("coser.business.common.species") + " : " + speciesBuilder + "</li>");
out.write("</ul>");
// partie specific : commandes
@@ -660,20 +660,20 @@
// date du rapport
out.write("<div style='text-align:right;font-style:italic'>" +
- _("coser.business.publication.date") +" : " +
+ t("coser.business.publication.date") +" : " +
dateFormat.format(new Date()) + "</div>");
// partie projet
- out.write("<h2>" + _("coser.business.publication.projectdetails") + "</h2>");
+ out.write("<h2>" + t("coser.business.publication.projectdetails") + "</h2>");
out.write("<ul>");
- out.write("<li>" + _("coser.business.publication.creationdate") + " : " + dateFormat.format(project.getCreationDate()) + "</li>");
- out.write("<li>" + _("coser.business.publication.author") + " : " + project.getAuthor() + "</li>");
- out.write("<li>" + _("coser.business.publication.catchfilename") + " : " + commonService.getDataStorageFileName(project, Category.CATCH, null) + "</li>");
- out.write("<li>" + _("coser.business.publication.lengthfilename") + " : " + commonService.getDataStorageFileName(project, Category.LENGTH, null) + "</li>");
- out.write("<li>" + _("coser.business.publication.haulfilename") + " : " + commonService.getDataStorageFileName(project, Category.HAUL, null) + "</li>");
- out.write("<li>" + _("coser.business.publication.stratafilename") + " : " + commonService.getDataStorageFileName(project, Category.STRATA, null) + "</li>");
+ out.write("<li>" + t("coser.business.publication.creationdate") + " : " + dateFormat.format(project.getCreationDate()) + "</li>");
+ out.write("<li>" + t("coser.business.publication.author") + " : " + project.getAuthor() + "</li>");
+ out.write("<li>" + t("coser.business.publication.catchfilename") + " : " + commonService.getDataStorageFileName(project, Category.CATCH, null) + "</li>");
+ out.write("<li>" + t("coser.business.publication.lengthfilename") + " : " + commonService.getDataStorageFileName(project, Category.LENGTH, null) + "</li>");
+ out.write("<li>" + t("coser.business.publication.haulfilename") + " : " + commonService.getDataStorageFileName(project, Category.HAUL, null) + "</li>");
+ out.write("<li>" + t("coser.business.publication.stratafilename") + " : " + commonService.getDataStorageFileName(project, Category.STRATA, null) + "</li>");
if (StringUtils.isNotEmpty(project.getComment())) {
- out.write("<li>" + _("coser.business.publication.comment") + " : " + project.getComment() + "</li>");
+ out.write("<li>" + t("coser.business.publication.comment") + " : " + project.getComment() + "</li>");
}
out.write("</ul>");
}
@@ -770,7 +770,7 @@
Map<String, String[]> strataContent = commonService.getOriginalContent(project, Category.STRATA, strataLines);
// third, generate html report
- out.write("<h2>" + _("coser.business.publication.datamodification") + "</h2>");
+ out.write("<h2>" + t("coser.business.publication.datamodification") + "</h2>");
out.write("<ol>");
for (Command command : container.getHistoryCommands()) {
Category category = null;
@@ -956,9 +956,9 @@
}
// configure chart
- //CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year"));
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
// FIXME echatellier 20110414 hack just for year, need a real locale object here
- // to call _(locale, i18nkey)
+ // to call t(locale, i18nkey)
String yearAxis = "Year";
if ("fr".equals(locale.getLanguage())) {
yearAxis = "Ann\u00E9e";
@@ -1100,9 +1100,9 @@
// configure chart
- //CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year"));
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
// FIXME echatellier 20110414 hack just for year, need a real locale object here
- // to call _(locale, i18nkey)
+ // to call t(locale, i18nkey)
String yearAxis = "Year";
if ("fr".equals(locale.getLanguage())) {
yearAxis = "Ann\u00E9e";
@@ -1315,9 +1315,9 @@
}
// configure chart
- //CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year"));
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
// FIXME echatellier 20110414 hack just for year, need a real locale object here
- // to call _(locale, i18nkey)
+ // to call t(locale, i18nkey)
String yearAxis = "Year";
if ("fr".equals(locale.getLanguage())) {
yearAxis = "Ann\u00E9e";
@@ -1494,9 +1494,9 @@
// configure chart
- //CategoryAxis categoryAxis = new CategoryAxis(_("coser.business.common.year"));
+ //CategoryAxis categoryAxis = new CategoryAxis(t("coser.business.common.year"));
// FIXME echatellier 20110414 hack just for year, need a real locale object here
- // to call _(locale, i18nkey)
+ // to call t(locale, i18nkey)
String yearAxis = "Year";
if ("fr".equals(locale.getLanguage())) {
yearAxis = "Ann\u00E9e";
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/WebService.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,8 +25,8 @@
package fr.ifremer.coser.services;
-import static org.nuiton.i18n.I18n._;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.t;
+import static org.nuiton.i18n.I18n.l;
import java.io.File;
import java.io.FileFilter;
@@ -58,10 +58,10 @@
import java.util.TreeSet;
import java.util.regex.Matcher;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.MapUtils;
-import org.apache.commons.collections.keyvalue.MultiKey;
-import org.apache.commons.collections.map.MultiKeyMap;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.collections4.keyvalue.MultiKey;
+import org.apache.commons.collections4.map.MultiKeyMap;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringEscapeUtils;
@@ -428,18 +428,18 @@
// and selection with only selected results
progress.setCurrent(0);
- progress.setText(_("coser.business.uploadresult.modifyResultOptions"));
+ progress.setText(t("coser.business.uploadresult.modifyResultOptions"));
modifyRSufiResults(selectedResults, indicatorsResults, mapResults, publishDataResults);
- progress.setText(_("coser.business.uploadresult.checkcollision"));
+ progress.setText(t("coser.business.uploadresult.checkcollision"));
checkDataCollision(selectedResults);
- progress.setText(_("coser.business.uploadresult.preparezip"));
+ progress.setText(t("coser.business.uploadresult.preparezip"));
// default extract to temp directory with data sources
File prepareZip = performResultExtract(selectedResults, publishDataResults, null);
- progress.setText(_("coser.business.uploadresult.sendzip"));
+ progress.setText(t("coser.business.uploadresult.sendzip"));
progress.setTotal((int)prepareZip.length());
// then upload zip file to website
@@ -563,7 +563,7 @@
// on creer une clé composé pour l'id du resultat
String resultZoneTypeId = rsufiResult.getZone() + String.valueOf(rsufiResult.isMapsResult());
if (resultZoneTypeIds.contains(resultZoneTypeId)) {
- throw new CoserBusinessException(_("coser.business.resultupload.duplicatedresult",
+ throw new CoserBusinessException(t("coser.business.resultupload.duplicatedresult",
project.getName(), selection.getName(), rsufiResult.getName(), rsufiResult.getZone()));
} else {
resultZoneTypeIds.add(resultZoneTypeId);
@@ -762,10 +762,10 @@
StringBuilder content = new StringBuilder();
int count = 0;
- content.append(_("coser.business.notificationmail.mapsresults") + "\n");
+ content.append(t("coser.business.notificationmail.mapsresults") + "\n");
for (Map.Entry<String, String> noMapsResultZoneId : noMapsResultZoneIds.entrySet()) {
if (mapsResults.containsValue(noMapsResultZoneId.getValue())) {
- content.append(" - " + _("coser.business.notificationmail.deleted",
+ content.append(" - " + t("coser.business.notificationmail.deleted",
getZoneFullName(noMapsResultZoneId.getKey()),
noMapsResultZoneId.getValue()) + "\n");
count++;
@@ -773,7 +773,7 @@
}
for (Map.Entry<String, String> mapsResultZoneId : mapsResultZoneIds.entrySet()) {
if (!mapsResults.containsValue(mapsResultZoneId.getValue())) {
- content.append(" - " + _("coser.business.notificationmail.added",
+ content.append(" - " + t("coser.business.notificationmail.added",
getZoneFullName(mapsResultZoneId.getKey()),
mapsResultZoneId.getValue()) + "\n");
count++;
@@ -781,10 +781,10 @@
}
content.append("\n");
- content.append(_("coser.business.notificationmail.indicatorsresults") + "\n");
+ content.append(t("coser.business.notificationmail.indicatorsresults") + "\n");
for (Map.Entry<String, String> noIndicatorsResultZoneId : noIndicatorsResultZoneIds.entrySet()) {
if (indicatorResults.containsValue(noIndicatorsResultZoneId.getValue())) {
- content.append(" - " + _("coser.business.notificationmail.deleted",
+ content.append(" - " + t("coser.business.notificationmail.deleted",
getZoneFullName(noIndicatorsResultZoneId.getKey()),
noIndicatorsResultZoneId.getValue()) + "\n");
count++;
@@ -793,7 +793,7 @@
}
for (Map.Entry<String, String> indicatorsResultZoneId : indicatorsResultZoneIds.entrySet()) {
if (!indicatorResults.containsValue(indicatorsResultZoneId.getValue())) {
- content.append(" - " + _("coser.business.notificationmail.added",
+ content.append(" - " + t("coser.business.notificationmail.added",
getZoneFullName(indicatorsResultZoneId.getKey()),
indicatorsResultZoneId.getValue()) + "\n");
count++;
@@ -801,10 +801,10 @@
}
content.append("\n");
- content.append(_("coser.business.notificationmail.dataresults") + "\n");
+ content.append(t("coser.business.notificationmail.dataresults") + "\n");
for (Map.Entry<String, String> noDataResultZoneId : noDataResultZoneIds.entrySet()) {
if (dataResults.containsValue(noDataResultZoneId.getValue())) {
- content.append(" - " + _("coser.business.notificationmail.deleted",
+ content.append(" - " + t("coser.business.notificationmail.deleted",
getZoneFullName(noDataResultZoneId.getKey()),
noDataResultZoneId.getValue()) + "\n");
count++;
@@ -813,7 +813,7 @@
}
for (Map.Entry<String, String> dataResultZoneId : dataResultZoneIds.entrySet()) {
if (!dataResults.containsValue(dataResultZoneId.getValue())) {
- content.append(" - " + _("coser.business.notificationmail.added",
+ content.append(" - " + t("coser.business.notificationmail.added",
getZoneFullName(dataResultZoneId.getKey()),
dataResultZoneId.getValue()) + "\n");
count++;
@@ -1132,8 +1132,8 @@
emailPart.setHostName(config.getSmtpHost());
emailPart.addTo(email);
emailPart.setFrom("noreply-coser(a)ifremer.fr", "Coser");
- emailPart.setSubject(_("coser.business.notificationmail.subject", count));
- emailPart.setContent(_("coser.business.notificationmail.body", login, detail), "text/plain; charset=ISO-8859-9");
+ emailPart.setSubject(t("coser.business.notificationmail.subject", count));
+ emailPart.setContent(t("coser.business.notificationmail.body", login, detail), "text/plain; charset=ISO-8859-9");
// send mail
emailPart.send();
@@ -2832,7 +2832,7 @@
try {
StringBuilder htmlContent = new StringBuilder();
htmlContent.append("<html><head>");
- htmlContent.append("<title>" + l_(locale, "coser.business.extract.extracttitle")+ "</title>");
+ htmlContent.append("<title>" + l(locale, "coser.business.extract.extracttitle")+ "</title>");
htmlContent.append("<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />");
htmlContent.append("</head><body>");
@@ -2862,7 +2862,7 @@
htmlContent.append("<div style='page-break-after: always'>");
htmlContent.append("<img src='file://" + chartFile.getAbsolutePath() + "' />");
htmlContent.append("<br />");
- htmlContent.append(l_(locale, "coser.business.extract.extractdata") + " :");
+ htmlContent.append(l(locale, "coser.business.extract.extractdata") + " :");
htmlContent.append("<pre>").append(content).append("</pre>");
htmlContent.append("</div>");
Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/PublicationServiceTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/services/PublicationServiceTest.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/PublicationServiceTest.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.services;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.io.File;
import java.io.IOException;
@@ -133,7 +133,7 @@
Assert.assertTrue(fileContent.indexOf("Test fatal") > 0);
Assert.assertTrue(fileContent.indexOf("Test warning and graph") > 0);
Assert.assertTrue(fileContent.indexOf("Test error") > 0);
- Assert.assertTrue(fileContent.indexOf(_("coser.business.control.error.allCategories")) > 0);
+ Assert.assertTrue(fileContent.indexOf(t("coser.business.control.error.allCategories")) > 0);
// clean all
htmlExport.delete();
Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java
===================================================================
--- trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/WebServiceTest.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -34,7 +34,7 @@
import java.util.Locale;
import java.util.Map;
-import org.apache.commons.collections.map.MultiKeyMap;
+import org.apache.commons.collections4.map.MultiKeyMap;
import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.Before;
Modified: trunk/coser-ui/pom.xml
===================================================================
--- trunk/coser-ui/pom.xml 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/pom.xml 2014-02-24 15:14:55 UTC (rev 1124)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -11,7 +10,25 @@
<groupId>fr.ifremer.coser</groupId>
<artifactId>coser-ui</artifactId>
+ <packaging>jar</packaging>
+ <name>Coser :: UI</name>
+ <description>Coser ui module</description>
+ <licenses>
+ <license>
+ <name>GNU General Public License</name>
+ <url>http://www.gnu.org/licenses/gpl.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <properties>
+ <maven.jar.main.class>fr.ifremer.coser.Coser</maven.jar.main.class>
+ <license.licenseName>gpl_v3</license.licenseName>
+
+ <redmine.releaseFiles>target/coser-${project.version}-bin.zip</redmine.releaseFiles>
+ </properties>
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -33,14 +50,18 @@
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-utils</artifactId>
</dependency>
<dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-config</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-validator</artifactId>
</dependency>
@@ -85,14 +106,14 @@
<artifactId>jaxx-widgets</artifactId>
</dependency>
<dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-widgets-extra</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.swinglabs.swingx</groupId>
<artifactId>swingx-core</artifactId>
</dependency>
<dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-widgets</artifactId>
- </dependency>
- <dependency>
<groupId>com.fifesoft</groupId>
<artifactId>rsyntaxtextarea</artifactId>
</dependency>
@@ -110,26 +131,6 @@
</dependency>
</dependencies>
- <name>Coser :: UI</name>
- <description>Coser ui module</description>
-
- <packaging>jar</packaging>
-
- <licenses>
- <license>
- <name>GNU General Public License</name>
- <url>http://www.gnu.org/licenses/gpl.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <properties>
- <maven.jar.main.class>fr.ifremer.coser.Coser</maven.jar.main.class>
- <license.licenseName>gpl_v3</license.licenseName>
-
- <redmine.releaseFiles>target/coser-${project.version}-bin.zip</redmine.releaseFiles>
- </properties>
-
<build>
<resources>
<resource>
@@ -146,7 +147,6 @@
</excludes>
</resource>
</resources>
-
<pluginManagement>
<plugins>
Modified: trunk/coser-ui/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/coser-ui/src/license/THIRD-PARTY.properties 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/license/THIRD-PARTY.properties 2014-02-24 15:14:55 UTC (rev 1124)
@@ -1,7 +1,6 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache License
# - Apache Software License, Version 2.0
# - BSD License
# - BSD-style license
@@ -9,6 +8,7 @@
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
# - GNU Affero General Public License v3
+# - GNU GENERAL PUBLIC LICENSE version 2 or higher
# - GNU General Public License - Version 2 with the class path exception
# - GNU Lesser General Public Licence
# - GNU Lesser General Public License (LGPL), version 2.1
@@ -27,10 +27,10 @@
# Please fill the missing licenses for dependencies :
#
#
-#Tue Jan 29 15:44:52 CET 2013
-commons-jxpath--commons-jxpath--1.3=Apache Software License, Version 2.0
-commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+#Mon Feb 24 15:58:04 CET 2014
+commons-jxpath--commons-jxpath--1.3=The Apache Software License, Version 2.0
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
javassist--javassist--3.8.0.GA=GNU Lesser General Public License
javax.mail--mail--1.4.1=License Agreement for JavaMail(TM) API
-org.apache.commons--commons-email--1.2=Apache Software License, Version 2.0
-regexp--regexp--1.3=The Apache Software License, Version 2.0
+org.apache.commons--commons-email--1.2=The Apache Software License, Version 2.0
+org.nuiton.thirdparty--sdoc--0.5.0-beta-patchcl=GNU GENERAL PUBLIC LICENSE version 2 or higher
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -31,13 +31,13 @@
import jaxx.runtime.context.DefaultApplicationContext;
+import jaxx.runtime.swing.session.SwingSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.i18n.I18n;
import org.nuiton.i18n.init.ClassPathI18nInitializer;
import org.nuiton.i18n.init.DefaultI18nInitializer;
-import org.nuiton.util.ArgumentsParserException;
-import org.nuiton.widget.SwingSession;
+import org.nuiton.config.ArgumentsParserException;
import com.bbn.openmap.MapBean;
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Font;
import java.util.Enumeration;
@@ -35,6 +35,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.nuiton.config.ConfigOptionDef;
/**
* Coser application configuration.
@@ -99,14 +100,14 @@
}
}
- public static enum CoserOption implements OptionDef {
+ public static enum CoserOption implements ConfigOptionDef {
- CONFIG_FILE(CONFIG_FILE_NAME, _("coser.config.config.file.description"), "coser.properties", String.class, true, true),
- LOOKANDFEEL("coser.lookandfeel", _("coser.config.lookandfeel.description"), null, String.class, false, false),
- APPLICATION_VERSION("coser.application.version", _("coser.config.application.version.description"), null, String.class, false, false),
- SUPPORT_EMAIL("coser.support.email", _("coser.config.support.email.description"), "support(a)codelutin.com", String.class, false, false),
- WEBSITE_URL("coser.website", _("coser.config.website.description"), "http://maven-site.forge.codelutin.com/coser/", String.class, false, false),
- SWING_FONT_SIZE("coser.swingfontsize", _("coser.config.swingfontsize.description"), "12", Integer.class, false, false);
+ CONFIG_FILE(CONFIG_FILE_NAME, t("coser.config.config.file.description"), "coser.properties", String.class, true, true),
+ LOOKANDFEEL("coser.lookandfeel", t("coser.config.lookandfeel.description"), null, String.class, false, false),
+ APPLICATION_VERSION("coser.application.version", t("coser.config.application.version.description"), null, String.class, false, false),
+ SUPPORT_EMAIL("coser.support.email", t("coser.config.support.email.description"), "support(a)codelutin.com", String.class, false, false),
+ WEBSITE_URL("coser.website", t("coser.config.website.description"), "http://maven-site.forge.codelutin.com/coser/", String.class, false, false),
+ SWING_FONT_SIZE("coser.swingfontsize", t("coser.config.swingfontsize.description"), "12", Integer.class, false, false);
protected String key;
protected String description;
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.BorderLayout;
import java.awt.Color;
@@ -43,12 +43,12 @@
import jaxx.runtime.JAXXContext;
+import jaxx.runtime.swing.session.SwingSession;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.util.Resource;
-import org.nuiton.widget.AboutFrame;
-import org.nuiton.widget.SwingSession;
+import org.nuiton.jaxx.widgets.extra.AboutFrame;
import fr.ifremer.coser.CoserBusinessException;
import fr.ifremer.coser.CoserConfig;
@@ -105,8 +105,8 @@
CoserConfig config = frame.getContextValue(CoserConfig.class);
config.setLocale(newLocale);
config.saveForUser();
- JOptionPane.showMessageDialog(frame, _("coser.ui.locale.mustRestart"),
- _("coser.ui.locale.title"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(frame, t("coser.ui.locale.mustRestart"),
+ t("coser.ui.locale.title"), JOptionPane.INFORMATION_MESSAGE);
}
/**
@@ -233,8 +233,8 @@
/* Logo doesn't not display with that version
AboutPanel aboutPanel = new AboutPanel(view);
aboutPanel.setIconPath("/icons/logo300.png");
- aboutPanel.setTitle(_("coser.ui.about.title"));
- aboutPanel.setAboutText(_("coser.ui.about.about", config.getApplicationVersion()));
+ aboutPanel.setTitle(t("coser.ui.about.title"));
+ aboutPanel.setAboutText(t("coser.ui.about.about", config.getApplicationVersion()));
aboutPanel.setLicenseFile("META-INF/coser-ui-LICENSE.txt");
aboutPanel.setThirdpartyFile("META-INF/coser-ui-THIRD-PARTY.txt");
aboutPanel.init();
@@ -248,8 +248,8 @@
return new JScrollPane(textArea);
}
};
- aboutFrame.setTitle(_("coser.ui.about.title"));
- aboutFrame.setAboutHtmlText(_("coser.ui.about.about", config.getApplicationVersion()));
+ aboutFrame.setTitle(t("coser.ui.about.title"));
+ aboutFrame.setAboutHtmlText(t("coser.ui.about.about", config.getApplicationVersion()));
aboutFrame.setIconPath("/icons/logo300.png");
aboutFrame.setIconImage(Resource.getIcon("/icons/logo300.png").getImage());
InputStream licenseStream = getClass().getResourceAsStream("/META-INF/coser-ui-LICENSE.txt");
@@ -302,7 +302,7 @@
*/
public void closeProject() {
projectLoaded(null);
- view.setTitle(_("coser.ui.mainview.titleempty"));
+ view.setTitle(t("coser.ui.mainview.titleempty"));
showHomeView();
}
@@ -315,7 +315,7 @@
view.setProject(project);
if (project != null) {
view.setContextValue(project);
- view.setTitle(_("coser.ui.mainview.titleproject", project.getName()));
+ view.setTitle(t("coser.ui.mainview.titleproject", project.getName()));
} else {
view.removeContextValue(Project.class);
}
@@ -378,8 +378,8 @@
// #667 : Empecher l'accès à l'étape de contrôle si des sélections existent
if (!project.getSelections().isEmpty()) {
- JOptionPane.showMessageDialog(view, _("coser.ui.mainview.accesswontrolwithselection"),
- _("coser.ui.control.controlTitle"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.mainview.accesswontrolwithselection"),
+ t("coser.ui.control.controlTitle"), JOptionPane.ERROR_MESSAGE);
return;
}
@@ -532,7 +532,7 @@
@Override
public String getDescription() {
- return _("coser.ui.selection.selectionFilterDescription");
+ return t("coser.ui.selection.selectionFilterDescription");
}
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenu.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenu.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenu.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Font;
import java.awt.event.ActionEvent;
@@ -95,7 +95,7 @@
if (project != null) {
if (!project.getControl().isValidated()) {
- JMenuItem menuItem = new JMenuItem(_("coser.ui.mainframe.menu.data.noValidation"));
+ JMenuItem menuItem = new JMenuItem(t("coser.ui.mainframe.menu.data.noValidation"));
menuItem.setFont(menuItem.getFont().deriveFont(Font.ITALIC));
menuItem.setEnabled(false);
add(menuItem);
@@ -104,7 +104,7 @@
Map<String, Selection> selections = project.getSelections();
if (selections == null || selections.isEmpty()) {
- JMenuItem menuItem = new JMenuItem(_("coser.ui.mainframe.menu.data.noSelection"));
+ JMenuItem menuItem = new JMenuItem(t("coser.ui.mainframe.menu.data.noSelection"));
menuItem.setFont(menuItem.getFont().deriveFont(Font.ITALIC));
menuItem.setEnabled(false);
add(menuItem);
@@ -123,7 +123,7 @@
add(new JSeparator());
// new selection
- JMenuItem newMenuItem = new JMenuItem(_("coser.ui.mainframe.menu.data.newSelection"));
+ JMenuItem newMenuItem = new JMenuItem(t("coser.ui.mainframe.menu.data.newSelection"));
// les chaines ne doivent pas poser pb, on ne peut pas
// avoir de selection avec espace
newMenuItem.setActionCommand("$new selection$");
@@ -131,7 +131,7 @@
add(newMenuItem);
// replay selection
- JMenuItem replayMenuItem = new JMenuItem(_("coser.ui.mainframe.menu.data.replaySelection"));
+ JMenuItem replayMenuItem = new JMenuItem(t("coser.ui.mainframe.menu.data.replaySelection"));
// les chaines ne doivent pas poser pb, on ne peut pas
// avoir de selection avec espace
replayMenuItem.setActionCommand("$replay selection$");
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.common;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
import java.awt.Cursor;
@@ -102,8 +102,8 @@
if (log.isWarnEnabled()) {
log.warn("Can't open generated report at " + report.getAbsolutePath(), ex);
}
- JOptionPane.showMessageDialog(parentComponent, _("coser.ui.error.htmlReportCantBeOpened", report.getAbsolutePath()),
- _("coser.ui.error.htmlReportError"), JOptionPane.WARNING_MESSAGE);
+ JOptionPane.showMessageDialog(parentComponent, t("coser.ui.error.htmlReportCantBeOpened", report.getAbsolutePath()),
+ t("coser.ui.error.htmlReportError"), JOptionPane.WARNING_MESSAGE);
}
}
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.common;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
import java.util.Collections;
@@ -34,11 +34,11 @@
import jaxx.runtime.JAXXContext;
+import jaxx.runtime.swing.session.SwingSession;
import org.nuiton.math.matrix.MatrixND;
import org.nuiton.math.matrix.viewer.MatrixViewerPanel;
import org.nuiton.math.matrix.viewer.renderer.MatrixChartRenderer;
import org.nuiton.math.matrix.viewer.renderer.MatrixPanelRenderer;
-import org.nuiton.widget.SwingSession;
import fr.ifremer.coser.bean.AbstractDataContainer;
import fr.ifremer.coser.bean.Project;
@@ -83,7 +83,7 @@
}
// display matrix viewer component
- JFrame matrixViewerFrame = new JFrame(_("coser.ui.graph.lengthStructure"));
+ JFrame matrixViewerFrame = new JFrame(t("coser.ui.graph.lengthStructure"));
matrixViewerFrame.setName("lengthstructureframe");
MatrixViewerPanel panel = new MatrixViewerPanel();
panel.addMatrixRenderer(new MatrixChartRenderer());
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListRenderer.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListRenderer.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.ui.control;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
@@ -53,7 +53,7 @@
int index, boolean isSelected, boolean cellHasFocus) {
Category category = (Category)value;
- String stringValue = _(category.getTranslationKey());
+ String stringValue = t(category.getTranslationKey());
return super.getListCellRendererComponent(list, stringValue, index, isSelected, cellHasFocus);
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.control;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import fr.ifremer.coser.CoserConstants.Category;
import fr.ifremer.coser.bean.Project;
@@ -99,7 +99,7 @@
String name = header[column];
// only for column 0 (line index)
if (column == 0) {
- name = _(name);
+ name = t(name);
}
return name;
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDuplicatedLineTableModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDuplicatedLineTableModel.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDuplicatedLineTableModel.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -33,7 +33,7 @@
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlErrorTreeRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlErrorTreeRenderer.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlErrorTreeRenderer.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.control;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
@@ -82,10 +82,10 @@
String tooltipText = null;
if (userObject instanceof String) {
- text = _((String)userObject) + " (" + model.getChildCount(value) + ")";
+ text = t((String)userObject) + " (" + model.getChildCount(value) + ")";
}
else if (userObject instanceof Category) {
- text = _(((Category)userObject).getTranslationKey()) + " (" + model.getChildCount(value) + ")";
+ text = t(((Category)userObject).getTranslationKey()) + " (" + model.getChildCount(value) + ")";
}
else if (userObject instanceof ControlErrorGroup) {
ControlErrorGroup validationErrorGroup = (ControlErrorGroup)userObject;
@@ -106,7 +106,7 @@
}
String message = validationErrorGroup.getMessage();
- text = _(message) + " (" + model.getChildCount(value) + ")";
+ text = t(message) + " (" + model.getChildCount(value) + ")";
}
else if (userObject instanceof ControlError) {
ControlError validationError = (ControlError)userObject;
@@ -130,7 +130,7 @@
if (message == null) {
message = validationError.getMessage();
}
- text = _(message);
+ text = t(message);
tooltipText = validationError.getTipMessage();
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.control;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.BorderLayout;
import java.awt.GridBagConstraints;
@@ -63,6 +63,7 @@
import jaxx.runtime.JAXXUtil;
import jaxx.runtime.SwingUtil;
+import jaxx.runtime.swing.session.SwingSession;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.beanutils.PropertyUtils;
@@ -74,7 +75,6 @@
import org.jdesktop.swingx.treetable.TreeTableNode;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
-import org.nuiton.widget.SwingSession;
import fr.ifremer.coser.CoserBusinessException;
import fr.ifremer.coser.CoserConfig;
@@ -202,7 +202,7 @@
int[] dataSelectedRows = displayedTable.getSelectedRows();
final int columnIndex = displayedTable.getColumnModel().getColumnIndexAtX(event.getX());
- JPopupMenu popupMenu = new JPopupMenu(_("coser.ui.control.dataMenuLabel"));
+ JPopupMenu popupMenu = new JPopupMenu(t("coser.ui.control.dataMenuLabel"));
// plusieurs lignes selectionnées et pas la premiere colonne (Line index)
if (dataSelectedRows.length > 0 && columnIndex > 0) {
@@ -211,7 +211,7 @@
final String firstValue = (String)controlDataModel.getValueAt(dataSelectedRows[0], columnIndex);
// replace in selection
- JMenuItem replaceMenu = new JMenuItem(_("coser.ui.control.dataMenuReplace", columnName));
+ JMenuItem replaceMenu = new JMenuItem(t("coser.ui.control.dataMenuReplace", columnName));
replaceMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -231,7 +231,7 @@
// replace in everywhere
if (columnIndex > 0) {
final String columnName = displayedTable.getColumnName(columnIndex);
- JMenuItem replaceAllMenu = new JMenuItem(_("coser.ui.control.dataMenuReplaceAll", columnName));
+ JMenuItem replaceAllMenu = new JMenuItem(t("coser.ui.control.dataMenuReplaceAll", columnName));
replaceAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -249,7 +249,7 @@
// delete selected
if (dataSelectedRows.length > 0) {
- JMenuItem deleteSelectedMenu = new JMenuItem(_("coser.ui.control.dataMenuDeleteSelected"));
+ JMenuItem deleteSelectedMenu = new JMenuItem(t("coser.ui.control.dataMenuDeleteSelected"));
deleteSelectedMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -274,8 +274,8 @@
int[] selectedLines = controlDataTable.getSelectedRows();
if (ArrayUtils.isNotEmpty(selectedLines)) {
- int response = JOptionPane.showConfirmDialog(controlView, _("coser.ui.control.confirmDeletionsMessage", selectedLines.length),
- _("coser.ui.control.confirmDeletionTitle"),
+ int response = JOptionPane.showConfirmDialog(controlView, t("coser.ui.control.confirmDeletionsMessage", selectedLines.length),
+ t("coser.ui.control.confirmDeletionTitle"),
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
@@ -380,8 +380,8 @@
}
// message de confirmation
- JOptionPane.showMessageDialog(replaceView, _("coser.ui.control.replace.replacedCount", replaceCount),
- _("coser.ui.control.replace.title"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(replaceView, t("coser.ui.control.replace.replacedCount", replaceCount),
+ t("coser.ui.control.replace.title"), JOptionPane.INFORMATION_MESSAGE);
} catch (CoserBusinessException ex) {
throw new CoserException("Can't replace field value", ex);
@@ -603,7 +603,7 @@
// selectall n'a d'interet que pour les groupes d'erreurs
if (lastNode.getChildCount() > 0) {
- JMenuItem replaceMenu = new JMenuItem(_("coser.ui.control.globalErrorMenuSelectAll"));
+ JMenuItem replaceMenu = new JMenuItem(t("coser.ui.control.globalErrorMenuSelectAll"));
replaceMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -618,7 +618,7 @@
// fix potentail NPE
if (errorTable.getRowCount() > 0) {
- JMenuItem generateHtmlMenu = new JMenuItem(_("coser.ui.control.globalErrorMenuGenerateHTML"));
+ JMenuItem generateHtmlMenu = new JMenuItem(t("coser.ui.control.globalErrorMenuGenerateHTML"));
generateHtmlMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -848,7 +848,7 @@
if (!reftaxSpecies.containsKey(fieldValue)) {
domain.add(0, fieldValue);
}
- ListComboBoxModel<String> speciesComboModel = new ListComboBoxModel<String>(domain);
+ ListComboBoxModel speciesComboModel = new ListComboBoxModel(domain);
JComboBox speciesCombo = new JComboBox(speciesComboModel);
speciesCombo.setRenderer(new SpeciesListRenderer(reftaxSpecies));
speciesCombo.setSelectedItem(fieldValue);
@@ -946,8 +946,8 @@
*/
public void saveControl(ControlView view) {
saveProjectControl(view);
- JOptionPane.showMessageDialog(view, _("coser.ui.control.controlSaved"),
- _("coser.ui.control.controlTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.control.controlSaved"),
+ t("coser.ui.control.controlTitle"), JOptionPane.INFORMATION_MESSAGE);
}
/**
@@ -1123,8 +1123,8 @@
* @param view view
*/
public void deleteData(ControlView view) {
- int response = JOptionPane.showConfirmDialog(view, _("coser.ui.control.confirmDeletionMessage"),
- _("coser.ui.control.confirmDeletionTitle"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
+ int response = JOptionPane.showConfirmDialog(view, t("coser.ui.control.confirmDeletionMessage"),
+ t("coser.ui.control.confirmDeletionTitle"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
// disableValidAction
@@ -1173,8 +1173,8 @@
try {
List<ControlError> controlErrors = view.getGlobalControlErrorModel().getControlErrors();
service.validControl(project, controlErrors);
- JOptionPane.showMessageDialog(view, _("coser.ui.control.controlValidated"),
- _("coser.ui.control.controlTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.control.controlValidated"),
+ t("coser.ui.control.controlTitle"), JOptionPane.INFORMATION_MESSAGE);
} catch (CoserBusinessException ex) {
throw new CoserException("Can't generate html report", ex);
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/GlobalControlErrorModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/GlobalControlErrorModel.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/GlobalControlErrorModel.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,8 +23,8 @@
package fr.ifremer.coser.ui.control;
-import static org.nuiton.i18n.I18n._;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.t;
+import static org.nuiton.i18n.I18n.n;
import java.util.HashMap;
import java.util.HashSet;
@@ -83,7 +83,7 @@
for (ControlError validationError : validationErrors) {
Object category = validationError.getCategory() == null ?
- n_("coser.ui.control.error.allCategories") : validationError.getCategory();
+ n("coser.ui.control.error.allCategories") : validationError.getCategory();
// definition du noeud categorie
DefaultMutableTreeTableNode categoryNode = nodeCache.get(category);
@@ -108,7 +108,7 @@
if (validationError instanceof DiffCatchLengthControlError) {
DiffCatchLengthControlError diffCatchError = (DiffCatchLengthControlError)validationError;
String species = diffCatchError.getSpecies();
- String speciesCategory = _("coser.ui.control.error.diffcatchlenghtspecies",
+ String speciesCategory = t("coser.ui.control.error.diffcatchlenghtspecies",
project.getDisplaySpeciesText(species));
ControlErrorGroup group = new ControlErrorGroup(validationError.getCategory(), validationError.getLevel(), speciesCategory);
@@ -145,7 +145,7 @@
switch (columnIndex) {
case 0:
- result = _("coser.ui.control.global.message");
+ result = t("coser.ui.control.global.message");
break;
}
return result;
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/freize/FreizeHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -22,7 +22,7 @@
*/
package fr.ifremer.coser.ui.freize;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Color;
import java.awt.Component;
@@ -144,18 +144,18 @@
// step 2
model.setStep2Enabled(true);
if (!project.getSelections().isEmpty()) {
- view.getControlStatus().setText(_("coser.ui.freize.locked"));
- view.getControlStatus().setToolTipText(_("coser.ui.freize.controllockedtip"));
+ view.getControlStatus().setText(t("coser.ui.freize.locked"));
+ view.getControlStatus().setToolTipText(t("coser.ui.freize.controllockedtip"));
view.getControlStatus().setIcon(LOCKED_ICON);
} else {
- view.getControlStatus().setText(_("coser.ui.freize.validated"));
+ view.getControlStatus().setText(t("coser.ui.freize.validated"));
view.getControlStatus().setIcon(OK_ICON);
}
Selection selection = model.getSelection();
if (selection != null && selection.isValidated()) {
view.getSelectionStatus().setIcon(OK_ICON);
- view.getSelectionStatus().setText(_("coser.ui.freize.validated"));
+ view.getSelectionStatus().setText(t("coser.ui.freize.validated"));
view.getStep2Panel().setBackground(COMPLETE_COLOR);
// step 3
@@ -172,12 +172,12 @@
} else {
view.getStep2Panel().setBackground(PENDING_COLOR);
view.getSelectionStatus().setIcon(BAD_ICON);
- view.getSelectionStatus().setText(_("coser.ui.freize.unvalidated"));
+ view.getSelectionStatus().setText(t("coser.ui.freize.unvalidated"));
}
} else {
view.getStep1Panel().setBackground(PENDING_COLOR);
view.getControlStatus().setIcon(BAD_ICON);
- view.getControlStatus().setText(_("coser.ui.freize.unvalidated"));
+ view.getControlStatus().setText(t("coser.ui.freize.unvalidated"));
}
} else {
view.getStep0Panel().setBackground(PENDING_COLOR);
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -35,7 +35,7 @@
<Table>
<row>
<cell fill="both" columns="2">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.configuration.category.path"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.configuration.category.path"))}'>
<row>
<cell fill="horizontal">
<JLabel text="{CoserBusinessOption.PROJECTS_DIRECTORY.getDescription()}" />
@@ -109,7 +109,7 @@
</row>
<row>
<cell fill="both" columns="2">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.configuration.category.controlselection"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.configuration.category.controlselection"))}'>
<row>
<cell fill="horizontal">
<JLabel text="{CoserBusinessOption.CONTROL_NOBSMIN.getDescription()}" />
@@ -163,7 +163,7 @@
</row>
<row>
<cell fill="both" columns="2">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.configuration.category.misc"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.configuration.category.misc"))}'>
<row>
<cell fill="horizontal">
<JLabel text="{CoserBusinessOption.SMTP_HOST.getDescription()}" />
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/NoCopiedLayerUI.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.option;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Color;
import java.awt.FlowLayout;
@@ -58,7 +58,7 @@
public NoCopiedLayerUI(ValidatorDialog view) {
this.view = view;
setLocked(true);
- copyToDiskButton = new JButton(_("coser.ui.validators.copyToDisk"));
+ copyToDiskButton = new JButton(t("coser.ui.validators.copyToDisk"));
copyToDiskButton.addActionListener(this);
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/OptionHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.option;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.io.File;
import java.io.IOException;
@@ -68,8 +68,8 @@
*/
public void restoreDefaults(ValidatorDialog view) {
- int answer = JOptionPane.showConfirmDialog(view, _("coser.ui.validators.confirmRestore"),
- _("coser.ui.validators.title"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+ int answer = JOptionPane.showConfirmDialog(view, t("coser.ui.validators.confirmRestore"),
+ t("coser.ui.validators.title"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (answer == JOptionPane.YES_OPTION) {
CoserConfig config = view.getContextValue(CoserConfig.class);
@@ -95,8 +95,8 @@
*/
public void copyDefaultValidators(ValidatorDialog view) {
- int answer = JOptionPane.showConfirmDialog(view, _("coser.ui.validators.confirmCopyToDisk"),
- _("coser.ui.validators.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
+ int answer = JOptionPane.showConfirmDialog(view, t("coser.ui.validators.confirmCopyToDisk"),
+ t("coser.ui.validators.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (answer != JOptionPane.YES_OPTION) {
view.dispose();
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorDialog.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,8 +23,12 @@
#L%
-->
<JDialog title="coser.ui.validators.title">
+ <import>
+ org.jdesktop.jxlayer.JXLayer
+ org.nuiton.jaxx.widgets.extra.editor.Editor
+ </import>
<OptionHandler id="handler" javaBean="null" />
- <org.jdesktop.jxlayer.JXLayer id="noCopiedToDiskLayer">
+ <JXLayer id="noCopiedToDiskLayer">
<Table>
<row>
<cell columns="2" fill="horizontal">
@@ -49,7 +53,7 @@
</JScrollPane>
</cell>
<cell weightx="2" weighty="1" fill="both">
- <org.nuiton.widget.editor.Editor id="validationEditor" />
+ <Editor id="validationEditor" />
</cell>
</row>
<row>
@@ -64,5 +68,5 @@
</cell>
</row>
</Table>
- </org.jdesktop.jxlayer.JXLayer>
+ </JXLayer>
</JDialog>
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ValidatorsTreeRenderer.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.option;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
@@ -57,11 +57,11 @@
Object stringValue = value;
if (value instanceof Category) {
- stringValue = _(((Category)value).getTranslationKey());
+ stringValue = t(((Category)value).getTranslationKey());
}
else if (value instanceof ValidationLevel) {
// en attendant mieux
- stringValue = _(((ValidationLevel)value).getXWorkContext());
+ stringValue = t(((ValidationLevel)value).getXWorkContext());
}
return super.getTreeCellRendererComponent(tree, stringValue, sel, expanded, leaf,
row, hasFocus);
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -45,7 +45,7 @@
</BeanValidator>
<script><![CDATA[
- JCheckBox customReferenceCheckBox = new JCheckBox(_("coser.ui.project.useCustomReferenceSpeciesFile"));
+ JCheckBox customReferenceCheckBox = new JCheckBox(t("coser.ui.project.useCustomReferenceSpeciesFile"));
void $afterCompleteSetup() {
fr.ifremer.coser.ui.widgets.ComponentTitledBorder componentBorder =
new fr.ifremer.coser.ui.widgets.ComponentTitledBorder(customReferenceCheckBox, useCustomReferenceFilePanel, BorderFactory.createEtchedBorder());
@@ -58,7 +58,7 @@
<row>
<cell weightx="1" fill="horizontal">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.newProject"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.project.newProject"))}'>
<row>
<cell anchor="west">
<JLabel text="coser.ui.project.projectname" />
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -42,7 +42,7 @@
<row>
<cell weightx="1" fill="horizontal">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.editProject"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.project.editProject"))}'>
<row>
<cell anchor="west">
<JLabel text="coser.ui.project.projectname" />
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.project;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.event.MouseEvent;
import java.io.File;
@@ -206,13 +206,13 @@
// check some files existences
if (!reftaxSpeciesFile.isFile()) {
- JOptionPane.showMessageDialog(projectView, _("coser.ui.project.createProjectMissingReftax"),
- _("coser.ui.project.missingFile"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(projectView, t("coser.ui.project.createProjectMissingReftax"),
+ t("coser.ui.project.missingFile"), JOptionPane.ERROR_MESSAGE);
return;
}
if (!codeTypeEspeceFile.isFile()) {
- JOptionPane.showMessageDialog(projectView, _("coser.ui.project.createProjectMissingCodeTypeSpecies"),
- _("coser.ui.project.missingFile"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(projectView, t("coser.ui.project.createProjectMissingCodeTypeSpecies"),
+ t("coser.ui.project.missingFile"), JOptionPane.ERROR_MESSAGE);
return;
}
@@ -324,7 +324,7 @@
if (log.isErrorEnabled()) {
log.error("Can't open project", ex);
}
- JOptionPane.showMessageDialog(projectView, ex.getMessage(), _("coser.ui.project.openError"),
+ JOptionPane.showMessageDialog(projectView, ex.getMessage(), t("coser.ui.project.openError"),
JOptionPane.ERROR_MESSAGE);
} finally {
setDefaultCursor(projectView);
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -27,7 +27,7 @@
<row>
<cell weightx="1" fill="horizontal">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.openProjectTitle"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.project.openProjectTitle"))}'>
<row>
<cell anchor="north">
<JLabel text="coser.ui.project.project" />
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectSummaryView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectSummaryView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectSummaryView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -29,7 +29,7 @@
<row>
<cell weightx="1" fill="horizontal">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.summary.title"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.project.summary.title"))}'>
<row>
<cell anchor="west">
<JLabel text="coser.ui.project.summary.path" />
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/SpeciesFieldTypeListRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/SpeciesFieldTypeListRenderer.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/SpeciesFieldTypeListRenderer.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.ui.project;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
@@ -56,13 +56,13 @@
// add another human comment
switch (type) {
case C_Valide:
- text += " (" + _("coser.ui.project.cValideSpeciesTypeDesc") + ")";
+ text += " (" + t("coser.ui.project.cValideSpeciesTypeDesc") + ")";
break;
case C_PERM:
- text += " (" + _("coser.ui.project.cPermSpeciesTypeDesc") + ")";
+ text += " (" + t("coser.ui.project.cPermSpeciesTypeDesc") + ")";
break;
case L_Valide:
- text += " (" + _("coser.ui.project.lValideSpeciesTypeDesc") + ")";
+ text += " (" + t("coser.ui.project.lValideSpeciesTypeDesc") + ")";
break;
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ExportUploadDialog.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ExportUploadDialog.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ExportUploadDialog.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -28,7 +28,7 @@
<row>
<cell weightx="1" weighty="1" fill="both">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.uploadresult.extractChoice"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.uploadresult.extractChoice"))}'>
<row>
<cell fill="horizontal">
<JLabel text="coser.ui.uploadresult.extractTo" />
@@ -52,7 +52,7 @@
</row>
<row>
<cell weightx="1" weighty="1" fill="both">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.uploadresult.uploadChoice"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.uploadresult.uploadChoice"))}'>
<row>
<cell fill="horizontal">
<JLabel text="coser.ui.uploadresult.uploadLogin" />
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.result;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.io.File;
import java.util.ArrayList;
@@ -38,7 +38,7 @@
import jaxx.runtime.JAXXUtil;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import fr.ifremer.coser.CoserBusinessException;
@@ -192,12 +192,12 @@
String status = get();
if (StringUtils.isNotEmpty(status)) {
- JOptionPane.showMessageDialog(view, _("coser.ui.uploadresult.resultsuploaderror", status),
- _("coser.ui.uploadresult.title"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.uploadresult.resultsuploaderror", status),
+ t("coser.ui.uploadresult.title"), JOptionPane.ERROR_MESSAGE);
}
else {
- JOptionPane.showMessageDialog(view, _("coser.ui.uploadresult.resultsuploaded"),
- _("coser.ui.uploadresult.title"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.uploadresult.resultsuploaded"),
+ t("coser.ui.uploadresult.title"), JOptionPane.INFORMATION_MESSAGE);
}
view.dispose();
@@ -236,8 +236,8 @@
setWaitCursor(view);
webService.performResultExtract(selectedResult, publishDataResults, extractDirectory);
- JOptionPane.showMessageDialog(view, _("coser.ui.uploadresult.resultsextracted"),
- _("coser.ui.uploadresult.title"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.uploadresult.resultsextracted"),
+ t("coser.ui.uploadresult.title"), JOptionPane.INFORMATION_MESSAGE);
view.dispose();
}
catch (CoserBusinessException ex) {
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableModel.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableModel.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.result;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@@ -79,25 +79,25 @@
switch (column) {
case 0:
- name = _("coser.ui.result.table.resultName");
+ name = t("coser.ui.result.table.resultName");
break;
case 1:
- name = _("coser.ui.result.table.rsufiVersion");
+ name = t("coser.ui.result.table.rsufiVersion");
break;
case 2:
- name = _("coser.ui.result.table.zone");
+ name = t("coser.ui.result.table.zone");
break;
case 3:
- name = _("coser.ui.result.table.estComIndFile");
+ name = t("coser.ui.result.table.estComIndFile");
break;
case 4:
- name = _("coser.ui.result.table.estPopIndFile");
+ name = t("coser.ui.result.table.estPopIndFile");
break;
case 5:
- name = _("coser.ui.result.table.maps");
+ name = t("coser.ui.result.table.maps");
break;
case 6:
- name = _("coser.ui.result.table.otherfiles");
+ name = t("coser.ui.result.table.otherfiles");
break;
}
return name;
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableRenderer.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/ResultTableRenderer.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.result;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
@@ -77,10 +77,10 @@
case 6:
boolean availale = (Boolean)value;
if (availale) {
- localValue = _("coser.ui.common.yes");
+ localValue = t("coser.ui.common.yes");
}
else {
- localValue = _("coser.ui.common.no");
+ localValue = t("coser.ui.common.no");
}
break;
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTableModel.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTableModel.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/result/RsufiResultTableModel.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.result;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.util.Date;
import java.util.HashSet;
@@ -114,22 +114,22 @@
String result = null;
switch(column) {
case 0:
- result = _("coser.ui.uploadresult.creationDate");
+ result = t("coser.ui.uploadresult.creationDate");
break;
case 1:
- result = _("coser.ui.uploadresult.path");
+ result = t("coser.ui.uploadresult.path");
break;
case 2:
- result = _("coser.ui.uploadresult.zone");
+ result = t("coser.ui.uploadresult.zone");
break;
case 3:
- result = _("coser.ui.uploadresult.indicatorResult");
+ result = t("coser.ui.uploadresult.indicatorResult");
break;
case 4:
- result = _("coser.ui.uploadresult.mapResult");
+ result = t("coser.ui.uploadresult.mapResult");
break;
case 5:
- result = _("coser.ui.uploadresult.publishData");
+ result = t("coser.ui.uploadresult.publishData");
break;
}
return result;
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -152,18 +152,18 @@
<Table>
<row>
<cell fill="horizontal">
- <JLabel id="strataLabel" text='{_("coser.ui.selection.details.strata", 0, 0)}' />
+ <JLabel id="strataLabel" text='{t("coser.ui.selection.details.strata", 0, 0)}' />
</cell>
</row>
<row>
<cell weightx="1" weighty="2" fill="both" rows="2">
<JScrollPane>
<StrataListModel id="strataListModel"
- onContentsChanged='strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
+ onContentsChanged='strataLabel.setText(t("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
<JList id="strataList" model="{strataListModel}"
onMouseClicked="getHandler().showStrataContextMenu(this, event)"
selectionModel="{new CoserListSelectionModel(strataList.getSelectionModel(), strataListModel)}"
- onValueChanged='setStrataValidated(false); strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
+ onValueChanged='setStrataValidated(false); strataLabel.setText(t("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
</JScrollPane>
</cell>
<cell anchor="northeast">
@@ -188,19 +188,19 @@
<Table>
<row>
<cell fill="horizontal" columns="4">
- <JLabel id="typeSpeciesLabel" text='{_("coser.ui.selection.details.type", typeSpeciesList.getSelectedIndices().length, typeSpeciesList.getModel().getSize())}' />
+ <JLabel id="typeSpeciesLabel" text='{t("coser.ui.selection.details.type", typeSpeciesList.getSelectedIndices().length, typeSpeciesList.getModel().getSize())}' />
</cell>
</row>
<row>
<cell fill="both" weightx="1" weighty="1" columns="2">
<JScrollPane>
<SpeciesTypesListModel id="typeSpeciesModel" constructorParams="this"
- onContentsChanged='typeSpeciesLabel.setText(_("coser.ui.selection.details.type", typeSpeciesList.getSelectedIndices().length, typeSpeciesList.getModel().getSize()))'/>
+ onContentsChanged='typeSpeciesLabel.setText(t("coser.ui.selection.details.type", typeSpeciesList.getSelectedIndices().length, typeSpeciesList.getModel().getSize()))'/>
<JList id="typeSpeciesList" model="{typeSpeciesModel}"
cellRenderer="{new SpeciesTypesRenderer()}"
selectionModel="{new CoserListSelectionModel(typeSpeciesList.getSelectionModel(), typeSpeciesModel)}"
enabled="{isYearsValidated() && isStrataValidated()}"
- onValueChanged='validFilterButton.setEnabled(true); typeSpeciesLabel.setText(_("coser.ui.selection.details.type", typeSpeciesList.getSelectedIndices().length, typeSpeciesList.getModel().getSize()))' />
+ onValueChanged='validFilterButton.setEnabled(true); typeSpeciesLabel.setText(t("coser.ui.selection.details.type", typeSpeciesList.getSelectedIndices().length, typeSpeciesList.getModel().getSize()))' />
</JScrollPane>
</cell>
<cell anchor="south" columns="2">
@@ -214,22 +214,22 @@
<Table>
<row>
<cell fill="horizontal" columns="2">
- <JLabel id="filteredSpeciesLabel" text='{_("coser.ui.selection.details.filteredSpecies", 0, 0)}' />
+ <JLabel id="filteredSpeciesLabel" text='{t("coser.ui.selection.details.filteredSpecies", 0, 0)}' />
</cell>
<cell fill="horizontal">
- <JLabel id="selectedSpeciesLabel" text='{_("coser.ui.selection.details.selectedSpecies", 0, 0)}' />
+ <JLabel id="selectedSpeciesLabel" text='{t("coser.ui.selection.details.selectedSpecies", 0, 0)}' />
</cell>
</row>
<row>
<cell weightx="1" weighty="1" fill="both">
<JScrollPane>
<SpeciesListModel id="filteredSpeciesListModel"
- onContentsChanged='filteredSpeciesLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpeciesList.getSelectedIndices().length, filteredSpeciesList.getModel().getSize()))'/>
+ onContentsChanged='filteredSpeciesLabel.setText(t("coser.ui.selection.details.filteredSpecies", filteredSpeciesList.getSelectedIndices().length, filteredSpeciesList.getModel().getSize()))'/>
<JList id="filteredSpeciesList" model="{filteredSpeciesListModel}"
onMouseClicked="getHandler().showFilteredSpeciesContextMenu(this, event)"
selectionModel="{new CoserListSelectionModel(filteredSpeciesList.getSelectionModel(), filteredSpeciesListModel)}"
enabled="{isYearsValidated() && isStrataValidated()}"
- onValueChanged='filteredSpeciesLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpeciesList.getSelectedIndices().length, filteredSpeciesList.getModel().getSize()))' />
+ onValueChanged='filteredSpeciesLabel.setText(t("coser.ui.selection.details.filteredSpecies", filteredSpeciesList.getSelectedIndices().length, filteredSpeciesList.getModel().getSize()))' />
<ListSelectionModel id="filteredSpeciesListSelectionModel" javaBean="filteredSpeciesList.getSelectionModel()" />
</JScrollPane>
</cell>
@@ -292,12 +292,12 @@
<cell weightx="1" weighty="1" fill="both">
<JScrollPane>
<SpeciesListModel id="selectedSpeciesListModel"
- onContentsChanged='setSpeciesValidated(false);selectedSpeciesLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpeciesList.getSelectedIndices().length, selectedSpeciesList.getModel().getSize()))'/>
+ onContentsChanged='setSpeciesValidated(false);selectedSpeciesLabel.setText(t("coser.ui.selection.details.selectedSpecies", selectedSpeciesList.getSelectedIndices().length, selectedSpeciesList.getModel().getSize()))'/>
<JList id="selectedSpeciesList" model="{selectedSpeciesListModel}"
onMouseClicked="getHandler().showSelectedSpeciesContextMenu(this, event)"
selectionModel="{new CoserListSelectionModel(selectedSpeciesList.getSelectionModel(), selectedSpeciesListModel)}"
enabled="{isYearsValidated() && isStrataValidated()}"
- onValueChanged='selectedSpeciesLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpeciesList.getSelectedIndices().length, selectedSpeciesList.getModel().getSize()))'/>
+ onValueChanged='selectedSpeciesLabel.setText(t("coser.ui.selection.details.selectedSpecies", selectedSpeciesList.getSelectedIndices().length, selectedSpeciesList.getModel().getSize()))'/>
<ListSelectionModel id="selectedSpeciesListSelectionModel" javaBean="selectedSpeciesList.getSelectionModel()" />
</JScrollPane>
</cell>
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.selection;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
import java.awt.GridBagConstraints;
@@ -53,6 +53,7 @@
import jaxx.runtime.JAXXUtil;
+import jaxx.runtime.swing.session.SwingSession;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -61,7 +62,6 @@
import org.jfree.chart.JFreeChart;
import org.nuiton.math.matrix.MatrixND;
import org.nuiton.math.matrix.gui.MatrixTableModelND;
-import org.nuiton.widget.SwingSession;
import fr.ifremer.coser.CoserBusinessException;
import fr.ifremer.coser.CoserConfig;
@@ -289,8 +289,8 @@
*/
public void reloadControlData(SelectionDetailsView view) {
- int response = JOptionPane.showConfirmDialog(view, _("coser.ui.selection.detail.confirmcontrolreload"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+ int response = JOptionPane.showConfirmDialog(view, t("coser.ui.selection.detail.confirmcontrolreload"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
Project project = view.getContextValue(Project.class);
@@ -304,8 +304,8 @@
view.getValidDatesButton().setEnabled(true);
view.getDetailAccordionPane().setSelected(1);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.detail.controldatareloaded"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.detail.controldatareloaded"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
} catch (CoserBusinessException ex) {
throw new CoserException("Can't reload control data", ex);
@@ -375,8 +375,8 @@
// update sampling effort data table
showSamplingEffort(view);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.detail.yearsvalidated"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.detail.yearsvalidated"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
// auto select strata accordion pane
view.getDetailAccordionPane().setSelected(2);
@@ -483,8 +483,8 @@
// update sampling effort data table
showSamplingEffort(view);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.detail.stratavalidated"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.detail.stratavalidated"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
// auto select species accordion pane
view.getDetailAccordionPane().setSelected(3);
@@ -556,8 +556,8 @@
// to remove from view, non available species
updateSelectionSpecies(view);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.detail.speciesvalidated"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.detail.speciesvalidated"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
}
finally {
setDefaultCursor(view);
@@ -578,7 +578,7 @@
JPopupMenu popupMenu = new JPopupMenu();
// select all menu
- JMenuItem selectAllMenu = new JMenuItem(_("coser.ui.common.selectAll"));
+ JMenuItem selectAllMenu = new JMenuItem(t("coser.ui.common.selectAll"));
selectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -589,7 +589,7 @@
popupMenu.add(selectAllMenu);
// unselect all menu
- JMenuItem unselectAllMenu = new JMenuItem(_("coser.ui.common.unselectAll"));
+ JMenuItem unselectAllMenu = new JMenuItem(t("coser.ui.common.unselectAll"));
unselectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -616,7 +616,7 @@
JPopupMenu popupMenu = new JPopupMenu();
// select all menu
- JMenuItem selectAllMenu = new JMenuItem(_("coser.ui.common.selectAll"));
+ JMenuItem selectAllMenu = new JMenuItem(t("coser.ui.common.selectAll"));
selectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -627,7 +627,7 @@
popupMenu.add(selectAllMenu);
// unselect all menu
- JMenuItem unselectAllMenu = new JMenuItem(_("coser.ui.common.unselectAll"));
+ JMenuItem unselectAllMenu = new JMenuItem(t("coser.ui.common.unselectAll"));
unselectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -657,7 +657,7 @@
int[] selectedRows = view.getFilteredSpeciesList().getSelectedIndices();
if (selectedRows.length > 0) {
// merge menu
- JMenuItem fusionMenu = new JMenuItem(_("coser.ui.selection.speciesMenuFusion"));
+ JMenuItem fusionMenu = new JMenuItem(t("coser.ui.selection.speciesMenuFusion"));
fusionMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -667,7 +667,7 @@
popupMenu.add(fusionMenu);
// graph
- JMenuItem graphMenu = new JMenuItem(_("coser.ui.selection.details.displayDiffCatchLengthGraph"));
+ JMenuItem graphMenu = new JMenuItem(t("coser.ui.selection.details.displayDiffCatchLengthGraph"));
graphMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -678,7 +678,7 @@
}
// select all menu
- JMenuItem selectAllMenu = new JMenuItem(_("coser.ui.common.selectAll"));
+ JMenuItem selectAllMenu = new JMenuItem(t("coser.ui.common.selectAll"));
selectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -689,7 +689,7 @@
popupMenu.add(selectAllMenu);
// unselect all menu
- JMenuItem unselectAllMenu = new JMenuItem(_("coser.ui.common.unselectAll"));
+ JMenuItem unselectAllMenu = new JMenuItem(t("coser.ui.common.unselectAll"));
unselectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -719,7 +719,7 @@
int[] selectedRows = view.getSelectedSpeciesList().getSelectedIndices();
if (selectedRows.length > 0) {
// graph
- JMenuItem graphMenu = new JMenuItem(_("coser.ui.selection.details.displayDiffCatchLengthGraph"));
+ JMenuItem graphMenu = new JMenuItem(t("coser.ui.selection.details.displayDiffCatchLengthGraph"));
graphMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -730,7 +730,7 @@
}
// select all menu
- JMenuItem selectAllMenu = new JMenuItem(_("coser.ui.common.selectAll"));
+ JMenuItem selectAllMenu = new JMenuItem(t("coser.ui.common.selectAll"));
selectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -741,7 +741,7 @@
popupMenu.add(selectAllMenu);
// unselect all menu
- JMenuItem unselectAllMenu = new JMenuItem(_("coser.ui.common.unselectAll"));
+ JMenuItem unselectAllMenu = new JMenuItem(t("coser.ui.common.unselectAll"));
unselectAllMenu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -766,7 +766,7 @@
// fill species combo box with reftax species list
Map<String, String> reftaxSpecies = project.getRefTaxSpeciesMap();
- ListComboBoxModel<String> speciesComboModel = new ListComboBoxModel<String>(new ArrayList<String>(reftaxSpecies.keySet()));
+ ListComboBoxModel speciesComboModel = new ListComboBoxModel(new ArrayList<String>(reftaxSpecies.keySet()));
speciesFusionDialog.getSpeciesCombo().setModel(speciesComboModel);
speciesFusionDialog.getSpeciesCombo().setRenderer(new SpeciesListRenderer(reftaxSpecies));
@@ -776,9 +776,9 @@
Object[] selectedValues = view.getFilteredSpeciesList().getSelectedValues();
if (selectedValues.length == 1) {
- speciesFusionDialog.setTitle(_("coser.ui.selection.fusion.rename.title"));
+ speciesFusionDialog.setTitle(t("coser.ui.selection.fusion.rename.title"));
} else {
- speciesFusionDialog.setTitle(_("coser.ui.selection.fusion.title"));
+ speciesFusionDialog.setTitle(t("coser.ui.selection.fusion.title"));
}
speciesFusionDialog.setLocationRelativeTo(view);
@@ -833,20 +833,20 @@
projectService.createProjectSelection(project, selection);
selectionView.setCreationState(false);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.selectionCreated"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.selectionCreated"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
} else {
projectService.saveProjectSelection(project, selection);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.selectionSaved"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.selectionSaved"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
}
}
catch (CoserBusinessException ex) {
if (log.isErrorEnabled()) {
log.error("Can't save selection", ex);
}
- JOptionPane.showMessageDialog(view, ex.getMessage(), _("coser.ui.selection.saveError"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, ex.getMessage(), t("coser.ui.selection.saveError"), JOptionPane.ERROR_MESSAGE);
}
// enable tabs
@@ -904,8 +904,8 @@
try {
saveSelectionLists(view, selection);
service.validSelection(project, selection);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.selectionValidated"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.selectionValidated"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
// enable tabs
SelectionView selectionView = view.getParentContainer(SelectionView.class);
@@ -914,7 +914,7 @@
if (log.isErrorEnabled()) {
log.error("Can't save selection", ex);
}
- JOptionPane.showMessageDialog(view, ex.getMessage(), _("coser.ui.selection.saveError"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, ex.getMessage(), t("coser.ui.selection.saveError"), JOptionPane.ERROR_MESSAGE);
}
}
}
@@ -941,8 +941,8 @@
if (!currentOccDensSelection.equals(originalOccDensSelection)
&& StringUtils.isBlank(selection.getSelectedSpeciesOccDensComment())) {
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.nonJustifiedOccurenceDensity"),
- _("coser.ui.selection.nonJustifiedTitle"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.nonJustifiedOccurenceDensity"),
+ t("coser.ui.selection.nonJustifiedTitle"), JOptionPane.ERROR_MESSAGE);
view.getOccurrenceDensityCommentField().requestFocus();
canValidate = false;
}
@@ -953,8 +953,8 @@
int[] sizeAllYearSpeciesSelection = view.getSelectionSizeAllYearList().getSelectedIndices();
if (sizeAllYearSpeciesSelection.length < sizeAllYearSpeciesInModel
&& StringUtils.isBlank(selection.getSelectedSpeciesSizeAllYearComment())) {
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.nonJustifiedSizeAllYear"),
- _("coser.ui.selection.nonJustifiedTitle"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.nonJustifiedSizeAllYear"),
+ t("coser.ui.selection.nonJustifiedTitle"), JOptionPane.ERROR_MESSAGE);
view.getSizeAllYearCommentField().requestFocus();
canValidate = false;
}
@@ -966,8 +966,8 @@
int[] maturitySpeciesSelection = view.getSelectionMaturityList().getSelectedIndices();
if (maturitySpeciesSelection.length < maturitySpeciesInModel
&& StringUtils.isBlank(selection.getSelectedSpeciesMaturityComment())) {
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.nonJustifiedMaturity"),
- _("coser.ui.selection.nonJustifiedTitle"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.nonJustifiedMaturity"),
+ t("coser.ui.selection.nonJustifiedTitle"), JOptionPane.ERROR_MESSAGE);
view.getMaturityCommentField().requestFocus();
canValidate = false;
}
@@ -1073,16 +1073,16 @@
parent.getFilteredSpeciesListSelectionModel().clearSelection();
if (speciesCodes.length == 1) {
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.speciesRenamed"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.speciesRenamed"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
} else {
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.speciesMerged"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.speciesMerged"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
}
}
catch (CoserBusinessException ex) {
JOptionPane.showMessageDialog(view, ex.getMessage(),
- _("coser.ui.selection.fusion.title"), JOptionPane.ERROR_MESSAGE);
+ t("coser.ui.selection.fusion.title"), JOptionPane.ERROR_MESSAGE);
}
view.dispose();
@@ -1347,7 +1347,7 @@
projectService.saveRsufiResults(project, selection, newResult, otherFiles);
view.dispose();
} catch (CoserBusinessException ex) {
- JOptionPane.showMessageDialog(view, ex.getMessage(), _("coser.ui.result.saveError"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, ex.getMessage(), t("coser.ui.result.saveError"), JOptionPane.ERROR_MESSAGE);
} finally {
setDefaultCursor(view);
}
@@ -1390,7 +1390,7 @@
List<File> newOthersFile = view.getOtherDataFileListModel().getFiles();
projectService.editRsufiResults(project, selection, editedResult, newOthersFile);
} catch (CoserBusinessException ex) {
- JOptionPane.showMessageDialog(view, ex.getMessage(), _("coser.ui.result.saveError"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, ex.getMessage(), t("coser.ui.result.saveError"), JOptionPane.ERROR_MESSAGE);
}
view.dispose();
}
@@ -1406,8 +1406,8 @@
RSufiResult result = view.getSelectionResultsTableModel().getValue(selectedRow);
int confirm = JOptionPane.showConfirmDialog(view,
- _("coser.ui.result.confirmDeleteResult", result.getName()),
- _("coser.ui.result.resultTitle"), JOptionPane.YES_NO_OPTION,
+ t("coser.ui.result.confirmDeleteResult", result.getName()),
+ t("coser.ui.result.resultTitle"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (confirm == JOptionPane.YES_OPTION) {
Project project = view.getContextValue(Project.class);
@@ -1460,8 +1460,8 @@
projectService.extractRSUfiData(project, selection, directory, false);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.rsufidataextracted"),
- _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.rsufidataextracted"),
+ t("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE);
} catch (CoserBusinessException ex) {
throw new CoserException("Can't extract rsufi files", ex);
} finally {
@@ -1633,7 +1633,7 @@
List<File> newOthersFile = view.getSelectionFilesListModel().getFiles();
projectService.editSelectionOptions(project, selection, newOthersFile);
} catch (CoserBusinessException ex) {
- JOptionPane.showMessageDialog(view, ex.getMessage(), _("coser.ui.result.saveError"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(view, ex.getMessage(), t("coser.ui.result.saveError"), JOptionPane.ERROR_MESSAGE);
}
view.dispose();
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -67,16 +67,16 @@
</row>
<row>
<cell fill="horizontal" columns="2">
- <JXTitledSeparator id="allSpeciesLabel" title='{_("coser.ui.selection.allSpecies", 0, 0)}' />
+ <JXTitledSeparator id="allSpeciesLabel" title='{t("coser.ui.selection.allSpecies", 0, 0)}' />
</cell>
<cell fill="horizontal" columns="2">
- <JXTitledSeparator id="occurrenceDensitySpeciesLabel" title='{_("coser.ui.selection.occurrenceDensitySpecies", 0, 0)}' />
+ <JXTitledSeparator id="occurrenceDensitySpeciesLabel" title='{t("coser.ui.selection.occurrenceDensitySpecies", 0, 0)}' />
</cell>
<cell fill="horizontal" columns="2">
- <JXTitledSeparator id="sizeAllYearSpeciesLabel" title='{_("coser.ui.selection.sizeAllYearSpecies", 0, 0)}' />
+ <JXTitledSeparator id="sizeAllYearSpeciesLabel" title='{t("coser.ui.selection.sizeAllYearSpecies", 0, 0)}' />
</cell>
<cell fill="horizontal" columns="2">
- <JXTitledSeparator id="maturitySpeciesLabel" title='{_("coser.ui.selection.maturitySpecies", 0, 0)}' />
+ <JXTitledSeparator id="maturitySpeciesLabel" title='{t("coser.ui.selection.maturitySpecies", 0, 0)}' />
</cell>
</row>
<row>
@@ -127,38 +127,38 @@
<cell weighty="1" weightx="1" fill="both" columns="2">
<JScrollPane>
<SpeciesListModel id="selectionAllSpeciesListModel"
- onContentsChanged='allSpeciesLabel.setTitle(_("coser.ui.selection.allSpecies", selectionAllSpeciesList.getSelectedIndices().length, selectionAllSpeciesList.getModel().getSize()))' />
+ onContentsChanged='allSpeciesLabel.setTitle(t("coser.ui.selection.allSpecies", selectionAllSpeciesList.getSelectedIndices().length, selectionAllSpeciesList.getModel().getSize()))' />
<JList id="selectionAllSpeciesList" model="{selectionAllSpeciesListModel}"
selectionModel="{new CoserListSelectionModel(selectionAllSpeciesList.getSelectionModel(), selectionAllSpeciesListModel)}"
enabled="false"
- onValueChanged='allSpeciesLabel.setTitle(_("coser.ui.selection.allSpecies", selectionAllSpeciesList.getSelectedIndices().length, selectionAllSpeciesList.getModel().getSize()))' />
+ onValueChanged='allSpeciesLabel.setTitle(t("coser.ui.selection.allSpecies", selectionAllSpeciesList.getSelectedIndices().length, selectionAllSpeciesList.getModel().getSize()))' />
</JScrollPane>
</cell>
<cell weightx="1" fill="both" columns="2">
<JScrollPane>
<OccurrenceDensitySpeciesListModel id="selectionOccurrenceDensityListModel"
- onContentsChanged='occurrenceDensitySpeciesLabel.setTitle(_("coser.ui.selection.occurrenceDensitySpecies", selectionOccurrenceDensityList.getSelectedIndices().length, selectionOccurrenceDensityList.getModel().getSize()))' />
+ onContentsChanged='occurrenceDensitySpeciesLabel.setTitle(t("coser.ui.selection.occurrenceDensitySpecies", selectionOccurrenceDensityList.getSelectedIndices().length, selectionOccurrenceDensityList.getModel().getSize()))' />
<JList id="selectionOccurrenceDensityList" model="{selectionOccurrenceDensityListModel}"
selectionModel="{new CoserListSelectionModel(selectionOccurrenceDensityList.getSelectionModel(), selectionOccurrenceDensityListModel)}"
- onValueChanged='applyOccDensFilter.setEnabled(true); occurrenceDensitySpeciesLabel.setTitle(_("coser.ui.selection.occurrenceDensitySpecies", selectionOccurrenceDensityList.getSelectedIndices().length, selectionOccurrenceDensityList.getModel().getSize()))' />
+ onValueChanged='applyOccDensFilter.setEnabled(true); occurrenceDensitySpeciesLabel.setTitle(t("coser.ui.selection.occurrenceDensitySpecies", selectionOccurrenceDensityList.getSelectedIndices().length, selectionOccurrenceDensityList.getModel().getSize()))' />
</JScrollPane>
</cell>
<cell weightx="1" fill="both" columns="2">
<JScrollPane>
<SizeAllYearSpeciesListModel id="selectionSizeAllYearListModel"
- onContentsChanged='sizeAllYearSpeciesLabel.setTitle(_("coser.ui.selection.sizeAllYearSpecies", selectionSizeAllYearList.getSelectedIndices().length, selectionSizeAllYearList.getModel().getSize()))' />
+ onContentsChanged='sizeAllYearSpeciesLabel.setTitle(t("coser.ui.selection.sizeAllYearSpecies", selectionSizeAllYearList.getSelectedIndices().length, selectionSizeAllYearList.getModel().getSize()))' />
<JList id="selectionSizeAllYearList" model="{selectionSizeAllYearListModel}"
selectionModel="{new CoserListSelectionModel(selectionSizeAllYearList.getSelectionModel(), selectionSizeAllYearListModel)}"
- onValueChanged='sizeAllYearSpeciesLabel.setTitle(_("coser.ui.selection.sizeAllYearSpecies", selectionSizeAllYearList.getSelectedIndices().length, selectionSizeAllYearList.getModel().getSize()))' />
+ onValueChanged='sizeAllYearSpeciesLabel.setTitle(t("coser.ui.selection.sizeAllYearSpecies", selectionSizeAllYearList.getSelectedIndices().length, selectionSizeAllYearList.getModel().getSize()))' />
</JScrollPane>
</cell>
<cell weightx="1" fill="both" columns="2">
<JScrollPane>
<MaturitySpeciesListModel id="selectionMaturityListModel"
- onContentsChanged='maturitySpeciesLabel.setTitle(_("coser.ui.selection.maturitySpecies", selectionMaturityList.getSelectedIndices().length, selectionMaturityList.getModel().getSize()))' />
+ onContentsChanged='maturitySpeciesLabel.setTitle(t("coser.ui.selection.maturitySpecies", selectionMaturityList.getSelectedIndices().length, selectionMaturityList.getModel().getSize()))' />
<JList id="selectionMaturityList" model="{selectionMaturityListModel}"
selectionModel="{new CoserListSelectionModel(selectionMaturityList.getSelectionModel(), selectionMaturityListModel)}"
- onValueChanged='maturitySpeciesLabel.setTitle(_("coser.ui.selection.maturitySpecies", selectionMaturityList.getSelectedIndices().length, selectionMaturityList.getModel().getSize()))' />
+ onValueChanged='maturitySpeciesLabel.setTitle(t("coser.ui.selection.maturitySpecies", selectionMaturityList.getSelectedIndices().length, selectionMaturityList.getModel().getSize()))' />
</JScrollPane>
</cell>
</row>
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionRsufiView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionRsufiView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionRsufiView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -32,7 +32,7 @@
<SelectionHandler id="handler" javaBean="null" />
<row>
<cell weightx="1" fill="horizontal">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.selection.option.optionTitle"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.selection.option.optionTitle"))}'>
<row>
<cell weightx="1" anchor="west">
<JButton text="coser.ui.selection.option.editFiles"
@@ -44,7 +44,7 @@
</row>
<row>
<cell weightx="1" fill="horizontal">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.result.extractDataTitle"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.result.extractDataTitle"))}'>
<row>
<cell>
<JLabel text="coser.ui.result.extractDataLabel" />
@@ -74,7 +74,7 @@
</row>
<row>
<cell weightx="1" weighty="2" fill="both">
- <Table border='{BorderFactory.createTitledBorder(_("coser.ui.result.availableDataTitle"))}'>
+ <Table border='{BorderFactory.createTitledBorder(t("coser.ui.result.availableDataTitle"))}'>
<row>
<cell columns="3" weightx="1" weighty="1" fill="both">
<JScrollPane>
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesListOccDensRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesListOccDensRenderer.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesListOccDensRenderer.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
package fr.ifremer.coser.ui.selection;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
import java.util.Map;
@@ -71,7 +71,7 @@
if (reftaxSpecies.containsKey(species)) {
speciesText = reftaxSpecies.get(species);
}
- String stringValue = _("coser.ui.selection.occurrencedensityrenderer", speciesText, occurrence, density);
+ String stringValue = t("coser.ui.selection.occurrencedensityrenderer", speciesText, occurrence, density);
return super.getListCellRendererComponent(list, stringValue, index, isSelected, cellHasFocus);
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.selection.replay;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.util.ArrayList;
import java.util.Collection;
@@ -36,7 +36,7 @@
import jaxx.runtime.JAXXUtil;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -119,7 +119,7 @@
Collection<String> remaindYear = CollectionUtils.subtract(replayedSelection.getSelectedYears(), selection.getAllYears());
if (!remaindYear.isEmpty()) {
String yearsAsString = StringUtils.join(remaindYear, ", ");
- String message = _("coser.ui.selection.replay.missingyears", yearsAsString);
+ String message = t("coser.ui.selection.replay.missingyears", yearsAsString);
view.getMessageArea2().setText(message);
}
@@ -172,7 +172,7 @@
Collection<String> remaindStrata = CollectionUtils.subtract(replayedSelection.getSelectedStrata(), strata);
if (!remaindStrata.isEmpty()) {
String strataAsString = StringUtils.join(remaindStrata, ", ");
- String message = _("coser.ui.selection.replay.missingstrata", strataAsString);
+ String message = t("coser.ui.selection.replay.missingstrata", strataAsString);
view.getMessageArea3().setText(message);
}
@@ -274,7 +274,7 @@
speciesBuilder.append(project.getDisplaySpeciesText(species));
separator = ", ";
}
- String message = _("coser.ui.selection.replay.missingspecies", speciesBuilder.toString());
+ String message = t("coser.ui.selection.replay.missingspecies", speciesBuilder.toString());
view.getMessageArea5().setText(message);
}
@@ -344,8 +344,8 @@
// autoselection de l'onglet "listes"
parent.getHandler().showSelectionView(selection, 1);
- JOptionPane.showMessageDialog(view, _("coser.ui.selection.selectionCreated"),
- _("coser.ui.selection.replay.replayTitle"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(view, t("coser.ui.selection.selectionCreated"),
+ t("coser.ui.selection.replay.replayTitle"), JOptionPane.INFORMATION_MESSAGE);
// hide current frame
view.dispose();
@@ -354,7 +354,7 @@
if (log.isErrorEnabled()) {
log.error("Can't save selection", ex);
}
- JOptionPane.showMessageDialog(view, ex.getMessage(), _("coser.ui.selection.saveError"),
+ JOptionPane.showMessageDialog(view, ex.getMessage(), t("coser.ui.selection.saveError"),
JOptionPane.ERROR_MESSAGE);
} finally {
setDefaultCursor(view);
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayView.jaxx 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayView.jaxx 2014-02-24 15:14:55 UTC (rev 1124)
@@ -69,7 +69,7 @@
<row>
<cell weightx="1" fill="horizontal" columns="3">
<JTextArea id="messageArea1" rows="3" editable="false"
- text='{_("coser.ui.selection.replay.noerrordetected")}' />
+ text='{t("coser.ui.selection.replay.noerrordetected")}' />
</cell>
</row>
<row>
@@ -110,7 +110,7 @@
<row>
<cell weightx="1" fill="horizontal" columns="3">
<JTextArea id="messageArea2" rows="3" editable="false"
- text='{_("coser.ui.selection.replay.noerrordetected")}' />
+ text='{t("coser.ui.selection.replay.noerrordetected")}' />
</cell>
</row>
<row>
@@ -151,7 +151,7 @@
<row>
<cell weightx="1" fill="horizontal" columns="3">
<JTextArea id="messageArea3" rows="3" editable="false"
- text='{_("coser.ui.selection.replay.noerrordetected")}' />
+ text='{t("coser.ui.selection.replay.noerrordetected")}' />
</cell>
</row>
<row>
@@ -190,7 +190,7 @@
<row>
<cell weightx="1" fill="horizontal" columns="3">
<JTextArea id="messageArea4" rows="3" editable="false"
- text='{_("coser.ui.selection.replay.noerrordetected")}' />
+ text='{t("coser.ui.selection.replay.noerrordetected")}' />
</cell>
</row>
<row>
@@ -230,7 +230,7 @@
<row>
<cell weightx="1" fill="horizontal" columns="3">
<JTextArea id="messageArea5" rows="3" editable="false"
- text='{_("coser.ui.selection.replay.noerrordetected")}' />
+ text='{t("coser.ui.selection.replay.noerrordetected")}' />
</cell>
</row>
<row>
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserProgressBar.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserProgressBar.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/CoserProgressBar.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.util;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import javax.swing.JProgressBar;
@@ -93,7 +93,7 @@
if (stepCount <= 1) {
setString(text);
} else {
- setString(_("coser.ui.control.progressStep", step +1, stepCount, text));
+ setString(t("coser.ui.control.progressStep", step +1, stepCount, text));
}
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/ErrorHelper.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/ErrorHelper.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/util/ErrorHelper.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -23,7 +23,7 @@
package fr.ifremer.coser.ui.util;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import java.awt.Component;
import java.io.PrintWriter;
@@ -78,8 +78,8 @@
public void showErrorDialog(Component parent, String message,
Throwable cause) {
JXErrorPane pane = new JXErrorPane();
- ErrorInfo info = new ErrorInfo(_("coser.ui.error.title"),
- _("coser.ui.error.htmlmessage", message), null, null,
+ ErrorInfo info = new ErrorInfo(t("coser.ui.error.title"),
+ t("coser.ui.error.htmlmessage", message), null, null,
cause, null, null);
pane.setErrorInfo(info);
pane.setErrorReporter(this);
@@ -156,7 +156,7 @@
// send mail
email.send();
- JOptionPane.showMessageDialog(null, _("coser.ui.error.reportSendTo", emailTo));
+ JOptionPane.showMessageDialog(null, t("coser.ui.error.reportSendTo", emailTo));
} catch (EmailException ex) {
if (log.isErrorEnabled()) {
log.error("Can't send report email" ,ex);
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2014-02-24 15:14:55 UTC (rev 1124)
@@ -15,9 +15,9 @@
coser.ui.common.unselectAll.short=None
coser.ui.common.valid=Valid
coser.ui.common.yes=Yes
-coser.ui.configuration.category.controlselection=Control and selection
-coser.ui.configuration.category.misc=Misc
-coser.ui.configuration.category.path=Paths
+coser.ui.configuration.category.controlselection=
+coser.ui.configuration.category.misc=
+coser.ui.configuration.category.path=
coser.ui.configuration.title=Configuration
coser.ui.control.categorylabel=Displayed data \:
coser.ui.control.checkData=Check data
@@ -123,16 +123,16 @@
coser.ui.project.createProjectMissingReftax=File 'Reftax' is not valid \!\n(check configuration \: coser.reference.species)
coser.ui.project.customReferenceSpeciesFile=New taxonomy reference file \:
coser.ui.project.displaySpeciesType=Display field \:
-coser.ui.project.editProject=Edit project
+coser.ui.project.editProject=
coser.ui.project.haulFile=Haul file \:
coser.ui.project.lValideSpeciesTypeDesc=Species latin name
coser.ui.project.lengthFile=Length file \:
coser.ui.project.maps=Maps \:
coser.ui.project.missingFile=Missing file
-coser.ui.project.newProject=New project
+coser.ui.project.newProject=
coser.ui.project.openError=Open error
coser.ui.project.openProject=Open
-coser.ui.project.openProjectTitle=Open existing project
+coser.ui.project.openProjectTitle=
coser.ui.project.outputSpeciesType=Output field \:
coser.ui.project.project=Project \:
coser.ui.project.projectauthor=Author \:
@@ -150,13 +150,13 @@
coser.ui.project.summary.resultCount=Result count \:
coser.ui.project.summary.selectionCount=Selection count \:
coser.ui.project.summary.strataFileName=Strata file name \:
-coser.ui.project.summary.title=Project summary
+coser.ui.project.summary.title=
coser.ui.project.summary.validated=Control validated \:
-coser.ui.project.useCustomReferenceSpeciesFile=Use custom taxonomy reference file
+coser.ui.project.useCustomReferenceSpeciesFile=
coser.ui.project.usedReferenceSpeciesFile=Current reference file (Reffax) \:
coser.ui.result.addNewResult=Save result
coser.ui.result.addOtherDataFile=Add file
-coser.ui.result.availableDataTitle=Available results \:
+coser.ui.result.availableDataTitle=
coser.ui.result.cancel=Cancel
coser.ui.result.confirmDeleteResult=Do you want to delete result %s ?
coser.ui.result.creationDate=Result date \:
@@ -166,7 +166,7 @@
coser.ui.result.estPopIndFile=ESTPOPind file \:
coser.ui.result.extractDataButton=Export in Rsufi format
coser.ui.result.extractDataLabel=Export directory \:
-coser.ui.result.extractDataTitle=Export RSufi input data
+coser.ui.result.extractDataTitle=
coser.ui.result.mapsDirectory=Maps directory \:
coser.ui.result.newResult=New Result
coser.ui.result.otherDataFile=Other files \:
@@ -190,7 +190,7 @@
coser.ui.result.validEditResult=Modify result
coser.ui.result.validNewResult=Add this result
coser.ui.result.zone=Zone \:
-coser.ui.selection.allSpecies=L1 \: All species (%d/%d)
+coser.ui.selection.allSpecies=
coser.ui.selection.comment=Comment \:
coser.ui.selection.detail.confirmcontrolreload=Are you sure you want to reload controled data ?\nAll modifications done on current selection will be lost.
coser.ui.selection.detail.controldatareloaded=Controled data reloaded.
@@ -206,19 +206,19 @@
coser.ui.selection.details.description=Description \:
coser.ui.selection.details.displayDiffCatchLengthGraph=Comparison catch/length graphs
coser.ui.selection.details.displayDiffCatchLengthGraphTip=Comparison catch/length graphs
-coser.ui.selection.details.filteredSpecies=Filtered species (%d/%d) \:
+coser.ui.selection.details.filteredSpecies=
coser.ui.selection.details.mergeSpeciesTip=Merge/Rename
coser.ui.selection.details.name=Selection name \:
coser.ui.selection.details.removeFromSelectedListTip=Remove selected species from selected species list
coser.ui.selection.details.saveSelection=Save selection
coser.ui.selection.details.selectAllSpeciesTip=Select all
-coser.ui.selection.details.selectedSpecies=L1 \: Selected species (%d/%d) \:
+coser.ui.selection.details.selectedSpecies=
coser.ui.selection.details.showMapTip=Display strata map
coser.ui.selection.details.showSpeciesTip=
coser.ui.selection.details.speciesDataDescription=Haul count by strata and year \:
coser.ui.selection.details.speciescontextmenu=For more options, use species lists contextual menu
-coser.ui.selection.details.strata=Strata (%d/%d) \:
-coser.ui.selection.details.type=Filter by type (%d/%d) \:
+coser.ui.selection.details.strata=
+coser.ui.selection.details.type=
coser.ui.selection.details.unSelectAllSpeciesTip=Unselect all
coser.ui.selection.details.validFilter=Valid filter
coser.ui.selection.details.validSelection=Valid selection
@@ -236,18 +236,18 @@
coser.ui.selection.fusion.name=New name \:
coser.ui.selection.fusion.rename.title=Rename
coser.ui.selection.fusion.title=Merge
-coser.ui.selection.maturitySpecies=L4 \: Species with maturity (%d/%d)
+coser.ui.selection.maturitySpecies=
coser.ui.selection.nonJustifiedMaturity=Maturity species list is not all selected.\nYou must justify this selection with a comment.
coser.ui.selection.nonJustifiedOccurenceDensity=Filtered list selection doesn't match filter selection.\nYou must justify this selection with a comment.
coser.ui.selection.nonJustifiedSizeAllYear=Size all year species list is not all selected.\nYou must justify this selection with a comment.
coser.ui.selection.nonJustifiedTitle=Unjustified selection
-coser.ui.selection.occurrenceDensitySpecies=L2 \: Filtered species (%d/%d)
+coser.ui.selection.occurrenceDensitySpecies=
coser.ui.selection.occurrencedensityrenderer=<html>%s<span style\='font-size\:85%%;color\:gray;'>(Occ\=%.2f, Dens\=%.2f)</span></html>
coser.ui.selection.option.addSelectionFile=Add
coser.ui.selection.option.editFiles=Selection files
coser.ui.selection.option.editFilesTitle=Edit files
coser.ui.selection.option.filesDetails=This files will be saved into current selection and copied into RSufi export.
-coser.ui.selection.option.optionTitle=Options
+coser.ui.selection.option.optionTitle=
coser.ui.selection.option.removeSelectionFile=Remove
coser.ui.selection.option.validSelectionFiles=Save
coser.ui.selection.reloadcontroldata=Reload controled data
@@ -261,7 +261,7 @@
coser.ui.selection.replay.missingstrata=Some strata are missing in current selection \: %s
coser.ui.selection.replay.missingyears=Some years are missing in current selection \: %s
coser.ui.selection.replay.nextstep=Next step
-coser.ui.selection.replay.noerrordetected=No errors detected.
+coser.ui.selection.replay.noerrordetected=
coser.ui.selection.replay.replayTitle=Replay selection
coser.ui.selection.replay.selectioninfos=Selection information \:
coser.ui.selection.rsufidataextracted=RSufi data extracted.
@@ -274,7 +274,7 @@
coser.ui.selection.selectionTitle=Selection step
coser.ui.selection.selectionValidated=Selection validated and saved.
coser.ui.selection.selectionreport=Selection report
-coser.ui.selection.sizeAllYearSpecies=L3 \: Species with size all year (%d/%d)
+coser.ui.selection.sizeAllYearSpecies=
coser.ui.selection.speciesMenuFusion=Merge/Rename
coser.ui.selection.speciesMerged=Species merged.
coser.ui.selection.speciesRenamed=Species renamed.
@@ -288,7 +288,7 @@
coser.ui.uploadresult.exportUploadTitle=Export/Upload
coser.ui.uploadresult.exportupload=Extract/Upload
coser.ui.uploadresult.extract=Extract
-coser.ui.uploadresult.extractChoice=Extract to directory
+coser.ui.uploadresult.extractChoice=
coser.ui.uploadresult.extractTo=Extract directory \:
coser.ui.uploadresult.filter.beginDate=Begin date \:
coser.ui.uploadresult.filter.endDate=End date \:
@@ -304,7 +304,7 @@
coser.ui.uploadresult.selectedResults=Selected results \:
coser.ui.uploadresult.title=Results publication
coser.ui.uploadresult.upload=Send results
-coser.ui.uploadresult.uploadChoice=Upload to server
+coser.ui.uploadresult.uploadChoice=
coser.ui.uploadresult.uploadLogin=Admin login \:
coser.ui.uploadresult.uploadPassword=Admin password \:
coser.ui.uploadresult.zone=Zone
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2014-02-24 15:14:55 UTC (rev 1124)
@@ -15,9 +15,9 @@
coser.ui.common.unselectAll.short=Aucun
coser.ui.common.valid=Valider
coser.ui.common.yes=Oui
-coser.ui.configuration.category.controlselection=Contrôle et sélection
-coser.ui.configuration.category.misc=Divers
-coser.ui.configuration.category.path=Chemins
+coser.ui.configuration.category.controlselection=
+coser.ui.configuration.category.misc=
+coser.ui.configuration.category.path=
coser.ui.configuration.title=Configuration
coser.ui.control.categorylabel=Données affichées \:
coser.ui.control.checkData=Vérifier les données
@@ -123,16 +123,16 @@
coser.ui.project.createProjectMissingReftax=Le fichier 'Reftax' n'est pas valide \!\n(vérifiez la configuration \: coser.reference.species)
coser.ui.project.customReferenceSpeciesFile=Nouveau fichier de référence taxonomique \:
coser.ui.project.displaySpeciesType=Champ pour affichage \:
-coser.ui.project.editProject=Modifier le projet
+coser.ui.project.editProject=
coser.ui.project.haulFile=Fichier des traits \:
coser.ui.project.lValideSpeciesTypeDesc=Nom latin des espèces
coser.ui.project.lengthFile=Fichier des tailles \:
coser.ui.project.maps=Cartes \:
coser.ui.project.missingFile=Fichier manquant
-coser.ui.project.newProject=Nouveau projet
+coser.ui.project.newProject=
coser.ui.project.openError=Erreur d'ouverture
coser.ui.project.openProject=Ouvrir
-coser.ui.project.openProjectTitle=Ouvrir un projet existant
+coser.ui.project.openProjectTitle=
coser.ui.project.outputSpeciesType=Champ de sortie \:
coser.ui.project.project=Projet \:
coser.ui.project.projectauthor=Auteur \:
@@ -150,13 +150,13 @@
coser.ui.project.summary.resultCount=Nombre de résultats \:
coser.ui.project.summary.selectionCount=Nombre de sélections \:
coser.ui.project.summary.strataFileName=Nom du fichier strates \:
-coser.ui.project.summary.title=Résumé du projet
+coser.ui.project.summary.title=
coser.ui.project.summary.validated=Contrôle validé \:
-coser.ui.project.useCustomReferenceSpeciesFile=Utiliser un autre fichier de référence taxonomique
+coser.ui.project.useCustomReferenceSpeciesFile=
coser.ui.project.usedReferenceSpeciesFile=Fichier de référence utilisé (Reftax) \:
coser.ui.result.addNewResult=Ajouter un résultat
coser.ui.result.addOtherDataFile=Ajouter un fichier
-coser.ui.result.availableDataTitle=Résultats disponibles
+coser.ui.result.availableDataTitle=
coser.ui.result.cancel=Annuler
coser.ui.result.confirmDeleteResult=Êtes vous sûr de vouloir supprimer le résultat %s ?
coser.ui.result.creationDate=Date du résultats \:
@@ -166,7 +166,7 @@
coser.ui.result.estPopIndFile=Fichier ESTPOPind \:
coser.ui.result.extractDataButton=Export au format RSufi
coser.ui.result.extractDataLabel=Dossier d'export \:
-coser.ui.result.extractDataTitle=Export des données en entrée de RSufi
+coser.ui.result.extractDataTitle=
coser.ui.result.mapsDirectory=Répertoire des cartes \:
coser.ui.result.newResult=Nouveau résultat
coser.ui.result.otherDataFile=Autre fichiers \:
@@ -190,7 +190,7 @@
coser.ui.result.validEditResult=Modifier le résultat
coser.ui.result.validNewResult=Ajouter le résultat
coser.ui.result.zone=Zone \:
-coser.ui.selection.allSpecies=L1 \: Toutes les espèces (%d/%d)
+coser.ui.selection.allSpecies=
coser.ui.selection.comment=Commentaire \:
coser.ui.selection.detail.confirmcontrolreload=Êtes vous sûr de vouloir recharger les données contrôlées ?\nToutes les modifications de la sélection en cours seront perdues.
coser.ui.selection.detail.controldatareloaded=Données contrôlées rechargées.
@@ -206,19 +206,19 @@
coser.ui.selection.details.description=Description \:
coser.ui.selection.details.displayDiffCatchLengthGraph=Graphiques des différences captures/tailles
coser.ui.selection.details.displayDiffCatchLengthGraphTip=Graphiques des différences captures/tailles
-coser.ui.selection.details.filteredSpecies=Espèces filtrées (%d/%d) \:
+coser.ui.selection.details.filteredSpecies=
coser.ui.selection.details.mergeSpeciesTip=Fusion/Renommage
coser.ui.selection.details.name=Nom de la sélection \:
coser.ui.selection.details.removeFromSelectedListTip=Retire les espèces sélectionnées de la liste des espèces sélectionnées
coser.ui.selection.details.saveSelection=Sauvegarder la sélection
coser.ui.selection.details.selectAllSpeciesTip=Sélectionner tout
-coser.ui.selection.details.selectedSpecies=L1 \: Espèces sélectionnées (%d/%d) \:
+coser.ui.selection.details.selectedSpecies=
coser.ui.selection.details.showMapTip=Afficher la carte des strates
coser.ui.selection.details.showSpeciesTip=Afficher la table de l'effort d'échantillonage
coser.ui.selection.details.speciesDataDescription=Nombre de traits par strate par année \:
coser.ui.selection.details.speciescontextmenu=Pour plus d'options, utilisez le menu contextuel sur les listes d'espèces
-coser.ui.selection.details.strata=Strates (%d/%d) \:
-coser.ui.selection.details.type=Filtrer par type (%d/%d) \:
+coser.ui.selection.details.strata=
+coser.ui.selection.details.type=
coser.ui.selection.details.unSelectAllSpeciesTip=Désélectionner tout
coser.ui.selection.details.validFilter=Valider les filtres
coser.ui.selection.details.validSelection=Valider la sélection
@@ -236,18 +236,18 @@
coser.ui.selection.fusion.name=Nouveau nom \:
coser.ui.selection.fusion.rename.title=Renommage
coser.ui.selection.fusion.title=Fusion
-coser.ui.selection.maturitySpecies=L4 \: Espèces avec maturité (%d/%d)
+coser.ui.selection.maturitySpecies=
coser.ui.selection.nonJustifiedMaturity=La liste espèces avec maturité n'est pas entièrement sélectionnée.\nVous devez justifier cette sélection par un commentaire.
coser.ui.selection.nonJustifiedOccurenceDensity=La sélection de la liste filtrée ne correspond pas à la sélection opérée par le filtre.\nVous devez justifier cette sélection par un commentaire.
coser.ui.selection.nonJustifiedSizeAllYear=La liste espèces avec des tailles pour toutes les années n'est pas entièrement sélectionnée.\nVous devez justifier cette sélection par un commentaire.
coser.ui.selection.nonJustifiedTitle=Sélection non justifiée
-coser.ui.selection.occurrenceDensitySpecies=L2 \: Espèces filtrées (%d/%d)
+coser.ui.selection.occurrenceDensitySpecies=
coser.ui.selection.occurrencedensityrenderer=<html>%s<span style\='font-size\:85%%;color\:gray;'>(Occ\=%.2f, Dens\=%.2f)</span></html>
coser.ui.selection.option.addSelectionFile=Ajouter
coser.ui.selection.option.editFiles=Fichiers de la sélection
coser.ui.selection.option.editFilesTitle=Modifier les fichiers
coser.ui.selection.option.filesDetails=Les fichiers suivants seront sauvegardés dans la sélection courante et copier dans l'export RSufi.
-coser.ui.selection.option.optionTitle=Options
+coser.ui.selection.option.optionTitle=
coser.ui.selection.option.removeSelectionFile=Supprimer
coser.ui.selection.option.validSelectionFiles=Sauver
coser.ui.selection.reloadcontroldata=Recharger les données contrôlées
@@ -261,7 +261,7 @@
coser.ui.selection.replay.missingstrata=Certaines strates de la séléction à rejouer sont manquantes \: %s
coser.ui.selection.replay.missingyears=Certaines années de la séléction à rejouer sont manquantes \: %s
coser.ui.selection.replay.nextstep=Étape suivante
-coser.ui.selection.replay.noerrordetected=Aucune erreur détéctée.
+coser.ui.selection.replay.noerrordetected=
coser.ui.selection.replay.replayTitle=Rejouer une sélection
coser.ui.selection.replay.selectioninfos=Information sur la sélection \:
coser.ui.selection.rsufidataextracted=Données RSufi extraites.
@@ -274,7 +274,7 @@
coser.ui.selection.selectionTitle=Étape de sélection
coser.ui.selection.selectionValidated=Sélection validée et sauvée.
coser.ui.selection.selectionreport=Rapport de la sélection
-coser.ui.selection.sizeAllYearSpecies=L3 \: Espèces avec taille pour toutes les années (%d/%d)
+coser.ui.selection.sizeAllYearSpecies=
coser.ui.selection.speciesMenuFusion=Fusion/Renommage
coser.ui.selection.speciesMerged=Espèces fusionnées.
coser.ui.selection.speciesRenamed=Espèce renommée.
@@ -288,7 +288,7 @@
coser.ui.uploadresult.exportUploadTitle=Exporter/Uploader
coser.ui.uploadresult.exportupload=Exporter/Uploader
coser.ui.uploadresult.extract=Extraire
-coser.ui.uploadresult.extractChoice=Extraire vers un dossier
+coser.ui.uploadresult.extractChoice=
coser.ui.uploadresult.extractTo=Dossier d'extraction \:
coser.ui.uploadresult.filter.beginDate=Date de début \:
coser.ui.uploadresult.filter.endDate=Date de fin \:
@@ -304,7 +304,7 @@
coser.ui.uploadresult.selectedResults=Résultats sélectionnés \:
coser.ui.uploadresult.title=Publication des résultats
coser.ui.uploadresult.upload=Envoyer les résultats
-coser.ui.uploadresult.uploadChoice=Envoyer sur le serveur
+coser.ui.uploadresult.uploadChoice=
coser.ui.uploadresult.uploadLogin=Login admin \:
coser.ui.uploadresult.uploadPassword=Mot de passe admin \:
coser.ui.uploadresult.zone=Zone
Modified: trunk/coser-web/LICENSE.txt
===================================================================
--- trunk/coser-web/LICENSE.txt 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-web/LICENSE.txt 2014-02-24 15:14:55 UTC (rev 1124)
@@ -658,4 +658,4 @@
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
\ No newline at end of file
+<http://www.gnu.org/licenses/>.
Modified: trunk/coser-web/pom.xml
===================================================================
--- trunk/coser-web/pom.xml 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-web/pom.xml 2014-02-24 15:14:55 UTC (rev 1124)
@@ -1,17 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>coser</artifactId>
- <version>1.4.4-SNAPSHOT</version>
+ <version>1.5-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.coser</groupId>
<artifactId>coser-web</artifactId>
+ <packaging>war</packaging>
+ <name>Coser :: Web</name>
+ <description>Coser web module</description>
+ <licenses>
+ <license>
+ <name>GNU Affero General Public License</name>
+ <url>http://www.gnu.org/licenses/agpl.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <properties>
+ <license.licenseName>agpl_v3</license.licenseName>
+ <redmine.releaseFiles>target/coser-${project.version}.war</redmine.releaseFiles>
+ <deployFiles>target/coser-${project.version}.war</deployFiles>
+
+ <!-- Post Release configuration -->
+ <skipPostRelease>false</skipPostRelease>
+ </properties>
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -29,8 +48,8 @@
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -41,12 +60,16 @@
<artifactId>nuiton-utils</artifactId>
</dependency>
<dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-config</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.struts.xwork</groupId>
- <artifactId>xwork-core</artifactId>
+ <groupId>org.apache.struts.xwork</groupId>
+ <artifactId>xwork-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
@@ -67,31 +90,8 @@
</dependency>
</dependencies>
- <name>Coser :: Web</name>
- <description>Coser web module</description>
-
- <licenses>
- <license>
- <name>GNU Affero General Public License</name>
- <url>http://www.gnu.org/licenses/agpl.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <packaging>war</packaging>
-
- <properties>
- <license.licenseName>agpl_v3</license.licenseName>
- <redmine.releaseFiles>target/coser-${project.version}.war</redmine.releaseFiles>
- <deployFiles>target/coser-${project.version}.war</deployFiles>
-
- <!-- Post Release configuration -->
- <skipPostRelease>false</skipPostRelease>
- </properties>
-
<build>
<finalName>coser-${project.version}</finalName>
-
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -107,7 +107,6 @@
</excludes>
</resource>
</resources>
-
<plugins>
<plugin>
<groupId>org.nuiton.i18n</groupId>
@@ -123,4 +122,5 @@
</plugin>
</plugins>
</build>
+
</project>
Modified: trunk/coser-web/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/coser-web/src/license/THIRD-PARTY.properties 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-web/src/license/THIRD-PARTY.properties 2014-02-24 15:14:55 UTC (rev 1124)
@@ -1,8 +1,6 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache License
-# - Apache Software License, Version 2.0
# - BSD License
# - BSD-style license
# - Bouncy Castle License
@@ -14,7 +12,6 @@
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
-# - License Agreement for Java(TM) Servlet API Specification Interface Classes
# - MIT License
# - Mozilla Public License
# - The Apache Software License, Version 1.1
@@ -23,8 +20,7 @@
# Please fill the missing licenses for dependencies :
#
#
-#Tue Jan 29 16:10:36 CET 2013
-commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+#Mon Feb 24 16:05:06 CET 2014
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
javassist--javassist--3.8.0.GA=GNU Lesser General Public License
-javax.servlet--servlet-api--2.5=License Agreement for Java(TM) Servlet API Specification Interface Classes
-regexp--regexp--1.3=The Apache Software License, Version 2.0
+javax.servlet--servlet-api--2.5=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -22,7 +22,7 @@
package fr.ifremer.coser.web;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
import fr.ifremer.coser.CoserBusinessConfig;
@@ -97,12 +97,12 @@
CONTEXT_NAME(APP_NAME, null, "coser"),
// see : http://www.nuiton.org/issues/1862
ENCODING_HACK(CONTEXT_NAME.getDefaultValue() + "." + CONFIG_ENCODING, null, "UTF-8"),
- CONFIG_FILE(CONTEXT_NAME.defaultValue + "." + CONFIG_FILE_NAME, _("coser.config.config.file.description"), "coserweb.properties"),
- APPLICATION_VERSION("coser.application.version", _("coser.config.application.version.description"), null),
- ADMIN_EMAIL("coser.admin.email", _("coser.config.config.file.description"), "harmonie(a)ifremer.fr"),
- ADMIN_LOGIN("coser.admin.login", _("coser.config.admin.login.description"), null),
- ADMIN_PASSWORD("coser.admin.password", _("coser.config.admin.password.description"), null),
- ANALYTICS_ID("coser.analytics.id", _("coser.config.analytics.id.description"), "UA-27739588-1");
+ CONFIG_FILE(CONTEXT_NAME.defaultValue + "." + CONFIG_FILE_NAME, t("coser.config.config.file.description"), "coserweb.properties"),
+ APPLICATION_VERSION("coser.application.version", t("coser.config.application.version.description"), null),
+ ADMIN_EMAIL("coser.admin.email", t("coser.config.config.file.description"), "harmonie(a)ifremer.fr"),
+ ADMIN_LOGIN("coser.admin.login", t("coser.config.admin.login.description"), null),
+ ADMIN_PASSWORD("coser.admin.password", t("coser.config.admin.password.description"), null),
+ ANALYTICS_ID("coser.analytics.id", t("coser.config.analytics.id.description"), "UA-27739588-1");
protected String key;
protected String description;
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/ServiceFactory.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -25,7 +25,7 @@
import java.util.Locale;
import org.nuiton.i18n.I18n;
-import org.nuiton.util.ArgumentsParserException;
+import org.nuiton.config.ArgumentsParserException;
import fr.ifremer.coser.services.WebService;
@@ -58,7 +58,7 @@
if (coserConfig == null) {
coserConfig = new CoserWebConfig();
try {
- coserConfig.parse(new String[0]);
+ coserConfig.parse();
} catch (ArgumentsParserException ex) {
throw new CoserWebException("Can't read configuration", ex);
}
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/admin/DeleteProjectsAction.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -24,7 +24,7 @@
import java.util.List;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.convention.annotation.InterceptorRef;
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/search/ExtractAction.java 2014-02-24 15:14:55 UTC (rev 1124)
@@ -31,7 +31,7 @@
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/pom.xml 2014-02-24 15:14:55 UTC (rev 1124)
@@ -1,25 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>4.1</version>
+ <version>4.7</version>
</parent>
<groupId>fr.ifremer</groupId>
<artifactId>coser</artifactId>
- <version>1.4.4-SNAPSHOT</version>
+ <version>1.5-SNAPSHOT</version>
<packaging>pom</packaging>
+ <name>Coser</name>
+ <description>Contrôle et Sélection RSufi</description>
+ <url>http://maven-site.forge.codelutin.com/coser</url>
+ <inceptionYear>2010</inceptionYear>
+ <organization>
+ <name>Ifremer</name>
+ <url>http://www.ifremer.fr/</url>
+ </organization>
+ <licenses>
+ <license>
+ <name>GNU Lesser General Public License</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <id>echatellier</id>
+ <name>Eric Chatellier</name>
+ <email>chatellier(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ <timezone>Europe/Paris</timezone>
+ </developer>
+ <developer>
+ <id>tchemit</id>
+ <name>Tony Chemit</name>
+ <email>chemit(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ <timezone>Europe/Paris</timezone>
+ </developer>
+ </developers>
+
<modules>
<module>coser-business</module>
<module>coser-ui</module>
<module>coser-web</module>
</modules>
+ <scm>
+ <connection>scm:svn:https://forge.codelutin.com/svn/coser/trunk</connection>
+ <developerConnection>scm:svn:https://forge.codelutin.com/svn/coser/trunk</developerConnection>
+ <url>https://forge.codelutin.com/repositories/browse/coser/trunk</url>
+ </scm>
<distributionManagement>
<site>
<id>${platform}</id>
@@ -27,17 +70,31 @@
</site>
</distributionManagement>
+ <properties>
+ <projectId>coser</projectId>
+ <platform>forge.codelutin.com</platform>
+
+ <license.licenseName>lgpl_v3</license.licenseName>
+ <license.organizationName>Ifremer, Codelutin</license.organizationName>
+
+ <!-- Versions -->
+ <jaxxVersion>2.8.2-SNAPSHOT</jaxxVersion>
+ <nuitonI18nVersion>3.0</nuitonI18nVersion>
+ <nuitonMatrixVersion>2.4-SNAPSHOT</nuitonMatrixVersion>
+ <struts.version>2.3.8</struts.version>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>nuiton-public</id>
+ <url>http://nexus.nuiton.org/nexus/content/groups/public</url>
+ </repository>
+ </repositories>
+
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
@@ -45,128 +102,75 @@
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
<groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
<artifactId>commons-math</artifactId>
<version>2.2</version>
- <scope>compile</scope>
</dependency>
<dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.8.3</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.4</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.2</version>
- <scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</artifactId>
- <version>4.2.3</version>
- <scope>compile</scope>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <version>3.0-rc-2</version>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.2.3</version>
- <scope>compile</scope>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-config</artifactId>
+ <version>3.0-alpha-2</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- <version>4.2.3</version>
- <scope>compile</scope>
- </dependency>
<dependency>
<groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
- <version>2.6.6</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.nuiton</groupId>
<artifactId>nuiton-validator</artifactId>
- <version>2.6.6</version>
- <scope>compile</scope>
+ <version>3.0-rc-1</version>
</dependency>
<dependency>
<groupId>org.nuiton.matrix</groupId>
<artifactId>nuiton-matrix</artifactId>
- <version>2.3.2</version>
- <scope>compile</scope>
+ <version>${nuitonMatrixVersion}</version>
</dependency>
<dependency>
<groupId>org.nuiton.matrix</groupId>
<artifactId>nuiton-matrix-gui</artifactId>
- <version>2.3.2</version>
- <scope>compile</scope>
+ <version>${nuitonMatrixVersion}</version>
</dependency>
<dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
- <version>${i18n.version}</version>
- <scope>compile</scope>
+ <version>${nuitonI18nVersion}</version>
</dependency>
<dependency>
<groupId>org.nuiton.jaxx</groupId>
<artifactId>jaxx-runtime</artifactId>
- <version>${jaxx.version}</version>
- <scope>compile</scope>
+ <version>${jaxxVersion}</version>
</dependency>
<dependency>
<groupId>org.nuiton.jaxx</groupId>
<artifactId>jaxx-validator</artifactId>
- <version>${jaxx.version}</version>
- <scope>compile</scope>
+ <version>${jaxxVersion}</version>
</dependency>
-
+
<dependency>
<groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-widgets-extra</artifactId>
+ <version>${jaxxVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
<artifactId>jaxx-widgets</artifactId>
- <version>${jaxx.version}</version>
+ <version>${jaxxVersion}</version>
<scope>runtime</scope>
</dependency>
@@ -174,21 +178,18 @@
<groupId>org.swinglabs.swingx</groupId>
<artifactId>swingx-core</artifactId>
<version>1.6.4</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.14</version>
- <scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
@@ -201,17 +202,9 @@
<groupId>org.jfree</groupId>
<artifactId>jcommon</artifactId>
<version>1.0.17</version>
- <scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-widgets</artifactId>
- <version>1.1.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
<groupId>com.fifesoft</groupId>
<artifactId>rsyntaxtextarea</artifactId>
<version>2.0.2</version>
@@ -222,42 +215,36 @@
<groupId>com.bbn</groupId>
<artifactId>openmap</artifactId>
<version>5.0</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>jxlayer</artifactId>
<version>3.0.4</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts.version}</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts.version}</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${struts.version}</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>${struts.version}</version>
- <scope>compile</scope>
</dependency>
<dependency>
@@ -278,106 +265,40 @@
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.3.4</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.0.1</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.19</version>
- <scope>compile</scope>
</dependency>
</dependencies>
</dependencyManagement>
- <name>Coser</name>
- <description>Contrôle et Sélection RSufi</description>
- <inceptionYear>2010</inceptionYear>
- <url>http://maven-site.forge.codelutin.com/coser</url>
-
- <organization>
- <name>Ifremer</name>
- <url>http://www.ifremer.fr/</url>
- </organization>
-
- <developers>
- <developer>
- <id>echatellier</id>
- <name>Eric Chatellier</name>
- <email>chatellier(a)codelutin.com</email>
- <organization>CodeLutin</organization>
- <roles>
- <role>Développeur</role>
- </roles>
- <timezone>Europe/Paris</timezone>
- </developer>
- <developer>
- <id>tchemit</id>
- <name>Tony Chemit</name>
- <email>chemit(a)codelutin.com</email>
- <organization>CodeLutin</organization>
- <roles>
- <role>Développeur</role>
- </roles>
- <timezone>Europe/Paris</timezone>
- </developer>
- </developers>
-
- <licenses>
- <license>
- <name>GNU Lesser General Public License</name>
- <url>http://www.gnu.org/licenses/lgpl.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <properties>
- <projectId>coser</projectId>
- <platform>forge.codelutin.com</platform>
-
- <license.licenseName>lgpl_v3</license.licenseName>
- <license.organizationName>Ifremer, Codelutin</license.organizationName>
-
- <!-- Versions -->
- <jaxx.version>2.5.9</jaxx.version>
- <i18n.version>2.5</i18n.version>
- <struts.version>2.3.16</struts.version>
- </properties>
-
- <scm>
- <connection>scm:svn:http://svn.forge.codelutin.com/svn/coser/trunk</connection>
- <developerConnection>scm:svn:http://svn.forge.codelutin.com/svn/coser/trunk</developerConnection>
- <url>http://forge.codelutin.com/repositories/browse/coser/trunk</url>
- </scm>
-
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.nuiton.jaxx</groupId>
<artifactId>jaxx-maven-plugin</artifactId>
- <version>${jaxx.version}</version>
+ <version>${jaxxVersion}</version>
</plugin>
<plugin>
<groupId>org.nuiton.i18n</groupId>
<artifactId>i18n-maven-plugin</artifactId>
- <version>${i18n.version}</version>
- <configuration>
- <strictMode>true</strictMode>
- </configuration>
+ <version>${nuitonI18nVersion}</version>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <version>8.1.8.v20121106</version>
+ <version>${jettyPluginVersion}</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
@@ -403,11 +324,5 @@
</plugins>
</pluginManagement>
</build>
-
- <repositories>
- <repository>
- <id>nuiton-public</id>
- <url>http://nexus.nuiton.org/nexus/content/groups/public</url>
- </repository>
- </repositories>
+
</project>
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/src/site/site_en.xml 2014-02-24 15:14:55 UTC (rev 1124)
@@ -29,7 +29,7 @@
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
- <version>1.2.2</version>
+ <version>${fluidoSkinVersion}</version>
</skin>
<publishDate format="MM-dd-yyyy" position="right"/>
@@ -51,6 +51,15 @@
<body>
+ <head>
+ <script type="text/javascript"
+ src="${mavenpomSiteCommonResourcesUrl}/js/mavenpom-site.js">
+ </script>
+
+ <link rel="stylesheet" type="text/css"
+ href="${mavenpomSiteCommonResourcesUrl}/css/mavenpom-site.css"/>
+ </head>
+
<breadcrumbs>
<item name="${project.name}" href="${project.url}" />
</breadcrumbs>
@@ -85,6 +94,21 @@
<menu ref="reports"/>
+ <footer>
+
+ <div id='projectMetas' locale='en'
+ projectversion='${project.version}'
+ platform='${project.platform}'
+ projectid='${project.projectId}'
+ scm='${project.scm.developerConnection}'
+ scmwebeditorenabled='${project.scmwebeditorEnabled}'
+ scmwebeditorurl='${project.scmwebeditorUrl}'
+ siteSourcesType='${project.siteSourcesType}'
+ piwikEnabled='${project.piwikEnabled}'
+ piwikId='${project.piwikId}'
+ scmwebeditor_skipDefaultFiles="true">
+ </div>
+ </footer>
</body>
</project>
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2013-12-12 09:25:56 UTC (rev 1123)
+++ trunk/src/site/site_fr.xml 2014-02-24 15:14:55 UTC (rev 1124)
@@ -29,7 +29,7 @@
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
- <version>1.2.2</version>
+ <version>${fluidoSkinVersion}</version>
</skin>
<publishDate format="dd/MM/yyyy" position="right"/>
@@ -51,6 +51,15 @@
<body>
+ <head>
+ <script type="text/javascript"
+ src="${mavenpomSiteCommonResourcesUrl}/js/mavenpom-site.js">
+ </script>
+
+ <link rel="stylesheet" type="text/css"
+ href="${mavenpomSiteCommonResourcesUrl}/css/mavenpom-site.css"/>
+ </head>
+
<breadcrumbs>
<item name="${project.name}" href="${project.url}" />
</breadcrumbs>
@@ -86,6 +95,21 @@
<menu ref="reports"/>
+ <footer>
+
+ <div id='projectMetas' locale='fr'
+ projectversion='${project.version}'
+ platform='${project.platform}'
+ projectid='${project.projectId}'
+ scm='${project.scm.developerConnection}'
+ scmwebeditorenabled='${project.scmwebeditorEnabled}'
+ scmwebeditorurl='${project.scmwebeditorUrl}'
+ siteSourcesType='${project.siteSourcesType}'
+ piwikEnabled='${project.piwikEnabled}'
+ piwikId='${project.piwikId}'
+ scmwebeditor_skipDefaultFiles="true">
+ </div>
+ </footer>
</body>
</project>
1
0