Version: | 1.0 |
---|---|
Provider: | PyXMCDA |
SOAP service’s name: | |
csvToXMCDA-criteriaSetsValues-PyXMCDA (see SOAP requests for details) |
Transforms a file containing criteria sets values from a comma-separated values (CSV) file to three XMCDA compliant files, containing the corresponding criteria/criteriaSets ids and their criteriaSetsValues.
Contact: Nicolas Duminy (nicolas.duminy@telecom-bretagne.eu)
Web page: https://gitlab.com/nduminy/ws-pyxmcda
(For outputs, see below)
The criteria and their criteria values as a CSV file. The first line is made of two cells, the first one being empty, and the second one will be the content of the attribute “mcdaConcept” in the tag “<criteriaValues>”, if supplied. The following lines are made of at least two cells, with the first cell being an criterion’ id (and name, see below), and the remaining cells their associated values.
The CSV is formatted by pairs of lines, each describing a criteriaSetValues.
Example:
set1 (performance),1.8,19
,g1,g2 (time),g3
The first line contains the criteriaSet id on the first cell. Additionally, the criteriaSet name is also extracted when the cell is formatted like id (name). Set the parameter “First column” to “id” to deactivate the extraction of criteriaSet name.
The following cells on the first line is the enumeration of all values associated to this criteriaSet. By default the values are considered as float numbers. This can be changed using the parameter “Default content”. It is possible to specify the type of a value by prepending it with a prefix:
The second line contains the criteria’ ids. Additionally, the criteria’ names are also extracted when the cells are formatted like id (name). Set the parameter “First column” to “id” to deactivate the extraction of criteria’ names.
Complete example:
performance,1.8
,g1,g2,g3
safety,3.8,s:Perfect,b:false
,g3,g4 (maintenance),g5 (risk)
The input value should be a valid XMCDA document whose main tag is <other>
.
Parameters of the method
The input value should be a valid XMCDA document whose main tag is <programParameters>
.
It must have the following form:
<programParameters>
<programParameter id="csv_delimiter">
<values>
<value>
<label>%1</label>
</value>
</values>
</programParameter>
<programParameter id="default_prefix">
<values>
<value>
<label>%2</label>
</value>
</values>
</programParameter>
<programParameter id="name_in_id">
<values>
<value>
<boolean>%3</boolean>
</value>
</values>
</programParameter>
</programParameters>
where:
%1 is a parameter named “CSV delimiter”. This is a string, and the value should conform to the following constraint: One character maximum. More formally, the constraint is:
%1.length() < 2
%2 is a parameter named “Default content”. It can have the following values:
float
: floatlabel
: stringinteger
: integerboolean
: booleanThe default value is float.
%3 is a parameter named “First column”. It can have the following values:
false
: idtrue
: id (name)The default value is id_and_name.
The contained criteria.
The returned value is a XMCDA document whose main tag is <criteria>
.
The contained criteria sets.
The returned value is a XMCDA document whose main tag is <criteriaSets>
.
The equivalent criteria sets values.
The returned value is a XMCDA document whose main tag is <criteriaSetsValues>
.
Status messages.
The returned value is a XMCDA document whose main tag is <programExecutionResult>
.