Class ImportUtils
java.lang.Object
org.qubership.atp.dataset.service.direct.importexport.utils.ImportUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetAttributeName(Map<Integer, String> row) Get attribute name from excel row.static StringgetAttributeType(Map<Integer, String> row) Get attribute type from excel row.static StringgetCellValue(Map<Integer, String> row, int key) Determine cell type and return its string representation, getStringCellValue() method call could throw exception if cell has number value or another type.static StringgetDatasetKey(String datasetListName, String datasetName) static StringgetDatasetKey(DatasetParameterValue datasetParameterValue) Get dataset key as concatenation of DSL and DS names.static StringgetDatasetKey(DataSet dataset) static StringgetDatasetKeyPathName(DataSet dataset) Get dataset key as concatenation of id DSL and DS name.static StringgetDslAttributeKey(String datasetListName, String attributeName) static StringgetDslAttributeKey(Attribute attribute) static StringgetDsParameterKey(String datasetListName, String datasetName, String attributeName) static StringgetDsParameterKey(Parameter parameter) Get dataset parameter key as concatenation of DSL, DS and attribute names.static StringgetDsParameterKey(DatasetParameterValue datasetParameterValue, String attributeName) Get dataset parameter key as concatenation of DSL, DS and attribute names.static StringgetOverlapKey(String datasetName, String attributeName) static StringgetOverlapKey(AttributeKey attributeKey, AttributeImportContext importContext) Get overlap key as concatenation of DS name, attribute key and name.static StringgetParameterDsRefName(String parameterValue) Get parameter dataset reference name.static booleanisArrowDelimiterPresent(String attributeName) static booleanisBlankRow(Map<Integer, String> row)
-
Field Details
-
DSL_ATTRIBUTE_REF_DELIMITER
- See Also:
-
ATTR_NAME_ROW_INDEX
public static final int ATTR_NAME_ROW_INDEX- See Also:
-
ATTR_TYPE_ROW_INDEX
public static final int ATTR_TYPE_ROW_INDEX- See Also:
-
-
Constructor Details
-
ImportUtils
public ImportUtils()
-
-
Method Details
-
getParameterDsRefName
Get parameter dataset reference name. Example of input value: DSL 2 -> DS 4- Parameters:
parameterValue- input combined reference name- Returns:
- dataset reference name
-
getAttributeType
Get attribute type from excel row.- Parameters:
row- excel row- Returns:
- parsed type
-
getAttributeName
Get attribute name from excel row.- Parameters:
row- excel row- Returns:
- parsed attribute name
-
getCellValue
Determine cell type and return its string representation, getStringCellValue() method call could throw exception if cell has number value or another type.- Parameters:
row- excel rowkey- excel cell index- Returns:
- string value string representation
-
isBlankRow
-
isArrowDelimiterPresent
-
getDslAttributeKey
-
getDslAttributeKey
-
getDsParameterKey
Get dataset parameter key as concatenation of DSL, DS and attribute names. Example, "DSL_DS_attribute".- Parameters:
parameter- inpute parameter- Returns:
- key
-
getDsParameterKey
public static String getDsParameterKey(DatasetParameterValue datasetParameterValue, String attributeName) Get dataset parameter key as concatenation of DSL, DS and attribute names. Example, "DSL_DS_attribute.- Parameters:
datasetParameterValue- dataset parameter valueattributeName- attribute name- Returns:
- key
-
getDsParameterKey
-
getDatasetKey
-
getDatasetKey
-
getDatasetKey
Get dataset key as concatenation of DSL and DS names. Example, "DSL_DS".- Parameters:
datasetParameterValue- dataset parameter value.- Returns:
- key
-
getDatasetKeyPathName
Get dataset key as concatenation of id DSL and DS name. Example, "IdDSL_NameDS".- Parameters:
dataset- input dataset- Returns:
- key
-
getOverlapKey
Get overlap key as concatenation of DS name, attribute key and name. Example, "DS 1_a -> b -> c.- Parameters:
attributeKey- overlap entity.- Returns:
- overlap key
-
getOverlapKey
-