]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - 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
diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferences.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/preferences/CSVPreferences.java
new file mode 100644 (file)
index 0000000..cecbb7b
--- /dev/null
@@ -0,0 +1,48 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2011 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.modeling.preferences;\r
+\r
+import org.simantics.history.csv.ExportInterpolation;\r
+\r
+/**\r
+ * TODO: duplicate of org.simantics.simulation.export. Reorganize to remove duplication.\r
+ */\r
+public class CSVPreferences {\r
+\r
+       public static final String P_NODE                       = "org.simantics.modeling";\r
+\r
+       // Comma separated value\r
+       public static final String P_CSV_DECIMAL_SEPARATOR      = "csv.decimal.separator";      //$NON-NLS-1$\r
+       public static final String P_CSV_FILE_EXTENSION         = "csv.file.extension";         //$NON-NLS-1$\r
+       public static final String P_CSV_COLUMN_SEPARATOR       = "csv.value.separator";        //$NON-NLS-1$\r
+       public static final String P_CSV_START_TIME             = "csv.start";                   //$NON-NLS-1$\r
+       public static final String P_CSV_TIME_STEP              = "csv.step";                   //$NON-NLS-1$\r
+       \r
+       public static final String P_CSV_RESAMPLE               = "csv.resample";                   //$NON-NLS-1$\r
+       public static final String P_CSV_SAMPLING_MODE          = "csv.sampling.mode";                   //$NON-NLS-1$\r
+\r
+       public static final String P_CSV_TIME_DIGITS            = "csv.format.time.digits";     //$NON-NLS-1$\r
+       public static final String P_CSV_FLOAT_DIGITS           = "csv.format.float.digits";    //$NON-NLS-1$\r
+       public static final String P_CSV_DOUBLE_DIGITS          = "csv.format.double.digits";   //$NON-NLS-1$\r
+\r
+       public static final Double DEFAULT_CSV_START_TIME       = 0.0; // seconds\r
+       public static final Double DEFAULT_CSV_TIME_STEP        = 1.0; // seconds\r
+       public static final String DEFAULT_FILE_EXTENSION       = ".txt";\r
+       \r
+       public static final Boolean DEFAULT_CSV_RESAMPLE        = true;\r
+       public static final String DEFAULT_CSV_SAMPLING_MODE    = ExportInterpolation.getDefault().toPreference();\r
+\r
+       public static final int    DEFAULT_CSV_TIME_DIGITS      = 9; // From MathContext#DEFAULT_DIGITS\r
+       public static final int    DEFAULT_CSV_FLOAT_DIGITS     = 7;\r
+       public static final int    DEFAULT_CSV_DOUBLE_DIGITS    = 15;\r
+\r
+}\r