1. Create domain package. Add RequestFilter class.
2. Update converter class with new domain object 3. Update properties file and xml configuration 4. Bug fix on jobs' validation status
This commit is contained in:
parent
daac1ae6cd
commit
cd2e30610a
12
pom.xml
12
pom.xml
|
@ -220,8 +220,9 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
|
@ -240,6 +241,7 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>com.googlecode.maven-download-plugin</groupId>
|
||||
<artifactId>download-maven-plugin</artifactId>
|
||||
|
@ -261,6 +263,7 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
|
@ -268,16 +271,16 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
<!--<goals>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>-->
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<sequential>
|
||||
<echo>Add theme</echo>
|
||||
<replace token="</head>"
|
||||
value="<link href='webjars/springfox-swagger-ui/themes/2.x/theme-feeling-blue.css' rel="stylesheet"/></head>"
|
||||
dir="${project.build.directory}/classes/META-INF/resources">
|
||||
dir="${settings.localRepository}/io/springfox/springfox-swagger-ui/2.7.0/META-INF/resources">
|
||||
<include name="swagger-ui.html"/>
|
||||
</replace>
|
||||
</sequential>
|
||||
|
@ -286,6 +289,7 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
-->
|
||||
|
||||
<!--<plugin>
|
||||
<groupId>cz.habarta.typescript-generator</groupId>
|
||||
|
|
|
@ -28,7 +28,7 @@ public class Config {
|
|||
@Value("${redis.port:6379}")
|
||||
private String port;
|
||||
|
||||
@Value("${redis.password:#{null}}")
|
||||
@Value("${redis.password}")
|
||||
private String password;
|
||||
|
||||
@PostConstruct
|
||||
|
|
|
@ -35,6 +35,7 @@ public class FrontEndLinkURIAuthenticationSuccessHandler implements Authenticati
|
|||
int expireSec = -1;
|
||||
sessionCookie.setMaxAge(expireSec);
|
||||
sessionCookie.setPath("/");
|
||||
// sessionCookie.setDomain();
|
||||
response.addCookie(sessionCookie);
|
||||
response.sendRedirect(frontEndURI);
|
||||
}
|
||||
|
|
|
@ -44,14 +44,14 @@ public class MonitorApiImpl implements MonitorApi {
|
|||
@RequestParam(value = "limit", required = false,defaultValue = "10") @ApiParam(value = "Null value") String limit,
|
||||
@RequestParam(value = "dateFrom", required = false) @ApiParam(value = "Null value") String dateFrom,
|
||||
@RequestParam(value = "dateTo", required = false) @ApiParam(value = "Null value") String dateTo,
|
||||
@RequestParam("validationStatus") @ApiParam(value = "Equals to filter validation jobs", required = true) String validationStatus,
|
||||
@RequestParam("validationStatus") @ApiParam(value = "Equals to filter validation jobs", required = false) String validationStatus,
|
||||
@RequestParam("includeJobsTotal") @ApiParam(value = "Always true", required = true) String includeJobsTotal) throws JSONException, ValidatorServiceException {
|
||||
|
||||
LOGGER.debug("Getting jobs of user : " + user);
|
||||
LOGGER.debug(user + "/" + jobType + "/" + offset + "/" + dateFrom + "/" + dateTo + "/" + validationStatus + "/" + includeJobsTotal);
|
||||
JobsOfUser retJobs = new JobsOfUser();
|
||||
LOGGER.debug("Size fo jobs list -> " + getValidationService().getStoredJobsNew(user, jobType, Integer.parseInt(offset),
|
||||
Integer.parseInt(limit), dateFrom, dateTo, validationStatus));
|
||||
LOGGER.debug("Size of jobs list -> " + getValidationService().getStoredJobsNew(user, jobType, Integer.parseInt(offset),
|
||||
Integer.parseInt(limit), dateFrom, dateTo, validationStatus).size());
|
||||
retJobs.setJobs(getValidationService().getStoredJobsNew(user, jobType, Integer.parseInt(offset),
|
||||
Integer.parseInt(limit), dateFrom, dateTo, validationStatus));
|
||||
if (Boolean.parseBoolean(includeJobsTotal)) {
|
||||
|
@ -60,6 +60,23 @@ public class MonitorApiImpl implements MonitorApi {
|
|||
retJobs.setTotalJobsFailed(this.getJobsTotalNumberOfUser(user, jobType, Constants.VALIDATION_JOB_STATUS_FAILED));
|
||||
retJobs.setTotalJobsOngoing(this.getJobsTotalNumberOfUser(user, jobType,Constants.VALIDATION_JOB_STATUS_ONGOING));
|
||||
}
|
||||
|
||||
//TODO fix status with new validator version
|
||||
for(StoredJob job :retJobs.getJobs()){
|
||||
if (job.getContentJobStatus().equals("ongoing") || job.getUsageJobStatus().equals("ongoing")) {
|
||||
job.setValidationStatus("ongoing");
|
||||
} else if ((job.getValidationType().equals("CU") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("finished") && job.getContentJobScore() > 50 && job.getUsageJobScore() > 50)
|
||||
|| (job.getValidationType().equals("C") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("none") && job.getContentJobScore() > 50)
|
||||
|| (job.getValidationType().equals("U") && job.getContentJobStatus().equals("none") && job.getUsageJobStatus().equals("finished") && job.getUsageJobScore() > 50)) {
|
||||
job.setValidationStatus("successful");
|
||||
} else if ((job.getValidationType().equals("CU") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("finished") && (job.getContentJobScore() <= 50 || job.getUsageJobScore() <= 50))
|
||||
|| (job.getValidationType().equals("C") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("none") && job.getContentJobScore() <= 50)
|
||||
|| (job.getValidationType().equals("U") && job.getContentJobStatus().equals("none") && job.getUsageJobStatus().equals("finished") && job.getUsageJobScore() <= 50) ) {
|
||||
job.setValidationStatus("failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return retJobs;
|
||||
|
||||
}
|
||||
|
|
|
@ -95,56 +95,10 @@ public interface RepositoryApi {
|
|||
List<Timezone> getTimezones();
|
||||
|
||||
@RequestMapping(value = "/updateRepository", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
Repository updateRepository(Repository repository);
|
||||
|
||||
@RequestMapping(value = "/updateManagedStatus", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateManagedStatus(String id, String managed);
|
||||
|
||||
@RequestMapping(value = "/updateEnglishName", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateEnglishName(String id,String officialName, String englishName);
|
||||
|
||||
@RequestMapping(value = "/updateLatitude", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateLatitude(String id, String latitude);
|
||||
|
||||
@RequestMapping(value = "/updateLongitude", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateLongitude(String id, String longitude);
|
||||
|
||||
@RequestMapping(value = "/updateOfficialName", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateOfficialName(String id, String officialName);
|
||||
|
||||
@RequestMapping(value = "/updateTimezone", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateTimezone(String id, String timezone);
|
||||
|
||||
@RequestMapping(value = "/updateTypology", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateTypology(String id, String typology);
|
||||
|
||||
@RequestMapping(value = "/updateLogoUrl", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updateLogoUrl(String id, String logoUrl);
|
||||
|
||||
@RequestMapping(value = "/updatePlatform", method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
String updatePlatform(String id, String platform);
|
||||
|
||||
|
||||
Repository updateRepository(Repository repository) throws JSONException;
|
||||
|
||||
@RequestMapping(value = "/getUrlsOfUserRepos/{user_email}/{page}/{size}/",method = RequestMethod.GET,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
|
@ -174,4 +128,12 @@ public interface RepositoryApi {
|
|||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
|
||||
|
||||
@RequestMapping(value = "/getListLatestUpdate/{mode}",method = RequestMethod.GET,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
Map<String, String> getListLatestUpdate(String mode) throws RepositoryServiceException, JSONException;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package eu.dnetlib.repo.manager.service.controllers;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import eu.dnetlib.domain.data.Repository;
|
||||
import eu.dnetlib.domain.data.RepositoryInterface;
|
||||
import eu.dnetlib.domain.enabling.Vocabulary;
|
||||
import eu.dnetlib.repo.manager.service.utils.Converter;
|
||||
import eu.dnetlib.repo.manager.service.utils.RequestFilter;
|
||||
import eu.dnetlib.repo.manager.service.domain.RequestFilter;
|
||||
import eu.dnetlib.repo.manager.shared.*;
|
||||
import gr.uoa.di.driver.enabling.vocabulary.VocabularyLoader;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
@ -288,7 +285,7 @@ public class RepositoryApiImpl implements RepositoryApi {
|
|||
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/api/")
|
||||
.path("/{id}/")
|
||||
.path("/{id}")
|
||||
.build().expand(id).encode();
|
||||
|
||||
String rs = restTemplate.getForObject(uriComponents.toUri(), String.class);
|
||||
|
@ -300,7 +297,6 @@ public class RepositoryApiImpl implements RepositoryApi {
|
|||
@RequestBody Repository repository) throws Exception {
|
||||
|
||||
repository = this.setRepositoryFeatures(datatype,repository);
|
||||
|
||||
LOGGER.debug("storing " + datatype + " repository with id: " + repository.getId());
|
||||
if (!datatype.equalsIgnoreCase("opendoar") && !datatype.equalsIgnoreCase("re3data")) {
|
||||
if (datatype.equalsIgnoreCase("journal") || datatype.equalsIgnoreCase("aggregator")) {
|
||||
|
@ -338,14 +334,15 @@ public class RepositoryApiImpl implements RepositoryApi {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Repository updateRepository(@RequestBody Repository repository) {
|
||||
/*UriComponents uriComponents = UriComponentsBuilder
|
||||
public Repository updateRepository(@RequestBody Repository repository) throws JSONException {
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/update/")
|
||||
.build()
|
||||
.encode();*/
|
||||
return null;
|
||||
|
||||
|
||||
.encode();
|
||||
String json_repository = Converter.repositoryObjectToJson(repository);
|
||||
HttpEntity<String> httpEntity = new HttpEntity <String> (json_repository,httpHeaders);
|
||||
restTemplate.postForObject(uriComponents.toUri(),httpEntity,String.class);
|
||||
return repository;
|
||||
}
|
||||
|
||||
private void updateRegisteredByValue(String id, String registeredBy) {
|
||||
|
@ -524,114 +521,6 @@ public class RepositoryApiImpl implements RepositoryApi {
|
|||
return Converter.toTimezones(timezones);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateManagedStatus(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "managed") String managed) {
|
||||
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/manage/")
|
||||
.queryParam("id",id)
|
||||
.queryParam("managed",managed)
|
||||
.build().encode();
|
||||
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateEnglishName(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "officialName") String officialName,
|
||||
@RequestParam(value = "englishname") String englishName) {
|
||||
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/name/")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("officialname",officialName)
|
||||
.queryParam("englishname",englishName)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateLatitude(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "latitude") String latitude) {
|
||||
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/latitude/")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("latitude",latitude)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateLongitude(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "longitude") String longitude) {
|
||||
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/longitude/")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("longitude",longitude)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateOfficialName(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "officialname") String officialname) {
|
||||
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/officialname/")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("officialname",officialname)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateTimezone(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "timezone") String timezone) {
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/timezone")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("timezone",timezone)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateTypology(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "typology") String typology) {
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/typology")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("typology",typology)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateLogoUrl(@RequestParam(value = "id") String id,
|
||||
@RequestParam(value = "logoUrl") String logoUrl) {
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/logourl")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("logourl",logoUrl)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updatePlatform(String id, String platform) {
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromHttpUrl(baseAddress + "/ds/platform")
|
||||
.queryParam("dsId",id)
|
||||
.queryParam("platform",platform)
|
||||
.build().encode();
|
||||
return restTemplate.postForObject(uriComponents.toUri(), null,String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getUrlsOfUserRepos(@PathVariable("user_email") String userEmail,
|
||||
@PathVariable("page") String page,
|
||||
|
@ -756,6 +645,17 @@ public class RepositoryApiImpl implements RepositoryApi {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getListLatestUpdate(@PathVariable("mode") String mode) throws JSONException {
|
||||
if(mode.equals("opendoar"))
|
||||
return Collections.singletonMap("lastCollectionDate", getRepositoryInterface("openaire____::"+mode).get(0).getLastCollectionDate());
|
||||
else
|
||||
/*
|
||||
* first api of re3data has null value on collection date
|
||||
* */
|
||||
return Collections.singletonMap("lastCollectionDate", getRepositoryInterface("openaire____::"+mode).get(1).getLastCollectionDate());
|
||||
}
|
||||
|
||||
private MetricsNumbers getMetricsNumbers(String openAIREID) throws BrokerException {
|
||||
|
||||
//build the uri params
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.repo.manager.service.utils;
|
||||
package eu.dnetlib.repo.manager.service.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
|
@ -1,16 +1,23 @@
|
|||
package eu.dnetlib.repo.manager.service.utils;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import eu.dnetlib.domain.data.Repository;
|
||||
import eu.dnetlib.domain.data.RepositoryInterface;
|
||||
import eu.dnetlib.repo.manager.shared.*;
|
||||
import eu.dnetlib.repo.manager.service.controllers.PiWikApi;
|
||||
import eu.dnetlib.repo.manager.shared.AggregationDetails;
|
||||
import eu.dnetlib.repo.manager.shared.Timezone;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
@ -18,7 +25,7 @@ import java.util.*;
|
|||
public class Converter {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Converter.class);
|
||||
|
||||
|
||||
public static Repository jsonToRepositoryObject(JSONObject repositoryObject) throws JSONException {
|
||||
|
||||
Repository repository = new Repository();
|
||||
|
@ -118,8 +125,6 @@ public class Converter {
|
|||
return repository;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Date convertStringToDate(String date){
|
||||
|
||||
if(Objects.equals(date, "null"))
|
||||
|
@ -182,6 +187,8 @@ public class Converter {
|
|||
//repositoryInterface.setActive(Boolean.parseBoolean(repositoryInterfaceObject.get("active").toString()));
|
||||
repositoryInterface.setRemovable(Boolean.parseBoolean(repositoryInterfaceObject.get("removable").toString()));
|
||||
repositoryInterface.setCompliance(repositoryInterfaceObject.get("compatibility").toString());
|
||||
repositoryInterface.setLastCollectionDate(repositoryInterfaceObject.get("lastCollectionDate").toString());
|
||||
|
||||
|
||||
Map<String, String> accessParams = new HashMap<>();
|
||||
Map<String, String> extraFields = new HashMap<>();
|
||||
|
@ -198,47 +205,56 @@ public class Converter {
|
|||
public static String repositoryObjectToJson(Repository repository) throws JSONException {
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("activationId",repository.getActivationId());
|
||||
jsonObject.put("aggregator",repository.getAggregator());
|
||||
jsonObject.put("certificates",repository.getCertificates());
|
||||
jsonObject.put("citationguidelineurl",repository.getCitationGuidelineUrl());
|
||||
jsonObject.put("collectedfrom",repository.getCollectedFrom());
|
||||
|
||||
jsonObject.put("id",repository.getId());
|
||||
jsonObject.put("openaireId",getOpenaireId(repository.getId()));
|
||||
jsonObject.put("officialname",repository.getOfficialName());
|
||||
jsonObject.put("englishname",repository.getEnglishName());
|
||||
jsonObject.put("websiteurl",repository.getWebsiteUrl());
|
||||
jsonObject.put("logourl",repository.getLogoUrl());
|
||||
jsonObject.put("contactemail",repository.getContactEmail());
|
||||
jsonObject.put("longitude",repository.getLongitude().toString());
|
||||
jsonObject.put("latitude",repository.getLatitude().toString());
|
||||
jsonObject.put("timezone",repository.getTimezone());
|
||||
jsonObject.put("namespaceprefix",repository.getNamespacePrefix());
|
||||
jsonObject.put("languages",repository.getOdLanguages());
|
||||
jsonObject.put("dateofvalidation",convertDateToString(repository.getDateOfValidation()));
|
||||
jsonObject.put("typology",repository.getTypology());
|
||||
jsonObject.put("dateofcollection",convertDateToString(repository.getDateOfCollection()));
|
||||
// jsonObject.put("platform",repository.getPlatform());
|
||||
jsonObject.put("activationId",repository.getActivationId());
|
||||
jsonObject.put("description",repository.getDescription());
|
||||
jsonObject.put("eissn",repository.getEissn());
|
||||
jsonObject.put("issn",repository.getIssn());
|
||||
jsonObject.put("lissn",repository.getLissn());
|
||||
jsonObject.put("registeredby",repository.getRegisteredBy());
|
||||
// jsonObject.put("subjects",repository.getSubjects());
|
||||
jsonObject.put("aggregator",repository.getAggregator());
|
||||
jsonObject.put("collectedfrom",repository.getCollectedFrom());
|
||||
// jsonObject.put("managed",repository.getIsManaged());
|
||||
|
||||
// jsonObject.put("organizations",repository.getOrganization());
|
||||
// for(repository.getOrganization())
|
||||
|
||||
//TODO check fields
|
||||
/* jsonObject.put("certificates",repository.getCertificates());
|
||||
jsonObject.put("citationguidelineurl",repository.getCitationGuidelineUrl());
|
||||
jsonObject.put("databaseaccessrestriction",repository.getDatabaseAccessRestriction());
|
||||
jsonObject.put("databaseaccesstype",repository.getDatabaseAccessType());
|
||||
jsonObject.put("datauploadrestriction",repository.getDataUploadRestriction());
|
||||
jsonObject.put("datauploadtype",repository.getDataUploadType());
|
||||
jsonObject.put("dateofcollection",convertDateToString(repository.getDateOfCollection()));
|
||||
jsonObject.put("dateofvalidation",convertDateToString(repository.getDateOfValidation()));
|
||||
jsonObject.put("description",repository.getDescription());
|
||||
jsonObject.put("eissn",repository.getEissn());
|
||||
jsonObject.put("englishname",repository.getEnglishName());
|
||||
jsonObject.put("id",repository.getId());
|
||||
jsonObject.put("issn",repository.getIssn());
|
||||
jsonObject.put("languages",repository.getOdLanguages());
|
||||
jsonObject.put("latitude",repository.getLatitude().toString());
|
||||
jsonObject.put("lissn",repository.getLissn());
|
||||
jsonObject.put("logourl",repository.getLogoUrl());
|
||||
jsonObject.put("longitude",repository.getLongitude().toString());
|
||||
jsonObject.put("missionstatementurl",repository.getMissionStatementUrl());
|
||||
jsonObject.put("namespaceprefix",repository.getNamespacePrefix());
|
||||
jsonObject.put("od_contenttypes",repository.getOdContentTypes());
|
||||
jsonObject.put("officialname",repository.getOfficialName());
|
||||
jsonObject.put("pidsystems",repository.getPidSystems());
|
||||
jsonObject.put("provenanceaction",repository.getProvenanceActionClass());
|
||||
jsonObject.put("qualitymanagementkind",repository.getQualityManagementKind());
|
||||
jsonObject.put("registeredby",repository.getRegisteredBy());
|
||||
jsonObject.put("releaseenddate",convertDateToString(repository.getReleaseEndDate()));
|
||||
jsonObject.put("releasestartdate",convertDateToString(repository.getReleaseStartDate()));
|
||||
jsonObject.put("serviceprovider",repository.getServiceProvider());
|
||||
jsonObject.put("timezone",repository.getTimezone());
|
||||
jsonObject.put("typology",repository.getTypology());
|
||||
jsonObject.put("versioning",repository.getVersioning());
|
||||
jsonObject.put("websiteurl",repository.getWebsiteUrl());
|
||||
|
||||
//datasource.get("managed");
|
||||
//datasource.get("platform");
|
||||
//datasource.get("subjects");
|
||||
//datasource.get("subjects");*/
|
||||
return jsonObject.toString();
|
||||
}
|
||||
|
||||
|
@ -352,4 +368,10 @@ public class Converter {
|
|||
}
|
||||
return tmz;
|
||||
}
|
||||
|
||||
public static String getOpenaireId(String repositoryId) {
|
||||
if (repositoryId != null && repositoryId.contains("::"))
|
||||
return repositoryId.split("::")[0] + "::" + DigestUtils.md5Hex(repositoryId.split("::")[1]);
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -10,37 +10,23 @@
|
|||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||
|
||||
<!--<import resource="classpath:META-INF/cxf/cxf.xml"/>
|
||||
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/>
|
||||
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
|
||||
<import resource="classpath*:/cxf.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/repos/ehcacher/springContext-repos-ehcacher.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/soap/cxf/applicationContext-eprbuilders.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/clients/ws/springContext-locatorFactory.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/users/springContext-users-ldap.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/util/springContext-locators.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupClients.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>-->
|
||||
|
||||
<context:property-placeholder location="classpath*:/eu/**/application.properties" />
|
||||
<context:annotation-config/>
|
||||
<context:component-scan base-package="eu.dnetlib.repo.manager.service.config"/>
|
||||
<tx:annotation-driven transaction-manager="txManager"/>
|
||||
|
||||
<bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader" id="propertyLoader">
|
||||
<property name="order" value="2" />
|
||||
<bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader"
|
||||
id="propertyLoader">
|
||||
<property name="order" value="2"/>
|
||||
<property name="properties">
|
||||
<bean class="eu.dnetlib.conf.WebappContextProperyFactory">
|
||||
<property name="propertyFetcher">
|
||||
<bean class="eu.dnetlib.conf.PropertyFetcher" />
|
||||
<bean class="eu.dnetlib.conf.PropertyFetcher"/>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="ignoreUnresolvablePlaceholders" value="true" />
|
||||
<property name="ignoreUnresolvablePlaceholders" value="true"/>
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath*:/gr/**/springContext-*.properties</value>
|
||||
|
|
|
@ -101,9 +101,8 @@ topic_types.url = https://beta.services.openaire.eu/provision/mvc/vocabularies/d
|
|||
oidc.issuer = https://aai.openminted.eu/oidc/
|
||||
oidc.id = 24e83176-1312-4ba3-bc0b-ffeebea1603e
|
||||
oidc.secret = U_gLOupYu2trYIOwfxGgZkkZoOHG_zGfaViOUsXcZ7qVQuF1rcJeQYKIDX1TY3z27CIoHaqq9ht2rmAiUmBRYQ
|
||||
oidc.home = http://194.177.192.121:8380/repomanager-service-dev/openid_connect_login
|
||||
webapp.home = http://194.177.192.121:8380/repomanager-service-dev/openid_connect_login
|
||||
webapp.dev.front = http://195.134.66.230:3000
|
||||
oidc.dev.home = http://194.177.192.121:8380/repomanager-service-dev/openid_connect_login
|
||||
webapp.dev.front = http://194.177.192.121:3000
|
||||
|
||||
|
||||
redis.host = 194.177.192.121
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
<property name="tokenEndpointAuthMethod" value="SECRET_BASIC" />
|
||||
<property name="redirectUris">
|
||||
<set>
|
||||
<value>${oidc.home}</value>
|
||||
<value>${oidc.dev.home}</value>
|
||||
</set>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
|
@ -1,48 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
|
||||
|
||||
<import resource="classpath*:/application-context.xml"/>
|
||||
|
||||
<!-- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>-->
|
||||
|
||||
<import resource="classpath:META-INF/cxf/cxf.xml"/>
|
||||
|
||||
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml"/>
|
||||
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
|
||||
<import resource="classpath*:/cxf.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/repos/ehcacher/springContext-repos-ehcacher.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/soap/cxf/applicationContext-eprbuilders.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/clients/ws/springContext-locatorFactory.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/users/springContext-users-ldap.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/util/springContext-locators.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupClients.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/>
|
||||
|
||||
<!--<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>-->
|
||||
<context:property-placeholder location="classpath*:/eu/**/application.properties" />
|
||||
|
||||
<bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader" id="propertyLoader">
|
||||
<property name="order" value="2" />
|
||||
<bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader"
|
||||
id="propertyLoader">
|
||||
<property name="order" value="2"/>
|
||||
<property name="properties">
|
||||
<bean class="eu.dnetlib.conf.WebappContextProperyFactory">
|
||||
<property name="propertyFetcher">
|
||||
<bean class="eu.dnetlib.conf.PropertyFetcher" />
|
||||
<bean class="eu.dnetlib.conf.PropertyFetcher"/>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="ignoreUnresolvablePlaceholders" value="true" />
|
||||
<property name="ignoreUnresolvablePlaceholders" value="true"/>
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath*:/gr/**/springContext-*.properties</value>
|
||||
|
|
Loading…
Reference in New Issue