| Data formats #16970/HEAD / v10 |
Tags:
not added yet
CSV Data FilesOMS can use data in CSV format for tabular input and output. There are some assumptions about the structure of an OMS CSV file in order to use it for data reading/writing.
TablesA table is stored as an ASCII file using the CSV standard. The file has the extension .csv. The content is stored as comma separated values. Tables may have comment lines, which start with the pound symbol # in the first column. Empty lines are allowed anywere in a table and get ignored. Tables consists of columns and rows, and optional table meta data. Columns may have a type and optional meta data. Meta data is organized as pair key, value.A table requires two key words, @table and @header. The @table keyword tags the start of a table definition, the @header tag starts a column definition. Both tags are case insensitive. Tables can be generated using any text editor. Spreadsheet tools usually do allow the export into a CSV file. Example @Table,Example DataSet Created,5/11/06 Author,OlafDavidA @Header,time,b,c Type,Date,Real,Real Format,yyyy-MM-dd,#0000.00,#000.0000 ,2006-05-12,0000.00,001.1000 ,2006-05-13,0001.00,002.1000 ,2006-05-14,0002.00,003.1000 ,2006-05-15,0003.00,004.1000 ,2006-05-16,0004.00,005.1000 ,2006-05-17,0005.00,006.1000 ,2006-05-18,0006.00,007.1000 A CSV file consists of three main sections:
A minimal table with no optional meta data looks like this: @table, example data table @header a, b, c , 1,2,3 , 4,5,6 ... more data
Such a table even looks O.K. when opened in Excel
Data TypesThe are the follwing types available:
Data FormattiingData in each column has to have a Type and may have a Format. If a column has the type date, it is required to have a Format meta data record. The Format information is being used by OMS either to parse the file is used as input, or it was used to write it out. For numerical data the format is optional if the data values can be parsed with no problems (means: no localized formatting)Format Patterns according to Sun's specification must be used:
If a pattern contains a comma, the format string and all data values for this column need to be quoted. CSV References |
Navigation Bar for Object Modeling System
Resources:
DownloadsYou must login to see this link. Register now, if you have no user account yet. OMS API Javadoc ![]() Handbook 3.0 (Draft) OMS License (LGPL 2.1) ![]() New Users: 1. Get an ALM account 2. Join the OMS project Contact Us: Jack CarlsonCoordinator, OMS Laboratory OMS Laboratory ![]() Jack.Carlson@colostate.edu (970) 492-7323 Olaf David ![]() Director, OMS Laboratory odavid (at) colostate.edu (970) 491-8026 |
Hotkeys
|