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 com.fasterxml.jackson.annotation.JsonRawValue;

import java.util.List;

/**
 * Object to represent the ld+json version of the @see <a href="http://schema.org/PropertyValue">Property Value</a>
 * in schema.org
 */

@JsonPropertyOrder({ "@type", "name", "value", "valueReference" })
@JsonInclude(JsonInclude.Include.NON_NULL)
public class JsonLDPropertyValue {


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

    private String name;
    private String value;


//    @JsonProperty("valueReference")
//    private List<JsonLDStructuredValue> valueReference;

    private JsonLDCategoryCode valueReference;

    public String getType() {
        return type;
    }

    public String getValue() {
        return value;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() { return name; }

    public void setValue(String value) {
        this.value = value;
    }

    public JsonLDCategoryCode getValueReference() {
        return valueReference;
    }

    public void setValueReference(JsonLDCategoryCode valueReference) {
        this.valueReference = valueReference;
    }
}

@@ -692,16 +692,74 @@
  value;%0A
+    private String unitText;%0A    private String unitCode;%0A
 %0A%0A//    
@@ -861,16 +861,21 @@
 private 
+List%3C
 JsonLDCa
@@ -876,32 +876,33 @@
 onLDCategoryCode
+%3E
  valueReference;
@@ -1226,16 +1226,21 @@
  public 
+List%3C
 JsonLDCa
@@ -1249,16 +1249,17 @@
 goryCode
+%3E
  getValu
@@ -1345,16 +1345,21 @@
 ference(
+List%3C
 JsonLDCa
@@ -1368,16 +1368,17 @@
 goryCode
+%3E
  valueRe
@@ -1439,11 +1439,385 @@
 e;%0A    %7D
+%0A%0A    public String getUnitCode() %7B%0A        return unitCode;%0A    %7D%0A%0A    public JsonLDPropertyValue unitCode(String unitCode) %7B%0A        this.unitCode = unitCode;%0A        return this;%0A    %7D%0A%0A    public String getUnitText() %7B%0A        return unitText;%0A    %7D%0A%0A    public JsonLDPropertyValue unitText(String unitText) %7B%0A        this.unitText = unitText;%0A        return this;%0A    %7D
 %0A%7D%0A

Add support to multiple ontologies as well as add the unitText and unitCode fields