This commit is contained in:
Fabio Sinibaldi 2019-04-01 14:56:06 +00:00
parent 6100cf8afb
commit a078f1026c
4 changed files with 51 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import lombok.Setter;
public class InternalAlgorithmDescriptor implements CustomData {
@AllArgsConstructor
@Getter
public static class Parameter{
private String name;
private String type;

View File

@ -4,6 +4,7 @@ import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.InternalAlgorithmDescriptor;
import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.InternalAlgorithmDescriptor.Parameter;
import org.gcube.data.publishing.gCatFeeder.model.CatalogueFormatData;
import org.gcube.data.publishing.gCatFeeder.model.InternalConversionException;
import org.gcube.data.publishing.gCatFeeder.utils.ContextUtils;
@ -42,6 +43,13 @@ public class GCatModel implements CatalogueFormatData {
item.getExtras().add(new CKanExtraField("system", "Algorithm"));
// TODO ADD PARAMETERS
for(Parameter param: desc.getParameters())
item.getExtras().add(new CKanExtraField("Algorithm:Input Parameter",
String.format("%1$s [%2$s] %3$s : %4$s",
param.getName(),param.getType(),
((param.getValue()!=null&&!param.getValue().isEmpty())?"default : "+param.getValue():""),
param.getDescription())));
// TODO ADD RESOURCES

View File

@ -0,0 +1,21 @@
{
"profile": "<metadataformat type=\"Algorithm\">\n <metadatafield>\n <fieldName>Input Parameter</fieldName>\n <dataType>String</dataType>\n <mandatory>false</mandatory>\n <note>Input parameter expected for the execution of the algorithm</note>\n </metadatafield> \n</metadataformat>",
"item":
{
"name": "step_4_vpa_iccat_bft_e_report_in_nextnext",
"title": "Step 4 Vpa Iccat Bft E Report in NextNext",
"description": "ICCAT (Eastern) Bluefin Tuna Stock Assessment. This set of R and Fortran code have been provided by ICCAT and IFremer to execute the whole Stock assessment workflow online integration has been done with the help (mediation) of CNR and IRD",
"version": null,
"visibility": null,
"license": "CC-BY-NC-SA-4.0",
"author": "gianpaolo.coro",
"maintainer": "gianpaolo.coro",
"tags": ["Iccat Eastern Bft Stock Assessment"],
"extras": [
{
"key": "system",
"value": "Algorithm"
}]
},
"resources": []
}

View File

@ -0,0 +1,21 @@
{
"profile": "<metadataformat type=\"Algorithm\">\n <metadatafield>\n <fieldName>Input Parameter</fieldName>\n <dataType>String</dataType>\n <mandatory>false</mandatory>\n <note>Input parameter expected for the execution of the algorithm</note>\n </metadatafield> \n</metadataformat>",
"item":
{
"name": "step_4_vpa_iccat_bft_e_report_in_nextnext",
"title": "Step 4 Vpa Iccat Bft E Report in NextNext",
"description": "ICCAT (Eastern) Bluefin Tuna Stock Assessment. This set of R and Fortran code have been provided by ICCAT and IFremer to execute the whole Stock assessment workflow online integration has been done with the help (mediation) of CNR and IRD",
"version": null,
"visibility": null,
"license": "CC-BY-NC-SA-4.0",
"author": "gianpaolo.coro",
"maintainer": "gianpaolo.coro",
"tags": ["Iccat Eastern Bft Stock Assessment"],
"extras": [
{
"key": "system",
"value": "Algorithm"
}]
},
"resources": []
}