Changeset 549 for ether_megapoli
- Timestamp:
- 09/11/12 16:31:02 (12 years ago)
- Location:
- ether_megapoli/trunk
- Files:
-
- 13 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/domain/interface/com/ether/simulation/Simulation.java
r538 r549 85 85 } 86 86 87 @NotNull 88 public String getDates() 89 { 90 return _dates; 91 } 92 93 public void setDates( @NotNull final String dates ) 94 { 95 _dates = dates; 96 } 97 87 98 private Integer _id; 88 99 … … 107 118 @XmlElement(name = "variable") 108 119 private Set<Variable> _variable; 120 121 @NotNull 122 private String _dates; 109 123 } -
ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/Simulation.hbm.xml
r538 r549 57 57 </set> 58 58 59 <property name="dates"> 60 <column name="dates"/> 61 </property> 62 59 63 </class> 60 64 </hibernate-mapping> -
ether_megapoli/trunk/persistence/implementation/com/ether/dao/simulation/SimulationDAOImpl.java
r547 r549 57 57 values.add( (String) title[1] ); 58 58 values.add( version ); 59 values.add( (String) title[2] ); 59 60 i++; 60 61 modelsList.add( values ); … … 97 98 .add( Projections.property( "simulation.id" ) ) 98 99 .add( Projections.property( "attribute.value" ) ) 100 .add( Projections.property( "simulation.dates" ) ) 99 101 ).addOrder( Order.asc( "simulation.id" ) ); 100 102 } -
ether_megapoli/trunk/persistence/sql/create.sql
r538 r549 45 45 'The default translation of the element' 46 46 /* GO */ 47 48 49 /* ****************************************************************** */50 /* **************** TABLES DE RELATION DE SIMULATION **************** */51 /* ****************************************************************** */52 /* Création des tables via navicat, puis des index et clefs étrangÚres en mode commande, car gros bug via navicat */53 54 /* REL_SIMULATION_DIMENSION */55 CREATE INDEX "ind_rel_simulation_dimension_simulationkey" ON "public"."rel_simulation_dimension" ("simulation_id" );56 CREATE INDEX "ind_rel_simulation_dimension_dimensionkey" ON "public"."rel_simulation_dimension" ("dimension_id" );57 ALTER TABLE rel_simulation_dimension ADD FOREIGN KEY(simulation_id) REFERENCES simulation ON DELETE CASCADE;58 ALTER TABLE rel_simulation_dimension ADD FOREIGN KEY(dimension_id) REFERENCES simulation_dimension ON DELETE CASCADE;59 60 /* REL_SIMULATION_ATTRIBUTE */61 CREATE INDEX "ind_rel_simulation_attribute_simulationkey" ON "public"."rel_simulation_attribute" ("simulation_id" );62 CREATE INDEX "ind_rel_simulation_attribute_attributekey" ON "public"."rel_simulation_attribute" ("attribute_id" );63 ALTER TABLE rel_simulation_attribute ADD FOREIGN KEY(simulation_id) REFERENCES simulation ON DELETE CASCADE;64 ALTER TABLE rel_simulation_attribute ADD FOREIGN KEY(attribute_id) REFERENCES simulation_attribute ON DELETE CASCADE;65 66 /* REL_SIMULATION_VARIABLE */67 CREATE INDEX "ind_rel_simulation_variable_simulationkey" ON "public"."rel_simulation_variable" ("simulation_id" );68 CREATE INDEX "ind_rel_simulation_variable_variablekey" ON "public"."rel_simulation_variable" ("variable_id" );69 ALTER TABLE rel_simulation_variable ADD FOREIGN KEY(simulation_id) REFERENCES simulation ON DELETE CASCADE;70 ALTER TABLE rel_simulation_variable ADD FOREIGN KEY(variable_id) REFERENCES simulation_variable ON DELETE CASCADE; -
ether_megapoli/trunk/persistence/sql/vmipsl_createSimulation.sql
r423 r549 1 CREATE SEQUENCE S_USER 2 /* GO */ 1 -- ---------------------------- 2 -- Table structure for "simulation" 3 -- ---------------------------- 4 DROP TABLE "simulation"; 5 CREATE TABLE "public"."simulation" ( 6 "id" int4 DEFAULT NULL NOT NULL, 7 "location" varchar(1000) DEFAULT NULL, 8 "xmlnsheader" varchar(1000) DEFAULT NULL, 9 CONSTRAINT "simulation_pkey" PRIMARY KEY ("id") 10 ) 11 WITH (OIDS=FALSE); 12 13 ALTER TABLE "public"."simulation" OWNER TO "postgres";; 14 15 -- ---------------------------- 16 -- Table structure for "simulation_attribute" 17 -- ---------------------------- 18 DROP TABLE "simulation_attribute"; 19 CREATE TABLE "public"."simulation_attribute" ( 20 "id" int4 DEFAULT NULL NOT NULL, 21 "name" varchar(100) DEFAULT NULL::character varying, 22 "value" varchar(1000) DEFAULT NULL::character varying, 23 CONSTRAINT "simulation_attribute_copy_pkey" PRIMARY KEY ("id") 24 ) 25 WITH (OIDS=FALSE); 26 27 ALTER TABLE "public"."simulation_attribute" OWNER TO "postgres";; 28 29 -- ---------------------------- 30 -- Table structure for "simulation_dimension" 31 -- ---------------------------- 32 DROP TABLE "simulation_dimension"; 33 CREATE TABLE "public"."simulation_dimension" ( 34 "id" int4 DEFAULT NULL NOT NULL, 35 "name" varchar(100) DEFAULT NULL::character varying NOT NULL, 36 "length" varchar(40) DEFAULT NULL::character varying NOT NULL, 37 "isunlimited" bool DEFAULT NULL, 38 CONSTRAINT "simulation_dimension_copy_pkey" PRIMARY KEY ("id") 39 ) 40 WITH (OIDS=FALSE); 41 42 ALTER TABLE "public"."simulation_dimension" OWNER TO "postgres";; 43 44 -- ---------------------------- 45 -- Table structure for "simulation_variable" 46 -- ---------------------------- 47 DROP TABLE "simulation_variable"; 48 CREATE TABLE "public"."simulation_variable" ( 49 "id" int4 DEFAULT NULL NOT NULL, 50 "name" varchar(40) DEFAULT NULL::character varying NOT NULL, 51 "shape" varchar(100) DEFAULT NULL::character varying, 52 "type" varchar(40) DEFAULT NULL::character varying, 53 "units" varchar(40) DEFAULT NULL::character varying, 54 "long_name" varchar(100) DEFAULT NULL::character varying, 55 CONSTRAINT "simulation_variable_copy_pkey" PRIMARY KEY ("id") 56 ) 57 WITH (OIDS=FALSE); 58 59 ALTER TABLE "public"."simulation_variable" OWNER TO "postgres";; 60 61 -- ---------------------------- 62 -- Table structure for "rel_simulation_attribute" 63 -- ---------------------------- 64 DROP TABLE "rel_simulation_attribute"; 65 CREATE TABLE "public"."rel_simulation_attribute" ( 66 "simulation_id" int4 DEFAULT NULL NOT NULL, 67 "attribute_id" int4 DEFAULT NULL NOT NULL, 68 CONSTRAINT "rel_simulation_attribute_pkey" PRIMARY KEY ("simulation_id", "attribute_id"), 69 CONSTRAINT "rel_simulation_attribute_simulation_id_fkey" FOREIGN KEY ("simulation_id") REFERENCES "public"."simulation" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, 70 CONSTRAINT "rel_simulation_attribute_attribute_id_fkey" FOREIGN KEY ("attribute_id") REFERENCES "public"."simulation_attribute" ("id") ON DELETE CASCADE ON UPDATE NO ACTION 71 ) 72 WITH (OIDS=FALSE); 73 74 ALTER TABLE "public"."rel_simulation_attribute" OWNER TO "postgres"; 75 76 CREATE INDEX "ind_rel_simulation_attribute_attributekey" ON "public"."rel_simulation_attribute" USING btree ("attribute_id"); 77 CREATE INDEX "ind_rel_simulation_attribute_simulationkey" ON "public"."rel_simulation_attribute" USING btree ("simulation_id");; 3 78 4 79 5 /*==============================================================*/ 6 /* Table : USER */ 7 /*==============================================================*/ 8 CREATE TABLE USER ( 9 USER_ID NUMBER(9,0) NOT NULL, 10 LASTNAME NVARCHAR2(100) NOT NULL, 11 FIRSTNAME NVARCHAR2(100), 12 EMAIL NVARCHAR2(100) NOT NULL, 13 PASSWORD NVARCHAR2(40) NOT NULL, 14 ROLE NVARCHAR2(40), 15 CREATION_DATE TIMESTAMP NOT NULL, 16 STATE NVARCHAR2(40) NOT NULL, 17 HAS_ACCESS_TO_BO NUMBER(1,0) DEFAULT 0 NOT NULL 18 CONSTRAINT CKC_HAS_ACCESS_TO_BO_USER CHECK (HAS_ACCESS_TO_BO IN (0,1)), 80 -- ---------------------------- 81 -- Table structure for "rel_simulation_dimension" 82 -- ---------------------------- 83 DROP TABLE "rel_simulation_dimension"; 84 CREATE TABLE "public"."rel_simulation_dimension" ( 85 "simulation_id" int4 DEFAULT NULL, 86 "dimension_id" int4 DEFAULT NULL, 87 CONSTRAINT "rel_simulation_dimension_simulation_id_fkey" FOREIGN KEY ("simulation_id") REFERENCES "public"."simulation" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, 88 CONSTRAINT "rel_simulation_dimension_dimension_id_fkey" FOREIGN KEY ("dimension_id") REFERENCES "public"."simulation_dimension" ("id") ON DELETE CASCADE ON UPDATE NO ACTION 89 ) 90 WITH (OIDS=FALSE); 19 91 20 CONSTRAINT PK_USER PRIMARY KEY (USER_ID) 21 CONSTRAINT AK_USER_EMAIL UNIQUE (EMAIL) 22 ) 23 /* GO */ 92 ALTER TABLE "public"."rel_simulation_dimension" OWNER TO "postgres"; 93 94 CREATE INDEX "ind_rel_simulation_dimension_dimensionkey" ON "public"."rel_simulation_dimension" USING btree ("dimension_id"); 95 CREATE INDEX "ind_rel_simulation_dimension_simulationkey" ON "public"."rel_simulation_dimension" USING btree ("simulation_id");; 24 96 25 97 26 COMMENT ON TABLE USER IS 27 'An user represent a people who can download and export data and eventually access to the backoffice.' 28 /* GO */ 98 -- ---------------------------- 99 -- Table structure for "rel_simulation_variable" 100 -- ---------------------------- 101 DROP TABLE "rel_simulation_variable"; 102 CREATE TABLE "public"."rel_simulation_variable" ( 103 "simulation_id" int4 DEFAULT NULL NOT NULL, 104 "variable_id" int4 DEFAULT NULL NOT NULL, 105 CONSTRAINT "rel_simulation_variable_pkey" PRIMARY KEY ("simulation_id", "variable_id"), 106 CONSTRAINT "rel_simulation_variable_simulation_id_fkey" FOREIGN KEY ("simulation_id") REFERENCES "public"."simulation" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, 107 CONSTRAINT "rel_simulation_variable_variable_id_fkey" FOREIGN KEY ("variable_id") REFERENCES "public"."simulation_variable" ("id") ON DELETE CASCADE ON UPDATE NO ACTION 108 ) 109 WITH (OIDS=FALSE); 29 110 111 ALTER TABLE "public"."rel_simulation_variable" OWNER TO "postgres"; 30 112 31 COMMENT ON COLUMN USER.USER_ID IS 'The identifier of the user' 32 /* GO */ 33 34 COMMENT ON COLUMN USER.LASTNAME IS 'The lastname of the user' 35 /* GO */ 36 37 COMMENT ON COLUMN USER.FIRSTNAME IS 'The firstname of the user' 38 /* GO */ 39 40 COMMENT ON COLUMN USER.EMAIL IS 'The email of the user. It must be unique' 41 /* GO */ 42 43 COMMENT ON COLUMN USER.PASSWORD_CODE IS 'The password of the user. Encoded in SHA-1' 44 /* GO */ 45 46 COMMENT ON COLUMN USER.ROLE IS 'The role of the user. Examples : coordinateur, administrateur, ...' 47 /* GO */ 48 49 COMMENT ON COLUMN USER.CREATION_DATE IS 'The creation date of the user. It never changes even the user state will be modified' 50 /* GO */ 51 52 COMMENT ON COLUMN USER.STATE IS 'The state of the user. Examples : waiting, accepted, refused, ...' 53 /* GO */ 54 55 COMMENT ON COLUMN USER.HAS_ACCESS_TO_BO IS 'Indicates if the user has access to the backoffice' 56 /* GO */ 113 CREATE INDEX "ind_rel_simulation_variable_simulationkey" ON "public"."rel_simulation_variable" USING btree ("simulation_id"); 114 CREATE INDEX "ind_rel_simulation_variable_variablekey" ON "public"."rel_simulation_variable" USING btree ("variable_id");; 57 115 58 116 59 117 118 /* ****************************************************************** */ 119 /* **************** TABLES DE RELATION DE SIMULATION **************** */ 120 /* ****************************************************************** */ 121 /* Création des tables via navicat, puis index et clefs étrangÚres en mode commande, car gros bug via navicat */ 60 122 61 /*==============================================================*/ 62 /* VERSION POSTGRES */ 63 /*==============================================================*/ 64 CREATE TABLE "public"."USER" ( 65 "USER_ID" int4 DEFAULT NULL NOT NULL, 66 "LASTNAME" varchar(100) DEFAULT NULL NOT NULL, 67 "FIRSTNAME" varchar(100) DEFAULT NULL, 68 "EMAIL" varchar(100) DEFAULT NULL NOT NULL, 69 "PASSWORD" varchar(40) DEFAULT NULL NOT NULL, 70 "ROLE" varchar(40) DEFAULT NULL, 71 "CREATION_DATE" timestamp(6) DEFAULT NULL NOT NULL, 72 "STATE" varchar(40) DEFAULT NULL NOT NULL, 73 "HAS_ACCESS_TO_BO" numeric(1) DEFAULT 0 NOT NULL, 74 CONSTRAINT "USER_pkey" PRIMARY KEY ("USER_ID"), 75 CONSTRAINT "AK_USER_EMAIL" UNIQUE ("EMAIL") 76 ) 77 WITH (OIDS=FALSE) 78 ; 123 /* REL_SIMULATION_DIMENSION */ 124 CREATE INDEX "ind_rel_simulation_dimension_simulationkey" ON "public"."rel_simulation_dimension" ("simulation_id" ); 125 CREATE INDEX "ind_rel_simulation_dimension_dimensionkey" ON "public"."rel_simulation_dimension" ("dimension_id" ); 126 ALTER TABLE rel_simulation_dimension ADD FOREIGN KEY(simulation_id) REFERENCES simulation ON DELETE CASCADE; 127 ALTER TABLE rel_simulation_dimension ADD FOREIGN KEY(dimension_id) REFERENCES simulation_dimension ON DELETE CASCADE; 79 128 80 ALTER TABLE "public"."USER" OWNER TO "postgres"; 129 /* REL_SIMULATION_ATTRIBUTE */ 130 CREATE INDEX "ind_rel_simulation_attribute_simulationkey" ON "public"."rel_simulation_attribute" ("simulation_id" ); 131 CREATE INDEX "ind_rel_simulation_attribute_attributekey" ON "public"."rel_simulation_attribute" ("attribute_id" ); 132 ALTER TABLE rel_simulation_attribute ADD FOREIGN KEY(simulation_id) REFERENCES simulation ON DELETE CASCADE; 133 ALTER TABLE rel_simulation_attribute ADD FOREIGN KEY(attribute_id) REFERENCES simulation_attribute ON DELETE CASCADE; 81 134 82 COMMENT ON TABLE "public"."USER" IS 'An user represent a people who can download and export data and eventually access to the backoffice.'; 83 84 COMMENT ON COLUMN "public"."USER"."USER_ID" IS 'The identifier of the user'; 85 86 COMMENT ON COLUMN "public"."USER"."LASTNAME" IS 'The lastname of the user'; 87 88 COMMENT ON COLUMN "public"."USER"."FIRSTNAME" IS 'The firstname of the user'; 89 90 COMMENT ON COLUMN "public"."USER"."EMAIL" IS 'The email of the user. It must be unique'; 91 92 COMMENT ON COLUMN "public"."USER"."PASSWORD" IS 'The password of the user. Encoded in SHA-1'; 93 94 COMMENT ON COLUMN "public"."USER"."ROLE" IS 'The role of the user. Examples : coordinateur, administrateur, ...'; 95 96 COMMENT ON COLUMN "public"."USER"."CREATION_DATE" IS 'The creation date of the user. It never changes even the user state will be modified'; 97 98 COMMENT ON COLUMN "public"."USER"."STATE" IS 'The state of the user. Examples : waiting, accepted, refused, ...'; 99 100 COMMENT ON COLUMN "public"."USER"."HAS_ACCESS_TO_BO" IS 'Indicates if the user has access to the backoffice'; 135 /* REL_SIMULATION_VARIABLE */ 136 CREATE INDEX "ind_rel_simulation_variable_simulationkey" ON "public"."rel_simulation_variable" ("simulation_id" ); 137 CREATE INDEX "ind_rel_simulation_variable_variablekey" ON "public"."rel_simulation_variable" ("variable_id" ); 138 ALTER TABLE rel_simulation_variable ADD FOREIGN KEY(simulation_id) REFERENCES simulation ON DELETE CASCADE; 139 ALTER TABLE rel_simulation_variable ADD FOREIGN KEY(variable_id) REFERENCES simulation_variable ON DELETE CASCADE; -
ether_megapoli/trunk/service/implementation/com/ether/EtherPlotContentServiceImpl.java
r547 r549 258 258 final ResourceBundle bundle = WebHelper.getBundle( locale ); 259 259 260 // final List<Double> parameterValues = (List<Double>) megapoliPlot.getData().getFirstArray(); 261 // final List<Double> latitudeValues = (List<Double>) megapoliPlot.getData().getSecondArray(); 262 // final List<Double> longitudeValues = (List<Double>) megapoliPlot.getData().getThirdArray(); 263 // final double[] parameterValuesArray = EtherHelper.convertListDoubleToDoubleArray( parameterValues ); 264 // final double[] latitudeValuesArray = EtherHelper.convertListDoubleToDoubleArray( latitudeValues ); 265 // final double[] longitudeValuesArray = EtherHelper.convertListDoubleToDoubleArray( longitudeValues ); 266 267 final double[] parameterValuesArray = _etherService.extractValuesByModelByVariableFromFile( megapoliPlot.getModelId(), megapoliPlot.getVariableName(), true ); 268 final double[] latitudeValuesArray = _etherService.extractValuesByModelByVariableFromFile( megapoliPlot.getModelId(), "lat", true ); 269 final double[] longitudeValuesArray = _etherService.extractValuesByModelByVariableFromFile( megapoliPlot.getModelId(), "lon", true ); 260 final double[] parameterValuesArray = (double[]) megapoliPlot.getData().getFirstArray(); 261 final double[] latitudeValuesArray = (double[]) megapoliPlot.getData().getSecondArray(); 262 final double[] longitudeValuesArray = (double[]) megapoliPlot.getData().getThirdArray(); 270 263 271 264 // Create the grid … … 279 272 280 273 // Create the contour levels and color map 281 List<Double> parameterValues = EtherHelper.convertArrayDoubleToListDouble( parameterValuesArray );274 final List<Double> parameterValues = EtherHelper.convertArrayDoubleToListDouble( parameterValuesArray ); 282 275 final Double min = Collections.min( parameterValues ); 283 276 final Double max = Collections.max( parameterValues ); -
ether_megapoli/trunk/service/implementation/com/ether/EtherServiceImpl.java
r547 r549 668 668 for( final String fileName : simulationsDirectory.list() ) 669 669 { 670 if( fileName.endsWith( ".nc") )670 if( fileName.endsWith( FORMAT_FILE ) ) 671 671 { 672 672 // Create directory and move simulation file into … … 703 703 704 704 /** 705 * This method insert the header in database 705 * This method insert the header and the dates (variable "Times") in database 706 * The dates are saved in database as a unique String (use to split when we need to have the real values) 706 707 * The new variables are separatly created in the table .... 707 708 * The metadata are saved in the table .... … … 724 725 final Simulation simulation = (Simulation) uMarshaller.unmarshal( new File( fileName ) ); 725 726 727 // Extract dates for the simulation 728 final Runtime runtime = Runtime.getRuntime(); 729 final String[] argsNcdump = {"/bin/sh", "-c", "ncdump -v Times " + simulationPath + File.separatorChar + directoryName + File.separatorChar + directoryName + FORMAT_FILE + " | sed -e '1,/data:/d' -e '1,/Times/d' -e '$d'"}; 730 final Process exec = runtime.exec( argsNcdump ); 731 732 final BufferedReader bufferedReader = new BufferedReader( new InputStreamReader( exec.getInputStream() ) ); 733 final StringBuffer stringBuffer = new StringBuffer(); 734 String line; 735 while( ( line = bufferedReader.readLine() ) != null ) 736 stringBuffer.append( line ); 737 738 final String dates = stringBuffer.toString().replaceAll( "\"", "" ).replaceAll( " ", "" ).replaceAll( ";", "" ); 739 simulation.setDates( dates ); 740 726 741 final Integer simulationId = insertSimulation( simulation ); 727 742 } … … 733 748 { 734 749 throw new ServiceException( ServiceException.ServiceCode.ERROR_JAXB, e ); 750 } 751 catch( IOException e ) 752 { 753 throw new ServiceException( ServiceException.ServiceCode.ERROR_PROCESS_SIMULATION_NCDUMP, e ); 735 754 } 736 755 } … … 1133 1152 1134 1153 private static String FILE_HEADER_NAME = "header.xml"; 1154 private static String FORMAT_FILE = ".nc"; 1135 1155 1136 1156 private PlateformDAO _plateformDAO; -
ether_megapoli/trunk/service/implementation/com/ether/SimulationPlot.java
r547 r549 2 2 3 3 import org.jetbrains.annotations.NotNull; 4 import org.jetbrains.annotations.Nullable; 4 5 5 6 /** … … 43 44 } 44 45 46 @Nullable 47 public Data getData() 48 { 49 return _data; 50 } 51 52 public void setData( @Nullable final Data data ) 53 { 54 _data = data; 55 } 56 45 57 @NotNull 46 58 private Integer _modelId; 47 48 59 @NotNull 49 60 private Integer _variableId; 50 61 @NotNull 51 62 private String _variableName; 63 @Nullable 64 private Data _data; 52 65 } -
ether_megapoli/trunk/web/src/ApplicationResources.properties
r545 r549 539 539 simulation.selectVariable=Variables 540 540 simulation.noVariable=Pas de variable 541 simulation.level=Niveau 541 542 542 543 ################################################################ -
ether_megapoli/trunk/web/src/ApplicationResources_en.properties
r545 r549 540 540 simulation.selectVariable=Variables 541 541 simulation.noVariable=No variable 542 542 simulation.level=Level 543 543 544 544 ################################################################ -
ether_megapoli/trunk/web/src/com/ether/ControllerSimulation.java
r545 r549 78 78 jsonModel.put( "name", model.get( 1 ) ); 79 79 jsonModel.put( "version", model.get( 2 ) ); 80 jsonModel.put( "dates", model.get( 3 ).split( "," ) ); 80 81 jsonArray.add( jsonModel ); 81 82 } -
ether_megapoli/trunk/web/src/com/ether/ControllerSimulationPlot.java
r547 r549 92 92 megapoliPlot.setBeginDate( formatedDateBegin ); 93 93 megapoliPlot.setEndDate( formatedDateEnd ); 94 // TODO : calculer le nombre de valeurs 95 megapoliPlot.setValuesNumber( 10 ); 94 95 final double[] parameterValuesArray = _etherService.extractValuesByModelByVariableFromFile( megapoliPlot.getModelId(), megapoliPlot.getVariableName(), false ); 96 final double[] latitudeValuesArray = _etherService.extractValuesByModelByVariableFromFile( megapoliPlot.getModelId(), "lat", false ); 97 final double[] longitudeValuesArray = _etherService.extractValuesByModelByVariableFromFile( megapoliPlot.getModelId(), "lon", false ); 98 99 final Data valuesLists = new Data( parameterValuesArray, latitudeValuesArray, longitudeValuesArray ); 100 megapoliPlot.setData( valuesLists ); 101 megapoliPlot.setValuesNumber( parameterValuesArray.length ); 96 102 97 103 final BufferedImage bufferedImage = _etherPlotService.createMainPane( megapoliPlot, Context.getLocale( request ) ); 98 104 ImageIO.write( bufferedImage, "png", response.getOutputStream() ); 99 105 } 100 // catch( ServiceException se )101 // {102 // try103 // {104 // if( !flagException )105 // createErrorPane( response, request, se.getLocalizedMessage(), se );106 // }107 // catch( Exception e2 )108 // {109 // throw new ServletException( "Error : no possibity to write image in response", e2 );110 // }111 // }112 106 catch( Exception e1 ) 113 107 { -
ether_megapoli/trunk/web/visualization/visu_simulation-script.jsp
r547 r549 16 16 this.containerVariables = $( "#containerVariables" ); 17 17 this.containerButtons = $( "#containerButtons" ); 18 this.containerOptionCalendar = $( "#containerOptionCalendarSimulation" ); 18 this.containerOptionDates = $( "#containerOptionDates" ); 19 // this.containerOptionCalendar = $( "#containerOptionCalendarSimulation" ); 19 20 20 21 /** *********** LOADING *********** **/ … … 36 37 createOptions: function() 37 38 { 39 this.visualizeButton = new Button( {value:interfaceTexts["simulation.button.visualize"], parent:this.containerButtons, id:"button_visualize", onClick:jQuery.proxy( this.onClickVisualize, this )} ); 40 this.visualizeButton.disable(); 41 }, 42 43 createCalendar: function() 44 { 38 45 // Calendar 39 46 this.calendarFormat = "%Y-%m-%d %H:%i"; … … 54 61 55 62 this.clearCalendarButton = new Button( {value:interfaceTexts["simulation.button.clear"], parent:this.containerOptionCalendar, id:"button_clear_calendar_simulation", className:"small", onClick:jQuery.proxy( this.onClickClear, this )} ); 56 57 this.createButtons(); 58 }, 59 60 createButtons: function() 61 { 62 this.visualizeButton = new Button( {value:interfaceTexts["simulation.button.visualize"], parent:this.containerButtons, id:"button_visualize", onClick:jQuery.proxy( this.onClickVisualize, this )} ); 63 this.visualizeButton.disable(); 63 }, 64 65 createSelectDates: function() 66 { 67 if( !this.selectedModel ) 68 return; 69 70 this.containerOptionDates.empty(); 71 72 var paramSelect = new Object(); 73 paramSelect.parent = this.containerOptionDates; 74 this.selectDates = new Select( paramSelect ); 75 jQuery.each( this.selectedModel.jsonElement.dates, jQuery.proxy( function ( i, date ) 76 { 77 this.selectDates.add( date, date ); 78 }, this ) ); 79 this.selectDates.selectFirst( false ); 64 80 }, 65 81 … … 125 141 this.selectedVariable = false; 126 142 143 this.createSelectDates(); 127 144 this.requestVariablesByModel(); 128 145 this.testAllFields(); -
ether_megapoli/trunk/web/visualization/visu_simulation.jsp
r546 r549 20 20 <ether:htmlJsp jspFile="visu_simulation-script"/> 21 21 <ether:htmlJs jsFile="classesForJQuery/Loading"/> 22 <ether:htmlJs jsFile="classesForJQuery/Select"/> 22 23 <ether:htmlJs jsFile="calendar/anytime"/> 23 24 <ether:htmlJs jsFile="jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min"/> … … 50 51 51 52 <div id="generalContainerOptions" class="span-9 last"> 52 <div id="containerOptionCalendarSimulation"> 53 <div id="messages" class="messagesHeight"><bean:message key="visualization.selectPeriod"/></div> 54 <bean:message key="data.access.loc.inter"/> <input type="text" id="beginDate" size="15"/> 55 <bean:message key="data.access.loc.inter2"/> <input type="text" id="endDate" size="15"/> 56 </div> 53 <div id="messages" class="messagesHeight"><bean:message key="simulation.selectDate"/></div> 54 <div id="containerOptionDates"></div> 55 <BR/> 56 57 <div id="messages" class="messagesHeight"><bean:message key="simulation.level"/></div> 58 <div id="containerOptionDates"></div> 59 <BR/> 60 61 <%--<div id="containerOptionCalendarSimulation">--%> 62 <%--<div id="messages" class="messagesHeight"><bean:message key="visualization.selectPeriod"/></div>--%> 63 <%--<bean:message key="data.access.loc.inter"/> <input type="text" id="beginDate" size="15"/>--%> 64 <%--<bean:message key="data.access.loc.inter2"/> <input type="text" id="endDate" size="15"/>--%> 65 <%--</div>--%> 57 66 58 67 <div id="containerOptionTitle"> … … 78 87 interfaceTexts["simulation.button.clear"] = "<bean:message key="visualization.button.clear"/>"; 79 88 interfaceTexts["simulation.button.visualize"] = '<bean:message key="visualization.button.visualize"/>'; 89 interfaceTexts["simulation.quicklook"] = "<bean:message key="visualization.quicklook"/>"; 80 90 81 91 new InterfaceSimulation( ${simulations} );
Note: See TracChangeset
for help on using the changeset viewer.