From: mka Date: Thu, 14 Mar 2013 12:03:08 +0000 (+0000) Subject: Studies comparison functionality is implemented. X-Git-Tag: Root_Delivery2_2013_04_22~98 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c82921352d947bc2c4c281d7c9adbe94258cbf7;p=tools%2Fsiman.git Studies comparison functionality is implemented. --- diff --git a/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java index 29986c0..2c13f06 100644 --- a/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/PublicationServiceImpl.java @@ -756,9 +756,10 @@ public class PublicationServiceImpl implements PublicationService { if(pub == null) { throw new InvalidParameterException("id", String.valueOf(publicationId)); } - //res.setPathToFile(_documentService.getSaveDirectory(pub.value()).getAbsolutePath()); + + res.setDocumentTitle(pub.value().getTitle()); res.setPathToFile(pub.value().getFile().asFile().getAbsolutePath()); - res.setScenarioTitle(pub.getOwner().getTitle()); //!!!!! + res.setScenarioTitle(pub.getOwner().getTitle()); res.setStudyTitle(pub.getOwnerStudy().getTitle()); return res; } diff --git a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java index 7fd574b..a34f6d5 100644 --- a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java @@ -51,12 +51,12 @@ import org.splat.dal.bo.som.Publication; import org.splat.dal.bo.som.Scenario; import org.splat.dal.bo.som.SimulationContext; import org.splat.dal.bo.som.Study; +import org.splat.dal.bo.som.Study.Properties; import org.splat.dal.bo.som.ValidationCycle; +import org.splat.dal.bo.som.ValidationCycle.Actor; import org.splat.dal.bo.som.ValidationCycleRelation; import org.splat.dal.bo.som.ValidationStep; import org.splat.dal.bo.som.Visibility; -import org.splat.dal.bo.som.Study.Properties; -import org.splat.dal.bo.som.ValidationCycle.Actor; import org.splat.dal.dao.som.DescriptionAttributeDAO; import org.splat.dal.dao.som.DocumentDAO; import org.splat.dal.dao.som.IDBuilderDAO; @@ -76,9 +76,9 @@ import org.splat.service.dto.DocumentDTO; import org.splat.service.dto.StudyFacadeDTO; import org.splat.service.technical.IndexService; import org.splat.service.technical.ProjectSettingsService; +import org.splat.service.technical.ProjectSettingsService.Step; import org.splat.service.technical.ProjectSettingsServiceImpl; import org.splat.service.technical.RepositoryService; -import org.splat.service.technical.ProjectSettingsService.Step; import org.splat.som.Revision; import org.springframework.transaction.annotation.Transactional; @@ -1201,7 +1201,7 @@ public class StudyServiceImpl implements StudyService { resultPath = pathToFile.substring(0, pathToFile.indexOf("vault")) + "downloads" + File.separator + userName + File.separator + "ComparisonResult.pdf"; - XYSeries series = new XYSeries("Study: " + docDTO.getStudyTitle() + " Scenario: " + docDTO.getScenarioTitle()); + XYSeries series = new XYSeries("Study: " + docDTO.getStudyTitle() + " Scenario: " + docDTO.getScenarioTitle() + "Document: " + docDTO.getDocumentTitle()); //read the file and get points information. try { diff --git a/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java b/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java index 2925ece..69e3074 100644 --- a/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java +++ b/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java @@ -25,6 +25,10 @@ public class DocToCompareDTO { * Scenario title. */ private String _scenarioTitle; + /** + * Document title. + */ + private String _documentTitle; /** * Path to comparable file in vault. */ @@ -59,6 +63,20 @@ public class DocToCompareDTO { public void setScenarioTitle(final String scenarioTitle) { _scenarioTitle = scenarioTitle; } + /** + * Get the documentTitle. + * @return the documentTitle + */ + public String getDocumentTitle() { + return _documentTitle; + } + /** + * Set the documentTitle. + * @param documentTitle the documentTitle to set + */ + public void setDocumentTitle(final String documentTitle) { + _documentTitle = documentTitle; + } /** * Get the pathToFile. * @return the pathToFile