Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 731 metabolic pathways search changes #751

Merged
merged 3 commits into from
Feb 1, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Issue #731 Metabolic pathways search changes
okolesn committed Jan 31, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d5c565c1688ab3499960363fac8bd55e9313666c
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ public final class MessagesConstants {
public static final String ERROR_SPECIES_NOT_SPECIFIED = "error.no.species";
public static final String ERROR_INDEX_NOT_SPECIFIED = "error.no.index.cache";
public static final String ERROR_INDEX_URL_NOT_SPECIFIED = "error.no.index.url.cache";
public static final String ERROR_INDEX_DIRECTORY_IS_EMPTY = "error.empty.index.directory";
public static final String ERROR_CHROMOSOME_NOT_SPECIFIED = "error.no.chromosome";
public static final String ERROR_STARTPOSITION_NOT_SPECIFIED = "error.no.startposition";
public static final String ERROR_FINISHPOSITION_NOT_SPECIFIED = "error.no.finishposition";
@@ -294,8 +295,6 @@ public final class MessagesConstants {

//Pathway
public static final String ERROR_PATHWAY_NOT_FOUND = "error.pathway.not.found";
public static final String ERROR_PATHWAY_NO_GLYPHS = "error.pathway.no.glyphs.found";
public static final String ERROR_PATHWAY_NO_ARCS = "error.pathway.no.arcs.found";

//Attributes
public static final String ERROR_ATTRIBUTE_INVALID_VALUE = "error.attribute.invalid.value";
Original file line number Diff line number Diff line change
@@ -28,10 +28,9 @@
import com.epam.catgenome.controller.Result;
import com.epam.catgenome.controller.vo.registration.PathwayRegistrationRequest;
import com.epam.catgenome.entity.pathway.Pathway;
import com.epam.catgenome.entity.pathway.SbgnElement;
import com.epam.catgenome.entity.pathway.PathwayQueryParams;
import com.epam.catgenome.util.db.Page;
import com.epam.catgenome.manager.pathway.PathwaySecurityService;
import com.epam.catgenome.util.db.QueryParameters;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiResponse;
@@ -50,7 +49,6 @@
import javax.servlet.http.HttpServletResponse;
import javax.xml.bind.JAXBException;
import java.io.IOException;
import java.util.List;

@RestController
@Api(value = "pathway", description = "Metabolic Pathways Management")
@@ -88,19 +86,6 @@ public void loadPathwayContent(@PathVariable final Long pathwayId,
response.flushBuffer();
}

@PostMapping(value = "/pathway/search")
@ApiOperation(
value = "Searches sbgn file elements",
notes = "Searches sbgn file elements",
produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
})
public Result<List<SbgnElement>> searchElements(@RequestBody SbgnElement sbgnElement)
throws IOException, ParseException {
return Result.success(pathwaySecurityService.searchElements(sbgnElement));
}

@PostMapping(value = "/pathways")
@ApiOperation(
value = "Returns pathways page",
@@ -109,8 +94,9 @@ public Result<List<SbgnElement>> searchElements(@RequestBody SbgnElement sbgnEle
@ApiResponses(
value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
})
public Result<Page<Pathway>> loadPathways(@RequestBody final QueryParameters queryParameters) {
return Result.success(pathwaySecurityService.loadPathways(queryParameters));
public Result<Page<Pathway>> loadPathways(@RequestBody final PathwayQueryParams params)
throws IOException, ParseException {
return Result.success(pathwaySecurityService.loadPathways(params));
}

@PostMapping(value = "/pathway")
@@ -122,7 +108,7 @@ public Result<Page<Pathway>> loadPathways(@RequestBody final QueryParameters que
value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
})
public Result<Pathway> createPathway(@RequestBody final PathwayRegistrationRequest request)
throws IOException, ParseException, JAXBException {
throws IOException, JAXBException {
return Result.success(pathwaySecurityService.createPathway(request));
}

Original file line number Diff line number Diff line change
@@ -23,17 +23,15 @@
*/
package com.epam.catgenome.entity.pathway;

import lombok.Builder;
import com.epam.catgenome.util.db.PagingInfo;
import com.epam.catgenome.util.db.SortInfo;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Builder
public class SbgnElement {
private Long pathwayId;
private SbgnElementType type;
private String clazz;
private String entryId;
private String label;
@Getter
public class PathwayQueryParams {
private PagingInfo pagingInfo;
private String term;
private SortInfo sortInfo;
}

This file was deleted.

Loading