@Override public Model getUPDATEModel(Representation rep) { return getCREATEModel(rep); //FIXME no updatableProperties() }
/** * Tests * {@link BaseDelegatingResource#setConvertedProperties(Object, java.util.Map, DelegatingResourceDescription, boolean)} */ @Test public void setConvertedProperties_shouldAllowSettingANullValue() { DrugResource1_8 resource = new DrugResource1_8(); Drug drug = new Drug(); drug.setRoute(new Concept()); Map<String, Object> propertyMap = new HashMap<String, Object>(); propertyMap.put("route", null); resource.setConvertedProperties(drug, propertyMap, resource.getUpdatableProperties(), false); Assert.isNull(drug.getRoute()); }
@Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = super.getCreatableProperties(); description.addProperty("strength"); description.addRequiredProperty("name"); return description; }
@Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { DelegatingResourceDescription repDesc = super.getRepresentationDescription(rep); if (rep instanceof DefaultRepresentation) { repDesc.addProperty("strength"); } else if (rep instanceof FullRepresentation) { repDesc.addProperty("strength"); } return repDesc; }