diff --git a/src/main/cliapp/src/components/DiseaseAnnotationsComponent.js b/src/main/cliapp/src/components/DiseaseAnnotationsComponent.js
index 879c26f44..a65a983a2 100644
--- a/src/main/cliapp/src/components/DiseaseAnnotationsComponent.js
+++ b/src/main/cliapp/src/components/DiseaseAnnotationsComponent.js
@@ -29,11 +29,11 @@ export const DiseaseAnnotationsComponent = () => {
setDiseaseAnnotations(data.results);
setTotalRecords(data.totalResults);
},
- onError: (error) => {
- errorMessage.current.show([
- { severity: 'error', summary: 'Error', detail: error.message, sticky: true }
- ])
- },
+ onError: (error) => {
+ errorMessage.current.show([
+ { severity: 'error', summary: 'Error', detail: error.message, sticky: true }
+ ])
+ },
keepPreviousData: true
})
@@ -72,7 +72,7 @@ export const DiseaseAnnotationsComponent = () => {
const publicationTemplate = (rowData) => {
if (rowData) {
- return
{rowData.referenceList[0].curie}
+ return {rowData.referenceList.map(a => a.curie)}
}
};
@@ -82,8 +82,8 @@ export const DiseaseAnnotationsComponent = () => {
return (
-
Disease Annotations Table
-
+ Disease Annotations Table
+
{
paginatorTemplate="CurrentPageReport FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"
currentPageReportTemplate="Showing {first} to {last} of {totalRecords}" rows={rows} rowsPerPageOptions={[10, 20, 50, 100, 250, 1000]}
paginatorLeft={paginatorLeft} paginatorRight={paginatorRight}>
-
+
-
+
diff --git a/src/main/cliapp/src/components/FMSComponent.js b/src/main/cliapp/src/components/FMSComponent.js
index 38cd01c67..0a76417a4 100644
--- a/src/main/cliapp/src/components/FMSComponent.js
+++ b/src/main/cliapp/src/components/FMSComponent.js
@@ -22,7 +22,8 @@ export const FMSComponent = () => {
fmsService.getReleases().then(results => {
console.log(results);
setReleases(results.reverse());
- //selectedRelease = results[0].releaseVersion;
+ //selectedRelease = results[0].releaseVersio;
+ //setSelectedRelease(results[0].releaseVersion);
//setDataFiles(results.dataFiles);
});
diff --git a/src/main/cliapp/src/service/DiseaseService.js b/src/main/cliapp/src/service/DiseaseService.js
index 893ed6378..1ff5afba9 100644
--- a/src/main/cliapp/src/service/DiseaseService.js
+++ b/src/main/cliapp/src/service/DiseaseService.js
@@ -2,25 +2,27 @@ import axios from 'axios';
export class DiseaseService {
getDiseases(limit, page, sorts, filters) {
-
var sortOptions = {};
var sortArray = {};
- sorts.forEach((o) => {
+ if(sorts) {
+ sorts.forEach((o) => {
sortArray[o.field] = o.order;
- });
+ });
+ }
var filterArray = {};
-
- Object.keys(filters).forEach((key) => {
+ if(filters) {
+ Object.keys(filters).forEach((key) => {
filterArray[key] = filters[key]["value"];
- });
+ });
+ }
if(Object.keys(filterArray).length > 0) {
- sortOptions["searchFilters"] = filterArray;
+ sortOptions["searchFilters"] = filterArray;
}
if(Object.keys(sortArray).length > 0) {
- sortOptions["sortOrders"] = sortArray;
+ sortOptions["sortOrders"] = sortArray;
}
return axios.post('/api/doterm/search?limit=' + limit + '&page=' + page, sortOptions).then(res => res.data);
diff --git a/src/main/java/org/alliancegenome/curation_api/base/BaseGeneratedEntity.java b/src/main/java/org/alliancegenome/curation_api/base/BaseGeneratedEntity.java
index 64220b87e..836579821 100644
--- a/src/main/java/org/alliancegenome/curation_api/base/BaseGeneratedEntity.java
+++ b/src/main/java/org/alliancegenome/curation_api/base/BaseGeneratedEntity.java
@@ -6,6 +6,7 @@
import org.alliancegenome.curation_api.view.View;
import org.hibernate.annotations.*;
+import org.hibernate.search.engine.backend.types.*;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.*;
import com.fasterxml.jackson.annotation.JsonView;
@@ -15,8 +16,8 @@
@Data @EqualsAndHashCode(callSuper = false)
@MappedSuperclass
public class BaseGeneratedEntity extends BaseEntity {
-
- @Id
+
+ @Id @DocumentId
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@JsonView({View.FieldsOnly.class})
private Long id;
diff --git a/src/main/java/org/alliancegenome/curation_api/base/BaseSQLDAO.java b/src/main/java/org/alliancegenome/curation_api/base/BaseSQLDAO.java
index 702fc6087..e47bcaf63 100644
--- a/src/main/java/org/alliancegenome/curation_api/base/BaseSQLDAO.java
+++ b/src/main/java/org/alliancegenome/curation_api/base/BaseSQLDAO.java
@@ -140,8 +140,9 @@ public SearchResults searchByParams(Pagination pagination, Map result = query.fetch(pagination.getPage() * pagination.getLimit(), pagination.getLimit());
log.debug(query);
+ SearchResult result = query.fetch(pagination.getPage() * pagination.getLimit(), pagination.getLimit());
+
SearchResults results = new SearchResults();
results.setResults(result.hits());
diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Association.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Association.java
index 8612dd6dc..539c48a5b 100644
--- a/src/main/java/org/alliancegenome/curation_api/model/entities/Association.java
+++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Association.java
@@ -9,6 +9,10 @@
import org.alliancegenome.curation_api.view.View;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.hibernate.envers.Audited;
+import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate;
+import org.hibernate.search.mapper.pojo.mapping.definition.annotation.*;
+import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate;
+import org.hibernate.search.mapper.pojo.mapping.definition.annotation.*;
import com.fasterxml.jackson.annotation.JsonView;
@@ -22,13 +26,20 @@
@Schema(name = "association", description = "Annotation class representing a disease annotation")
public class Association extends BaseGeneratedEntity {
+ @IndexedEmbedded(includeDepth = 1)
+ @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@ManyToOne
@JsonView({View.FieldsOnly.class})
private BiologicalEntity subject;
+
+ @IndexedEmbedded(includeDepth = 1)
+ @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@ManyToOne
@JsonView({View.FieldsOnly.class})
private DOTerm object;
+ @IndexedEmbedded(includeDepth = 1)
+ @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@ManyToMany
@JsonView({View.FieldsOnly.class})
private List referenceList;