]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferences.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / preferences / CSVPreferences.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2011 Association for Decentralized Information Management in\r
3  * Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.modeling.preferences;\r
13 \r
14 import org.simantics.history.csv.ExportInterpolation;\r
15 \r
16 /**\r
17  * TODO: duplicate of org.simantics.simulation.export. Reorganize to remove duplication.\r
18  */\r
19 public class CSVPreferences {\r
20 \r
21         public static final String P_NODE                       = "org.simantics.modeling";\r
22 \r
23         // Comma separated value\r
24         public static final String P_CSV_DECIMAL_SEPARATOR      = "csv.decimal.separator";      //$NON-NLS-1$\r
25         public static final String P_CSV_FILE_EXTENSION         = "csv.file.extension";         //$NON-NLS-1$\r
26         public static final String P_CSV_COLUMN_SEPARATOR       = "csv.value.separator";        //$NON-NLS-1$\r
27         public static final String P_CSV_START_TIME             = "csv.start";                   //$NON-NLS-1$\r
28         public static final String P_CSV_TIME_STEP              = "csv.step";                   //$NON-NLS-1$\r
29         \r
30         public static final String P_CSV_RESAMPLE               = "csv.resample";                   //$NON-NLS-1$\r
31         public static final String P_CSV_SAMPLING_MODE          = "csv.sampling.mode";                   //$NON-NLS-1$\r
32 \r
33         public static final String P_CSV_TIME_DIGITS            = "csv.format.time.digits";     //$NON-NLS-1$\r
34         public static final String P_CSV_FLOAT_DIGITS           = "csv.format.float.digits";    //$NON-NLS-1$\r
35         public static final String P_CSV_DOUBLE_DIGITS          = "csv.format.double.digits";   //$NON-NLS-1$\r
36 \r
37         public static final Double DEFAULT_CSV_START_TIME       = 0.0; // seconds\r
38         public static final Double DEFAULT_CSV_TIME_STEP        = 1.0; // seconds\r
39         public static final String DEFAULT_FILE_EXTENSION       = ".txt";\r
40         \r
41         public static final Boolean DEFAULT_CSV_RESAMPLE        = true;\r
42         public static final String DEFAULT_CSV_SAMPLING_MODE    = ExportInterpolation.getDefault().toPreference();\r
43 \r
44         public static final int    DEFAULT_CSV_TIME_DIGITS      = 9; // From MathContext#DEFAULT_DIGITS\r
45         public static final int    DEFAULT_CSV_FLOAT_DIGITS     = 7;\r
46         public static final int    DEFAULT_CSV_DOUBLE_DIGITS    = 15;\r
47 \r
48 }\r