Details of matrixView in model

3.67K viewsGeneral Discussion
0

Hi,

I am developing an interface for Quantrix-database interaction to import the data into quantrix model. I have received the data in IDatagrid and now paasing this to model …model.importdata(IDatagrid obj, HashMap obj) and setting it to view. The data I received is display in wrong format..i mean to say category and items.

1) Can some one please provide me the details how quantrix reads the data and displays.(I know HashMap is used to configure it….but how this information is interpreted to display on frontend).

2)How view works and how about if I want to read some data from view and update it into my database.

The information available about the API’s is not enough in the documentation..can some provide me with some examples on interpreting the data into view. I have gone through all the examples given in this form ( that only helped me to reach to this level :)) but still not got much info on dataimport implementation of quantrix

Thanks,

0

Greetings,

When, model.importData(IDataGrid, Map) is called, the map is used to configure the import along several important lines.
1) Whether the import is 2D or multi-Dimensional
2) Whether it is to an existing matrix or a new matrix is created.
3) What columns represent categories and which represent data items under the “Item” category.

The IDataGrid is a simple API and returns a value. The value is interpreted as a String or Number. How the value is interpreted is based on the column.
1) if the column is a category, the value is converted to a string. If it is a number it uses a default Double.toString() implementation. Though you can set a NumberFormat to format the number, it is currently not available through QAPI. You would have to set it through the data link wizard.
2) If the column is an item column, the string or number value is directly set on the cell using the aggregation specified for the column (typically sum for number values).

As for your second question, it is a pretty broad topic. If basically you want access to cells in a column or row. You can use a Range and CellIterator. For example.
QTableViewCellIterator iterator = matrix.getRange(“A1”).getCellIterator();
Then iterate over the cells to get the values.

Hope this helps.

Brian Cabana

You are viewing 1 out of 2 answers, click here to view all answers.