From cfbdebaf4d170e7ec8509df76c3dc22b93701165 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 2 Oct 2019 17:32:21 +0200 Subject: [PATCH] working on the DSM --- .../datasources/common/BrowseTerm.java | 4 + .../datasources/common/BrowseTermImpl.java | 18 +- .../common/LocalDatasourceManager.java | 2 +- .../datasources/common/SearchApisEntry.java | 1 - .../LocalSimpleDatasourceManagerImpl.java | 265 ++++++++++++++++-- .../data/datasource/XmlBrowsableField.java | 40 +++ ...icationContext-dnet-datasource-manager.xml | 22 +- .../templates/browseRepoApis.xquery.st | 5 + .../templates/findRepoApis.xquery.st | 11 + .../datasources/templates/findRepos.xquery.st | 11 + .../datasources/templates/findReposMap.xquery | 11 + .../templates/simpleFindRepos.xquery.st | 12 + dnet-modular-ui/pom.xml | 2 +- .../repositories/RepoInternalController.java | 2 +- .../web/resources/html/repoBrowse.html | 2 +- 15 files changed, 382 insertions(+), 26 deletions(-) create mode 100644 dnet-data-services/src/main/java/eu/dnetlib/data/datasource/XmlBrowsableField.java create mode 100644 dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/browseRepoApis.xquery.st create mode 100644 dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepoApis.xquery.st create mode 100644 dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepos.xquery.st create mode 100644 dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findReposMap.xquery create mode 100644 dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/simpleFindRepos.xquery.st diff --git a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTerm.java b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTerm.java index f208ae4..104a2c5 100644 --- a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTerm.java +++ b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTerm.java @@ -2,6 +2,10 @@ package eu.dnetlib.enabling.datasources.common; public interface BrowseTerm { + String getCode(); + + void setCode(String code); + String getTerm(); void setTerm(String term); diff --git a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTermImpl.java b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTermImpl.java index 3d0d854..fe781ff 100644 --- a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTermImpl.java +++ b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/BrowseTermImpl.java @@ -2,28 +2,44 @@ package eu.dnetlib.enabling.datasources.common; public class BrowseTermImpl implements BrowseTerm { + private String code; private String term; private long total; public BrowseTermImpl() {} - public BrowseTermImpl(final String term, final int total) { + public BrowseTermImpl(final String code, final String term, final int total) { + this.code = code; this.term = term; this.total = total; } + @Override + public String getCode() { + return code; + } + + @Override + public void setCode(final String code) { + this.code = code; + } + + @Override public String getTerm() { return term; } + @Override public void setTerm(final String term) { this.term = term; } + @Override public long getTotal() { return total; } + @Override public void setTotal(final long total) { this.total = total; } diff --git a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/LocalDatasourceManager.java b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/LocalDatasourceManager.java index 49242f0..529d7c5 100644 --- a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/LocalDatasourceManager.java +++ b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/LocalDatasourceManager.java @@ -15,7 +15,7 @@ public interface LocalDatasourceManager, API extends List listBrowsableFields() throws DsmException; - List browseField(String field) throws DsmException; + List browseField(String field) throws DsmException; void setActive(String dsId, String apiId, boolean active) throws DsmException; diff --git a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/SearchApisEntry.java b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/SearchApisEntry.java index 80a42b5..a283bb0 100644 --- a/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/SearchApisEntry.java +++ b/dnet-core-components/src/main/java/eu/dnetlib/enabling/datasources/common/SearchApisEntry.java @@ -2,7 +2,6 @@ package eu.dnetlib.enabling.datasources.common; import javax.xml.bind.annotation.XmlRootElement; -@XmlRootElement public class SearchApisEntry implements Comparable { private String id; diff --git a/dnet-data-services/src/main/java/eu/dnetlib/data/datasource/LocalSimpleDatasourceManagerImpl.java b/dnet-data-services/src/main/java/eu/dnetlib/data/datasource/LocalSimpleDatasourceManagerImpl.java index fd7193e..dc9042c 100644 --- a/dnet-data-services/src/main/java/eu/dnetlib/data/datasource/LocalSimpleDatasourceManagerImpl.java +++ b/dnet-data-services/src/main/java/eu/dnetlib/data/datasource/LocalSimpleDatasourceManagerImpl.java @@ -1,20 +1,51 @@ package eu.dnetlib.data.datasource; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; import eu.dnetlib.enabling.datasources.common.*; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; import eu.dnetlib.enabling.locators.UniqueServiceLocator; +import org.antlr.stringtemplate.StringTemplate; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpStatus; +import org.dom4j.Document; +import org.dom4j.Node; +import org.dom4j.io.SAXReader; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Required; +import org.springframework.core.io.ClassPathResource; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.io.StringReader; +import java.util.*; +import java.util.stream.Collectors; public class LocalSimpleDatasourceManagerImpl implements LocalSimpleDatasourceManager { + private static final Log log = LogFactory.getLog(LocalSimpleDatasourceManagerImpl.class); + + private static final String REPOSITORY_RESOURCE_TYPE = "RepositoryServiceResourceType"; + + private ClassPathResource findReposQueryTmpl = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/findRepos.xquery.st"); + + private ClassPathResource browseRepoApisQueryTmpl = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/browseRepoApis.xquery.st"); + private ClassPathResource findRepoApisQueryTmpl = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/findRepoApis.xquery.st"); + private ClassPathResource findReposMapQuery = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/findReposMap.xquery"); + private ClassPathResource simpleFindReposQueryTmpl = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/simpleFindRepos.xquery.st"); + + private List browsableFields; + @Autowired private UniqueServiceLocator serviceLocator; - @Override public Set listManagedDatasourceIds() throws DsmRuntimeException { throw new DsmRuntimeException("method 'listManagedDatasourceIds' not implemented"); @@ -22,58 +53,203 @@ public class LocalSimpleDatasourceManagerImpl implements LocalSimpleDatasourceMa @Override public List searchDatasourcesByType(String type) throws DsmException { + try { + final List list = new ArrayList<>(); - return null; + final StringTemplate st = new StringTemplate(IOUtils.toString(simpleFindReposQueryTmpl.getInputStream())); + st.setAttribute("type", type); + + for (String s : serviceLocator.getService(ISLookUpService.class).quickSearchProfile(st.toString())) { + final SimpleDatasource r = new SimpleDatasource(); + final String[] arr = s.split("@=@"); + r.setId(arr[0].trim()); + r.setName(arr[1].trim()); + r.setOrigId(arr[2].trim()); + r.setApis(Sets.newHashSet(arr[3].replaceAll("\\s", "").split(","))); + r.setValid("true".equals(arr[4].trim())); + r.setTypology(type); + list.add(r); + } + + Collections.sort(list); + + return list; + } catch (Exception e) { + log.error("Error listing repos", e); + } + return Lists.newArrayList(); } @Override public List searchApis(String field, Object value) throws DsmException { - return null; + try { + final StringTemplate st = new StringTemplate(); + st.setTemplate(IOUtils.toString(findRepoApisQueryTmpl.getInputStream())); + + final String val = value.toString(); + if (field.equalsIgnoreCase("__search__")) { + st.setAttribute("cond", "contains(../..//(*|@*)/lower-case(.), '" + StringEscapeUtils.escapeXml(val.toLowerCase()) + "')"); + } else { + final XmlBrowsableField f = findBrowseField(field); + if (f != null) { + st.setAttribute("cond", f.getXpath() + "='" + StringEscapeUtils.escapeXml(val) + "'"); + } else { + return Lists.newArrayList(); + } + } + + final String query = st.toString(); + final SAXReader reader = new SAXReader(); + final List list = serviceLocator.getService(ISLookUpService.class).quickSearchProfile(query); + + return list.stream() + .map(s -> { + final SearchApisEntry iface = new SearchApisEntry(); + try { + final Document doc = reader.read(new StringReader(s)); + final String country = doc.valueOf("//REPO/@country"); + + iface.setRepoId(doc.valueOf("//REPO/@id")); + iface.setRepoCountry(StringUtils.isEmpty(country) ? "-" : country.toUpperCase()); + iface.setRepoName(doc.valueOf("//REPO/@name")); + iface.setRepoPrefix(doc.valueOf("//REPO/@prefix")); + + final Node ifcNode = doc.selectSingleNode("//INTERFACE"); + + iface.setId(ifcNode.valueOf("./@id")); + iface.setActive(Boolean.valueOf(ifcNode.valueOf("./@active"))); + iface.setProtocol(ifcNode.valueOf("./ACCESS_PROTOCOL/text()")); + + final String overCompliance = ifcNode.valueOf("./INTERFACE_EXTRA_FIELD[@name='overriding_compliance']"); + if (StringUtils.isEmpty(overCompliance)) { + iface.setCompliance(ifcNode.valueOf("@compliance")); + } else { + iface.setCompliance(overCompliance); + } + + final String lastAggregationDate = ifcNode.valueOf("./INTERFACE_EXTRA_FIELD[@name='last_aggregation_date']"); + if (!StringUtils.isEmpty(lastAggregationDate)) { + iface.setAggrDate(lastAggregationDate); + } else { + final String lastDownloadDate = ifcNode.valueOf("./INTERFACE_EXTRA_FIELD[@name='last_download_date']"); + if (!StringUtils.isEmpty(lastDownloadDate)) { + iface.setAggrDate(lastDownloadDate); + } + } + final String lastAggregationTotal = ifcNode.valueOf("./INTERFACE_EXTRA_FIELD[@name='last_aggregation_total']"); + if (StringUtils.isEmpty(lastAggregationTotal)) { + final String lastDownloadTotal = ifcNode.valueOf("./INTERFACE_EXTRA_FIELD[@name='last_download_total']"); + if (StringUtils.isEmpty(lastDownloadTotal)) { + iface.setAggrTotal(0); + } else { + iface.setAggrTotal(NumberUtils.toInt(lastDownloadTotal, 0)); + } + } else { + iface.setAggrTotal(NumberUtils.toInt(lastAggregationTotal, 0)); + } + } catch (Exception e) { + log.error(e); + } + return iface; + }).collect(Collectors.toList()); + } catch (Exception e) { + log.error("Error searching field " + field + " - value: " + value, e); + } + return Lists.newArrayList(); } @Override - public List listBrowsableFields() throws DsmException { - return null; + public List listBrowsableFields() throws DsmException { + return getBrowsableFields(); + } + + public List getBrowsableFields() { + return browsableFields; + } + + @Required + public void setBrowsableFields(List browsableFields) { + this.browsableFields = browsableFields; } @Override - public List browseField(String field) throws DsmException { - return null; + public List browseField(final String f) throws DsmException { + final List list = Lists.newArrayList(); + try { + final XmlBrowsableField field = findBrowseField(f); + if (field != null) { + final StringTemplate st = new StringTemplate(IOUtils.toString(browseRepoApisQueryTmpl.getInputStream())); + st.setAttribute("xpath", field.getXpath()); + + final Map terms = fetchVocabularyTerms(field.getVocabulary()); + + for (String s : serviceLocator.getService(ISLookUpService.class).quickSearchProfile(st.toString())) { + final String[] arr = s.split("@-@-@"); + final String id = arr[0].trim(); + final int count = NumberUtils.toInt(arr[1].trim(), 0); + list.add(new BrowseTermImpl(id, findLabel(id, terms), count)); + } + } + } catch (Exception e) { + log.error("Error browsing field " + f, e); + } + + return list; } @Override public void setActive(String dsId, String apiId, boolean active) throws DsmException { - + throw new DsmRuntimeException("method 'setActive' not implemented"); } @Override public boolean isActive(String dsId, String apiId) throws DsmException { - return false; + throw new DsmRuntimeException("method 'isActive' not implemented"); } @Override public void setLastCollectionInfo(String dsId, String apiId, String mdId, Integer size, Date date) throws DsmException { - + Map updates = Maps.newHashMap(); + updates.put("last_collection_date", date.toString()); + updates.put("last_collection_total", size.toString()); + updateInterfaceExtraInfo(dsId, apiId, updates); } @Override public void setLastAggregationInfo(String dsId, String apiId, String mdId, Integer size, Date date) throws DsmException { - + Map updates = Maps.newHashMap(); + updates.put("last_aggregation_date", date.toString()); + updates.put("last_aggregation_total", size.toString()); + updateInterfaceExtraInfo(dsId, apiId, updates); } @Override public void setLastDownloadInfo(String dsId, String apiId, String objId, Integer size, Date date) throws DsmException { - + Map updates = Maps.newHashMap(); + updates.put("last_download_date", date.toString()); + updates.put("last_download_total", size.toString()); + updateInterfaceExtraInfo(dsId, apiId, updates); } @Override public void setLastValidationJob(String dsId, String apiId, String jobId) throws DsmException { - + Map updates = Maps.newHashMap(); + updates.put("last_validation_job", jobId); + updateInterfaceExtraInfo(dsId, apiId, updates); } @Override public void updateApiDetails(String dsId, String apiId, String metadataIdentifierPath, String baseUrl, Map params) throws DsmException { + // oaiset, baseurl, compatibility +/* + + oai + http://pub.uni-bielefeld.de/oai + //*[local-name()='header']/*[local-name()='identifier'] + */ + + } @Override @@ -130,4 +306,59 @@ public class LocalSimpleDatasourceManagerImpl implements LocalSimpleDatasourceMa public void updateCompliance(String dsId, String apiId, String compliance, boolean override) throws DsmException { } + + // HELPERS + + private void updateInterfaceExtraInfo(String dsId, String apiId, Map updates) throws DsmException { + final String xpath = "//INTERFACE[@id = '%s']/INTERFACE_EXTRA_FIELD[@name='%s']"; + final ISRegistryService isRegistry = serviceLocator.getService(ISRegistryService.class); + + updates.forEach((k, v) -> { + try { + isRegistry.updateProfileNode(dsId, String.format(xpath, apiId, k), v); + } catch (ISRegistryException e) { + log.error("Error updating profile: " + dsId, e); + throw new DsmRuntimeException("Error updating profile: " + dsId, e); + } + }); + } + + private void updateInterfaceExtraInfo(String dsId, String apiId, Integer size, Date date, String last_date, String last_total) throws DsmException { + final String xpath = "//INTERFACE[@id = '%s']/INTERFACE_EXTRA_FIELD[@name='%s']"; + final ISRegistryService isRegistry = serviceLocator.getService(ISRegistryService.class); + try { + isRegistry.updateProfileNode(dsId, String.format(xpath, apiId, last_date), date.toString()); + isRegistry.updateProfileNode(dsId, String.format(xpath, apiId, last_total), size.toString()); + + } catch (ISRegistryException e) { + log.error("Error updating profile: " + dsId, e); + throw new DsmException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Error updating profile: " + dsId, e); + } + } + + private XmlBrowsableField findBrowseField(final String id) throws DsmException { + for (XmlBrowsableField f : listBrowsableFields()) { + if (f.getId().equals(id)) { + return f; + } + } + return null; + } + + public Map fetchVocabularyTerms(final String voc) throws ISLookUpException { + final String xquery = "for $x in collection('/db/DRIVER/VocabularyDSResources/VocabularyDSResourceType')[.//VOCABULARY_NAME/@code = '" + + voc.trim() + "']//TERM return concat($x/@code, ' @@@ ', $x/@english_name)"; + + final Map map = Maps.newHashMap(); + for (String s : serviceLocator.getService(ISLookUpService.class).quickSearchProfile(xquery)) { + final String[] arr = s.split("@@@"); + map.put(arr[0].trim(), arr[1].trim()); + } + return map; + } + + private String findLabel(final String code, final Map terms) { + return terms.containsKey(code) ? terms.get(code) : code; + } + } diff --git a/dnet-data-services/src/main/java/eu/dnetlib/data/datasource/XmlBrowsableField.java b/dnet-data-services/src/main/java/eu/dnetlib/data/datasource/XmlBrowsableField.java new file mode 100644 index 0000000..6793159 --- /dev/null +++ b/dnet-data-services/src/main/java/eu/dnetlib/data/datasource/XmlBrowsableField.java @@ -0,0 +1,40 @@ +package eu.dnetlib.data.datasource; + +import eu.dnetlib.enabling.datasources.common.BrowsableField; + +public class XmlBrowsableField extends BrowsableField { + + private String xpath; + private String vocabulary; + + public XmlBrowsableField() { + super(); + } + + public XmlBrowsableField(final String id, final String label) { + super(id, label); + } + + public XmlBrowsableField(final String id, final String label, final String xpath, final String vocabulary) { + super(id, label); + this.xpath = xpath; + this.vocabulary = vocabulary; + } + + public String getXpath() { + return xpath; + } + + public void setXpath(final String xpath) { + this.xpath = xpath; + } + + public String getVocabulary() { + return vocabulary; + } + + public void setVocabulary(final String vocabulary) { + this.vocabulary = vocabulary; + } + +} \ No newline at end of file diff --git a/dnet-data-services/src/main/resources/eu/dnetlib/datasource/applicationContext-dnet-datasource-manager.xml b/dnet-data-services/src/main/resources/eu/dnetlib/datasource/applicationContext-dnet-datasource-manager.xml index e6e36f7..4b3796d 100644 --- a/dnet-data-services/src/main/resources/eu/dnetlib/datasource/applicationContext-dnet-datasource-manager.xml +++ b/dnet-data-services/src/main/resources/eu/dnetlib/datasource/applicationContext-dnet-datasource-manager.xml @@ -10,8 +10,24 @@ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"> - - - + + + + + + + + + + diff --git a/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/browseRepoApis.xquery.st b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/browseRepoApis.xquery.st new file mode 100644 index 0000000..02cd812 --- /dev/null +++ b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/browseRepoApis.xquery.st @@ -0,0 +1,5 @@ +let \$list := collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType')//INTERFACE/$xpath$ + +for \$x in distinct-values(\$list) +where string-length(\$x) > 0 +return concat(\$x, ' @-@-@ ', count(\$list[.=\$x])) \ No newline at end of file diff --git a/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepoApis.xquery.st b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepoApis.xquery.st new file mode 100644 index 0000000..bbf2b35 --- /dev/null +++ b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepoApis.xquery.st @@ -0,0 +1,11 @@ +for \$x in +collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType')//INTERFACE[$cond$] +return + + + {\$x} + \ No newline at end of file diff --git a/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepos.xquery.st b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepos.xquery.st new file mode 100644 index 0000000..b26efd2 --- /dev/null +++ b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findRepos.xquery.st @@ -0,0 +1,11 @@ +for \$x in collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType') +$if(conds)$ + where $conds.keys:{xpath| \$x$xpath$ = '$conds.(xpath)$'}; separator=" and "$ +$endif$ +return \$x +, +for \$x in collection('/db/DRIVER/PendingRepositoryResources/RepositoryServiceResourceType') +$if(conds)$ + where $conds.keys:{xpath| \$x$xpath$ = '$conds.(xpath)$'}; separator=" and "$ +$endif$ +return \$x \ No newline at end of file diff --git a/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findReposMap.xquery b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findReposMap.xquery new file mode 100644 index 0000000..55751f4 --- /dev/null +++ b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/findReposMap.xquery @@ -0,0 +1,11 @@ +for $x in + collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType') +where + $x//NUMBER_OF_OBJECTS != 0 and not($x//LATITUDE = 0 and $x//LONGITUDE = 0) +return + + {$x//RESOURCE_IDENTIFIER/@value/string()} + {$x//OFFICIAL_NAME/text()} + {$x//LATITUDE/text()} + {$x//LONGITUDE/text()} + \ No newline at end of file diff --git a/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/simpleFindRepos.xquery.st b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/simpleFindRepos.xquery.st new file mode 100644 index 0000000..5fe1a2c --- /dev/null +++ b/dnet-data-services/src/main/resources/eu/dnetlib/enabling/datasources/templates/simpleFindRepos.xquery.st @@ -0,0 +1,12 @@ +for \$x in + collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType') +where + \$x//DATASOURCE_TYPE = '$type$' +return + concat(\$x//RESOURCE_IDENTIFIER/@value, ' @=@ ', \$x//OFFICIAL_NAME, ' @=@ ', \$x//DATASOURCE_ORIGINAL_ID, ' @=@ ', string-join(\$x//INTERFACE/@id, ','), ' @=@ true'), +for \$x in + collection('/db/DRIVER/PendingRepositoryResources/RepositoryServiceResourceType') +where + \$x//DATASOURCE_TYPE = '$type$' +return + concat(\$x//RESOURCE_IDENTIFIER/@value, ' @=@ ', \$x//OFFICIAL_NAME, ' @=@ ', \$x//DATASOURCE_ORIGINAL_ID, ' @=@ ', string-join(\$x//INTERFACE/@id, ','), ' @=@ false') \ No newline at end of file diff --git a/dnet-modular-ui/pom.xml b/dnet-modular-ui/pom.xml index 292a150..a9f9b55 100644 --- a/dnet-modular-ui/pom.xml +++ b/dnet-modular-ui/pom.xml @@ -33,7 +33,7 @@ ${project.version} -