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

Add relatedScores property to Score entity AtlasOfLivingAustralia/fie… #975

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion grails-app/conf/application.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,11 @@ environments {
app.uploads.url = "/document/download/"
grails.mail.host="localhost"
grails.mail.port=1025

grails.cache.ehcache = {
diskStore {
path "~/data/${appName}/ehcache"
}
}

}
test {
Expand Down
18 changes: 18 additions & 0 deletions grails-app/domain/au/org/ala/ecodata/RelatedScore.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package au.org.ala.ecodata

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString


@EqualsAndHashCode
@ToString
@JsonIgnoreProperties(['metaClass', 'errors', 'expandoMetaClass'])
class RelatedScore {

String scoreId

/** A description of the association - e.g. Service Provider, Grantee, Sponsor */
String description

}
4 changes: 4 additions & 0 deletions grails-app/domain/au/org/ala/ecodata/Score.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Score {
/** Can be used to categorize scores */
List<String> tags

List<RelatedScore> relatedScores


/** Embedded document describing how the score should be calculated */
Map configuration
Expand All @@ -59,6 +61,8 @@ class Score {
version false
}

static embedded = ['relatedScores']

def beforeValidate() {
if (scoreId == null) {
scoreId = Identifiers.getNew(true, "")
Expand Down
Loading