Class ImportedDataItem
java.lang.Object
io.jmix.dataimport.extractor.data.ImportedDataItem
- All Implemented Interfaces:
RawValuesSource
Represents a source of raw values for properties for one entity to import.
Contains the following info:
Contains the following info:
- Item index:
- CSV, XLSX - row number;
- JSON - index of JSON object in the object array;
- XML - sequential number of XML child element in the root element.
- Raw values map:
- CSV, XLSX - string cell values by column names;
- JSON - field values by field names. As a field value can be: string (for all simple fields),
ImportedObject
orImportedObjectList
; - XML - tag value by tag names. As a tag value can be: string (for tags without child tags),
ImportedObject
orImportedObjectList
.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddRawValue
(String dataFieldName, Object value) Adds a raw value of specified data fieldint
getRawValue
(String dataFieldName) Gets a raw value of the specified data fieldvoid
setItemIndex
(int itemIndex) void
setRawValues
(Map<String, Object> rawValues) Sets a map containing raw values of data fields.toString()
-
Field Details
-
rawValues
-
itemIndex
protected int itemIndex
-
-
Constructor Details
-
ImportedDataItem
public ImportedDataItem()
-
-
Method Details
-
getItemIndex
public int getItemIndex() -
getRawValues
- Specified by:
getRawValues
in interfaceRawValuesSource
- Returns:
- map that contains raw values by data field names
-
setItemIndex
public void setItemIndex(int itemIndex) -
setRawValues
Description copied from interface:RawValuesSource
Sets a map containing raw values of data fields.- Specified by:
setRawValues
in interfaceRawValuesSource
- Parameters:
rawValues
- map with raw values
-
addRawValue
Description copied from interface:RawValuesSource
Adds a raw value of specified data field- Specified by:
addRawValue
in interfaceRawValuesSource
- Parameters:
dataFieldName
- data field namevalue
- raw value- Returns:
- current instance of raw values source
-
getRawValue
Description copied from interface:RawValuesSource
Gets a raw value of the specified data field- Specified by:
getRawValue
in interfaceRawValuesSource
- Parameters:
dataFieldName
- data field name- Returns:
- extracted raw value
-
toString
-