85 lines
3.4 KiB
Java
85 lines
3.4 KiB
Java
package eu.dnetlib.scholix.api.controller;
|
|
|
|
|
|
import eu.dnetlib.common.controller.AbstractDnetController;
|
|
import eu.dnetlib.scholix.api.model.v1.ScholixV1;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.constraints.NotNull;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
|
|
@RestController
|
|
@RequestMapping("/v1")
|
|
@Api(tags = {
|
|
"Scholix"
|
|
})
|
|
public class ScholixControllerV1 extends AbstractDnetController {
|
|
|
|
@Operation(
|
|
summary = "Get all Scholix relation collected from a publisher",
|
|
description = "return a list of scholix object published from a specific publisher"
|
|
)
|
|
@GetMapping("/linksFromPublisher")
|
|
public List<ScholixV1> linksFromPublisher(
|
|
@Parameter(
|
|
in = ParameterIn.QUERY,
|
|
description = "Filter Scholix relationships collected from a publisher",
|
|
schema = @Schema(), required = true) String publisher,
|
|
@Parameter(in = ParameterIn.QUERY,
|
|
description = "The page number") @RequestParam(required = false) Integer page
|
|
) {
|
|
|
|
return new ArrayList<>();
|
|
}
|
|
|
|
@Operation(
|
|
summary = "Get all Scholix relation collected from a datasource",
|
|
description = "return a list of scholix object collected from a specific datasource"
|
|
)
|
|
@GetMapping("/linksFromDatasource")
|
|
public List<ScholixV1> linksFromDatasource(
|
|
@Parameter(
|
|
in = ParameterIn.QUERY,
|
|
description = "Filter Scholix relationships collected from a LinkProvider",
|
|
schema = @Schema()) @NotNull String datasource,
|
|
@Parameter(in = ParameterIn.QUERY,
|
|
description = "The page number") @RequestParam(required = false) Integer page
|
|
) {
|
|
|
|
return new ArrayList<>();
|
|
}
|
|
|
|
|
|
@Operation(
|
|
summary = "Retrieve all scholix links from a persistent identifier",
|
|
description = "The linksFromPid endpoint returns a list of scholix object related from a specific persistent identifier"
|
|
)
|
|
@GetMapping("/linksFromPid")
|
|
public List<ScholixV1> linksFromPid(
|
|
@Parameter(in = ParameterIn.QUERY, description = "persistent Identifier") @NotNull String pid,
|
|
@Parameter(in = ParameterIn.QUERY, description = "Persistent Identifier Type") @RequestParam(required = false) String pidType,
|
|
@Parameter(in = ParameterIn.QUERY, description = "typology target filter should be publication, dataset or unknown") @RequestParam(required = false) String typologyTarget,
|
|
@Parameter(in = ParameterIn.QUERY, description = "a datasource provenance filter of the target relation") @RequestParam(required = false) String datasourceTarget,
|
|
@Parameter(in = ParameterIn.QUERY,
|
|
description = "The page number") @RequestParam(required = false) Integer page
|
|
) {
|
|
|
|
return new ArrayList<>();
|
|
}
|
|
|
|
|
|
|
|
}
|