package uk.ac.ebi.biosamples.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import java.util.HashMap;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder(value={"@context", "@type", "name", "description", "url", "includedInDataCatalog"})
public class JsonLDDataset implements BioschemasObject{

    @JsonProperty("@context")
    private final String context = "http://schema.org";

    @JsonProperty("@type")
    private final String type = "Dataset";

    @JsonProperty("name")
    private final String name = "BioSamples collection";

    @JsonProperty("description")
    private final String description = "BioSamples stores and supplies descriptions and metadata about biological samples used in research and development by academia and industry. Samples are either 'reference' samples (e.g. from 1000 Genomes, HipSci, FAANG) or have been used in an assay database such as the European Nucleotide Archive (ENA) or ArrayExpress.";

    private String url =  "https://www.ebi.ac.uk/biosamples/samples";

    private Map<String, String> dataCatalog = getDefaultDataCatalog();


    private Map getDefaultDataCatalog() {
        Map<String, String> dataCatalog = new HashMap<>();
        dataCatalog.put("@type", "DataCatalog");
        dataCatalog.put("@id", "https://www.ebi.ac.uk/biosamples");
        return dataCatalog;
    }

    @JsonProperty("url")
    public String getUrl() {
        return url;
    }

    public JsonLDDataset datasetUrl(String url) {
        this.url = url;
        return this;
    }

    @JsonProperty("includedInDataCatalog")
    public Map<String, String> getDataCatalog() {
        return dataCatalog;
    }

    public JsonLDDataset dataCatalogUrl(String dataCatalogUrl) {
        Map dataCatalog = getDefaultDataCatalog();
        dataCatalog.put("@id", dataCatalogUrl);
        this.dataCatalog = dataCatalog;
        return this;
    }
}


@@ -760,24 +760,28 @@
 cription = %22
+The 
 BioSamples s
@@ -783,246 +783,789 @@
 les 
-stores and supplies descriptions and metadata about biological samples used in research and development by academia and industry. Samples are either 'reference' samples (e.g. from 1000 Genomes, HipSci, FAANG) or ha
+database at EMBL-EBI provides a central hub for sample metadata storage and linkage to other EMBL-EBI resources. BioSamples contains just over 5 million samples in 2018. Fast, reciprocal data exchange is fully established between sister Biosample databases and other INSDC partners, enabling a worldwide common representation and centralisation of sample metadata. BioSamples plays a vital role in data coordination, acting as the sample metadata repository for many biomedical projects including the Functional Annotation of Animal Genomes (FAANG), the European Bank for induced pluripotent Stem Cells (EBiSC) and the %7BHuman Induced Pluripotent Stem Cell Initiative (HipSci). Data growth is dri
 ve
+n
  b
-een used in an assay
+y the ever more important role BioSamples is playing as an ELIXIR data deposition
  dat
@@ -1574,12 +1574,11 @@
 ase 
-such
+and
  as 
@@ -1586,56 +1586,321 @@
 he E
-uropean Nucleotide Archive (ENA) or ArrayExpress
+MBL-EBI hub for sample metadata. BioSamples is now the destination for samples from ELIXIR-EXCELERATE use case projects ranging from plant phenotyping to marine metagenomics, as well as several other community efforts including the Global Alliance for Genomics and Health (GA4GH) and the ELIXIR Bioschemas project
 .%22;%0A

Updates the dataset description