From 9014e32c4eac39bbdd1ab43b6c5e8d80d31acab4 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Tue, 9 Nov 2021 14:31:58 +0100 Subject: [PATCH 1/5] #22344 --- DataMinerAlgorithmsCrawler/CHANGELOG.md | 3 + DataMinerAlgorithmsCrawler/pom.xml | 14 +- .../gCatFeeder/collectors/dm/Constants.java | 3 +- .../dm/DMAlgorithmsInfoCollector.java | 130 ++++++++--- .../dm/DataMinerCollectorProperties.java | 4 +- .../gCatFeeder/collectors/dm/URIResolver.java | 123 ++++++++++ .../dm/model/InternalAlgorithmDescriptor.java | 10 +- .../collectors/dm/model/ckan/GCatModel.java | 86 +++++-- .../collectors/dm/config.properties | 4 +- .../gCatFeeder/collectors/dm/profile.xml | 211 +++++++++++++++--- .../collectors/dm/ItemUrlTests.java | 19 ++ .../collectors/dm/TranslationTest.java | 43 +++- .../catalogues/gCat/Interactions.java | 1 + .../catalogues/gCat/full-algorithm.json | 129 +++++++---- gCat-Feeder/src/test/resources/logback.xml | 2 +- 15 files changed, 640 insertions(+), 142 deletions(-) create mode 100644 DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/URIResolver.java create mode 100644 DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/ItemUrlTests.java diff --git a/DataMinerAlgorithmsCrawler/CHANGELOG.md b/DataMinerAlgorithmsCrawler/CHANGELOG.md index 761cb85..eb1c415 100644 --- a/DataMinerAlgorithmsCrawler/CHANGELOG.md +++ b/DataMinerAlgorithmsCrawler/CHANGELOG.md @@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # Changelog for org.gcube.data-publishing.gFeed.DataMinerAlgorithmsCrawler +## [v1.0.5-SNAPSHOT] - 2020-12-15 +- Fixes [#22344](https://support.d4science.org/issues/22344#change-128440) : publish DM algorithms as Methods + ## [v1.0.4] - 2020-12-15 - Dependency management - Naming Convention \ No newline at end of file diff --git a/DataMinerAlgorithmsCrawler/pom.xml b/DataMinerAlgorithmsCrawler/pom.xml index c6784ed..7cfabfe 100644 --- a/DataMinerAlgorithmsCrawler/pom.xml +++ b/DataMinerAlgorithmsCrawler/pom.xml @@ -8,7 +8,7 @@ DataMinerAlgorithmsCrawler DataMinerAlgorithmsCrawler - 1.0.4 + 1.0.5-SNAPSHOT Plugin for gCat-Feeder for DataMiner Algorithms publishing @@ -56,6 +56,18 @@ jersey-media-json-jackson + + org.gcube.data-catalogue + gcat-client + [2.0.0,3.0.0) + + + + org.gcube.portlets.user + uri-resolver-manager + [1.5.0-SNAPSHOT,2.0.0) + + org.projectlombok lombok diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/Constants.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/Constants.java index 4c5be96..00ca13e 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/Constants.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/Constants.java @@ -11,7 +11,8 @@ public class Constants { // ENVIRONMENT EXPECTED PARAMETERS public static final String GUI_BASE_URL=ENVIRONMENT_PROPERTIES_BASE+"GUI_BASE_URL"; - + public static final String GATEWAY_NAME=ENVIRONMENT_PROPERTIES_BASE+"GATEWAY_NAME"; + public static final String DEFAULT_AUTHOR=ENVIRONMENT_PROPERTIES_BASE+"DEFAULT_AUTHOR"; public static final String DEFAULT_MAINTAINER=ENVIRONMENT_PROPERTIES_BASE+"DEFAULT_MAINTAINER"; diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java index fd4894b..3bd92a4 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java @@ -1,14 +1,17 @@ package org.gcube.data.publishing.gCatFeeder.collectors.dm; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.chrono.IsoChronology; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.ResolverStyle; +import java.time.temporal.ChronoField; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.gcube.common.resources.gcore.ServiceEndpoint; + import org.gcube.data.analysis.dataminermanagercl.server.DataMinerService; import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient; import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator; @@ -23,16 +26,49 @@ import org.gcube.data.publishing.gCatfeeder.collectors.DataCollector; import org.gcube.data.publishing.gCatfeeder.collectors.model.faults.CollectorFault; import lombok.extern.slf4j.Slf4j; +import org.gcube.portlets.user.uriresolvermanager.exception.IllegalArgumentException; +import org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException; + @Slf4j public class DMAlgorithmsInfoCollector implements DataCollector { - private static final Pattern p = Pattern.compile("\\{Published by (.*)\\((.*(\\.)?.*\\)).*\\}$"); + /* + * i.e. "Basic statistic max min average {Published by Giancarlo Panichi (giancarlo.panichi) on 2018/07/20 10:24 GMT}" + */ + + private static final Pattern descriptionPattern = Pattern.compile("\\{Published by (.*)\\((.*(\\.)?.*\\)) on (.*)\\}$"); + + + static final DateTimeFormatter versionDateParser= DateTimeFormatter.ofPattern("uuuu/MM/dd HH:mm 'GMT'[Z]") + .withResolverStyle(ResolverStyle.STRICT) + .withLocale(Locale.getDefault()) + .withZone(ZoneId.systemDefault()); + +/* static final DateTimeFormatter versionDateParser=new DateTimeFormatterBuilder() + .parseCaseInsensitive().parseLenient() + .appendValue(ChronoField.YEAR,4) + .appendLiteral('/') + .appendValue(ChronoField.MONTH_OF_YEAR,2) + .appendLiteral('/') + .appendValue(ChronoField.DAY_OF_MONTH,2) + .appendLiteral(' ') + .appendValue(ChronoField.HOUR_OF_DAY,2) + .appendLiteral(':') + .appendValue(ChronoField.MINUTE_OF_HOUR,2) + .appendLiteral(' ') + .appendOffset("+HHMM", "GMT") + .toFormatter().withChronology(IsoChronology.INSTANCE) + .withResolverStyle(ResolverStyle.SMART); */ + + - private Map env=null; - - + + + + + public void setEnvironmentConfiguration(EnvironmentConfiguration envConfig) { if(envConfig!=null) { log.debug("Current Environment Configuration is : "+envConfig.getCurrentConfiguration()); @@ -74,7 +110,7 @@ public class DMAlgorithmsInfoCollector implements DataCollector params = new HashMap(); + params.put(ENTITY_NAME, name); + params.put(ENTITY_CONTEXT,DATASET); + params.put("gcube_scope", ContextUtils.getCurrentScope()); + String shortLink = resolver.getLink(params, false); + return shortLink; + } + + /*public String getCatalogueItemURL(String name) { + try { + String uriResolverURL = getConfigurationFromIS(); + + ObjectNode requestContent = mapper.createObjectNode(); + requestContent.put(CATALOGUE_CONTEXT, ContextUtils.getCurrentScope()); + + requestContent.put(ENTITY_TYPE, DATASET); + requestContent.put(ENTITY_NAME, name); + + GXHTTPStringRequest gxhttpStringRequest = GXHTTPStringRequest.newRequest(uriResolverURL); + gxhttpStringRequest.from(CTLG_RESOLVER_NAME); + gxhttpStringRequest.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + gxhttpStringRequest.isExternalCall(true); + String body = mapper.writeValueAsString(requestContent); + HttpURLConnection httpURLConnection = gxhttpStringRequest.post(body); + + if(httpURLConnection.getResponseCode() != 200) { + try{ + IOUtils.copy(httpURLConnection.getInputStream(),System.out); + }catch(Throwable t){ + System.out.println("No message"); + } + throw new InternalServerErrorException("Unable to get Item URL via URI Resolver. Code : "+ + httpURLConnection.getResponseCode()); + } + + String url = getStringBuilder(httpURLConnection.getInputStream()).toString(); + + return url; + } catch(WebApplicationException e) { + throw e; + } catch(Exception e) { + throw new WebApplicationException(e); + } + }*/ + + + /* + static String getConfigurationFromIS() { + try { + + StringBuilder toReturn=new StringBuilder(); + ServiceEndpoint serviceEndpoint = ISUtils.queryForServiceEndpointsByName("Service","HTTP-URI-Resolver").get(0); + serviceEndpoint.profile().accessPoints(). + forEach(a->{ + if(a.name().equals(CTLG_RESOLVER_NAME)) + toReturn.append(a.address()); + }); + if(toReturn.length()>0) return toReturn.toString(); + else throw new Exception("Access point for "+CTLG_RESOLVER_NAME+" not found "); + } catch(WebApplicationException e) { + throw e; + } catch(Exception e) { + throw new InternalServerErrorException("Error while getting configuration on IS", e); + } + + } + + */ +} diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/InternalAlgorithmDescriptor.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/InternalAlgorithmDescriptor.java index f7cfd6f..188ddcd 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/InternalAlgorithmDescriptor.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/InternalAlgorithmDescriptor.java @@ -1,5 +1,6 @@ package org.gcube.data.publishing.gCatFeeder.collectors.dm.model; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -25,7 +26,10 @@ public class InternalAlgorithmDescriptor implements CustomData { private UserIdentity author; private UserIdentity maintainer; - + + private String version; + private LocalDateTime creationDate; + //category info private String categoryBriefDescription; @@ -38,8 +42,10 @@ public class InternalAlgorithmDescriptor implements CustomData { private Set outputParameters=new HashSet<>(); private String guiLink; + private String gatewayName; private String wpsLink; - + + private Boolean privateFlag; diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java index b81cf2a..95ee937 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java @@ -2,9 +2,14 @@ package org.gcube.data.publishing.gCatFeeder.collectors.dm.model.ckan; import java.io.ByteArrayOutputStream; import java.net.URL; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; import java.util.ArrayList; import org.gcube.data.publishing.gCatFeeder.collectors.dm.DataMinerCollectorProperties; +import org.gcube.data.publishing.gCatFeeder.collectors.dm.URIResolver; import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.InternalAlgorithmDescriptor; import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.Parameter; import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.UserIdentity; @@ -25,6 +30,9 @@ import lombok.extern.slf4j.Slf4j; @Slf4j public class GCatModel implements CatalogueFormatData { + private static final DateTimeFormatter dateFormatter=DateTimeFormatter.ISO_DATE; + + private static ObjectMapper mapper=new ObjectMapper(); private static String profileXML=null; @@ -35,6 +43,21 @@ public class GCatModel implements CatalogueFormatData { profileXML=toSet; } + + + public static String getItemUrl(String name) { + try{ + URIResolver uriResolver = new URIResolver(); + log.debug("Evaluating item url for {}",name); + String catalogueItemURL = uriResolver.getCatalogueItemURL(name); + log.info("Item URL for {} is {}",name,catalogueItemURL); + return catalogueItemURL; + }catch(Exception e){ + log.warn("Unable to evaluate item URL for "+name,e); + return null; + } + } + public GCatModel(InternalAlgorithmDescriptor desc) { item=new CkanItem(); // item.setAuthor(desc.getAuthor()); @@ -53,20 +76,52 @@ public class GCatModel implements CatalogueFormatData { item.setPrivateFlag(desc.getPrivateFlag()); - for(Parameter param: desc.getInputParameters()) - item.getExtras().add(new CKanExtraField(profileID+":Input Parameter", - String.format("%1$s [%2$s] %3$s : %4$s", + /* for(Parameter param: desc.getInputParameters()) + item.getExtras().add(new CKanExtraField(profileID+":Input Parameter", + String.format("%1$s [%2$s] %3$s : %4$s", param.getName(),param.getType(), ((param.getValue()!=null&&!param.getValue().isEmpty())?"default : "+param.getValue():""), param.getDescription()))); for(Parameter param: desc.getOutputParameters()) - item.getExtras().add(new CKanExtraField(profileID+":Output Parameter", - String.format("%1$s [%2$s] %3$s : %4$s", + item.getExtras().add(new CKanExtraField(profileID+":Output Parameter", + String.format("%1$s [%2$s] %3$s : %4$s", param.getName(),param.getType(), ((param.getValue()!=null&&!param.getValue().isEmpty())?"default : "+param.getValue():""), param.getDescription()))); +*/ + + item.getExtras().add(new CKanExtraField("Identity:Creator", desc.getAuthor().asStringValue())); + + + item.getExtras().add(new CKanExtraField("Identity:CreationDate", dateFormatter.format(desc.getCreationDate()))); + + item.getExtras().add(new CKanExtraField("AccessMode:UsageMode", "as-a-Service via Blue-Cloud Infrastructure")); + item.getExtras().add(new CKanExtraField("AccessMode:Availability", "On-Line")); + + item.getExtras().add(new CKanExtraField("TechnicalDetails:Hosting Environment", "gCube SmartGear")); + item.getExtras().add(new CKanExtraField("TechnicalDetails:Dependencies on Other SW", "gCube DataMiner")); + + item.getExtras().add(new CKanExtraField("Rights:Field/Scope of use", "Any use")); + item.getExtras().add(new CKanExtraField("Rights:Basic rights", "Communication")); + item.getExtras().add(new CKanExtraField("Rights:Basic rights", "Making available to the public")); + item.getExtras().add(new CKanExtraField("Rights:Basic rights", "Distribution")); + + item.getExtras().add(new CKanExtraField("Attribution:Attribution requirements", + String.format("Cite as: %1$s (%2$d): %3$s. %4$s. %5$s. %6$s. %7$s. Retrieved from the %8$s (%9$s) operated by D4Science.org www.d4science.org", + desc.getAuthor().asStringValue(), + LocalDateTime.now().getYear(), + desc.getName(), + desc.getVersion(), + "Blue-Cloud", + "DataMiner Process", + getItemUrl(item.getName()), + desc.getGatewayName(), + desc.getGuiLink()))); + + + //Algorithm Description @@ -77,8 +132,8 @@ public class GCatModel implements CatalogueFormatData { // Algorithm Users - item.getExtras().add(new CKanExtraField(profileID+":Process Author",desc.getAuthor().asStringValue())); - item.getExtras().add(new CKanExtraField(profileID+":Process Maintainer",desc.getAuthor().asStringValue())); + //item.getExtras().add(new CKanExtraField(profileID+":Process Author",desc.getAuthor().asStringValue())); + //item.getExtras().add(new CKanExtraField(profileID+":Process Maintainer",desc.getAuthor().asStringValue())); if(desc.getGuiLink()!=null) { try { @@ -112,23 +167,6 @@ public class GCatModel implements CatalogueFormatData { } - /** - * (Common) Title - * (Common) Description - * (Common) Tags: free list of keywords - * (Common) License - * (Common) Visibility: either public or private - * (Common) Version - * (Common) Author: the creator of metadata. Only one occurrence is supported; - * (Common) Maintainer: - * (Method specific) Creator: the author of the method (with email and ORCID). Repeatable field; - * (Method specific) Creation date: when the method has been released; - * (Method specific) Input: Repeatable field; - * (Method specific) Output: Repeatable field; - * (Method specific) RelatedPaper: a reference to an associated paper; - * (Method specific) Restrictions On Use: an optional text - * (Method specific) Attribution requirements: the text to use to acknowledge method usage; - */ static final String fixTag(String toFix) { diff --git a/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/config.properties b/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/config.properties index 6213182..6a6f419 100644 --- a/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/config.properties +++ b/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/config.properties @@ -1,3 +1,3 @@ -default_author=Gianpaolo Coro +default_author=Gianpaolo.Coro gui_param_name=OperatorId -ckan_resource_type=DataMiner Process \ No newline at end of file +ckan_resource_type=Method \ No newline at end of file diff --git a/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/profile.xml b/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/profile.xml index d32a8e3..417b979 100644 --- a/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/profile.xml +++ b/DataMinerAlgorithmsCrawler/src/main/resources/org/gcube/data/publishing/gCatFeeder/collectors/dm/profile.xml @@ -1,41 +1,196 @@ - - - Input Parameter - false - String - Input parameter expected for the execution of the process - - - Output Parameter - false - String - Output parameter expected from the execution of the process - - - - Process Author + + + External Identifier false String * - - The name of the author, with email and ORCID. The format should - be: family, given[, email][, ORCID]. Example: Smith, John, - js@acme.org, orcid.org/0000-0002-1825-0097 + This applies only to methods that have been already published. Insert here a DOI, an handle, and any other Identifier assigned when publishing the dataset alsewhere. + + + Creator + true + String + * + The name of the creator, with email and ORCID. The format should be: family, given[, email][, ORCID]. Example: Smith, John, js@acme.org, orcid.org/0000-0002-1825-0097 - ^[a-zA-ZÀ-ÿ .'-]+, [a-zA-ZÀ-ÿ .'-]+[,]*([a-zA-Z0-9_!#$%’*+=?`{|}~^.-]+@[a-zA-Z0-9À-ÿ.-]+)?[,]*(orcid.org\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\d\d\d-\d\d\d[\dX])?$ + ^[a-zA-ZÀ-ÿ .'-]+, [a-zA-ZÀ-ÿ .'-]+[, ]*([a-zA-Z0-9_!#$%’*+=?`{|}~^.-]+@[a-zA-Z0-9À-ÿ.-]+)?[, ]*(orcid.org\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\d\d\d-\d\d\d[\dX])?$ - - Process Maintainer + + CreationDate + true + Time + 1 + The date of creation of the dataset (different from the date of registration of the dataset automatically added by the system). Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 1998-11-10 or 2015-05-29 11:55 + + ^(\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\d{2}(:?\d{2})?)?)?$ + + + + Owner false String * - - The name of the author, with email and ORCID. The format should - be: family, given[, email][, ORCID]. Example: Smith, John, - js@acme.org, orcid.org/0000-0002-1825-0097 + The owner of the method (free text). + + + RelatedPaper + false + String + 1 + Insert a complete reference to an associated work. + + + Semantic Coverage + false + String + * + Tagging e.g. Functional analysis, Environment analysis and visualisation, ... + + + UsageMode + true + String + 1 + How the method is expected to be exploited. + + Download + as-a-Application via Blue-Cloud Infrastructure + as-a-Application via third-party Infrastructure + as-a-Service via Blue-Cloud Infrastructure + as-a-Service via third-party Infrastructure + + + + Availability + false + String + 1 + How the availability to the resource is offered. On-line means that the method can be executed through the Virtual Laboratory Gateway. On-site means that the method can only be executed by visiting the hosting provider. + + On-Line + On-Site + + + + Hosting Environment + false + String + 1 + E.g. Linux, Microsoft Azure, Amazon EC2 + + + ProgrammingLanguage + false + String + 1 + The primary language used to implement the method. + + + Dependencies on Other SW + false + String + * + E.g. this sowftware requires an Hadoop cluster to run + + + input + false + String + * + inputParametersType. See WPS specifications + + + output + false + String + * + outputType. See WPS specifications + + + IP/Copyrights + false + String + 1 + Whether software is covered by any rights: copyright, related rights, know how, proprietary, etc. + + + Field/Scope of use + true + String + 1 + + Any use + Non-commercial only + Research only + Non-commercial research only + Private use + Use for developing and providing a service + + + + Basic rights + true + String + 1 + + Temporary download of a single copy only + Download + Copying + Distribution + Modification + Communication + Making available to the public + Other rights + + + + Restrictions on use + false + String + 1 + Any restrictions on how where the dataset may be used + + + Sublicense rights + false + String + 1 + Any restrictions on how where the dataset may be used + + No + Yes + + + + Requirement of non-disclosure (confidentiality mark) + false + String + 1 + Requirement of non-disclosure (confidentiality mark). Whether the dataset bears confidentiality mark/may be used and shared subject to the obligation of non-disclosure + + + Embargo period + false + Time_Interval + 1 + Period of time during which the resource may be used. Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 2016-07-31 or 2015-05-10 12:00 - ^[a-zA-ZÀ-ÿ .'-]+, [a-zA-ZÀ-ÿ .'-]+[,]*([a-zA-Z0-9_!#$%’*+=?`{|}~^.-]+@[a-zA-Z0-9À-ÿ.-]+)?[,]*(orcid.org\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\d\d\d-\d\d\d[\dX])?$ + ^(\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\d{2}(:?\d{2})?)?)?$ + + Attribution requirements + false + String + 1 + The text to acknowledge the resource when using it + + + Distribution requirements + false + String + 1 + The text to acknowledge the resource when distributing it + \ No newline at end of file diff --git a/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/ItemUrlTests.java b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/ItemUrlTests.java new file mode 100644 index 0000000..4028495 --- /dev/null +++ b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/ItemUrlTests.java @@ -0,0 +1,19 @@ +package org.gcube.data.publishing.gCatFeeder.collectors.dm; + +import org.gcube.common.authorization.library.provider.SecurityTokenProvider; +import org.gcube.data.publishing.gCatFeeder.tests.BaseCollectorTest; +import org.gcube.data.publishing.gCatFeeder.tests.TokenSetter; +import org.gcube.portlets.user.uriresolvermanager.exception.IllegalArgumentException; +import org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException; +import org.junit.Test; + +public class ItemUrlTests extends BaseCollectorTest { + + @Test + public void getItemURL() throws UriResolverMapException, IllegalArgumentException { + //SecurityTokenProvider.instance.set("***REMOVED***"); + TokenSetter.set("/gcube/devsec/devVRE"); + String name = "fake"; + System.out.println(new URIResolver().getCatalogueItemURL(name)); + } +} diff --git a/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java index bccf28d..9f5ff5f 100644 --- a/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java +++ b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java @@ -1,13 +1,18 @@ package org.gcube.data.publishing.gCatFeeder.collectors.dm; import java.io.IOException; +import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.Collection; import java.util.Set; +import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.InternalAlgorithmDescriptor; +import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.ckan.GCatModel; import org.gcube.data.publishing.gCatFeeder.model.CatalogueFormatData; import org.gcube.data.publishing.gCatFeeder.model.InternalConversionException; import org.gcube.data.publishing.gCatFeeder.tests.BaseCollectorTest; +import org.gcube.data.publishing.gCatFeeder.tests.TokenSetter; import org.gcube.data.publishing.gCatfeeder.collectors.CollectorPlugin; import org.gcube.data.publishing.gCatfeeder.collectors.DataCollector; import org.gcube.data.publishing.gCatfeeder.collectors.DataTransformer; @@ -20,12 +25,18 @@ import com.fasterxml.jackson.core.JsonGenerationException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; +import static org.junit.Assert.*; + public class TranslationTest extends BaseCollectorTest{ @Test public void testTranslation() throws CollectorFault, CatalogueNotSupportedException, JsonGenerationException, JsonMappingException, IOException, InternalConversionException { - Assume.assumeTrue(isTestInfrastructureEnabled()); + //Assume.assumeTrue(isTestInfrastructureEnabled()); + System.out.println("START HERE"); + //TokenSetter.set("/d4science.research-infrastructures.eu/D4OS/Blue-CloudLab"); + //SecurityTokenProvider.instance.set("***REMOVED***"); + TokenSetter.set("/gcube/devsec/devVRE"); System.out.println("Entering Infrastructure enabled tests.."); ObjectMapper mapper = new ObjectMapper(); @@ -38,12 +49,38 @@ public class TranslationTest extends BaseCollectorTest{ System.out.println(mapper.writeValueAsString(obj)+"\n"); for(String destinationcatalogue : (Set)plugin.getSupportedCatalogueTypes()) { - DataTransformer transformer=plugin.getTransformerByCatalogueType(destinationcatalogue); + DataTransformer transformer= + plugin.getTransformerByCatalogueType(destinationcatalogue); + System.out.println("Starting Transformation "+transformer.toString()); + for(Object data:transformer.transform(collected)) System.out.println(((CatalogueFormatData)data).toCatalogueFormat()); } } - + + + @Test + public void testParseDescription(){ + String s="balablabalba"; + assertEquals("n/a",DMAlgorithmsInfoCollector.parseDescriptionForDate(s)); + assertEquals(null, DMAlgorithmsInfoCollector.parseDescriptionForUser(s)); + s="Basic statistic max min average {Published by Giancarlo Panichi (giancarlo.panichi) on 2018/07/20 10:24 GMT}"; + assertEquals("2018/07/20 10:24 GMT",DMAlgorithmsInfoCollector.parseDescriptionForDate(s)); + assertEquals("Giancarlo Panichi ",DMAlgorithmsInfoCollector.parseDescriptionForUser(s)); + + + + System.out.println(DMAlgorithmsInfoCollector.versionDateParser.format(ZonedDateTime.now())); + System.out.println(DMAlgorithmsInfoCollector.versionDateParser.parse(DMAlgorithmsInfoCollector.parseDescriptionForDate(s))); + } + + @Test + public void testEnvironment(){ + + assertNotNull(DMAlgorithmsInfoCollector.getWPSBasePath()); + assertNotNull(GCatModel.getItemUrl("fake")); + System.out.println(getEnvironmentConfiguration().getCurrentConfiguration()); + } } diff --git a/gCat-Controller/src/test/java/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/Interactions.java b/gCat-Controller/src/test/java/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/Interactions.java index 5055d6b..eecea6a 100644 --- a/gCat-Controller/src/test/java/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/Interactions.java +++ b/gCat-Controller/src/test/java/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/Interactions.java @@ -10,6 +10,7 @@ import org.gcube.data.publishing.gCatFeeder.model.CatalogueFormatData; import org.gcube.data.publishing.gCatFeeder.model.CatalogueInstanceDescriptor; import org.gcube.data.publishing.gCatFeeder.model.InternalConversionException; import org.gcube.data.publishing.gCatFeeder.tests.BaseCataloguePluginTest; +import org.gcube.data.publishing.gCatFeeder.tests.TokenSetter; import org.gcube.data.publishing.gCataFeeder.catalogues.gCat.GCatPlugin; import org.junit.Assert; import org.junit.Assume; diff --git a/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json b/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json index 85bf340..b4f283d 100644 --- a/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json +++ b/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json @@ -1,57 +1,90 @@ { - "profileID": "DataMiner Process", - "profile": "\r\n\t\r\n\t\tInput Parameter<\/fieldName>\r\n\t\tfalse<\/mandatory>\r\n\t\tString<\/dataType>\r\n\t\tInput parameter expected for the execution of the process<\/note>\r\n\t<\/metadatafield>\t\r\n\t\r\n\t\tOutput Parameter<\/fieldName>\r\n\t\tfalse<\/mandatory>\r\n\t\tString<\/dataType>\r\n\t\tOutput parameter expected from the execution of the process\r\n\t\t<\/note>\r\n\t<\/metadatafield>\r\n\t\r\n\t\tProcess Author<\/fieldName>\r\n\t\tfalse<\/mandatory>\r\n\t\tString<\/dataType>\r\n\t\t*<\/maxOccurs>\r\n\t\t\r\n\t\tThe name of the author, with email and ORCID. The format should\r\n\t\t\tbe: family, given[, email][, ORCID]. Example: Smith, John,\r\n\t\t\tjs@acme.org, orcid.org\/0000-0002-1825-0097<\/note>\r\n\t\t\r\n\t\t\t^[a-zA-Z\u00C0-\u00FF .'-]+, [a-zA-Z\u00C0-\u00FF .'-]+[,\r\n\t\t\t\t]*([a-zA-Z0-9_!#$%\u2019*+=?`{|}~^.-]+@[a-zA-Z0-9\u00C0-\u00FF.-]+)?[,\r\n\t\t\t\t]*(orcid.org\\\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\\d\\d\\d-\\d\\d\\d[\\dX])?$<\/regularExpression>\r\n\t\t<\/validator>\r\n\t<\/metadatafield>\r\n\t\r\n\t\tProcess Maintainer<\/fieldName>\r\n\t\tfalse<\/mandatory>\r\n\t\tString<\/dataType>\r\n\t\t*<\/maxOccurs>\r\n\t\t\r\n\t\tThe name of the author, with email and ORCID. The format should\r\n\t\t\tbe: family, given[, email][, ORCID]. Example: Smith, John,\r\n\t\t\tjs@acme.org, orcid.org\/0000-0002-1825-0097<\/note>\r\n\t\t\r\n\t\t\t^[a-zA-Z\u00C0-\u00FF .'-]+, [a-zA-Z\u00C0-\u00FF .'-]+[,\r\n\t\t\t\t]*([a-zA-Z0-9_!#$%\u2019*+=?`{|}~^.-]+@[a-zA-Z0-9\u00C0-\u00FF.-]+)?[,\r\n\t\t\t\t]*(orcid.org\\\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\\d\\d\\d-\\d\\d\\d[\\dX])?$<\/regularExpression>\r\n\t\t<\/validator>\r\n\t<\/metadatafield>\r\n<\/metadataformat>", + "profileID": "Method", + "profile": "\n\t\n\t\tExternal Identifier\n\t\tfalse\n\t\tString\n\t\t*\n\t\tThis applies only to methods that have been already published. Insert here a DOI, an handle, and any other Identifier assigned when publishing the dataset alsewhere.\n\t\n\t\n\t\tCreator\n\t\ttrue\n\t\tString\n\t\t*\n\t\tThe name of the creator, with email and ORCID. The format should be: family, given[, email][, ORCID]. Example: Smith, John, js@acme.org, orcid.org/0000-0002-1825-0097\n\t\t\n\t\t\t^[a-zA-ZÀ-ÿ .'-]+, [a-zA-ZÀ-ÿ .'-]+[, ]*([a-zA-Z0-9_!#$%’*+=?`{|}~^.-]+@[a-zA-Z0-9À-ÿ.-]+)?[, ]*(orcid.org\\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\\d\\d\\d-\\d\\d\\d[\\dX])?$\n\t\t\n\t\n\t\n\t\tCreationDate\n\t\ttrue\n\t\tTime\n\t\t1\n\t\tThe date of creation of the dataset (different from the date of registration of the dataset automatically added by the system). Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 1998-11-10 or 2015-05-29 11:55\n\t\t\n\t\t\t^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$\n\t\t\n\t\n\t\n\t\tOwner\n\t\tfalse\n\t\tString\n\t\t*\n\t\tThe owner of the method (free text).\n\t\n\t\n\t\tRelatedPaper\n\t\tfalse\n\t\tString\n\t\t1\n\t\tInsert a complete reference to an associated work.\n\t\n\t\n\t\tSemantic Coverage\n\t\tfalse\n\t\tString\n\t\t*\n\t\tTagging e.g. Functional analysis, Environment analysis and visualisation, ...\n\t\n\t\n\t\tUsageMode\n\t\ttrue\n\t\tString\n\t\t1\n\t\tHow the method is expected to be exploited.\n\t\t\n\t\t\tDownload\n\t\t\tas-a-Application via Blue-Cloud Infrastructure\n\t\t\tas-a-Application via third-party Infrastructure\n\t\t\tas-a-Service via Blue-Cloud Infrastructure\n\t\t\tas-a-Service via third-party Infrastructure\n\t\t\n\t\n\t\n\t\tAvailability\n\t\tfalse\n\t\tString\n\t\t1\n\t\tHow the availability to the resource is offered. On-line means that the method can be executed through the Virtual Laboratory Gateway. On-site means that the method can only be executed by visiting the hosting provider.\n\t\t\n\t\t\tOn-Line\n\t\t\tOn-Site\n\t\t\n\t\n\t\n\t\tHosting Environment\n\t\tfalse\n\t\tString\n\t\t1\n\t\tE.g. Linux, Microsoft Azure, Amazon EC2\n\t\n\t\n\t\tProgrammingLanguage\n\t\tfalse\n\t\tString\n\t\t1\n\t\tThe primary language used to implement the method. \n\t\n\t\n\t\tDependencies on Other SW\n\t\tfalse\n\t\tString\n\t\t*\n\t\tE.g. this sowftware requires an Hadoop cluster to run\n\t\n\t\n\t\tinput\n\t\tfalse\n\t\tString\n\t\t*\n\t\tinputParametersType. See WPS specifications\n\t\n\t\n\t\toutput\n\t\tfalse\n\t\tString\n\t\t*\n\t\toutputType. See WPS specifications \n\t\n\t\n\t\tIP/Copyrights\n\t\tfalse\n\t\tString\n\t\t1\n\t\tWhether software is covered by any rights: copyright, related rights, know how, proprietary, etc.\n\t\n\t\n\t\tField/Scope of use\n\t\ttrue\n\t\tString\n\t\t1\n\t\t\n\t\t\tAny use\n\t\t\tNon-commercial only\n\t\t\tResearch only\n\t\t\tNon-commercial research only\n\t\t\tPrivate use\n\t\t\tUse for developing and providing a service\n\t\t\n\t\n\t\n\t\tBasic rights\n\t\ttrue\n\t\tString\n\t\t1\n\t\t\n\t\t\tTemporary download of a single copy only\n\t\t\tDownload\n\t\t\tCopying\n\t\t\tDistribution\n\t\t\tModification\n\t\t\tCommunication\n\t\t\tMaking available to the public\n\t\t\tOther rights\n\t\t\n\t\n\t\n\t\tRestrictions on use\n\t\tfalse\n\t\tString\n\t\t1\n\t\tAny restrictions on how where the dataset may be used \n\t\n\t\n\t\tSublicense rights\n\t\tfalse\n\t\tString\n\t\t1\n\t\tAny restrictions on how where the dataset may be used\n\t\t\n\t\t\tNo\n\t\t\tYes\n\t\t\n\t\n\t\n\t\tRequirement of non-disclosure (confidentiality mark)\n\t\tfalse\n\t\tString\n\t\t1\n\t\tRequirement of non-disclosure (confidentiality mark). Whether the dataset bears confidentiality mark/may be used and shared subject to the obligation of non-disclosure\n\t\n\t\n\t\tEmbargo period\n\t\tfalse\n\t\tTime_Interval\n\t\t1\n\t\tPeriod of time during which the resource may be used. Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 2016-07-31 or 2015-05-10 12:00\n\t\t\n\t\t\t^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$\n\t\t\n\t\n\t\n\t\tAttribution requirements\n\t\tfalse\n\t\tString\n\t\t1\n\t\tThe text to acknowledge the resource when using it\n\t\n\t\n\t\tDistribution requirements\n\t\tfalse\n\t\tString\n\t\t1\n\t\tThe text to acknowledge the resource when distributing it\n\t\n", "item": { - "name": "timeextraction_in_prevre", - "title": "Timeextraction in preVRE", + "name": "bionym_local_in_blue-cloudlab", + "title": "Bionym Local in Blue-CloudLab", "version": null, "license_id": "CC-BY-NC-SA-4.0", "author": null, "maintainer": null, - "tags": [ - { - "name": "Geo Processing" - }, - { - "name": "preVRE" - }, - { - "name": "WPS" - }, - { - "name": "Analytics" - }], - "extras": [ - { - "key": "system:type", - "value": "DataMiner Process" - }, - { - "key": "DataMiner Process:Process Description", - "value": "An algorithm to extract a time series of values associated to a geospatial features repository (e.g. NETCDF, ASC, GeoTiff files etc. ). The algorithm analyses the time series and automatically searches for hidden periodicities. It produces one chart of the time series, one table containing the time series values and possibly the spectrogram." - }, - { - "key": "DataMiner Process:Process Author", - "value": "Sinibaldi,Fabio" - }, - { - "key": "DataMiner Process:Process Maintainer", - "value": "Sinibaldi,Fabio" - }], - "private": true + "notes": "A fast version of the algorithm implementing BiOnym, a flexible workflow approach to taxon name matching. The workflow allows to activate several taxa names matching algorithms and to get the list of possible transcriptions for a list of input raw species names with possible authorship indication.", + "tags": + [ + { + "name": "Taxa" + }, + { + "name": "Blue-CloudLab" + }, + { + "name": "WPS" + }, + { + "name": "Analytics" + } + ], + "extras": + [ + { + "key": "system:type", + "value": "Method" + }, + { + "key": "Identity:Creator", + "value": "Coro, Gianpaolo" + }, + { + "key": "Identity:CreationDate", + "value": "2021-11-04" + }, + { + "key": "AccessMode:UsageMode", + "value": "as-a-Service via Blue-Cloud Infrastructure" + }, + { + "key": "AccessMode:Availability", + "value": "On-Line" + }, + { + "key": "TechnicalDetails:Hosting Environment", + "value": "gCube SmartGear" + }, + { + "key": "TechnicalDetails:Dependencies on Other SW", + "value": "gCube DataMiner" + }, + { + "key": "Rights:Field/Scope of use", + "value": "Any use" + }, + { + "key": "Rights:Basic rights", + "value": "Communication" + }, + { + "key": "Rights:Basic rights", + "value": "Making available to the public" + }, + { + "key": "Rights:Basic rights", + "value": "Distribution" + }, + { + "key": "Attribution:Attribution requirements", + "value": "Cite as: (): . <Version>. <Publisher>. <ResourceType>. <Identifier>. Retrieved from the <gateway name> (<gateway URL>) operated by D4Science.org www.d4science.org" + } + ], + "private": false }, - "resources": [ - { - "name": "Gateway Link", - "url": "https://pre.d4science.org/group/prevre/dataminer-manager?OperatorId=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.TIMEEXTRACTION", - "format": "HTTP", - "description": "Link to the GUI designed to operate with DataMiner" - }, - { - "name": "WPS Link", - "url": "https://dataminer1-pre.d4science.org/wps/WebProcessingService?Request=DescribeProcess&Version=1.0.0&Service=WPS&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.TIMEEXTRACTION", - "format": "WPS", - "description": "WPS Link to the DataMiner Process" - }] + "resources": + [ + { + "name": "WPS Link", + "url": "https://dataminer-genericworkers-proto-1804.d4science.org:443/wps/WebProcessingService?Request=DescribeProcess&Version=1.0.0&Service=WPS&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.BIONYM_LOCAL", + "format": "WPS", + "description": "WPS Link to the Method" + } + ] } \ No newline at end of file diff --git a/gCat-Feeder/src/test/resources/logback.xml b/gCat-Feeder/src/test/resources/logback.xml index 6ea2f23..cdeec9f 100644 --- a/gCat-Feeder/src/test/resources/logback.xml +++ b/gCat-Feeder/src/test/resources/logback.xml @@ -8,7 +8,7 @@ </encoder> </appender> - <logger name="org.gcube" level="DEBUG"/> + <logger name="org.gcube.data" level="DEBUG"/> <root level="WARN"> <appender-ref ref="STDOUT" /> From 44e057797c46d89ddbf3bfb4ea0a08767d34dab2 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi <fabio.sinibaldi@isti.cnr.it> Date: Tue, 9 Nov 2021 16:01:17 +0100 Subject: [PATCH 2/5] Parameters --- .../collectors/dm/model/ckan/GCatModel.java | 8 +- .../collectors/dm/TranslationTest.java | 8 +- .../catalogues/gCat/full-algorithm.json | 110 ++++++++++++------ 3 files changed, 81 insertions(+), 45 deletions(-) diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java index 95ee937..99efd07 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java @@ -76,8 +76,8 @@ public class GCatModel implements CatalogueFormatData { item.setPrivateFlag(desc.getPrivateFlag()); - /* for(Parameter param: desc.getInputParameters()) - item.getExtras().add(new CKanExtraField(profileID+":Input Parameter", + for(Parameter param: desc.getInputParameters()) + item.getExtras().add(new CKanExtraField("TechnicalDetails:input", String.format("%1$s [%2$s] %3$s : %4$s", param.getName(),param.getType(), ((param.getValue()!=null&&!param.getValue().isEmpty())?"default : "+param.getValue():""), @@ -85,12 +85,12 @@ public class GCatModel implements CatalogueFormatData { for(Parameter param: desc.getOutputParameters()) - item.getExtras().add(new CKanExtraField(profileID+":Output Parameter", + item.getExtras().add(new CKanExtraField("TechnicalDetails:output", String.format("%1$s [%2$s] %3$s : %4$s", param.getName(),param.getType(), ((param.getValue()!=null&&!param.getValue().isEmpty())?"default : "+param.getValue():""), param.getDescription()))); -*/ + item.getExtras().add(new CKanExtraField("Identity:Creator", desc.getAuthor().asStringValue())); diff --git a/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java index 9f5ff5f..82c7306 100644 --- a/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java +++ b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java @@ -32,11 +32,7 @@ public class TranslationTest extends BaseCollectorTest{ @Test public void testTranslation() throws CollectorFault, CatalogueNotSupportedException, JsonGenerationException, JsonMappingException, IOException, InternalConversionException { - //Assume.assumeTrue(isTestInfrastructureEnabled()); - System.out.println("START HERE"); - //TokenSetter.set("/d4science.research-infrastructures.eu/D4OS/Blue-CloudLab"); - //SecurityTokenProvider.instance.set("***REMOVED***"); - TokenSetter.set("/gcube/devsec/devVRE"); + Assume.assumeTrue(isTestInfrastructureEnabled()); System.out.println("Entering Infrastructure enabled tests.."); ObjectMapper mapper = new ObjectMapper(); @@ -78,7 +74,7 @@ public class TranslationTest extends BaseCollectorTest{ @Test public void testEnvironment(){ - + Assume.assumeTrue(isTestInfrastructureEnabled()); assertNotNull(DMAlgorithmsInfoCollector.getWPSBasePath()); assertNotNull(GCatModel.getItemUrl("fake")); System.out.println(getEnvironmentConfiguration().getCurrentConfiguration()); diff --git a/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json b/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json index b4f283d..6e9bf58 100644 --- a/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json +++ b/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json @@ -1,43 +1,62 @@ { - "profileID": "Method", - "profile": "<metadataformat type=\"Method\">\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>External Identifier</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>This applies only to methods that have been already published. Insert here a DOI, an handle, and any other Identifier assigned when publishing the dataset alsewhere.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>Creator</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>The name of the creator, with email and ORCID. The format should be: family, given[, email][, ORCID]. Example: Smith, John, js@acme.org, orcid.org/0000-0002-1825-0097</note>\n\t\t<validator>\n\t\t\t<regularExpression>^[a-zA-ZÀ-ÿ .'-]+, [a-zA-ZÀ-ÿ .'-]+[, ]*([a-zA-Z0-9_!#$%’*+=?`{|}~^.-]+@[a-zA-Z0-9À-ÿ.-]+)?[, ]*(orcid.org\\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\\d\\d\\d-\\d\\d\\d[\\dX])?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>CreationDate</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>Time</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The date of creation of the dataset (different from the date of registration of the dataset automatically added by the system). Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 1998-11-10 or 2015-05-29 11:55</note>\n\t\t<validator>\n\t\t\t<regularExpression>^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>Owner</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>The owner of the method (free text).</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>RelatedPaper</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Insert a complete reference to an associated work.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Coverage\">\n\t\t<fieldName>Semantic Coverage</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>Tagging e.g. Functional analysis, Environment analysis and visualisation, ...</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"AccessMode\">\n\t\t<fieldName>UsageMode</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>How the method is expected to be exploited.</note>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Download</vocabularyField>\n\t\t\t<vocabularyField>as-a-Application via Blue-Cloud Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Application via third-party Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Service via Blue-Cloud Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Service via third-party Infrastructure</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"AccessMode\">\n\t\t<fieldName>Availability</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>How the availability to the resource is offered. On-line means that the method can be executed through the Virtual Laboratory Gateway. On-site means that the method can only be executed by visiting the hosting provider.</note>\n\t\t<vocabulary>\n\t\t\t<vocabularyField>On-Line</vocabularyField>\n\t\t\t<vocabularyField>On-Site</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>Hosting Environment</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>E.g. Linux, Microsoft Azure, Amazon EC2</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>ProgrammingLanguage</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The primary language used to implement the method. </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>Dependencies on Other SW</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>E.g. this sowftware requires an Hadoop cluster to run</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>input</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>inputParametersType. See WPS specifications</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>output</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>outputType. See WPS specifications </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>IP/Copyrights</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Whether software is covered by any rights: copyright, related rights, know how, proprietary, etc.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Field/Scope of use</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Any use</vocabularyField>\n\t\t\t<vocabularyField>Non-commercial only</vocabularyField>\n\t\t\t<vocabularyField>Research only</vocabularyField>\n\t\t\t<vocabularyField>Non-commercial research only</vocabularyField>\n\t\t\t<vocabularyField>Private use</vocabularyField>\n\t\t\t<vocabularyField>Use for developing and providing a service</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Basic rights</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Temporary download of a single copy only</vocabularyField>\n\t\t\t<vocabularyField>Download</vocabularyField>\n\t\t\t<vocabularyField>Copying</vocabularyField>\n\t\t\t<vocabularyField>Distribution</vocabularyField>\n\t\t\t<vocabularyField>Modification</vocabularyField>\n\t\t\t<vocabularyField>Communication</vocabularyField>\n\t\t\t<vocabularyField>Making available to the public</vocabularyField>\n\t\t\t<vocabularyField>Other rights</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Restrictions on use</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Any restrictions on how where the dataset may be used </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Sublicense rights</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Any restrictions on how where the dataset may be used</note>\n\t\t<vocabulary>\n\t\t\t<vocabularyField>No</vocabularyField>\n\t\t\t<vocabularyField>Yes</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Requirement of non-disclosure (confidentiality mark)</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Requirement of non-disclosure (confidentiality mark). Whether the dataset bears confidentiality mark/may be used and shared subject to the obligation of non-disclosure</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Embargo period</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>Time_Interval</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Period of time during which the resource may be used. Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 2016-07-31 or 2015-05-10 12:00</note>\n\t\t<validator>\n\t\t\t<regularExpression>^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Attribution\">\n\t\t<fieldName>Attribution requirements</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The text to acknowledge the resource when using it</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Attribution\">\n\t\t<fieldName>Distribution requirements</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The text to acknowledge the resource when distributing it</note>\n\t</metadatafield>\n</metadataformat>", - "item": - { - "name": "bionym_local_in_blue-cloudlab", - "title": "Bionym Local in Blue-CloudLab", - "version": null, - "license_id": "CC-BY-NC-SA-4.0", + "item": { "author": null, - "maintainer": null, - "notes": "A fast version of the algorithm implementing BiOnym, a flexible workflow approach to taxon name matching. The workflow allows to activate several taxa names matching algorithms and to get the list of possible transcriptions for a list of input raw species names with possible authorship indication.", - "tags": - [ - { - "name": "Taxa" - }, - { - "name": "Blue-CloudLab" - }, - { - "name": "WPS" - }, - { - "name": "Analytics" - } - ], - "extras": - [ + "extras": [ { "key": "system:type", "value": "Method" }, + { + "key": "TechnicalDetails:input", + "value": "YResolution [OBJECT] : Projection resolution on the Y axis" + }, + { + "key": "TechnicalDetails:input", + "value": "XResolution [OBJECT] : Projection resolution on the X axis" + }, + { + "key": "TechnicalDetails:input", + "value": "BBox_UpperRightLat [OBJECT] : Upper Right Latitute of the Bounding Box" + }, + { + "key": "TechnicalDetails:input", + "value": "BBox_LowerLeftLat [OBJECT] : Lower Left Latitute of the Bounding Box" + }, + { + "key": "TechnicalDetails:input", + "value": "BBox_UpperRightLong [OBJECT] : Upper Right Longitude of the Bounding Box" + }, + { + "key": "TechnicalDetails:input", + "value": "Z [OBJECT] : Value of Z. Default is 0, that means processing will be at surface level or at the first avaliable Z value in the layer" + }, + { + "key": "TechnicalDetails:input", + "value": "Layer [OBJECT] : Layer Title or UUID or HTTP link. E.g. the title or the UUID (preferred) of a layer indexed in the e-Infrastructure on GeoNetwork - You can retrieve it from GeoExplorer. Otherwise you can supply the direct HTTP link of the layer. The format will be guessed from the link. The default is GeoTiff. Supports several standards (NETCDF, WFS, WCS ASC, GeoTiff )" + }, + { + "key": "TechnicalDetails:input", + "value": "BBox_LowerLeftLong [OBJECT] : Lower Left Longitude of the Bounding Box" + }, + { + "key": "TechnicalDetails:input", + "value": "TimeIndex [OBJECT] : Time Index. The default is the first time indexed dataset" + }, + { + "key": "TechnicalDetails:output", + "value": "non_deterministic_output [FILE] : NonDeterministicOutput" + }, + { + "key": "TechnicalDetails:output", + "value": "Output ESRI GRID ASCII FILE [FILE] : Output ESRI GRID ASCII FILE" + }, { "key": "Identity:Creator", "value": "Coro, Gianpaolo" }, { "key": "Identity:CreationDate", - "value": "2021-11-04" + "value": "2021-11-09" }, { "key": "AccessMode:UsageMode", @@ -73,18 +92,39 @@ }, { "key": "Attribution:Attribution requirements", - "value": "Cite as: <Creator> (<PublicationYear>): <Title>. <Version>. <Publisher>. <ResourceType>. <Identifier>. Retrieved from the <gateway name> (<gateway URL>) operated by D4Science.org www.d4science.org" + "value": "Cite as: Coro, Gianpaolo (2021): Esri Grid Extraction. n/a. Blue-Cloud. DataMiner Process. null. Retrieved from the null (null) operated by D4Science.org www.d4science.org" } ], - "private": false + "license_id": "CC-BY-NC-SA-4.0", + "maintainer": null, + "name": "esri_grid_extraction_in_blue-cloudlab", + "notes": "An algorithm to extract values associated to an environmental feature repository (e.g. NETCDF, ASC, GeoTiff files etc. ). A grid of points at a certain resolution is specified by the user and values are associated to the points from the environmental repository. It accepts as one geospatial repository ID (via their UUIDs in the infrastructure spatial data repository - recoverable through the Geoexplorer portlet) or a direct link to a file and the specification about time and space. The algorithm produces one ESRI GRID ASCII file containing the values associated to the selected bounding box.", + "private": false, + "tags": [ + { + "name": "Geo Processing" + }, + { + "name": "Blue-CloudLab" + }, + { + "name": "WPS" + }, + { + "name": "Analytics" + } + ], + "title": "Esri Grid Extraction in Blue-CloudLab", + "version": null }, - "resources": - [ + "profile": "<metadataformat type=\"Method\">\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>External Identifier</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>This applies only to methods that have been already published. Insert here a DOI, an handle, and any other Identifier assigned when publishing the dataset alsewhere.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>Creator</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>The name of the creator, with email and ORCID. The format should be: family, given[, email][, ORCID]. Example: Smith, John, js@acme.org, orcid.org/0000-0002-1825-0097</note>\n\t\t<validator>\n\t\t\t<regularExpression>^[a-zA-ZÀ-ÿ .'-]+, [a-zA-ZÀ-ÿ .'-]+[, ]*([a-zA-Z0-9_!#$%’*+=?`{|}~^.-]+@[a-zA-Z0-9À-ÿ.-]+)?[, ]*(orcid.org\\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\\d\\d\\d-\\d\\d\\d[\\dX])?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>CreationDate</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>Time</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The date of creation of the dataset (different from the date of registration of the dataset automatically added by the system). Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 1998-11-10 or 2015-05-29 11:55</note>\n\t\t<validator>\n\t\t\t<regularExpression>^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>Owner</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>The owner of the method (free text).</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>RelatedPaper</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Insert a complete reference to an associated work.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Coverage\">\n\t\t<fieldName>Semantic Coverage</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>Tagging e.g. Functional analysis, Environment analysis and visualisation, ...</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"AccessMode\">\n\t\t<fieldName>UsageMode</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>How the method is expected to be exploited.</note>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Download</vocabularyField>\n\t\t\t<vocabularyField>as-a-Application via Blue-Cloud Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Application via third-party Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Service via Blue-Cloud Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Service via third-party Infrastructure</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"AccessMode\">\n\t\t<fieldName>Availability</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>How the availability to the resource is offered. On-line means that the method can be executed through the Virtual Laboratory Gateway. On-site means that the method can only be executed by visiting the hosting provider.</note>\n\t\t<vocabulary>\n\t\t\t<vocabularyField>On-Line</vocabularyField>\n\t\t\t<vocabularyField>On-Site</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>Hosting Environment</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>E.g. Linux, Microsoft Azure, Amazon EC2</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>ProgrammingLanguage</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The primary language used to implement the method. </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>Dependencies on Other SW</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>E.g. this sowftware requires an Hadoop cluster to run</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>input</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>inputParametersType. See WPS specifications</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>output</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>outputType. See WPS specifications </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>IP/Copyrights</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Whether software is covered by any rights: copyright, related rights, know how, proprietary, etc.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Field/Scope of use</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Any use</vocabularyField>\n\t\t\t<vocabularyField>Non-commercial only</vocabularyField>\n\t\t\t<vocabularyField>Research only</vocabularyField>\n\t\t\t<vocabularyField>Non-commercial research only</vocabularyField>\n\t\t\t<vocabularyField>Private use</vocabularyField>\n\t\t\t<vocabularyField>Use for developing and providing a service</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Basic rights</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Temporary download of a single copy only</vocabularyField>\n\t\t\t<vocabularyField>Download</vocabularyField>\n\t\t\t<vocabularyField>Copying</vocabularyField>\n\t\t\t<vocabularyField>Distribution</vocabularyField>\n\t\t\t<vocabularyField>Modification</vocabularyField>\n\t\t\t<vocabularyField>Communication</vocabularyField>\n\t\t\t<vocabularyField>Making available to the public</vocabularyField>\n\t\t\t<vocabularyField>Other rights</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Restrictions on use</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Any restrictions on how where the dataset may be used </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Sublicense rights</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Any restrictions on how where the dataset may be used</note>\n\t\t<vocabulary>\n\t\t\t<vocabularyField>No</vocabularyField>\n\t\t\t<vocabularyField>Yes</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Requirement of non-disclosure (confidentiality mark)</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Requirement of non-disclosure (confidentiality mark). Whether the dataset bears confidentiality mark/may be used and shared subject to the obligation of non-disclosure</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Embargo period</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>Time_Interval</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Period of time during which the resource may be used. Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 2016-07-31 or 2015-05-10 12:00</note>\n\t\t<validator>\n\t\t\t<regularExpression>^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Attribution\">\n\t\t<fieldName>Attribution requirements</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The text to acknowledge the resource when using it</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Attribution\">\n\t\t<fieldName>Distribution requirements</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The text to acknowledge the resource when distributing it</note>\n\t</metadatafield>\n</metadataformat>", + "profileID": "Method", + "resources": [ { - "name": "WPS Link", - "url": "https://dataminer-genericworkers-proto-1804.d4science.org:443/wps/WebProcessingService?Request=DescribeProcess&Version=1.0.0&Service=WPS&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.BIONYM_LOCAL", + "description": "WPS Link to the Method", "format": "WPS", - "description": "WPS Link to the Method" + "name": "WPS Link", + "url": "https://dataminer-prototypes-cnr-1804.d4science.org/wps/WebProcessingService?Request=DescribeProcess&Version=1.0.0&Service=WPS&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ESRI_GRID_EXTRACTION" } ] } \ No newline at end of file From f2ba354915bbe666517aaa6b4321d40784ea83b4 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi <fabio.sinibaldi@isti.cnr.it> Date: Wed, 10 Nov 2021 14:35:41 +0100 Subject: [PATCH 3/5] Item Corrections --- .../dm/DMAlgorithmsInfoCollector.java | 7 +-- .../collectors/dm/model/ckan/GCatModel.java | 5 +- .../collectors/dm/TranslationTest.java | 4 +- .../catalogues/gCat/full-algorithm.json | 50 +++++++++---------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java index 3bd92a4..1003173 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/DMAlgorithmsInfoCollector.java @@ -1,6 +1,7 @@ package org.gcube.data.publishing.gCatFeeder.collectors.dm; import java.time.LocalDateTime; +import java.time.Month; import java.time.ZoneId; import java.time.chrono.IsoChronology; import java.time.format.DateTimeFormatter; @@ -143,8 +144,8 @@ public class DMAlgorithmsInfoCollector implements DataCollector<InternalAlgorith try{ toSetCreationDate=LocalDateTime.parse(desc.getVersion(),versionDateParser); }catch(Throwable t){ - log.debug("Version {} is not a date. Using Now as Creation date..",desc.getVersion()); - toSetCreationDate = LocalDateTime.now(); + log.debug("Version {} is not a date. Using 1900-01-01 as Creation date..",desc.getVersion()); + toSetCreationDate = LocalDateTime.of(1900, Month.JANUARY,1,0,0); } desc.setCreationDate(toSetCreationDate); @@ -257,7 +258,7 @@ public class DMAlgorithmsInfoCollector implements DataCollector<InternalAlgorith Matcher m=descriptionPattern.matcher(description); if(m.find()) return m.group(4); // group 0 == {...}, group 1 == Giancarlo Panichi, group 2 == giancarlo.panichi, group 4 == 2018/07/20 10:24 GMT - else return "n/a"; + else return "n.d."; } static final String getWPSBasePath() { diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java index 99efd07..f306d2a 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/model/ckan/GCatModel.java @@ -60,11 +60,12 @@ public class GCatModel implements CatalogueFormatData { public GCatModel(InternalAlgorithmDescriptor desc) { item=new CkanItem(); - // item.setAuthor(desc.getAuthor()); + item.setAuthor(desc.getAuthor().getFirstName()+" "+desc.getAuthor().getLastName()); item.setTitle(desc.getName()+" in "+ContextUtils.getCurrentScopeName()); item.setLicense_id("CC-BY-NC-SA-4.0"); - // item.setMaintainer(desc.getMaintainer()); + item.setMaintainer(desc.getMaintainer().getFirstName()+" "+desc.getMaintainer().getLastName()); + item.setName(item.getTitle().toLowerCase().toLowerCase().replaceAll(" ", "_")); for(String tag:desc.getTags()) { item.getTags().add(new CkanItem.Tag(fixTag(tag))); diff --git a/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java index 82c7306..0baba31 100644 --- a/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java +++ b/DataMinerAlgorithmsCrawler/src/test/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/TranslationTest.java @@ -75,8 +75,8 @@ public class TranslationTest extends BaseCollectorTest{ @Test public void testEnvironment(){ Assume.assumeTrue(isTestInfrastructureEnabled()); - assertNotNull(DMAlgorithmsInfoCollector.getWPSBasePath()); - assertNotNull(GCatModel.getItemUrl("fake")); + //assertNotNull(DMAlgorithmsInfoCollector.getWPSBasePath()); + //assertNotNull(GCatModel.getItemUrl("fake")); System.out.println(getEnvironmentConfiguration().getCurrentConfiguration()); } } diff --git a/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json b/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json index 6e9bf58..0d6b645 100644 --- a/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json +++ b/gCat-Controller/src/test/resources/org/gcube/data/publishing/gCatFeeder/catalogues/gCat/full-algorithm.json @@ -1,6 +1,6 @@ { "item": { - "author": null, + "author": "Gianpaolo Coro", "extras": [ { "key": "system:type", @@ -8,39 +8,31 @@ }, { "key": "TechnicalDetails:input", - "value": "YResolution [OBJECT] : Projection resolution on the Y axis" + "value": "FeaturesColumnNames [COLUMN_LIST] : column Names for the features [a sequence of names of columns from OccurrencePointsTable separated by | ]" }, { "key": "TechnicalDetails:input", - "value": "XResolution [OBJECT] : Projection resolution on the X axis" + "value": "maxIterations [OBJECT] : XMeans max number of overall iterations of the clustering learning" }, { "key": "TechnicalDetails:input", - "value": "BBox_UpperRightLat [OBJECT] : Upper Right Latitute of the Bounding Box" + "value": "minClusters [OBJECT] : minimum number of expected clusters" }, { "key": "TechnicalDetails:input", - "value": "BBox_LowerLeftLat [OBJECT] : Lower Left Latitute of the Bounding Box" + "value": "maxClusters [OBJECT] : maximum number of clusters to produce" }, { "key": "TechnicalDetails:input", - "value": "BBox_UpperRightLong [OBJECT] : Upper Right Longitude of the Bounding Box" + "value": "OccurrencePointsClusterLabel [OBJECT] : table name of the resulting distribution" }, { "key": "TechnicalDetails:input", - "value": "Z [OBJECT] : Value of Z. Default is 0, that means processing will be at surface level or at the first avaliable Z value in the layer" + "value": "OccurrencePointsTable [TABULAR] default : : Occurrence Points Table. Max 4000 points [a http link to a table in UTF-8 encoding following this template: (GENERIC) A generic comma separated csv file in UTF-8 encoding]" }, { "key": "TechnicalDetails:input", - "value": "Layer [OBJECT] : Layer Title or UUID or HTTP link. E.g. the title or the UUID (preferred) of a layer indexed in the e-Infrastructure on GeoNetwork - You can retrieve it from GeoExplorer. Otherwise you can supply the direct HTTP link of the layer. The format will be guessed from the link. The default is GeoTiff. Supports several standards (NETCDF, WFS, WCS ASC, GeoTiff )" - }, - { - "key": "TechnicalDetails:input", - "value": "BBox_LowerLeftLong [OBJECT] : Lower Left Longitude of the Bounding Box" - }, - { - "key": "TechnicalDetails:input", - "value": "TimeIndex [OBJECT] : Time Index. The default is the first time indexed dataset" + "value": "min_points [OBJECT] : number of points which define an outlier set" }, { "key": "TechnicalDetails:output", @@ -48,7 +40,7 @@ }, { "key": "TechnicalDetails:output", - "value": "Output ESRI GRID ASCII FILE [FILE] : Output ESRI GRID ASCII FILE" + "value": "OutputTable [TABULAR] default : : Output cluster table [a http link to a table in UTF-8 ecoding following this template: (CLUSTER) http://goo.gl/PnKhhb]" }, { "key": "Identity:Creator", @@ -56,7 +48,7 @@ }, { "key": "Identity:CreationDate", - "value": "2021-11-09" + "value": "1900-01-01" }, { "key": "AccessMode:UsageMode", @@ -92,20 +84,20 @@ }, { "key": "Attribution:Attribution requirements", - "value": "Cite as: Coro, Gianpaolo (2021): Esri Grid Extraction. n/a. Blue-Cloud. DataMiner Process. null. Retrieved from the null (null) operated by D4Science.org www.d4science.org" + "value": "Cite as: Coro, Gianpaolo (2021): Xmeans. n.d.. Blue-Cloud. DataMiner Process. https://data.dev.d4science.org/ctlg/devVRE/xmeans_in_devvre. Retrieved from the DEVGateway (https://next.d4science.org/group/devvre/dataminer?OperatorId=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.XMEANS) operated by D4Science.org www.d4science.org" } ], "license_id": "CC-BY-NC-SA-4.0", - "maintainer": null, - "name": "esri_grid_extraction_in_blue-cloudlab", - "notes": "An algorithm to extract values associated to an environmental feature repository (e.g. NETCDF, ASC, GeoTiff files etc. ). A grid of points at a certain resolution is specified by the user and values are associated to the points from the environmental repository. It accepts as one geospatial repository ID (via their UUIDs in the infrastructure spatial data repository - recoverable through the Geoexplorer portlet) or a direct link to a file and the specification about time and space. The algorithm produces one ESRI GRID ASCII file containing the values associated to the selected bounding box.", + "maintainer": "Gianpaolo Coro", + "name": "xmeans_in_devvre", + "notes": "A clustering algorithm for occurrence points that relies on the X-Means algorithm, i.e. an extended version of the K-Means algorithm improved by an Improve-Structure part. A Maximum of 4000 points is allowed.", "private": false, "tags": [ { - "name": "Geo Processing" + "name": "Data Clustering" }, { - "name": "Blue-CloudLab" + "name": "devVRE" }, { "name": "WPS" @@ -114,17 +106,23 @@ "name": "Analytics" } ], - "title": "Esri Grid Extraction in Blue-CloudLab", + "title": "Xmeans in devVRE", "version": null }, "profile": "<metadataformat type=\"Method\">\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>External Identifier</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>This applies only to methods that have been already published. Insert here a DOI, an handle, and any other Identifier assigned when publishing the dataset alsewhere.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>Creator</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>The name of the creator, with email and ORCID. The format should be: family, given[, email][, ORCID]. Example: Smith, John, js@acme.org, orcid.org/0000-0002-1825-0097</note>\n\t\t<validator>\n\t\t\t<regularExpression>^[a-zA-ZÀ-ÿ .'-]+, [a-zA-ZÀ-ÿ .'-]+[, ]*([a-zA-Z0-9_!#$%’*+=?`{|}~^.-]+@[a-zA-Z0-9À-ÿ.-]+)?[, ]*(orcid.org\\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\\d\\d\\d-\\d\\d\\d[\\dX])?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>CreationDate</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>Time</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The date of creation of the dataset (different from the date of registration of the dataset automatically added by the system). Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 1998-11-10 or 2015-05-29 11:55</note>\n\t\t<validator>\n\t\t\t<regularExpression>^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>Owner</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>The owner of the method (free text).</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Identity\">\n\t\t<fieldName>RelatedPaper</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Insert a complete reference to an associated work.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Coverage\">\n\t\t<fieldName>Semantic Coverage</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>Tagging e.g. Functional analysis, Environment analysis and visualisation, ...</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"AccessMode\">\n\t\t<fieldName>UsageMode</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>How the method is expected to be exploited.</note>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Download</vocabularyField>\n\t\t\t<vocabularyField>as-a-Application via Blue-Cloud Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Application via third-party Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Service via Blue-Cloud Infrastructure</vocabularyField>\n\t\t\t<vocabularyField>as-a-Service via third-party Infrastructure</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"AccessMode\">\n\t\t<fieldName>Availability</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>How the availability to the resource is offered. On-line means that the method can be executed through the Virtual Laboratory Gateway. On-site means that the method can only be executed by visiting the hosting provider.</note>\n\t\t<vocabulary>\n\t\t\t<vocabularyField>On-Line</vocabularyField>\n\t\t\t<vocabularyField>On-Site</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>Hosting Environment</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>E.g. Linux, Microsoft Azure, Amazon EC2</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>ProgrammingLanguage</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The primary language used to implement the method. </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>Dependencies on Other SW</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>E.g. this sowftware requires an Hadoop cluster to run</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>input</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>inputParametersType. See WPS specifications</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"TechnicalDetails\">\n\t\t<fieldName>output</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>*</maxOccurs>\n\t\t<note>outputType. See WPS specifications </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>IP/Copyrights</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Whether software is covered by any rights: copyright, related rights, know how, proprietary, etc.</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Field/Scope of use</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Any use</vocabularyField>\n\t\t\t<vocabularyField>Non-commercial only</vocabularyField>\n\t\t\t<vocabularyField>Research only</vocabularyField>\n\t\t\t<vocabularyField>Non-commercial research only</vocabularyField>\n\t\t\t<vocabularyField>Private use</vocabularyField>\n\t\t\t<vocabularyField>Use for developing and providing a service</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Basic rights</fieldName>\n\t\t<mandatory>true</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<vocabulary isMultiSelection=\"true\">\n\t\t\t<vocabularyField>Temporary download of a single copy only</vocabularyField>\n\t\t\t<vocabularyField>Download</vocabularyField>\n\t\t\t<vocabularyField>Copying</vocabularyField>\n\t\t\t<vocabularyField>Distribution</vocabularyField>\n\t\t\t<vocabularyField>Modification</vocabularyField>\n\t\t\t<vocabularyField>Communication</vocabularyField>\n\t\t\t<vocabularyField>Making available to the public</vocabularyField>\n\t\t\t<vocabularyField>Other rights</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Restrictions on use</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Any restrictions on how where the dataset may be used </note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Sublicense rights</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Any restrictions on how where the dataset may be used</note>\n\t\t<vocabulary>\n\t\t\t<vocabularyField>No</vocabularyField>\n\t\t\t<vocabularyField>Yes</vocabularyField>\n\t\t</vocabulary>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Requirement of non-disclosure (confidentiality mark)</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Requirement of non-disclosure (confidentiality mark). Whether the dataset bears confidentiality mark/may be used and shared subject to the obligation of non-disclosure</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Rights\">\n\t\t<fieldName>Embargo period</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>Time_Interval</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>Period of time during which the resource may be used. Use ISO 8601 Date Format: YYYY-MM-DD[ HH:MM] Ex. 2016-07-31 or 2015-05-10 12:00</note>\n\t\t<validator>\n\t\t\t<regularExpression>^(\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01]))+([ ]+(\\d{2}(:?\\d{2})?)?)?$</regularExpression>\n\t\t</validator>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Attribution\">\n\t\t<fieldName>Attribution requirements</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The text to acknowledge the resource when using it</note>\n\t</metadatafield>\n\t<metadatafield categoryref=\"Attribution\">\n\t\t<fieldName>Distribution requirements</fieldName>\n\t\t<mandatory>false</mandatory>\n\t\t<dataType>String</dataType>\n\t\t<maxOccurs>1</maxOccurs>\n\t\t<note>The text to acknowledge the resource when distributing it</note>\n\t</metadatafield>\n</metadataformat>", "profileID": "Method", "resources": [ + { + "description": "Link to the GUI designed to operate with DataMiner", + "format": "https", + "name": "Gateway Link", + "url": "https://next.d4science.org/group/devvre/dataminer?OperatorId=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.XMEANS" + }, { "description": "WPS Link to the Method", "format": "WPS", "name": "WPS Link", - "url": "https://dataminer-prototypes-cnr-1804.d4science.org/wps/WebProcessingService?Request=DescribeProcess&Version=1.0.0&Service=WPS&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ESRI_GRID_EXTRACTION" + "url": "https://dataminer1.dev.d4science.org:443/wps/WebProcessingService?Request=DescribeProcess&Version=1.0.0&Service=WPS&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.XMEANS" } ] } \ No newline at end of file From 852d1ed712230b092015aa94aa2bf8a8dfaacb44 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi <fabio.sinibaldi@isti.cnr.it> Date: Thu, 11 Nov 2021 10:44:58 +0100 Subject: [PATCH 4/5] Profile never published --- .../publishing/gCatFeeder/collectors/dm/GCATTransformer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/GCATTransformer.java b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/GCATTransformer.java index 9c823a1..ee51e65 100644 --- a/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/GCATTransformer.java +++ b/DataMinerAlgorithmsCrawler/src/main/java/org/gcube/data/publishing/gCatFeeder/collectors/dm/GCATTransformer.java @@ -13,7 +13,7 @@ public class GCATTransformer implements DataTransformer<GCatModel,InternalAlgori @Override public Set<GCatModel> transform(Collection<InternalAlgorithmDescriptor> collectedData) { HashSet<GCatModel> toReturn=new HashSet<>(); - boolean specifyProfile=true; + boolean specifyProfile=false; //never for(InternalAlgorithmDescriptor desc:collectedData) { toReturn.add(desc.asCKANModel(specifyProfile)); specifyProfile=false; //only once From 04ed0f388fbcdad627a17c217dc1db3787e63d77 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi <fabio.sinibaldi@isti.cnr.it> Date: Thu, 11 Nov 2021 10:46:00 +0100 Subject: [PATCH 5/5] Releasing 1.0.5 --- DataMinerAlgorithmsCrawler/CHANGELOG.md | 2 +- DataMinerAlgorithmsCrawler/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DataMinerAlgorithmsCrawler/CHANGELOG.md b/DataMinerAlgorithmsCrawler/CHANGELOG.md index eb1c415..a17b1a1 100644 --- a/DataMinerAlgorithmsCrawler/CHANGELOG.md +++ b/DataMinerAlgorithmsCrawler/CHANGELOG.md @@ -2,7 +2,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # Changelog for org.gcube.data-publishing.gFeed.DataMinerAlgorithmsCrawler -## [v1.0.5-SNAPSHOT] - 2020-12-15 +## [v1.0.5] - 2020-12-15 - Fixes [#22344](https://support.d4science.org/issues/22344#change-128440) : publish DM algorithms as Methods ## [v1.0.4] - 2020-12-15 diff --git a/DataMinerAlgorithmsCrawler/pom.xml b/DataMinerAlgorithmsCrawler/pom.xml index 7cfabfe..f6b2a9a 100644 --- a/DataMinerAlgorithmsCrawler/pom.xml +++ b/DataMinerAlgorithmsCrawler/pom.xml @@ -8,7 +8,7 @@ </parent> <artifactId>DataMinerAlgorithmsCrawler</artifactId> <name>DataMinerAlgorithmsCrawler</name> - <version>1.0.5-SNAPSHOT</version> + <version>1.0.5</version> <description>Plugin for gCat-Feeder for DataMiner Algorithms publishing</description> <!-- <properties> -->