@Override protected IntegerProperty create() { return new IntegerProperty(); }
public void texting(String inc) { IntegerProperty textLength = new IntegerProperty(); Timeline timeline = new Timeline(new KeyFrame(Duration.millis(300 * inc.length())), new KeyValue(textLength, inc.length())); labelHeader.textProperty().bind(Bindings.createStringBinding(() -> inc.substring(0, textLength.get()), textLength)); timeline.play(); }
public void texting(String inc) { IntegerProperty textLength = new IntegerProperty(); Timeline timeline = new Timeline(new KeyFrame(Duration.millis(300)), e -> { textLength.set(textLength.get()+1); labelHeader.setText(inc.substring(0, textLength.get())); }); timeline.setCycleCount(inc.length()); timeline.play(); }
@Override public Model getCREATEModel(Representation rep) { return new ModelImpl() .property("name", new StringProperty()) .property("description", new StringProperty()) .property("memberIds", new ArrayProperty(new IntegerProperty())) //FIXME .required("name").required("description").required("memberIds"); }
@Override public Model getCREATEModel(Representation rep) { return ((ModelImpl) super.getCREATEModel(rep)) .property("datatypeClassname", new StringProperty()) .property("minOccurs", new IntegerProperty()) .property("maxOccurs", new IntegerProperty()) .property("datatypeConfig", new StringProperty()) .property("preferredHandlerClassname", new StringProperty()) .property("handlerConfig", new StringProperty()) .required("datatypeClassname"); }
@Override public Model getGETModel(Representation rep) { ModelImpl model = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .property("minOccurs", new IntegerProperty()) .property("maxOccurs", new IntegerProperty()) .property("datatypeClassname", new StringProperty()) .property("preferredHandlerClassname", new StringProperty()); } if (rep instanceof FullRepresentation) { model .property("datatypeConfig", new StringProperty()) .property("handlerConfig", new StringProperty()); } return model; }
@Override public Model getGETModel(Representation rep) { ModelImpl model = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .property("aIsToB", new StringProperty()) .property("bIsToA", new StringProperty()); } if (rep instanceof FullRepresentation) { model .property("weight", new IntegerProperty()); } return model; }
public Model getGETModel(Representation rep) { ModelImpl model = ((ModelImpl) super.getGETModel(rep)); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .property("uuid", new StringProperty()) .property("display", new StringProperty()) .property("name", new StringProperty()) .property("description", new StringProperty()) .property("voided", new StringProperty()) .property("memberIds", new ArrayProperty(new IntegerProperty())); //FIXME } return model; }
@Override public Model getCREATEModel(Representation rep) { return ((ModelImpl) super.getCREATEModel(rep)) .property("aIsToB", new StringProperty()) .property("bIsToA", new StringProperty()) .property("weight", new IntegerProperty()) .required("aIsToB").required("bIsToA"); }
@Override public Model getGETModel(Representation rep) { ModelImpl modelImpl = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation) { modelImpl .property("uuid", new StringProperty()) .property("display", new StringProperty()) .property("messageState", new IntegerProperty()); } else if (rep instanceof FullRepresentation) { modelImpl .property("uuid", new StringProperty()) .property("display", new StringProperty()) .property("source", new RefProperty("#/definitions/Hl7sourceGet")) .property("sourceKey", new StringProperty()) .property("data", new StringProperty()) .property("messageState", new IntegerProperty()); } return modelImpl; }
private static Response constructResponse(int status, String error) { Property statusProp = new IntegerProperty() .description("The status code of the error (also provided in the HTTP header)"); statusProp.setExample(status); Property errorProp = new StringProperty() .description("The error message describing the error"); errorProp.setExample((Object)error); return new Response() .description(error) .schema(new ObjectProperty() .property("status", statusProp) .property("error", errorProp)); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#getCREATEModel(Representation) */ @Override public Model getCREATEModel(Representation rep) { return new ModelImpl() .property("diagnosis", new StringProperty()) .property("encounter", new StringProperty()) .property("condition", new StringProperty()) .property("certainty", new StringProperty()) .property("patient", new StringProperty().example("uuid")) .property("rank", new IntegerProperty()); }
@Override public Model getCREATEModel(Representation rep) { OrderResource1_10 orderResource = (OrderResource1_10) Context.getService(RestService.class) .getResourceBySupportedClass(Order.class); ModelImpl orderModel = (ModelImpl) orderResource.getCREATEModel(rep); return orderModel .property("specimenSource", new StringProperty().example("uuid")) .property("laterality", new EnumProperty(TestOrder.Laterality.class)) .property("clinicalHistory", new StringProperty()) .property("frequency", new StringProperty().example("uuid")) .property("numberOfRepeats", new IntegerProperty()); }
@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"); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#getUPDATEModel(Representation) */ @Override public Model getUPDATEModel(Representation rep) { return new ModelImpl() .property("diagnosis", new StringProperty()) .property("condition", new StringProperty()) .property("encounter", new StringProperty()) .property("certainty", new EnumProperty(ConditionVerificationStatus.class)) .property("rank", new IntegerProperty()) .property("voided", new BooleanProperty()); } }
@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) { OrderResource1_10 orderResource = (OrderResource1_10) Context.getService(RestService.class) .getResourceBySupportedClass(Order.class); ModelImpl orderModel = (ModelImpl) orderResource.getGETModel(rep); orderModel .property("laterality", new EnumProperty(TestOrder.Laterality.class)) .property("clinicalHistory", new StringProperty()) .property("numberOfRepeats", new IntegerProperty()); if (rep instanceof DefaultRepresentation) { orderModel .property("specimenSource", new RefProperty("#/definitions/ConceptGetRef")) .property("frequency", new RefProperty("#/definitions/OrderfrequencyGetRef")); } else if (rep instanceof FullRepresentation) { orderModel .property("specimenSource", new RefProperty("#/definitions/ConceptGet")) .property("frequency", new RefProperty("#/definitions/OrderfrequencyGet")); } return orderModel; }
protected Operation generateQueryCountOperation(RestQueriesConfiguration.QueryInfo query, RequestMethod method) { Operation operation = new Operation() .tag(query.getEntityName() + " Queries") .produces(APPLICATION_JSON_VALUE) .summary("Return a number of entities in query result") .description("Returns a number of entities that matches the query. You can use the all keyword for " + "the queryNameParam to get the number of all available entities.") .response(200, new Response() .description("Success. Entities count is returned") .schema(new IntegerProperty().description("Entities count"))) .response(403, getErrorResponse("Forbidden. The user doesn't have permissions to read the entity.")) .response(404, getErrorResponse("MetaClass not found or query with the given name not found")); operation.setParameters(generateQueryOpParams(query, method, false)); return operation; }
@Override public Model getCREATEModel(Representation representation) { ModelImpl model = new ModelImpl() .property("names", new ArrayProperty(new RefProperty("#/definitions/PersonNameCreate"))) .property("gender", new StringProperty()._enum("M")._enum("F")) .property("age", new IntegerProperty()) .property("birthdate", new DateProperty()) .property("birthdateEstimated", new BooleanProperty()._default(false)) .property("dead", new BooleanProperty()._default(false)) .property("deathDate", new DateProperty()) .property("causeOfDeath", new StringProperty()) .property("addresses", new ArrayProperty(new RefProperty("#/definitions/PersonAddressCreate"))) .property("attributes", new ArrayProperty(new RefProperty("#/definitions/PersonAttributeCreate"))); model.setRequired(Arrays.asList("names", "gender")); return model; }
@Override public Model getUPDATEModel(Representation representation) { return new ModelImpl() .property("dead", new BooleanProperty()) .property("causeOfDeath", new StringProperty()) .property("deathDate", new DateProperty()) .property("age", new IntegerProperty()) .property("gender", new StringProperty()._enum("M")._enum("F")) .property("birthdate", new DateProperty()) .property("birthdateEstimated", new BooleanProperty()._default(false)) .property("preferredName", new StringProperty().example("uuid")) .property("preferredAddress", new StringProperty().example("uuid")) .property("attributes", new ArrayProperty(new RefProperty("#/definitions/PersonAttributeCreate"))) .required("dead").required("causeOfDeath"); }