Skip to content

Commit

Permalink
Return Series for Operation (#792)
Browse files Browse the repository at this point in the history
* fix: rename updated field for Operatoin

* fix: test

* fix: get series for operation
  • Loading branch information
EmmanuelDemey authored Oct 15, 2024
1 parent c27cc32 commit 497a490
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ public IdLabelTwoLangs buildIdLabelTwoLangsFromJson(JSONObject jsonFamOpeSer) {
if(jsonFamOpeSer.has(Constants.LABEL_LG2)) {
idLabelTwoLangs.setLabelLg2(jsonFamOpeSer.getString(Constants.LABEL_LG2));
}
if(jsonFamOpeSer.has(Constants.CREATORS)) {
List<String> stringList = new ArrayList<>();
for (int i = 0; i < jsonFamOpeSer.getJSONArray(Constants.CREATORS).length(); i++) {
Object element = jsonFamOpeSer.getJSONArray(Constants.CREATORS).get(i);
if (element instanceof String) {
stringList.add((String) element);
}
}
idLabelTwoLangs.setCreators(stringList);
}
return idLabelTwoLangs;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import io.swagger.v3.oas.annotations.media.Schema;

import java.util.List;

public class IdLabelTwoLangs {

private static String classLink = "fr.insee.rmes.config.swagger.model.IdLabelTwoLangs";
Expand All @@ -15,6 +17,9 @@ public class IdLabelTwoLangs {
@Schema(description = "Label lg2")
public String labelLg2;

@Schema(description = "Creators")
private List<String> creators;

public IdLabelTwoLangs(String id, String labelLg1, String labelLg2) {
super();
this.id = id;
Expand Down Expand Up @@ -54,4 +59,11 @@ public void setId(String id) {
this.id = id;
}

public void setCreators(List<String> creators) {
this.creators = creators;
}

public List<String> getCreators() {
return creators;
}
}

0 comments on commit 497a490

Please sign in to comment.