-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from elixir-europe/biosamples-receipt
BioSamples response as per receipt format
- Loading branch information
Showing
4 changed files
with
119 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
...-biosamples/src/main/java/com/elixir/biohackaton/ISAToSRA/biosamples/receipt/Receipt.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package com.elixir.biohackaton.ISAToSRA.biosamples.receipt; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class Receipt { | ||
private String targetRepository; | ||
private List<Accession> accessions; | ||
private List<Error> errors; | ||
private List<Info> info; | ||
|
||
public void setTargetRepository(String targetRepository) { | ||
this.targetRepository = targetRepository; | ||
} | ||
|
||
public void setAccessions(List<Accession> accessions) { | ||
this.accessions = accessions; | ||
} | ||
|
||
public void setErrors(List<Error> errors) { | ||
this.errors = errors; | ||
} | ||
|
||
public void setInfo(List<Info> info) { | ||
this.info = info; | ||
} | ||
|
||
@Getter | ||
public static class Accession { | ||
private String id; | ||
private String data; | ||
|
||
public Accession(String id, String data) { | ||
this.id = id; | ||
this.data = data; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public void setData(String data) { | ||
this.data = data; | ||
} | ||
} | ||
|
||
// Error class | ||
@Getter | ||
static class Error { | ||
private String code; | ||
private String message; | ||
|
||
public Error(String code, String message) { | ||
this.code = code; | ||
this.message = message; | ||
} | ||
|
||
public void setCode(String code) { | ||
this.code = code; | ||
} | ||
|
||
public void setMessage(String message) { | ||
this.message = message; | ||
} | ||
} | ||
|
||
// Info class | ||
@Getter | ||
static class Info { | ||
// Define fields, constructor, getters, and setters | ||
private String key; | ||
private String value; | ||
|
||
public Info(String key, String value) { | ||
this.key = key; | ||
this.value = value; | ||
} | ||
|
||
public void setKey(String key) { | ||
this.key = key; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters