Skip to content

Commit

Permalink
renaming of artifact field fileURI
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Weller committed Jan 30, 2025
1 parent 8d0186b commit e5c10e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ public class Artifact {

private String type;

private URI fileUri;
private URI fileURI;

private Confidence confidence;


public Artifact() {
}

public Artifact(String name, String type, URI fileUri, Confidence confidence) {
public Artifact(String name, String type, URI fileURI, Confidence confidence) {
this.name = name;
this.type = type;
this.fileUri = fileUri;
this.fileURI = fileURI;
this.confidence = confidence;
}

Expand All @@ -40,12 +40,12 @@ public void setType(String type) {
this.type = type;
}

public URI getFileUri() {
return this.fileUri;
public URI getFileURI() {
return this.fileURI;
}

public void setFileUri(URI fileUri) {
this.fileUri = fileUri;
public void setFileURI(URI fileURI) {
this.fileURI = fileURI;
}

public Confidence getConfidence() {
Expand All @@ -66,8 +66,8 @@ public Artifact type(String type) {
return this;
}

public Artifact fileUri(URI fileUri) {
setFileUri(fileUri);
public Artifact fileURI(URI fileURI) {
setFileURI(fileURI);
return this;
}

Expand All @@ -84,20 +84,20 @@ public boolean equals(Object o) {
return false;
}
Artifact artifact = (Artifact) o;
return Objects.equals(name, artifact.name) && Objects.equals(type, artifact.type) && Objects.equals(fileUri, artifact.fileUri) && Objects.equals(confidence, artifact.confidence);
return Objects.equals(name, artifact.name) && Objects.equals(type, artifact.type) && Objects.equals(fileURI, artifact.fileURI) && Objects.equals(confidence, artifact.confidence);
}

@Override
public int hashCode() {
return Objects.hash(name, type, fileUri, confidence);
return Objects.hash(name, type, fileURI, confidence);
}

@Override
public String toString() {
return "{" +
" name='" + getName() + "'" +
", type='" + getType() + "'" +
", fileUri='" + getFileUri() + "'" +
", fileURI='" + getFileURI() + "'" +
", confidence='" + getConfidence() + "'" +
"}";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public void serialize(Artifact value, JsonGenerator gen, SerializerProvider prov
gen.writeObjectFieldStart(value.getType());

gen.writeStringField("name", value.getName());
if (value.getFileUri() != null) {
gen.writeStringField("fileURI", value.getFileUri().toString());
if (value.getFileURI() != null) {
gen.writeStringField("fileURI", value.getFileURI().toString());
} else {
gen.writeStringField("fileURI", "-");
}
Expand All @@ -34,5 +34,4 @@ public void serialize(Artifact value, JsonGenerator gen, SerializerProvider prov
gen.writeEndObject();
}


}

0 comments on commit e5c10e4

Please sign in to comment.