Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mica without Opal #4393

Merged
merged 44 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
af4f178
#4376 WIP. StudyTableSource interface added. New property sourceURN r…
ymarcon Nov 29, 2022
bb60956
sourceURN property/getter/setter renamed to source
ymarcon Dec 1, 2022
0a03355
source package added, with unit tests
ymarcon Dec 1, 2022
36bac70
Excel table source added, reads excel from Mica's file system
ymarcon Dec 1, 2022
ce06962
Edit/create study tables with opal or file source. WIP.
ymarcon Dec 2, 2022
af62535
File path can be copied. Study table's file source can be relative to…
ymarcon Dec 5, 2022
7e2bf5e
Study table context added. Opal dtos (aggregations) are not exposed i…
ymarcon Dec 5, 2022
d76429e
Deferred init of excel datasource. Less verbose log messages when stu…
ymarcon Dec 5, 2022
49bb303
SPI mica-source testing
ymarcon Dec 7, 2022
ce7009b
Deferred attachment stream extraction
ymarcon Dec 7, 2022
7444705
Handle disposable table sources
ymarcon Dec 8, 2022
f44653f
Mica source plugin could be an Initialisable
ymarcon Dec 9, 2022
2ce571d
#4381 Variable taxonomies service added to support other taxonomies p…
ymarcon Dec 12, 2022
bd0b7eb
mica-source plugin type renamed to mica-tables. Ne plugin type: mica-…
ymarcon Dec 12, 2022
3b73a32
Taxonomy of taxonomies is configurable. Added attribute to have a tax…
ymarcon Dec 13, 2022
f4b546e
Variable taxonomies can be read from local folder: MICA_HOME/conf/tax…
ymarcon Dec 13, 2022
1a42294
AbstractTaxonomiesProviderService added
ymarcon Dec 13, 2022
1af18b2
Caching of taxonomies refactored, not functional yet
ymarcon Dec 13, 2022
e846e96
Variable taxonomies are cached
ymarcon Dec 15, 2022
02b75e9
Fix dataset taxonomy init
ymarcon Dec 16, 2022
6c21d28
Opal taxonomies cache replaced by generic variable taxonomies cache. …
ymarcon Dec 16, 2022
deb6620
Code cleaning: Opal service helper merged into opal service
ymarcon Dec 16, 2022
f2ea723
classifications administration
ymarcon Jan 11, 2023
701ccb8
make sure variable taxo title/description in the meta taxo matches th…
ymarcon Jan 12, 2023
26795aa
hide instead of remove a target vocabulary if type is disabled
ymarcon Jan 12, 2023
87485e7
Plugins REST API added
ymarcon Jan 12, 2023
4ebe42d
Plugin REST API added
ymarcon Jan 12, 2023
8b7acd7
Service Plugin REST API added
ymarcon Jan 12, 2023
38c6ed7
Update the search plugin in the upgrade procedure
ymarcon Jan 12, 2023
8d470c4
ng-obiba-mica version
ymarcon Jan 12, 2023
c0c664e
No server error when opal projects cannot be retrieved
ymarcon Jan 13, 2023
cd1defc
Fix some wording and showVariableStatistics template setting added
ymarcon Jan 13, 2023
340e6b7
Fix some wording and showVariableStatistics template setting added
ymarcon Jan 13, 2023
0247a14
Fix harmonized variable id encoding for url
ymarcon Jan 18, 2023
b7a4b31
Fix harmonized variable id encoding for url for reverse proxy
ymarcon Jan 18, 2023
38b5e7a
NoSuchTableSourceException added with their web service mapper
ymarcon Jan 19, 2023
2f75ffe
ng-obiba-mica latest release
ymarcon Jan 19, 2023
d7389c3
prepare for upgrade to 5.2
ymarcon Jan 20, 2023
06e4d21
StudyTableSource does not need to return the table name, this is impl…
ymarcon Jan 20, 2023
84be7b2
Modifying the meta txonomy requires admin role
ymarcon Jan 20, 2023
2f04954
Plugin management requires admin role
ymarcon Jan 20, 2023
7937732
Clean Opal projects web services
ymarcon Jan 20, 2023
99d2591
Helper class to read a taxonomy in YAML format from a stream
ymarcon Jan 26, 2023
d7e500f
Other study table source handled in the admin
ymarcon Jan 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mica-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<groupId>org.obiba.mica</groupId>
<artifactId>mica-web-model</artifactId>
</dependency>
<dependency>
<groupId>org.obiba.magma</groupId>
<artifactId>magma-datasource-excel</artifactId>
</dependency>
<dependency>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import org.obiba.mica.core.service.MailService;
import org.obiba.mica.core.service.SchemaFormContentFileService;
import org.obiba.mica.core.support.IdentifierGenerator;
import org.obiba.mica.core.support.YamlClassPathResourceReader;
import org.obiba.mica.core.support.YamlResourceReader;
import org.obiba.mica.dataset.service.VariableSetService;
import org.obiba.mica.micaConfig.domain.DataAccessConfig;
import org.obiba.mica.micaConfig.service.DataAccessConfigService;
Expand Down Expand Up @@ -396,7 +396,7 @@ protected void setAndLogStatus(T request, DataAccessEntityStatus to) {
protected String generateId() {
DataAccessConfig dataAccessConfig = dataAccessConfigService.getOrCreateConfig();

Object exclusions = YamlClassPathResourceReader.read(EXCLUSION_IDS_YAML_RESOURCE_PATH, Map.class).get("exclusions");
Object exclusions = YamlResourceReader.readClassPath(EXCLUSION_IDS_YAML_RESOURCE_PATH, Map.class).get("exclusions");

IdentifierGenerator.Builder builder = IdentifierGenerator.newBuilder().prefix(dataAccessConfig.getIdPrefix())
.size(dataAccessConfig.getIdLength());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import org.obiba.mica.core.upgrade.Mica460Upgrade;
import org.obiba.mica.core.upgrade.Mica500Upgrade;
import org.obiba.mica.core.upgrade.Mica510upgrade;
import org.obiba.mica.core.upgrade.Mica520upgrade;
import org.obiba.mica.core.upgrade.MicaVersionModifier;
import org.obiba.mica.core.upgrade.RuntimeVersionProvider;
import org.obiba.runtime.upgrade.UpgradeManager;
Expand All @@ -31,8 +31,8 @@ public class UpgradeConfiguration {

private List<UpgradeStep> upgradeSteps;

public UpgradeConfiguration(Mica460Upgrade mica460Upgrade, Mica500Upgrade mica500Upgrade, Mica510upgrade mica510upgrade) {
upgradeSteps = Arrays.asList(mica460Upgrade, mica500Upgrade, mica510upgrade);
public UpgradeConfiguration(Mica460Upgrade mica460Upgrade, Mica500Upgrade mica500Upgrade, Mica520upgrade mica520upgrade) {
upgradeSteps = Arrays.asList(mica460Upgrade, mica500Upgrade, mica520upgrade);
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,32 @@

import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
import org.obiba.mica.core.source.OpalTableSource;

import java.io.Serializable;

public class BaseStudyTable extends OpalTable {
public class BaseStudyTable {

protected String studyId;

protected String populationId;

protected int populationWeight;

private LocalizedString name;

private LocalizedString description;

private LocalizedString additionalInformation;

private int weight;

private String source;

// legacy
private String project;

// legacy
private String table;

public String getStudyId() {
return studyId;
}
Expand Down Expand Up @@ -72,13 +87,66 @@ public void setPopulationWeight(int populationWeight) {

@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("project", getProject()).add("table", getTable())
return MoreObjects.toStringHelper(this).add("source", getSource())
.add("studyId", getStudyId()).add("populationId", getPopulationId())
.toString();
}

@Override
protected String getEntityId() {
return studyId;
public void setName(LocalizedString name) {
this.name = name;
}

public LocalizedString getName() {
return name;
}

public void setDescription(LocalizedString description) {
this.description = description;
}

public LocalizedString getDescription() {
return description;
}

public LocalizedString getAdditionalInformation() {
return additionalInformation;
}

public void setAdditionalInformation(LocalizedString additionalInformation) {
this.additionalInformation = additionalInformation;
}

public int getWeight() {
return weight;
}

public void setWeight(int weight) {
this.weight = weight;
}

public boolean isFor(String studyId, String source) {
return this.studyId.equals(studyId) && getSource().equals(source);
}

public void setSource(String source) {
this.source = source;
}

public String getSource() {
// legacy
if (Strings.isNullOrEmpty(source)) {
this.source = OpalTableSource.newSource(project, table).getURN();
}
return source;
}

@Deprecated
public void setProject(String project) {
this.project = project;
}

@Deprecated
public void setTable(String table) {
this.table = table;
}
}
88 changes: 0 additions & 88 deletions mica-core/src/main/java/org/obiba/mica/core/domain/OpalTable.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

package org.obiba.mica.core.domain;

import java.io.Serializable;

import com.google.common.base.MoreObjects;

import java.io.Serializable;

/**
* Represents a opal table that is associated to a {@link org.obiba.mica.study.domain.Study}
* {@link org.obiba.mica.study.domain.Population} {@link org.obiba.mica.study.domain.DataCollectionEvent}.
Expand Down Expand Up @@ -63,7 +63,7 @@ public boolean appliesTo(String studyId, String populationId, String dataCollect

@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("project", getProject()).add("table", getTable())
return MoreObjects.toStringHelper(this).add("source", getSource())
.add("dceId", getDataCollectionEventUId()).toString();
}

Expand Down
Loading