@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response getExperimentByUser(@QueryParam("username") String username) {
AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
try {
List<ExperimentData> experimentDataList = airavataRegistry.getExperimentByUser(username);
ExperimentDataList experimentData = new ExperimentDataList();
List<ExperimentDataImpl> experimentDatas = new ArrayList<ExperimentDataImpl>();
for (ExperimentData anExperimentDataList : experimentDataList) {
experimentDatas.add((ExperimentDataImpl)anExperimentDataList);
}
experimentData.setExperimentDataList(experimentDatas);
if (experimentDataList.size() != 0) {
Response.ResponseBuilder builder = Response.status(Response.Status.OK);
builder.entity(experimentData);
return builder.build();
} else {