Public Member Functions | |
| Record () | |
| Record (String[] filenames, String filter) throws NoDataException, Beatl2Exception | |
| Record (String[] filenames) throws NoDataException, Beatl2Exception | |
| Record (String filename, String filter) throws NoDataException, Beatl2Exception | |
| Record (String filename) throws Beatl2Exception | |
| void | remove () throws Beatl2Exception |
| int | getNumFields () throws Beatl2Exception |
| int | getFieldIndexFromName (String fieldName) throws Beatl2Exception |
| int | addField (String fieldName, BasicTypeEnum type, int[] dim) throws Beatl2Exception |
| int | addStringField (String fieldName, String str) throws Beatl2Exception |
| void | removeField (int index) throws Beatl2Exception |
| int | attachField (String fieldName, BasicTypeEnum type, int[] dim, DataType fieldData) throws Beatl2Exception |
| DataType | detachField (int index) throws Beatl2Exception |
| String | getFieldName (int index) throws Beatl2Exception |
| BasicTypeEnum | getFieldType (int index) throws Beatl2Exception |
| int[] | getFieldDim (int index) throws Beatl2Exception |
| int | getFieldNumElements (int index) throws Beatl2Exception |
| DataType | getFieldData (int index) throws Beatl2Exception |
| void | setStringDataElement (DataType field_data, int array_index, String str) throws Beatl2Exception |
| void | changeFieldName (int index, String fieldName) throws Beatl2Exception |
| void | appendDataToField (int index, int[] dim, DataType data) throws Beatl2Exception |
| void | appendFieldToFieldByIndex (int index1, Record record2, int index2) throws Beatl2Exception |
| void | appendFieldToFieldByName (String fieldName1, Record record2, String fieldName2) throws Beatl2Exception |
| void | reshapeFieldData (int index, int dimId, int[] dimElementId) throws Beatl2Exception |
| void | filterFieldData (int index, byte[] dimFilter) throws Beatl2Exception |
| void | append (Record record) throws Beatl2Exception |
| void | slice (String dimension, int[] ids) throws Beatl2Exception |
| void | sliceRange (String dimension, int fromId, int toId) throws Beatl2Exception |
| void | exportToFile (String format, String filename) throws Beatl2Exception |
| String | toString () |
| String | dump () |
Static Public Member Functions | |
| static void | findColocatedData (Record record1, Record record2, double timeDistance, double radialDistance, double altitudeDistance) throws NoDataException, Beatl2Exception |
| static Record | importFromFile (String format, String filename) throws Beatl2Exception |
BEAT-II Record class.
BEAT-II records are generic records that can be dynamically changed. Although this type of record was made for BEAT-II its genericity allows for a much wider use. Each BEAT-II record consists of a dynamically growable/shrinkable list of fields.
| Record | ( | ) |
Create a new BEAT-II record.
| Record | ( | String[] | filenames, |
| String | filter | ||
| ) | throws NoDataException, Beatl2Exception |
Ingest multiple files and return a BEAT-II record with the data that matches the ingestion filter.
| filenames | List of filenames of the files that need to be ingested. All files need to be of the same product type. |
| filter | String containing a ',' or ';' separated list of key=value pairs with filter options ('value' may be a space separated list of values). The filter parameter string may be set to either an empty string ("") or null if no filter options are required. |
| NoDataException | If no data was ingested. |
| Beatl2Exception | If an error occurred. |
| Record | ( | String[] | filenames | ) | throws NoDataException, Beatl2Exception |
Ingest multiple files and return a BEAT-II record with the data that matches an empty ingestion filter.
| filenames | List of filenames of the files that need to be ingested. All files need to be of the same product type. |
| NoDataException | If no data was ingested. |
| Beatl2Exception | If an error occurred. |
| Record | ( | String | filename, |
| String | filter | ||
| ) | throws NoDataException, Beatl2Exception |
Ingest a file and return a BEAT-II record with the data that matches the ingestion filter.
| filename | File to be ingested. type. |
| filter | String containing a ',' or ';' separated list of key=value pairs with filter options ('value' may be a space separated list of values). The filter parameter string may be set to either an empty string ("") or NULL if no filter options are required. |
| NoDataException | If no data was ingested. |
| Beatl2Exception | If an error occurred. |
| Record | ( | String | filename | ) | throws Beatl2Exception |
Ingest a file and return a BEAT-II record with the data that matches an empty ingestion filter.
| filename | File to be ingested. |
| Beatl2Exception | If an error occurred. |
| int addField | ( | String | fieldName, |
| BasicTypeEnum | type, | ||
| int[] | dim | ||
| ) | throws Beatl2Exception |
Add a field to an existing BEAT-II record.
| fieldName | The field name. |
| type | Basic data type for the field. |
| dim | Dimensions of the field. |
| Beatl2Exception | If an error occurred. |
| int addStringField | ( | String | fieldName, |
| String | str | ||
| ) | throws Beatl2Exception |
Add a field containing a single String element to an existing BEAT-II record .
| fieldName | The field name. |
| str | String containing the value. |
| Beatl2Exception | If an error occurred. |
| void append | ( | Record | record | ) | throws Beatl2Exception |
Append the data of a BEAT-II record.
| record | The record to append. |
| Beatl2Exception | If an error occurred. |
| void appendDataToField | ( | int | index, |
| int[] | dim, | ||
| DataType | data | ||
| ) | throws Beatl2Exception |
Append data to a record field.
| index | Field index (0 <= index < number of fields). |
| dim | Dimensions of the data to be appended. |
| data | The field data to append to. |
| Beatl2Exception | If an error occurred. |
| void appendFieldToFieldByIndex | ( | int | index1, |
| Record | record2, | ||
| int | index2 | ||
| ) | throws Beatl2Exception |
Append data of one record field to the data block of another a record field.
| index1 | Field index for the current Record (0 <= index < number of fields). |
| record2 | The other record from which to append the field. |
| index2 | The field index for the other Record (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| void appendFieldToFieldByName | ( | String | fieldName1, |
| Record | record2, | ||
| String | fieldName2 | ||
| ) | throws Beatl2Exception |
Append data of one record field to the data block of another a record field.
| fieldName1 | The field name of the current record. |
| record2 | The Record to be appendeother record from which to append the field. |
| fieldName2 | The field name of the Record to be appended. |
| Beatl2Exception | If an error occurred. |
| int attachField | ( | String | fieldName, |
| BasicTypeEnum | type, | ||
| int[] | dim, | ||
| DataType | fieldData | ||
| ) | throws Beatl2Exception |
Add a field to an existing BEAT-II record and provide its field data.
| fieldName | The field name. |
| type | Basic data type for the field. |
| dim | Dimensions of the field. |
| fieldData | The DataType instance containing the data for this field. |
| Beatl2Exception | If an error occurred. |
| void changeFieldName | ( | int | index, |
| String | fieldName | ||
| ) | throws Beatl2Exception |
Change the field name of a BEAT-II record field.
| index | Field index (0 <= index < number of fields). |
| fieldName | The field name. |
| Beatl2Exception | If an error occurred. |
| DataType detachField | ( | int | index | ) | throws Beatl2Exception |
Remove a field from an existing BEAT-II record without removing its field data.
| index | Field index of the field to be detached (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| String dump | ( | ) |
Return a string containing the full contents of this Record.
This function is identical to toString(), but also prints the array data (instead of only the scalar values).
The string returned by this method can get *quite* large, depending on the size of the data arrays involved...
| void exportToFile | ( | String | format, |
| String | filename | ||
| ) | throws Beatl2Exception |
Export the Record into one of the supported export formats to a file.
| format | String value of the name of the export format. |
| filename | Filename of the export file that needs to be created. |
| Beatl2Exception | If an error occurred. |
| void filterFieldData | ( | int | index, |
| byte[] | dimFilter | ||
| ) | throws Beatl2Exception |
Filter field data in the first dimension.
| index | Field index for record (0 <= index < number of fields). |
| dimFilter | An array containing 0 (exclude) and 1 (include) values to indicate which elements should be filtered out. |
| Beatl2Exception | If an error occurred. |
| static void findColocatedData | ( | Record | record1, |
| Record | record2, | ||
| double | timeDistance, | ||
| double | radialDistance, | ||
| double | altitudeDistance | ||
| ) | throws NoDataException, Beatl2Exception [static] |
Find co-located data for two BEAT-II records matching time, geolocation, and/or altitude.
Note that this is nbot an instance method, but a static class method that requires two Record instances as parameters.
| record1 | Instance of a valid BEAT-II record. |
| record2 | Instance of a valid BEAT-II record. |
| timeDistance | Distance in seconds used to match time values of both records. |
| radialDistance | Distance in km used to match latitude and longitude values of both records. |
| altitudeDistance | Distance in km used to match altitude values of both records. |
| NoDataException | If no co-located data was found (both records will be left unmodified). |
| Beatl2Exception | If an error occurred. |
| DataType getFieldData | ( | int | index | ) | throws Beatl2Exception |
Retrieve the field data object of a BEAT-II record field.
| index | Field index (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| int [] getFieldDim | ( | int | index | ) | throws Beatl2Exception |
Retrieve the dimensions of a BEAT-II record field.
| index | Field index (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| int getFieldIndexFromName | ( | String | fieldName | ) | throws Beatl2Exception |
Find the field with the given field name in the record and return the field index. Comparison will be case insensitive.
| fieldName | The field name. |
| Beatl2Exception | If an error occurred. |
| String getFieldName | ( | int | index | ) | throws Beatl2Exception |
Retrieve the field name of a BEAT-II record field.
| index | Field index (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| int getFieldNumElements | ( | int | index | ) | throws Beatl2Exception |
Retrieve the number of elements of a BEAT-II record field.
| index | Field index (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| BasicTypeEnum getFieldType | ( | int | index | ) | throws Beatl2Exception |
Retrieve the basic data type of a BEAT-II record field.
| index | Field index (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| int getNumFields | ( | ) | throws Beatl2Exception |
Get the number of fields of a BEAT-II record.
| Beatl2Exception | If an error occurred. |
| static Record importFromFile | ( | String | format, |
| String | filename | ||
| ) | throws Beatl2Exception [static] |
Factory function for importing a BEAT-II record from a file that was stored in one of the supported import formats.
| format | String value of the name of the import format. |
| filename | Filename of the file from which the record should be imported. |
| Beatl2Exception | If an error occurred. |
| void remove | ( | ) | throws Beatl2Exception |
Closes an open Record. The Record instance will be invalid after calling this method and should no longer be used.
| Beatl2Exception | If an error occurred. |
| void removeField | ( | int | index | ) | throws Beatl2Exception |
Remove a field from an existing BEAT-II record.
| index | Field index of the field to be removed (0 <= index < number of fields). |
| Beatl2Exception | If an error occurred. |
| void reshapeFieldData | ( | int | index, |
| int | dimId, | ||
| int[] | dimElementId | ||
| ) | throws Beatl2Exception |
Rearrange field data in one dimension.
| index | Field index for record (0 <= index < number of fields). |
| dimId | The id of the dimension in which the rearrangement should take place. |
| dimElementId | An array containing the ids in dimension dim_id in the new arrangement (ids may occur more than once and the number of ids may be smaller or larger than the length of dimension dimId). |
| Beatl2Exception | If an error occurred. |
| void setStringDataElement | ( | DataType | field_data, |
| int | array_index, | ||
| String | str | ||
| ) | throws Beatl2Exception |
Store a copy of a string at a given position in the field data.
| field_data | Field data for a field that contains string data. |
| array_index | Index in the flattened array of strings for the field (use 0 if the field is a zero dimensional array). |
| str | The string for which a copy should be stored in the field data. |
| Beatl2Exception | If an error occurred. |
| void slice | ( | String | dimension, |
| int[] | ids | ||
| ) | throws Beatl2Exception |
Shrink a BEAT-II record to a subset of its data.
| dimension | Name of the dimension to which the id array is applicable. Provide NULL for the main dimension. If the dimension is not the main dimension it should be a subdimension of the main dimension (e.g. 'profile' dimension) |
| ids | Array of indices (0 based) for the elements that need to be kept. |
| Beatl2Exception | If an error occurred. |
| void sliceRange | ( | String | dimension, |
| int | fromId, | ||
| int | toId | ||
| ) | throws Beatl2Exception |
Shrink the record to a subrange of its data.
| dimension | Name of the dimension to which the id array is applicable. Provide NULL for the main dimension. If the dimension is not the main dimension it should be a subdimension of the main dimension (e.g. 'profile' dimension) |
| fromId | The first array index of the sub range (0 based). |
| toId | The last array index of the sub range (0 based). |
| Beatl2Exception | If an error occurred. |
| String toString | ( | ) |
Return a string containing a summary of the contents of this Record.
For array fields, only the dimensions are displayed, not the data values. Use dump() to get the full contents of a record.
The output format is identical to how the BEAT-II MATLAB shows structure information, except that for now a fixed padding value of 32 is used (rather than MATLAB's dynamic padding and justification on the colon), and that the precision parameters for some of the floats will differ from what MATLAB displays.