Skip to content

Commit

Permalink
[schema.org] Use spatio-temporal station
Browse files Browse the repository at this point in the history
For spatio-temporal data, use station as creator when available.
  • Loading branch information
jonathanthiry committed Nov 5, 2024
1 parent 453ae47 commit 34b84c3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ class SchemaOrg(handleProxies: HandleProxiesConfig)(using envri: Envri, envriCon
l2 => optJs(l2.acquisition.interval)(fromTimeInt)
)

val stationCreator = optJs(dobj.specificInfo.toOption)(
l2 => fromOrganization(l2.acquisition.station.org, l2.acquisition.station.responsibleOrganization)
)
val stationCreator = dobj.specificInfo.fold(
st => st.station,
ts => Some(ts.acquisition.station)
).fold(JsNull)(st => fromOrganization(st.org, st.responsibleOrganization))

val creator = envri match
case Envri.SITES => stationCreator
Expand Down

0 comments on commit 34b84c3

Please sign in to comment.