@Override protected DoubleProperty create() { return new DoubleProperty(); }
if (Objects.equal(typeName, "double")) { _matched=true; _switchResult = new DoubleProperty();
@Override public Model getCREATEModel(Representation rep) { return ((ModelImpl) super.getCREATEModel(rep)) .property("problem", new RefProperty("#/definitions/ConceptCreate")) .property("modifier", new EnumProperty(ProblemModifier.class)) .property("sortWeight", new DoubleProperty()) .required("problem"); }
protected Property getPrimitiveProperty(String type) { String primitiveType = type; if (type.contains(".")) { primitiveType = primitiveType.substring(primitiveType.lastIndexOf(".") + 1).toLowerCase(); } switch (primitiveType) { case "boolean": return new BooleanProperty().example(true); case "float": case "double": return new DoubleProperty().example("3.14"); case "byte": case "short": case "int": case "integer": return new IntegerProperty().example(42); case "long": return new LongProperty().example(Long.MAX_VALUE >> 4); case "date": return new DateProperty().example("2005-14-10T13:17:42.16Z"); case "uuid": UUIDProperty uuidProp = new UUIDProperty(); uuidProp.setExample("19474a3b-99b5-482e-9e77-852be9adf817"); return uuidProp; case "string": return new StringProperty().example("String"); default: return null; } }
@Override public Model getCREATEModel(Representation rep) { return new ModelImpl() .property("ingredient", new StringProperty().example("uuid")) .property("strength", new DoubleProperty()) .property("units", new StringProperty().example("uuid")) .required("ingredient"); }
public Model getGETModel(Representation rep) { ModelImpl modelImpl = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { modelImpl .property("doseStrength", new DoubleProperty()) .property("maximumDailyDose", new DoubleProperty()) .property("minimumDailyDose", new DoubleProperty()) .property("units", new StringProperty()) .property("combination", new BooleanProperty()._default(false)); } if (rep instanceof DefaultRepresentation) { modelImpl .property("dosageForm", new RefProperty("#/definitions/ConceptGetRef")) .property("concept", new RefProperty("#/definitions/ConceptGetRef")) .property("route", new RefProperty("#/definitions/ConceptGetRef")); } else if (rep instanceof FullRepresentation) { modelImpl .property("dosageForm", new RefProperty("#/definitions/ConceptGet")) .property("concept", new RefProperty("#/definitions/ConceptGet")) .property("route", new RefProperty("#/definitions/ConceptGet")); } return modelImpl; }
@Override public Model getGETModel(Representation rep) { ModelImpl model = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .property("modifier", new EnumProperty(ProblemModifier.class)) .property("sortWeight", new DoubleProperty()); } if (rep instanceof DefaultRepresentation) { model .property("problem", new RefProperty("#/definitions/ConceptGetRef")); } else if (rep instanceof FullRepresentation) { model .property("problem", new RefProperty("#/definitions/ConceptGet")); } return model; }
@Override public Model getCREATEModel(Representation rep) { ModelImpl model = ((ModelImpl) super.getCREATEModel(rep)) .property("combination", new BooleanProperty()._default(false)) .property("concept", new StringProperty()) .property("doseStrength", new DoubleProperty()) .property("maximumDailyDose", new DoubleProperty()) .property("minimumDailyDose", new DoubleProperty()) .property("units", new StringProperty()) .property("dosageForm", new StringProperty()) .property("route", new StringProperty()) .required("combination").required("concept"); if (rep instanceof FullRepresentation) { model .property("concept", new RefProperty("#/definitions/ConceptCreate")) .property("dosageForm", new RefProperty("#/definitions/ConceptCreate")) .property("route", new RefProperty("#/definitions/ConceptCreate")); } return model; }
} else if (double.class == objectClass || Double.class == objectClass) { swaggerProperty = new DoubleProperty(); } else if (BigDecimal.class == objectClass) {
} else if (double.class == objectClass || Double.class == objectClass) { swaggerProperty = new DoubleProperty(); } else if (BigDecimal.class == objectClass) {
DoubleProperty property = new DoubleProperty(); property.setRequired(annotation.required()); return property
return new DateTimeProperty(); case DOUBLE: return new DoubleProperty(); case ENUM: StringProperty prop = new StringProperty();
@Override public Model getCREATEModel(Representation rep) { return ((ModelImpl) super.getCREATEModel(rep)) .property("format", new StringProperty().example("java.lang.String")) .property("foreignKey", new IntegerProperty()) .property("sortWeight", new DoubleProperty()) .property("searchable", new BooleanProperty()._default(false)) .property("editPrivilege", new RefProperty("#/definitions/PrivilegeCreate")) .required("description"); }
@Override public Model getCREATEModel(Representation rep) { OrderResource1_8 orderResource = (OrderResource1_8) Context.getService(RestService.class) .getResourceBySupportedClass(Order.class); ModelImpl orderModel = (ModelImpl) orderResource.getCREATEModel(rep); orderModel .property("dose", new DoubleProperty()) .property("units", new StringProperty()) .property("frequency", new StringProperty()) .property("prn", new BooleanProperty()) .property("complex", new BooleanProperty()) .property("quantity", new IntegerProperty()) .property("drug", new RefProperty("#/definitions/DrugCreate")); // DrugOrders have a specific hardcoded value for this property orderModel.getProperties().remove("orderType"); return orderModel; }
@Override public Model getGETModel(Representation rep) { ModelImpl modelImpl = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { modelImpl .property("uuid", new StringProperty()) .property("display", new StringProperty()) .property("strength", new DoubleProperty()); } if (rep instanceof DefaultRepresentation) { modelImpl .property("ingredient", new RefProperty("#/definitions/ConceptGetRef")) .property("units", new RefProperty("#/definitions/ConceptGetRef")); } else if (rep instanceof FullRepresentation) { modelImpl .property("ingredient", new RefProperty("#/definitions/ConceptGet")) .property("units", new RefProperty("#/definitions/ConceptGet")); } return modelImpl; }
private static Map<String, Property> initProperties() { Map<String, Property> properties = new LinkedHashMap<>(); properties.put(PROPERTY_ONE_NAME, new StringProperty() .example(PROPERTY_ONE_EXAMPLE) .required(true) .description(PROPERTY_ONE_DESCRIPTION)); properties.put(PROPERTY_TWO_NAME, new StringProperty() .example(PROPERTY_TWO_EXAMPLE) .required(true) .description(PROPERTY_TWO_DESCRIPTION)); IntegerProperty integerProp = new IntegerProperty(); LongProperty longProp = new LongProperty(); BooleanProperty booleanProp = new BooleanProperty(); integerProp.setExample(""); longProp.setExample(""); booleanProp.setExample(""); properties.put(ARRAY_PROP_NAME, new ArrayProperty().example("").description("")); properties.put(DOUBLE_PROP_NAME, new DoubleProperty().example("").description("")); properties.put(FLOAT_PROP_NAME, new FloatProperty().example("").description("")); properties.put(INTEGER_PROP_NAME, integerProp.description("")); properties.put(LONG_PROP_NAME, longProp.description("")); properties.put(BOOLEAN_PROP_NAME, booleanProp.description("")); properties.put(OBJECT_PROP_NAME, new ObjectProperty().example("").description("")); return properties; } }
@Override public Model getGETModel(Representation rep) { ModelImpl model = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .property("format", new StringProperty()) .property("foreignKey", new IntegerProperty()) .property("sortWeight", new DoubleProperty()) .property("searchable", new BooleanProperty()._default(false)); } if (rep instanceof DefaultRepresentation) { model .property("editPrivilege", new RefProperty("#/definitions/PrivilegeGetRef")); } else if (rep instanceof FullRepresentation) { model .property("editPrivilege", new RefProperty("#/definitions/PrivilegeGet")) .property("concept", new StringProperty()); } return model; }
@Override public Model getGETModel(Representation rep) { OrderResource1_8 orderResource = (OrderResource1_8) Context.getService(RestService.class) .getResourceBySupportedClass(Order.class); ModelImpl orderModel = (ModelImpl) orderResource.getGETModel(rep); orderModel .property("dose", new DoubleProperty()) .property("units", new StringProperty()) .property("frequency", new StringProperty()) .property("prn", new BooleanProperty()) .property("complex", new BooleanProperty()) .property("quantity", new IntegerProperty()); if (rep instanceof DefaultRepresentation) { orderModel .property("drug", new RefProperty("#/definitions/DrugGetRef")); } else if (rep instanceof FullRepresentation) { orderModel .property("drug", new RefProperty("#/definitions/DrugGet")); } return orderModel; }
return fillProperty(new DoubleProperty(), mapping);