Skip to content

Commit

Permalink
refactored attribute names for LinearizationDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
soimugeo committed Dec 24, 2024
1 parent 1d11ab1 commit fac1fa1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
public class LinearizationDefinition {


@JsonProperty("Id")
private final String id;
@JsonProperty("linearizationId")
private final String linearizationId;

@JsonProperty("whoficEntityIri")
private final String whoficEntityIri;
@JsonProperty("linearizationUri")
private final String linearizationUri;

@JsonProperty("Description")
@JsonProperty("description")
private final String description;

@JsonProperty("linearizationMode")
Expand All @@ -27,25 +27,25 @@ public class LinearizationDefinition {
@JsonProperty("sortingCode")
private final String sortingCode;

@JsonProperty("DisplayLabel")
@JsonProperty("displayLabel")
private final String displayLabel;

@JsonProperty("oldId")
private final String oldId;


@JsonCreator
public LinearizationDefinition(@JsonProperty("Id") String id,
@JsonProperty("whoficEntityIri") String whoficEntityIri,
public LinearizationDefinition(@JsonProperty("linearizationId") String linearizationId,
@JsonProperty("linearizationUri") String linearizationUri,
@JsonProperty("oldId") String oldId,
@JsonProperty("Description")String description,
@JsonProperty("LinearizationMode") String linearizationMode,
@JsonProperty("DisplayLabel") String displayLabel,
@JsonProperty("description")String description,
@JsonProperty("linearizationMode") String linearizationMode,
@JsonProperty("displayLabel") String displayLabel,
@JsonProperty("rootId") String rootId,
@JsonProperty("CoreLinId") String coreLinId,
@JsonProperty("sortingCode") String sortingCode) {
this.id = id;
this.whoficEntityIri = whoficEntityIri;
this.linearizationId = linearizationId;
this.linearizationUri = linearizationUri;
this.description = description;
this.linearizationMode = linearizationMode;
this.rootId = rootId;
Expand All @@ -55,12 +55,12 @@ public LinearizationDefinition(@JsonProperty("Id") String id,
this.displayLabel = displayLabel;
}

public String getId() {
return id;
public String getLinearizationId() {
return linearizationId;
}

public String getWhoficEntityIri() {
return whoficEntityIri;
public String getLinearizationUri() {
return linearizationUri;
}

public String getLinearizationMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ private DiffElement<LinearizationDocumentChange, LinearizationEventsForView> toE
List<LinearizationDefinition> linearizationDefinitions) {
var lineElement = LinearizationEventsForView.create(viewName, linearizationEvents);
LinearizationDocumentChange sourceDocument;
var optionalDefView = linearizationDefinitions.stream().filter(definition -> definition.getWhoficEntityIri().equals(viewName)).findFirst();
var optionalDefView = linearizationDefinitions.stream().filter(definition -> definition.getLinearizationUri().equals(viewName)).findFirst();
if (optionalDefView.isPresent()) {
var defView = optionalDefView.get();
sourceDocument = LinearizationDocumentChange.create(defView.getWhoficEntityIri(), defView.getDisplayLabel(), defView.getId(), defView.getSortingCode());
sourceDocument = LinearizationDocumentChange.create(defView.getLinearizationUri(), defView.getDisplayLabel(), defView.getLinearizationId(), defView.getSortingCode());
} else {
sourceDocument = LinearizationDocumentChange.create(null, "Residuals", null, "ZZZZZZZZZZ");
}
Expand Down

0 comments on commit fac1fa1

Please sign in to comment.