|
OMS (v3.0.25) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oms3.io.DataIO
public class DataIO
Data Input/Output management.
Field Summary | |
---|---|
static java.lang.String |
CSPROPERTIES_EXT
|
static java.lang.String |
CSTABLE_EXT
|
static java.lang.String |
DATE_END
|
static java.lang.String |
DATE_FORMAT
|
static java.lang.String |
DATE_START
|
static java.lang.String |
HEADER
|
static java.lang.String |
HEADER1
|
static java.lang.String |
KEY_CONVERTED_FROM
|
static java.lang.String |
KEY_CREATED_AT
|
static java.lang.String |
KEY_CREATED_BY
|
static java.lang.String |
KEY_DIGEST
|
static java.lang.String |
KEY_FC_DAYS
|
static java.lang.String |
KEY_FC_START
|
static java.lang.String |
KEY_FORMAT
|
static java.lang.String |
KEY_HIST_YEAR
|
static java.lang.String |
KEY_MISSING_VAL
|
static java.lang.String |
KEY_NAME
|
static java.lang.String |
KEY_TYPE
|
static java.lang.String |
KEY_UNIT
|
static java.lang.String |
PROPERTIES
|
static java.lang.String |
PROPERTIES1
|
static java.lang.String |
PROPERTY
|
static java.lang.String |
PROPERTY1
|
static java.lang.String |
TABLE
|
static java.lang.String |
TABLE1
|
static java.lang.String |
VAL_DATE
|
Constructor Summary | |
---|---|
DataIO()
|
Method Summary | |
---|---|
static javax.swing.table.TableModel |
createTableModel(CSTable src)
Create a r/o data tablemodel |
static void |
dispose(java.util.Iterator i)
|
static int |
findColumnByName(CSTable t,
java.lang.String columnName)
|
static int |
findRowByDate(java.util.Date date,
int dateColumn,
CSTable table)
|
static javax.swing.table.TableModel |
fromCSP(CSProperties p,
int dim)
Returns a r/o table from a CSP file |
static javax.swing.table.AbstractTableModel |
get2DBounded(CSProperties p,
java.lang.String pname)
|
static javax.swing.table.AbstractTableModel |
getBoundProperties(CSProperties p,
java.lang.String boundName)
|
static java.util.Date[] |
getColumnDateValues(CSTable t,
java.lang.String columnName)
|
static java.lang.Double[] |
getColumnDoubleValues(CSTable t,
java.lang.String columnName)
Get a column as an int array. |
static double[] |
getColumnDoubleValuesInterval(java.util.Date start,
java.util.Date end,
CSTable t,
java.lang.String columnName)
|
static java.util.Date |
getDate(CSProperties p,
java.lang.String key)
Get a value as date. |
static int |
getInt(CSProperties p,
java.lang.String key)
Get a value as int. |
static javax.swing.table.AbstractTableModel |
getProperties(CSProperties p)
Get the KVP as table. |
static javax.swing.table.AbstractTableModel |
getUnBoundProperties(CSProperties p)
|
static boolean |
isBound(CSProperties p,
java.lang.String key,
int dim)
|
static java.util.List<java.lang.String> |
keysByMeta(CSProperties csp,
java.lang.String mkey,
java.lang.String mval)
|
static java.util.List<java.lang.String> |
keysByNotMeta(CSProperties csp,
java.lang.String mkey)
|
static java.util.List<java.lang.String> |
keysForBounds(CSProperties csp,
int boundCount)
|
static java.text.SimpleDateFormat |
lookupDateFormat(CSTable table,
int col)
|
static void |
merge(CSProperties base,
CSProperties overlay)
Merges two Properties, respects permissions |
static boolean |
playsRole(CSProperties p,
java.lang.String key,
java.lang.String role)
|
static void |
print(CSProperties props,
java.io.PrintWriter out)
Print CSProperties. |
static void |
print(CSTable table,
java.io.File f)
|
static void |
print(CSTable table,
java.io.PrintWriter out)
Print a CSTable |
static void |
print(java.util.Map<java.lang.String,java.lang.Object> props,
java.lang.String header,
java.io.PrintWriter out)
|
static CSProperties |
properties()
Create Empty properties |
static java.util.Properties |
properties(CSProperties p)
Convert CSProperties into Properties |
static CSProperties |
properties(java.util.Map<java.lang.String,java.lang.Object> p)
|
static CSProperties |
properties(java.util.Properties p)
Convert Properties to CSProperties |
static CSProperties |
properties(java.io.Reader[] r,
java.lang.String name)
Create a CSProperty from an array of reader. |
static CSProperties |
properties(java.io.Reader r,
java.lang.String name)
Parse properties from a reader |
static void |
save(CSProperties csp,
java.io.File f,
java.lang.String title)
|
static int[] |
sliceByTime(CSTable table,
int timeCol,
java.util.Date start,
java.util.Date end)
Get a slice of rows out of the table matching the time window |
static CSTable |
synthESPInput(CSTable table,
java.util.Date iniStart,
java.util.Date iniEnd,
int fcDays,
int year)
|
static CSTable |
table(java.io.File r,
java.lang.String name)
Parse a table from a fiven File |
static java.lang.String |
toArrayString(java.lang.String[] arr)
Create array string. |
static java.lang.String |
toArrayString(java.lang.String[][] arr)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TABLE
public static final java.lang.String HEADER
public static final java.lang.String PROPERTIES
public static final java.lang.String PROPERTY
public static final java.lang.String TABLE1
public static final java.lang.String HEADER1
public static final java.lang.String PROPERTIES1
public static final java.lang.String PROPERTY1
public static final java.lang.String CSPROPERTIES_EXT
public static final java.lang.String CSTABLE_EXT
public static final java.lang.String KEY_CONVERTED_FROM
public static final java.lang.String DATE_FORMAT
public static final java.lang.String DATE_START
public static final java.lang.String DATE_END
public static final java.lang.String KEY_CREATED_AT
public static final java.lang.String KEY_CREATED_BY
public static final java.lang.String KEY_UNIT
public static final java.lang.String KEY_FORMAT
public static final java.lang.String KEY_TYPE
public static final java.lang.String KEY_NAME
public static final java.lang.String KEY_MISSING_VAL
public static final java.lang.String KEY_FC_START
public static final java.lang.String KEY_FC_DAYS
public static final java.lang.String KEY_HIST_YEAR
public static final java.lang.String KEY_DIGEST
public static final java.lang.String VAL_DATE
Constructor Detail |
---|
public DataIO()
Method Detail |
---|
public static double[] getColumnDoubleValuesInterval(java.util.Date start, java.util.Date end, CSTable t, java.lang.String columnName)
public static java.text.SimpleDateFormat lookupDateFormat(CSTable table, int col)
public static int findRowByDate(java.util.Date date, int dateColumn, CSTable table)
public static CSTable synthESPInput(CSTable table, java.util.Date iniStart, java.util.Date iniEnd, int fcDays, int year)
public static int[] sliceByTime(CSTable table, int timeCol, java.util.Date start, java.util.Date end)
table
- timeCol
- start
- end
-
public static javax.swing.table.TableModel createTableModel(CSTable src)
src
-
public static javax.swing.table.AbstractTableModel getProperties(CSProperties p)
p
-
public static javax.swing.table.AbstractTableModel get2DBounded(CSProperties p, java.lang.String pname) throws java.text.ParseException
java.text.ParseException
public static boolean playsRole(CSProperties p, java.lang.String key, java.lang.String role)
public static boolean isBound(CSProperties p, java.lang.String key, int dim)
public static javax.swing.table.AbstractTableModel getBoundProperties(CSProperties p, java.lang.String boundName) throws java.text.ParseException
java.text.ParseException
public static javax.swing.table.AbstractTableModel getUnBoundProperties(CSProperties p) throws java.text.ParseException
java.text.ParseException
public static java.lang.String toArrayString(java.lang.String[] arr)
arr
-
public static java.lang.String toArrayString(java.lang.String[][] arr)
public static javax.swing.table.TableModel fromCSP(CSProperties p, int dim)
p
- dim
-
public static java.util.List<java.lang.String> keysByMeta(CSProperties csp, java.lang.String mkey, java.lang.String mval)
csp
- mkey
- mval
-
public static java.util.List<java.lang.String> keysForBounds(CSProperties csp, int boundCount)
public static java.util.List<java.lang.String> keysByNotMeta(CSProperties csp, java.lang.String mkey)
public static int findColumnByName(CSTable t, java.lang.String columnName)
public static java.util.Date[] getColumnDateValues(CSTable t, java.lang.String columnName)
public static java.lang.Double[] getColumnDoubleValues(CSTable t, java.lang.String columnName)
t
- columnName
-
public static java.util.Date getDate(CSProperties p, java.lang.String key) throws java.text.ParseException
p
- key
-
java.text.ParseException
public static int getInt(CSProperties p, java.lang.String key) throws java.text.ParseException
p
- key
-
java.text.ParseException
public static void save(CSProperties csp, java.io.File f, java.lang.String title)
public static void print(CSProperties props, java.io.PrintWriter out)
props
- the Properties to printout
- the outputwriter to print to.public static void print(java.util.Map<java.lang.String,java.lang.Object> props, java.lang.String header, java.io.PrintWriter out)
public static void print(CSTable table, java.io.File f) throws java.io.IOException
java.io.IOException
public static void print(CSTable table, java.io.PrintWriter out)
table
- out
- public static CSProperties properties(java.io.Reader r, java.lang.String name) throws java.io.IOException
r
- the Readername
- the name of the properties
java.io.IOException
public static CSProperties properties(java.io.Reader[] r, java.lang.String name) throws java.io.IOException
r
- name
-
java.io.IOException
public static void merge(CSProperties base, CSProperties overlay)
base
- overlay
- public static java.util.Properties properties(CSProperties p)
p
-
public static CSProperties properties(java.util.Properties p)
p
-
public static CSProperties properties(java.util.Map<java.lang.String,java.lang.Object> p)
public static CSProperties properties()
public static CSTable table(java.io.File r, java.lang.String name) throws java.io.IOException
r
- name
-
java.io.IOException
public static void dispose(java.util.Iterator i)
|
OMS (v3.0.25) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |