scholexplorer #4
|
@ -16,6 +16,7 @@
|
|||
<module>dhp-broker-public-application</module>
|
||||
<module>dhp-mdstore-manager</module>
|
||||
<module>dnet-orgs-database-application</module>
|
||||
<module>scholexplorer-api</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
<artifactId>apps</artifactId>
|
||||
<version>3.2.3-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>scholexplorer-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-bean-validators</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-help-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,89 @@
|
|||
package eu.dnetlib.scholix.api;
|
||||
|
||||
import eu.dnetlib.common.app.AbstractDnetApp;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableSwagger2
|
||||
@EnableCaching
|
||||
@EnableScheduling
|
||||
//@EntityScan("eu.dnetlib.scholix.api.controller")
|
||||
public class MainApplication extends AbstractDnetApp {
|
||||
|
||||
@Value("${dhp.swagger.api.host}")
|
||||
private String swaggetHost;
|
||||
|
||||
@Value("${dhp.swagger.api.basePath}")
|
||||
private String swaggerPath;
|
||||
|
||||
final String descriptionAPI = " <p style=\"text-align:center;\"><img src=\"/logo.png\" alt=\"ScholeXplorer\"> </p>" +
|
||||
"The Scholix Swagger API allows clients to run REST queries over the Scholexplorer index in order to fetch links matching given criteria. In the current version, clients can search for:" +
|
||||
"<ul><li>Links whose source object has a given PID or PID type</li>" +
|
||||
"<li>Links whose source object has been published by a given data source (\"data source as publisher\")</li>" +
|
||||
"<li>Links that were collected from a given data source (\"data source as provider\").</li></ul>";
|
||||
|
||||
public static void main(final String[] args) {
|
||||
SpringApplication.run(MainApplication.class, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configSwagger(final Docket docket) {
|
||||
docket
|
||||
.host(swaggetHost)
|
||||
.pathMapping(swaggerPath)
|
||||
.groupName("Scholexplorer V1")
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.any())
|
||||
.paths(p -> p.startsWith("/v1"))
|
||||
.build()
|
||||
.apiInfo(new ApiInfoBuilder()
|
||||
.title("Scholexplorer API V1.0")
|
||||
.description(descriptionAPI)
|
||||
.version("1.0")
|
||||
.contact(ApiInfo.DEFAULT_CONTACT)
|
||||
.license("Apache 2.0")
|
||||
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0")
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Bean (name = "SpringDOcketv2")
|
||||
public Docket v2Docket() {
|
||||
|
||||
|
||||
final Docket docket = new Docket(DocumentationType.SWAGGER_2);
|
||||
|
||||
docket
|
||||
.host(swaggetHost)
|
||||
.pathMapping(swaggerPath)
|
||||
.groupName("Scholexplorer V2")
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.any())
|
||||
.paths(p -> p.startsWith("/v2"))
|
||||
.build()
|
||||
.apiInfo(new ApiInfoBuilder()
|
||||
.title("Scholexplorer API V2.0")
|
||||
.description(descriptionAPI)
|
||||
.version("2.0")
|
||||
.contact(ApiInfo.DEFAULT_CONTACT)
|
||||
.license("Apache 2.0")
|
||||
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0")
|
||||
.build());
|
||||
|
||||
return docket;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package eu.dnetlib.scholix.api.controller;
|
||||
|
||||
import eu.dnetlib.common.controller.AbstractDnetController;
|
||||
import eu.dnetlib.scholix.api.model.v1.LinkPublisher;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/v1")
|
||||
@Api(tags = {
|
||||
"Datasources"
|
||||
})
|
||||
public class DatasourceV1 extends AbstractDnetController {
|
||||
|
||||
@Operation(
|
||||
summary = "Get all Datasources",
|
||||
description = "returns a list of all datasources")
|
||||
@GetMapping("/v1/listDatasources")
|
||||
public List<LinkPublisher> getDatasources() {
|
||||
return Arrays.asList(
|
||||
new LinkPublisher().name("pippo").totalRelationships(30),
|
||||
new LinkPublisher().name("pluto").totalRelationships(30),
|
||||
new LinkPublisher().name("peppa").totalRelationships(30)
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package eu.dnetlib.scholix.api.controller;
|
||||
import eu.dnetlib.scholix.api.model.v2.LinkProviderType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
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 java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/v2")
|
||||
@Api(tags = {
|
||||
"LinkProvider : Operation related to the Link Provider"
|
||||
})
|
||||
public class LinkProviderV2 {
|
||||
|
||||
@Operation(
|
||||
summary = "Get all Link Providers",
|
||||
description = "Return a list of link provider and relative number of relations")
|
||||
@GetMapping("/LinkProvider")
|
||||
public List<LinkProviderType> getLinkProviders(
|
||||
@Parameter(in = ParameterIn.QUERY, description = "Filter the link provider name") @RequestParam(required = false) String name
|
||||
) {
|
||||
return Arrays.asList(
|
||||
new LinkProviderType().name("pippo").totalRelationships(30),
|
||||
new LinkProviderType().name("pluto").totalRelationships(30),
|
||||
new LinkProviderType().name("peppa").totalRelationships(30)
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package eu.dnetlib.scholix.api.controller;
|
||||
import eu.dnetlib.scholix.api.model.v2.LinkProviderType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
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 java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/v2/LinkPublisher")
|
||||
@Api(tags = {
|
||||
"LinkPublisher : Operation related to the Link Publisher"
|
||||
})
|
||||
public class LinkPublisherV2 {
|
||||
|
||||
@Operation(
|
||||
summary = "Get All Publishers that provide source object",
|
||||
description = "Return a List of all Publishers that provide source objects in Scholix " +
|
||||
"links and the total number of links where the source object comes from this publisher")
|
||||
@GetMapping("/inSource")
|
||||
public List<LinkProviderType> getInSource(
|
||||
@Parameter(in = ParameterIn.QUERY, description = "Filter the link publisher name") @RequestParam(required = false) String name
|
||||
) {
|
||||
return Arrays.asList(
|
||||
new LinkProviderType().name("pippo").totalRelationships(30),
|
||||
new LinkProviderType().name("pluto").totalRelationships(30),
|
||||
new LinkProviderType().name("peppa").totalRelationships(30)
|
||||
);
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "Get All Publishers that provide target object",
|
||||
description = "Return a List of all Publishers that provide source objects in Scholix " +
|
||||
"links and the total number of links where the target object comes from this publisher")
|
||||
@GetMapping("/inTarget")
|
||||
public List<LinkProviderType> getInTarget(
|
||||
@Parameter(in = ParameterIn.QUERY, description = "Filter the link publisher name") @RequestParam(required = false) String name
|
||||
) {
|
||||
return Arrays.asList(
|
||||
new LinkProviderType().name("pippo").totalRelationships(30),
|
||||
new LinkProviderType().name("pluto").totalRelationships(30),
|
||||
new LinkProviderType().name("peppa").totalRelationships(30)
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
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<>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package eu.dnetlib.scholix.api.controller;
|
||||
|
||||
|
||||
import eu.dnetlib.common.controller.AbstractDnetController;
|
||||
import eu.dnetlib.scholix.api.model.v2.PageResultType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
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.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/v2")
|
||||
@Api(tags = {
|
||||
"Links : Operation related to the Scholix Links"
|
||||
})
|
||||
public class ScholixControllerV2 extends AbstractDnetController {
|
||||
|
||||
@ApiOperation("Get Scholix Links")
|
||||
@GetMapping("/Links")
|
||||
public PageResultType links(
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships collected from a LinkProvider") String linkProvider,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a target pid") String targetPid,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a target pid type") String targetPidType,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a target published in a Publisher named targetPublisher") String targetPublisher,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a target type (literature, dataset, unknown)") String targetType,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a source pid") String sourcePid,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a source pid type") String sourcePidType,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a source published in a Publisher named sourcePublisher") String sourcePublisher,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter Scholix relationships having a source type (literature, dataset, unknown)") String sourceType,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "Filter scholix Links having collected after this date") String harvestedAfter,
|
||||
@Parameter(in = ParameterIn.QUERY,
|
||||
description = "select page of result") Integer page) {
|
||||
|
||||
return new PageResultType();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package eu.dnetlib.scholix.api.model.v1;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Objects;
|
||||
|
||||
public class LinkPublisher {
|
||||
@NotBlank
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("totalRelationships")
|
||||
private Integer totalRelationships = null;
|
||||
|
||||
public LinkPublisher name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@Schema(description = "The Publisher Name")
|
||||
|
||||
@Size(max=300) public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public LinkPublisher totalRelationships(Integer totalRelationships) {
|
||||
this.totalRelationships = totalRelationships;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get totalRelationships
|
||||
* @return totalRelationships
|
||||
**/
|
||||
@Schema(description = "Total number of relationships that the publisher provides")
|
||||
|
||||
public Integer getTotalRelationships() {
|
||||
return totalRelationships;
|
||||
}
|
||||
|
||||
public void setTotalRelationships(Integer totalRelationships) {
|
||||
this.totalRelationships = totalRelationships;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
LinkPublisher linkPublisher = (LinkPublisher) o;
|
||||
return Objects.equals(this.name, linkPublisher.name) &&
|
||||
Objects.equals(this.totalRelationships, linkPublisher.totalRelationships);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, totalRelationships);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class LinkPublisher {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" totalRelationships: ").append(toIndentedString(totalRelationships)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package eu.dnetlib.scholix.api.model.v1;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ScholixCreator {
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("identifier")
|
||||
private List<ScholixIdentifier> identifier = null;
|
||||
|
||||
public ScholixCreator name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@Schema(required = true, description = "The name of the Object Creator")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ScholixCreator identifier(List<ScholixIdentifier> identifier) {
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ScholixCreator addIdentifierItem(ScholixIdentifier identifierItem) {
|
||||
if (this.identifier == null) {
|
||||
this.identifier = new ArrayList<ScholixIdentifier>();
|
||||
}
|
||||
this.identifier.add(identifierItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get identifier
|
||||
* @return identifier
|
||||
**/
|
||||
@Schema(description = "A unique string that identifies the Object Creator")
|
||||
public List<ScholixIdentifier> getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(List<ScholixIdentifier> identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ScholixCreator ScholixCreator = (ScholixCreator) o;
|
||||
return Objects.equals(this.name, ScholixCreator.name) &&
|
||||
Objects.equals(this.identifier, ScholixCreator.identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ScholixCreator {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package eu.dnetlib.scholix.api.model.v1;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class ScholixIdentifier {
|
||||
|
||||
@JsonProperty("identifier")
|
||||
private String identifier = null;
|
||||
|
||||
@JsonProperty("schema")
|
||||
private String schema = null;
|
||||
|
||||
|
||||
|
||||
public ScholixIdentifier Identifier(String ID) {
|
||||
this.identifier = ID;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ID
|
||||
* @return ID
|
||||
**/
|
||||
@Schema(description = "The value of the Identifier")
|
||||
public String getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(String identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public ScholixIdentifier Schema(String idScheme) {
|
||||
this.schema = idScheme;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Schema
|
||||
* @return Schema
|
||||
**/
|
||||
@Schema(description = "The Schema URL of the identifier type")
|
||||
|
||||
public String getSchema() {
|
||||
return schema;
|
||||
}
|
||||
|
||||
public void setSchema(String schema) {
|
||||
this.schema = schema;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ScholixIdentifier identifierType = (ScholixIdentifier) o;
|
||||
return Objects.equals(this.identifier, identifierType.identifier) &&
|
||||
Objects.equals(this.schema, identifierType.schema);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(identifier, schema);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class IdentifierType {\n");
|
||||
|
||||
sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
|
||||
sb.append(" schema: ").append(toIndentedString(schema)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package eu.dnetlib.scholix.api.model.v1;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ScholixItem {
|
||||
|
||||
@JsonProperty("identifier")
|
||||
private ScholixIdentifier identifier;
|
||||
|
||||
@JsonProperty("objectType")
|
||||
private String objectType;
|
||||
|
||||
@JsonProperty("objectSubType")
|
||||
private String objectSubType;
|
||||
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
@JsonProperty("creator")
|
||||
private List<ScholixCreator> creator;
|
||||
|
||||
@JsonProperty("publicationDate")
|
||||
private String publicationDate;
|
||||
|
||||
@JsonProperty("publisher")
|
||||
private ScholixProvider publisher;
|
||||
|
||||
public ScholixItem identifier(ScholixIdentifier identifier) {
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Schema(description = "The identifier string")
|
||||
public ScholixIdentifier getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(ScholixIdentifier identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public ScholixItem objectType(String objectType) {
|
||||
this.objectType = objectType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Schema(description = "Describes the nature of the object (its intended usage)")
|
||||
public String getObjectType() {
|
||||
return objectType;
|
||||
}
|
||||
|
||||
public void setObjectType(String objectType) {
|
||||
this.objectType = objectType;
|
||||
}
|
||||
|
||||
public ScholixItem objectSubType(String objectSubType) {
|
||||
this.objectSubType = objectSubType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Schema(description = "The sub-type of Object")
|
||||
public String getObjectSubType() {
|
||||
return objectSubType;
|
||||
}
|
||||
|
||||
public void setObjectSubType(String objectSubType) {
|
||||
this.objectSubType = objectSubType;
|
||||
}
|
||||
|
||||
public ScholixItem title(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Schema(description = "The name of the object")
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public ScholixItem creator(List<ScholixCreator> creator) {
|
||||
this.creator = creator;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ScholixItem addCreatorInstance(ScholixCreator creatorInstance) {
|
||||
if(this.creator == null)
|
||||
this.creator = new ArrayList<>();
|
||||
this.creator.add(creatorInstance);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Schema(description = "Party responsible for the creation of the object")
|
||||
public List<ScholixCreator> getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(List<ScholixCreator> creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
@Schema(description = "The date the object was formally issued, published or distributed")
|
||||
public String getPublicationDate() {
|
||||
return publicationDate;
|
||||
}
|
||||
|
||||
public void setPublicationDate(String publicationDate) {
|
||||
this.publicationDate = publicationDate;
|
||||
}
|
||||
|
||||
@Schema(description = "The name of the publisher of the object")
|
||||
public ScholixProvider getPublisher() {
|
||||
return publisher;
|
||||
}
|
||||
|
||||
public void setPublisher(ScholixProvider publisher) {
|
||||
this.publisher = publisher;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ScholixItem scholixItemType = (ScholixItem) o;
|
||||
return Objects.equals(this.objectType, scholixItemType.objectType) &&
|
||||
Objects.equals(this.objectSubType, scholixItemType.objectSubType) &&
|
||||
Objects.equals(this.identifier, scholixItemType.identifier) &&
|
||||
Objects.equals(this.title, scholixItemType.title) &&
|
||||
Objects.equals(this.creator, scholixItemType.creator) &&
|
||||
Objects.equals(this.publicationDate, scholixItemType.publicationDate) &&
|
||||
Objects.equals(this.publisher, scholixItemType.publisher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(objectType, objectSubType, identifier, title, creator, publicationDate, publisher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ScholixItemType {\n");
|
||||
|
||||
sb.append(" objectType: ").append(toIndentedString(objectType)).append("\n");
|
||||
sb.append(" objectSubType: ").append(toIndentedString(objectSubType)).append("\n");
|
||||
sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
|
||||
sb.append(" title: ").append(toIndentedString(title)).append("\n");
|
||||
sb.append(" creator: ").append(toIndentedString(creator)).append("\n");
|
||||
sb.append(" publicationDate: ").append(toIndentedString(publicationDate)).append("\n");
|
||||
sb.append(" publisher: ").append(toIndentedString(publisher)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package eu.dnetlib.scholix.api.model.v1;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ScholixProvider {
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("identifier")
|
||||
@Valid
|
||||
private List<ScholixIdentifier> identifier = null;
|
||||
|
||||
public ScholixProvider name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the provider name
|
||||
* @return name
|
||||
**/
|
||||
@Schema(description = "The provider name")
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ScholixProvider identifier(List<ScholixIdentifier> identifier) {
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ScholixProvider addIdentifierItem(ScholixIdentifier identifierItem) {
|
||||
if (this.identifier == null) {
|
||||
this.identifier = new ArrayList<>();
|
||||
}
|
||||
this.identifier.add(identifierItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get identifier
|
||||
* @return identifier
|
||||
**/
|
||||
@Schema(description = "the identifiers of the provider")
|
||||
@Valid
|
||||
public List<ScholixIdentifier> getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(List<ScholixIdentifier> identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ScholixProvider scholixProviderType = (ScholixProvider) o;
|
||||
return Objects.equals(this.name, scholixProviderType.name) &&
|
||||
Objects.equals(this.identifier, scholixProviderType.identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ScholixProviderType {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" identifiers: ").append(toIndentedString(identifier)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package eu.dnetlib.scholix.api.model.v1;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ScholixRelationship {
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("schema")
|
||||
private String schema = null;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("inverseRelationship")
|
||||
private String inverseRelationship = null;
|
||||
|
||||
public ScholixRelationship name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@Schema(required = true, description = "The relationship type chosen from a Scholix controlled vocabulary")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ScholixRelationship schema(String schema) {
|
||||
this.schema = schema;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The name of the schema or controlled list from which Relationship Sub-type is sourced
|
||||
* @return subType
|
||||
**/
|
||||
@Schema(description = "The name of the schema or controlled list from which Relationship Sub-type is sourced")
|
||||
public String getSchema() {
|
||||
return schema;
|
||||
}
|
||||
|
||||
public void setSchema(String schema) {
|
||||
this.schema = schema;
|
||||
}
|
||||
|
||||
public ScholixRelationship inverseRelationship(String inverseRelationship) {
|
||||
this.inverseRelationship = inverseRelationship;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get inverseRelationship
|
||||
* @return inverseRelationship
|
||||
**/
|
||||
@Schema(description = "The value of the inverse relation")
|
||||
|
||||
public String getInverseRelationship() {
|
||||
return inverseRelationship;
|
||||
}
|
||||
|
||||
public void setInverseRelationship(String inverseRelationship) {
|
||||
this.inverseRelationship = inverseRelationship;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ScholixRelationship relationshipType = (ScholixRelationship) o;
|
||||
return Objects.equals(this.name, relationshipType.name) &&
|
||||
Objects.equals(this.schema, relationshipType.schema) &&
|
||||
Objects.equals(this.inverseRelationship, relationshipType.inverseRelationship);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, schema, inverseRelationship);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class RelationshipType {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" subType: ").append(toIndentedString(schema)).append("\n");
|
||||
sb.append(" subTypeSchema: ").append(toIndentedString(inverseRelationship)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
package eu.dnetlib.scholix.api.model.v1;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ScholixV1 {
|
||||
|
||||
@JsonProperty("linkProvider")
|
||||
private List<ScholixProvider> linkProvider;
|
||||
|
||||
@JsonProperty("publicationDate")
|
||||
private String publicationDate;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("relationship")
|
||||
private ScholixRelationship relationship;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("source")
|
||||
private ScholixItem source;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("target")
|
||||
private ScholixItem target;
|
||||
|
||||
|
||||
|
||||
public ScholixV1 linkProvider (final List<ScholixProvider> linkProvider ) {
|
||||
this.linkProvider = linkProvider;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Schema(description = "An entity responsible for making this record available online")
|
||||
public List<ScholixProvider> getLinkProvider() {
|
||||
return linkProvider;
|
||||
}
|
||||
|
||||
public ScholixV1 addLinkProviderItem(ScholixProvider linkProviderItem) {
|
||||
if (this.linkProvider == null) {
|
||||
this.linkProvider = new ArrayList<>();
|
||||
}
|
||||
this.linkProvider.add(linkProviderItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setLinkProvider(List<ScholixProvider> linkProvider) {
|
||||
this.linkProvider = linkProvider;
|
||||
}
|
||||
|
||||
@Schema(description = "date of formal issuance (e.g., publication) of the resource; generally different from source object and target object publication dates")
|
||||
public String getPublicationDate() {
|
||||
return publicationDate;
|
||||
}
|
||||
|
||||
public ScholixV1 publicationDate(String publicationDate) {
|
||||
this.publicationDate = publicationDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setPublicationDate(String publicationDate) {
|
||||
this.publicationDate = publicationDate;
|
||||
}
|
||||
|
||||
@Schema(description = "Semantics of the relationship from source to target")
|
||||
public ScholixRelationship getRelationship() {
|
||||
return relationship;
|
||||
}
|
||||
|
||||
public ScholixV1 relationship(ScholixRelationship relationship) {
|
||||
this.relationship = relationship;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRelationship(ScholixRelationship relationship) {
|
||||
this.relationship = relationship;
|
||||
}
|
||||
|
||||
@Schema(description = "Root element relative to all properties describing the link’s source object.")
|
||||
public ScholixItem getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
|
||||
public ScholixV1 source(ScholixItem source) {
|
||||
this.source = source;
|
||||
return this;
|
||||
}
|
||||
public void setSource(ScholixItem source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
@Schema(description = "Root element relative to all properties describing the link’s target object.")
|
||||
public ScholixItem getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public ScholixV1 target(ScholixItem target) {
|
||||
this.target = target;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setTarget(ScholixItem target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ScholixV1 scholixV1 = (ScholixV1) o;
|
||||
return Objects.equals(this.linkProvider, scholixV1.getLinkProvider()) &&
|
||||
Objects.equals(this.publicationDate, scholixV1.getPublicationDate()) &&
|
||||
Objects.equals(this.relationship, scholixV1.getRelationship()) &&
|
||||
Objects.equals(this.source, scholixV1.getSource()) &&
|
||||
Objects.equals(this.target, scholixV1.getTarget());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(linkProvider, publicationDate, relationship, source, target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ScholixV1 {\n");
|
||||
|
||||
sb.append(" linkProvider: ").append(toIndentedString(linkProvider)).append("\n");
|
||||
sb.append(" publicationDate: ").append(toIndentedString(publicationDate)).append("\n");
|
||||
sb.append(" relationship: ").append(toIndentedString(relationship)).append("\n");
|
||||
sb.append(" source: ").append(toIndentedString(source)).append("\n");
|
||||
sb.append(" target: ").append(toIndentedString(target)).append("\n");
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* The type Link provider type.
|
||||
*/
|
||||
public class LinkProviderType {
|
||||
@NotBlank
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("totalRelationships")
|
||||
private Integer totalRelationships = null;
|
||||
|
||||
/**
|
||||
* Name link provider type.
|
||||
*
|
||||
* @param name the name
|
||||
* @return the link provider type
|
||||
*/
|
||||
public LinkProviderType name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return name name
|
||||
*/
|
||||
@Schema(description = "The Publisher Name")
|
||||
@Size(max=300)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name.
|
||||
*
|
||||
* @param name the name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total relationships link provider type.
|
||||
*
|
||||
* @param totalRelationships the total relationships
|
||||
* @return the link provider type
|
||||
*/
|
||||
public LinkProviderType totalRelationships(Integer totalRelationships) {
|
||||
this.totalRelationships = totalRelationships;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get totalRelationships
|
||||
*
|
||||
* @return totalRelationships total relationships
|
||||
*/
|
||||
@Schema(description = "Total number of relationships that the publisher provides")
|
||||
public Integer getTotalRelationships() {
|
||||
return totalRelationships;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets total relationships.
|
||||
*
|
||||
* @param totalRelationships the total relationships
|
||||
*/
|
||||
public void setTotalRelationships(Integer totalRelationships) {
|
||||
this.totalRelationships = totalRelationships;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
LinkProviderType linkPublisher = (LinkProviderType) o;
|
||||
return Objects.equals(this.name, linkPublisher.name) &&
|
||||
Objects.equals(this.totalRelationships, linkPublisher.totalRelationships);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, totalRelationships);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class LinkPublisher {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" totalRelationships: ").append(toIndentedString(totalRelationships)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The main class that show the page result from the method
|
||||
* /l2/links
|
||||
*/
|
||||
public class PageResultType implements Serializable {
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("currentPage")
|
||||
@ApiModelProperty(position = 0)
|
||||
private Integer currentPage = 0;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("totalLinks")
|
||||
@ApiModelProperty(position = 1)
|
||||
private Integer totalLinks= 0;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("totalPages")
|
||||
@ApiModelProperty(position = 2)
|
||||
private Integer totalPages = 0;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("result")
|
||||
@ApiModelProperty(position = 3)
|
||||
private List<ScholixType> result = new ArrayList<>();
|
||||
|
||||
|
||||
/**
|
||||
* Gets current page.
|
||||
*
|
||||
* @return the current page
|
||||
*/
|
||||
@Schema(description = "The Current page of the results")
|
||||
public Integer getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current page.
|
||||
*
|
||||
* @param currentPage the current page
|
||||
*/
|
||||
public void setCurrentPage(Integer currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets total links.
|
||||
*
|
||||
* @return the total links
|
||||
*/
|
||||
@Schema(description = "The total number of Links found by the query")
|
||||
public Integer getTotalLinks() {
|
||||
return totalLinks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets total links.
|
||||
*
|
||||
* @param totalLinks the total links
|
||||
*/
|
||||
public void setTotalLinks(Integer totalLinks) {
|
||||
this.totalLinks = totalLinks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets total pages.
|
||||
*
|
||||
* @return the total pages
|
||||
*/
|
||||
@Schema(description = "The Total number of pages")
|
||||
public Integer getTotalPages() {
|
||||
return totalPages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets total pages.
|
||||
*
|
||||
* @param totalPages the total pages
|
||||
*/
|
||||
public void setTotalPages(Integer totalPages) {
|
||||
this.totalPages = totalPages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets result.
|
||||
*
|
||||
* @return the result
|
||||
*/
|
||||
@Schema(description = "The First page of Scholix results")
|
||||
public List<ScholixType> getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets result.
|
||||
*
|
||||
* @param result the result
|
||||
*/
|
||||
public void setResult(List<ScholixType> result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* The type Relationship type.
|
||||
*/
|
||||
public class RelationshipType {
|
||||
|
||||
@NotNull
|
||||
@JsonProperty("Name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("SubType")
|
||||
private String subType;
|
||||
|
||||
@JsonProperty("SubTypeSchema")
|
||||
private String subTypeSchema;
|
||||
|
||||
|
||||
/**
|
||||
* Gets The relationship type chosen from a Scholix controlled vocabulary
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
@Schema(description = "The relationship type chosen from a Scholix controlled vocabulary")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets The relationship type chosen from a Scholix controlled vocabulary
|
||||
*
|
||||
* @param name the name
|
||||
* @return the RelationshipType instance
|
||||
*/
|
||||
public RelationshipType setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets The sub-type of RelationshipType.Name
|
||||
*
|
||||
* @return the sub type
|
||||
*/
|
||||
@Schema(description = "The sub-type of RelationshipType.Name")
|
||||
public String getSubType() {
|
||||
return subType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets The sub-type of RelationshipType.Name
|
||||
*
|
||||
* @param subType the sub type
|
||||
* @return the RelationshipType instance
|
||||
*/
|
||||
public RelationshipType setSubType(String subType) {
|
||||
this.subType = subType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets The name of the schema or controlled list from which RelationshipSub-type is sourced.
|
||||
*
|
||||
* @return the sub type schema
|
||||
*/
|
||||
@Schema(description = "The name of the schema or controlled list from which RelationshipSub-type is sourced")
|
||||
public String getSubTypeSchema() {
|
||||
return subTypeSchema;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets The name of the schema or controlled list from which RelationshipSub-type is sourced.
|
||||
*
|
||||
* @param subTypeSchema the sub type schema
|
||||
* @return the RelationshipType instance
|
||||
*/
|
||||
public RelationshipType setSubTypeSchema(String subTypeSchema) {
|
||||
this.subTypeSchema = subTypeSchema;
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The type Scholix creator type.
|
||||
*/
|
||||
public class ScholixCreatorType {
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("identifier")
|
||||
private List<ScholixIdentifierType> identifier = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Gets A List of unique string that identifies the creator
|
||||
*
|
||||
* @return the identifier
|
||||
*/
|
||||
@Schema(description = "A List of unique string that identifies the creator")
|
||||
public List<ScholixIdentifierType> getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets A List of unique string that identifies the creator
|
||||
*
|
||||
* @param identifier the identifier
|
||||
* @return the identifier
|
||||
*/
|
||||
public ScholixCreatorType setIdentifier(List<ScholixIdentifierType> identifier) {
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets The name of the Object Creator
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
@Schema(description = "The name of the Object Creator")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets The name of the Object Creator
|
||||
*
|
||||
* @param name the name
|
||||
* @return the name
|
||||
*/
|
||||
public ScholixCreatorType setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* The type Scholix identifier type.
|
||||
*/
|
||||
public class ScholixIdentifierType {
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("ID")
|
||||
private String id = null;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("IDScheme")
|
||||
private String idScheme = null;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("IDURL")
|
||||
private String idURL = null;
|
||||
|
||||
|
||||
/**
|
||||
* Gets The identifier
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
@Schema(description = "The identifier")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets The identifier
|
||||
*
|
||||
* @param id the id
|
||||
* @return the id
|
||||
*/
|
||||
public ScholixIdentifierType setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets The scheme or namespace of the identifier string
|
||||
*
|
||||
* @return the id scheme
|
||||
*/
|
||||
@Schema(description = "The scheme or namespace of the identifier string")
|
||||
public String getIdScheme() {
|
||||
return idScheme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets The scheme or namespace of the identifier string
|
||||
*
|
||||
* @param idScheme the id scheme
|
||||
* @return the id scheme
|
||||
*/
|
||||
public ScholixIdentifierType setIdScheme(String idScheme) {
|
||||
this.idScheme = idScheme;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets An internet resolvable form of the identifier
|
||||
*
|
||||
* @return the id url
|
||||
*/
|
||||
@Schema(description = "An internet resolvable form of the identifier")
|
||||
public String getIdURL() {
|
||||
return idURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets An internet resolvable form of the identifier
|
||||
*
|
||||
* @param idURL the id url
|
||||
* @return the id url
|
||||
*/
|
||||
public ScholixIdentifierType setIdURL(String idURL) {
|
||||
this.idURL = idURL;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The type Scholix item type.
|
||||
*/
|
||||
public class ScholixItemType {
|
||||
|
||||
@JsonProperty("Identifier")
|
||||
private List<ScholixIdentifierType> identifier = new ArrayList();
|
||||
|
||||
@JsonProperty("Title")
|
||||
private String title;
|
||||
|
||||
@JsonProperty("Type")
|
||||
private String type;
|
||||
|
||||
@JsonProperty("Creator")
|
||||
private List<ScholixCreatorType> creator = new ArrayList<>();
|
||||
|
||||
@JsonProperty("PublicationDate")
|
||||
private String publicationDate;
|
||||
|
||||
@JsonProperty("Publisher")
|
||||
private List<LinkProviderType> publisher = new ArrayList<>();
|
||||
|
||||
|
||||
/**
|
||||
* Gets identifier.
|
||||
*
|
||||
* @return the identifier
|
||||
*/
|
||||
public List<ScholixIdentifierType> getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets identifier.
|
||||
*
|
||||
* @param identifier the identifier
|
||||
* @return the identifier
|
||||
*/
|
||||
public ScholixItemType setIdentifier(List<ScholixIdentifierType> identifier) {
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets title.
|
||||
*
|
||||
* @return the title
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets title.
|
||||
*
|
||||
* @param title the title
|
||||
* @return the title
|
||||
*/
|
||||
public ScholixItemType setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets type.
|
||||
*
|
||||
* @return the type
|
||||
*/
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type.
|
||||
*
|
||||
* @param type the type
|
||||
* @return the type
|
||||
*/
|
||||
public ScholixItemType setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets creator.
|
||||
*
|
||||
* @return the creator
|
||||
*/
|
||||
public List<ScholixCreatorType> getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets creator.
|
||||
*
|
||||
* @param creator the creator
|
||||
* @return the creator
|
||||
*/
|
||||
public ScholixItemType setCreator(List<ScholixCreatorType> creator) {
|
||||
this.creator = creator;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets publication date.
|
||||
*
|
||||
* @return the publication date
|
||||
*/
|
||||
public String getPublicationDate() {
|
||||
return publicationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets publication date.
|
||||
*
|
||||
* @param publicationDate the publication date
|
||||
* @return the publication date
|
||||
*/
|
||||
public ScholixItemType setPublicationDate(String publicationDate) {
|
||||
this.publicationDate = publicationDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets publisher.
|
||||
*
|
||||
* @return the publisher
|
||||
*/
|
||||
public List<LinkProviderType> getPublisher() {
|
||||
return publisher;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets publisher.
|
||||
*
|
||||
* @param publisher the publisher
|
||||
* @return the publisher
|
||||
*/
|
||||
public ScholixItemType setPublisher(List<LinkProviderType> publisher) {
|
||||
this.publisher = publisher;
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* The type Scholix link provider type.
|
||||
*/
|
||||
public class ScholixLinkProviderType {
|
||||
@NotBlank
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("identifier")
|
||||
private List<ScholixIdentifierType> identifier = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Gets A List of unique string that identifies the object
|
||||
*
|
||||
* @return the identifier
|
||||
*/
|
||||
@Schema(description = "A List of unique string that identifies the object")
|
||||
public List<ScholixIdentifierType> getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets A List of unique string that identifies the object
|
||||
*
|
||||
* @param identifier the identifier
|
||||
* @return the identifier
|
||||
*/
|
||||
public ScholixLinkProviderType setIdentifier(List<ScholixIdentifierType> identifier) {
|
||||
this.identifier = identifier;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets The name of the Provider
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
@Schema(description = "The name of the Provider")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets The name of the Provider
|
||||
*
|
||||
* @param name the name
|
||||
* @return the name
|
||||
*/
|
||||
public ScholixLinkProviderType setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
package eu.dnetlib.scholix.api.model.v2;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The type Scholix type.
|
||||
*/
|
||||
public class ScholixType implements Serializable {
|
||||
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("RelationshipType")
|
||||
private RelationshipType relationshipType ;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("source")
|
||||
private ScholixItemType source ;
|
||||
|
||||
@NotBlank
|
||||
@JsonProperty("target")
|
||||
private ScholixItemType target ;
|
||||
|
||||
@JsonProperty("HarvestDate")
|
||||
private String harvestDate ;
|
||||
|
||||
|
||||
@JsonProperty("LicenseURL")
|
||||
private String licenseURL ;
|
||||
|
||||
@JsonProperty("LinkProvider")
|
||||
private List<LinkProviderType> linkProvider ;
|
||||
|
||||
@JsonProperty("LinkPublicationDate")
|
||||
private String linkPublicationDate ;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the nature of the relationship between the source object and target object in this Link Information Package
|
||||
*
|
||||
* @return the relationship type
|
||||
*/
|
||||
@Schema(description = "The nature of the relationship between the source object and target object in this Link Information Package")
|
||||
public RelationshipType getRelationshipType() {
|
||||
return relationshipType;
|
||||
}
|
||||
|
||||
public void setRelationshipType(RelationshipType relationshipType) {
|
||||
this.relationshipType = relationshipType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Root element relative to all properties describing the link’s source object
|
||||
*
|
||||
* @return the source
|
||||
*/
|
||||
@Schema(description = "Root element relative to all properties describing the link’s source object")
|
||||
public ScholixItemType getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets source.
|
||||
*
|
||||
* @param source the source
|
||||
*/
|
||||
public void setSource(ScholixItemType source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Root element relative to all properties describing the link’s target object
|
||||
*
|
||||
* @return the target
|
||||
*/
|
||||
@Schema(description = "Gets Root element relative to all properties describing the link’s target object")
|
||||
public ScholixItemType getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets target.
|
||||
*
|
||||
* @param target the target
|
||||
*/
|
||||
public void setTarget(ScholixItemType target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets harvest date.
|
||||
*
|
||||
* @return the harvest date
|
||||
*/
|
||||
public String getHarvestDate() {
|
||||
return harvestDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets harvest date.
|
||||
*
|
||||
* @param harvestDate the harvest date
|
||||
*/
|
||||
public void setHarvestDate(String harvestDate) {
|
||||
this.harvestDate = harvestDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets The URL of the license for the Scholix Link Information Package
|
||||
*
|
||||
* @return the license url
|
||||
*/
|
||||
|
||||
@Schema(description = "The URL of the license for the Scholix Link Information Package")
|
||||
public String getLicenseURL() {
|
||||
return licenseURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets license url.
|
||||
*
|
||||
* @param licenseURL the license url
|
||||
*/
|
||||
public void setLicenseURL(String licenseURL) {
|
||||
this.licenseURL = licenseURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets The source(s) of this Link Information Package.
|
||||
*
|
||||
* @return the link provider
|
||||
*/
|
||||
@Schema(description = "The source(s) of this Link Information Package")
|
||||
public List<LinkProviderType> getLinkProvider() {
|
||||
return linkProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets link provider.
|
||||
*
|
||||
* @param linkProvider the link provider
|
||||
*/
|
||||
public void setLinkProvider(List<LinkProviderType> linkProvider) {
|
||||
this.linkProvider = linkProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Date when this Link Information Package was first formally issued from this current Provider
|
||||
*
|
||||
* @return the link publication date
|
||||
*/
|
||||
@Schema(description = "Date when this Link Information Package was first formally issued from this current Provider")
|
||||
|
||||
public String getLinkPublicationDate() {
|
||||
return linkPublicationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets link publication date.
|
||||
*
|
||||
* @param linkPublicationDate the link publication date
|
||||
*/
|
||||
public void setLinkPublicationDate(String linkPublicationDate) {
|
||||
this.linkPublicationDate = linkPublicationDate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
spring.main.banner-mode = console
|
||||
|
||||
logging.level.root = INFO
|
||||
dhp.swagger.api.host = localhost:8080
|
||||
#dhp.swagger.api.host = api.scholexplorer.openaire.eu
|
||||
dhp.swagger.api.basePath = /
|
||||
|
||||
maven.pom.path = /META-INF/maven/eu.dnetlib.dhp/scholexplorer-api/effective-pom.xml
|
||||
#
|
||||
#spring.thymeleaf.cache=false
|
||||
#
|
||||
#management.endpoints.web.exposure.include = prometheus,health
|
||||
#management.endpoints.web.base-path = /
|
||||
#management.endpoints.web.path-mapping.prometheus = metrics
|
||||
#management.endpoints.web.path-mapping.health = health
|
||||
#
|
||||
#spring.datasource.url=jdbc:postgresql://localhost:5432/mdstoremanager
|
||||
#spring.datasource.username=
|
||||
#spring.datasource.password=
|
||||
#
|
||||
#spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
|
||||
#
|
||||
## Hibernate ddl auto (create, create-drop, validate, update)
|
||||
#spring.jpa.hibernate.ddl-auto = validate
|
||||
#spring.jpa.properties.hibernate.hbm2dll.extra_physical_table_types = MATERIALIZED VIEW
|
||||
#spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
|
||||
#spring.jpa.open-in-view=true
|
||||
#
|
||||
## logs
|
||||
#logging.level.io.swagger.models.parameters.AbstractSerializableParameter = error
|
||||
#
|
||||
## Hadoop
|
||||
#dhp.mdstore-manager.hadoop.cluster = GARR
|
||||
#dhp.mdstore-manager.hdfs.base-path = /data/dnet.dev/mdstore
|
||||
#dhp.mdstore-manager.hadoop.user = dnet.dev
|
||||
#
|
||||
##dhp.mdstore-manager.hadoop.zeppelin.base-url = https://iis-cdh5-test-gw.ocean.icm.edu.pl/zeppelin
|
||||
##dhp.mdstore-manager.hadoop.zeppelin.login =
|
||||
##dhp.mdstore-manager.hadoop.zeppelin.password =
|
||||
#dhp.mdstore-manager.hadoop.zeppelin.base-url = https://hadoop-zeppelin.garr-pa1.d4science.org
|
||||
#dhp.mdstore-manager.hadoop.zeppelin.login =
|
||||
#dhp.mdstore-manager.hadoop.zeppelin.password =
|
||||
#
|
||||
#dhp.mdstore-manager.hadoop.zeppelin.name-prefix = mdstoreManager
|
||||
#
|
||||
#dhp.mdstore-manager.inspector.records.max = 1000
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
|
@ -0,0 +1,135 @@
|
|||
<!-- HTML for static distribution bundle build -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Custom Swagger UI</title>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.24.2/swagger-ui.css" >
|
||||
<link rel="icon" type="image/png" href="./swagger-ui/swagger-favicon-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="./swagger-ui/swagger-favicon-16x16.png" sizes="16x16" />
|
||||
<style>
|
||||
html
|
||||
{
|
||||
box-sizing: border-box;
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after
|
||||
{
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
margin:0;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.top-nav-bar{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background: #333;
|
||||
padding: 15px;
|
||||
}
|
||||
.nav-bar-icon{
|
||||
margin-top: 1px;
|
||||
float: left;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
.nav-bar-title{
|
||||
float: left;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
margin-top: 7px;
|
||||
margin-left: 10px;
|
||||
font-size: 18px;
|
||||
color: #ffffff;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.nav-bar-select{
|
||||
width: 30%;
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 10px 15px;
|
||||
outline: 0;
|
||||
border-radius: 2px;
|
||||
border: none;
|
||||
background: #fafafa;
|
||||
color: #3b4151;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
}
|
||||
select.classic {
|
||||
background-image: linear-gradient(45deg, transparent 50%, #111 50%), linear-gradient(135deg, #111 50%, transparent 50%);
|
||||
background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px), 100% 0;
|
||||
background-size: 5px 5px, 5px 5px, 3.5em 3.5em;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="top-nav-bar">
|
||||
<a class="nav-bar-icon"><img src="swagger-favicon-32x32.png"></a>
|
||||
<a class="nav-bar-title"><b>X name</b></a>
|
||||
<select class="classic nav-bar-select" id="service-selector" onchange="changeSwaggerUI()">
|
||||
<option value="./swagger.json">X service</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="margin-top: 100px" id="swagger-ui"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.24.2/swagger-ui-bundle.js"> </script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.24.2/swagger-ui-standalone-preset.js"> </script>
|
||||
<script>
|
||||
function changeSwaggerUI(){
|
||||
let selected_service_swaggerURL = document.getElementById("service-selector").value;
|
||||
loadUI(selected_service_swaggerURL);
|
||||
}
|
||||
|
||||
function loadUI(swaggerJsonURL){
|
||||
// Begin Swagger UI call region
|
||||
const ui = SwaggerUIBundle({
|
||||
url: swaggerJsonURL,
|
||||
validatorUrl: "",
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
docExpansion: 'none',
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
plugins: [
|
||||
CustomTopbarPlugin
|
||||
],
|
||||
layout: "StandaloneLayout"
|
||||
});
|
||||
// End Swagger UI call region
|
||||
|
||||
window.ui = ui
|
||||
}
|
||||
|
||||
function CustomTopbarPlugin() {
|
||||
// this plugin overrides the Topbar component to return nothing
|
||||
return {
|
||||
components: {
|
||||
Topbar: () => null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
loadUI("./swagger-ui/springfox.js?v=3.0.0");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue