-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flatten json dataset schema with packing job schema
- Loading branch information
1 parent
4149de2
commit 35f17c6
Showing
16 changed files
with
222 additions
and
72 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
pace-data/src/main/java/edu/colorado/cires/pace/data/SoundPropagationModelsPackingJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package edu.colorado.cires.pace.data; | ||
|
||
import edu.colorado.cires.pace.data.object.PackingJob; | ||
import edu.colorado.cires.pace.data.object.SoundPropagationModelsDataset; | ||
import java.nio.file.Path; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@SuperBuilder | ||
@Jacksonized | ||
public class SoundPropagationModelsPackingJob extends SoundPropagationModelsDataset implements PackingJob { | ||
|
||
private final Path temperaturePath; | ||
private final Path biologicalPath; | ||
private final Path otherPath; | ||
private final Path documentsPath; | ||
private final Path calibrationDocumentsPath; | ||
private final Path navigationPath; | ||
private final Path sourcePath; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
pace-data/src/main/java/edu/colorado/cires/pace/data/object/AudioPackingJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package edu.colorado.cires.pace.data.object; | ||
|
||
import java.nio.file.Path; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@SuperBuilder | ||
@Jacksonized | ||
public class AudioPackingJob extends AudioDataset implements PackingJob { | ||
|
||
private final Path temperaturePath; | ||
private final Path biologicalPath; | ||
private final Path otherPath; | ||
private final Path documentsPath; | ||
private final Path calibrationDocumentsPath; | ||
private final Path navigationPath; | ||
private final Path sourcePath; | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
pace-data/src/main/java/edu/colorado/cires/pace/data/object/CPODPackingJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package edu.colorado.cires.pace.data.object; | ||
|
||
import java.nio.file.Path; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@SuperBuilder | ||
@Jacksonized | ||
public class CPODPackingJob extends CPodDataset implements PackingJob { | ||
|
||
private final Path temperaturePath; | ||
private final Path biologicalPath; | ||
private final Path otherPath; | ||
private final Path documentsPath; | ||
private final Path calibrationDocumentsPath; | ||
private final Path navigationPath; | ||
private final Path sourcePath; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
pace-data/src/main/java/edu/colorado/cires/pace/data/object/DetectionsPackingJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package edu.colorado.cires.pace.data.object; | ||
|
||
import java.nio.file.Path; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@SuperBuilder | ||
@Jacksonized | ||
public class DetectionsPackingJob extends DetectionsDataset implements PackingJob { | ||
|
||
private final Path temperaturePath; | ||
private final Path biologicalPath; | ||
private final Path otherPath; | ||
private final Path documentsPath; | ||
private final Path calibrationDocumentsPath; | ||
private final Path navigationPath; | ||
private final Path sourcePath; | ||
|
||
} |
52 changes: 33 additions & 19 deletions
52
pace-data/src/main/java/edu/colorado/cires/pace/data/object/PackingJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,40 @@ | ||
package edu.colorado.cires.pace.data.object; | ||
|
||
import jakarta.validation.Valid; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes.Type; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo.As; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; | ||
import com.fasterxml.jackson.annotation.JsonView; | ||
import edu.colorado.cires.pace.data.SoundPropagationModelsPackingJob; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.nio.file.Path; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@Data | ||
@Builder | ||
@Jacksonized | ||
public class PackingJob { | ||
|
||
private final Path temperaturePath; | ||
private final Path biologicalPath; | ||
private final Path otherPath; | ||
private final Path documentsPath; | ||
private final Path calibrationDocumentsPath; | ||
private final Path navigationPath; | ||
@NotNull | ||
private final Path sourcePath; | ||
@NotNull @Valid | ||
private final Dataset dataset; | ||
@JsonTypeInfo(use = Id.NAME, include = As.EXTERNAL_PROPERTY, property = "datasetType") | ||
@JsonSubTypes({ | ||
@Type(value = AudioPackingJob.class, name = "audio"), | ||
@Type(value = CPODPackingJob.class, name = "CPOD"), | ||
@Type(value = DetectionsPackingJob.class, name = "detections"), | ||
@Type(value = SoundClipsPackingJob.class, name = "sound clips"), | ||
@Type(value = SoundLevelMetricsPackingJob.class, name = "sound level metrics"), | ||
@Type(value = SoundPropagationModelsPackingJob.class, name = "sound propagation models"), | ||
}) | ||
public interface PackingJob { | ||
|
||
@JsonView(PackingJob.class) | ||
Path getTemperaturePath(); | ||
@JsonView(PackingJob.class) | ||
Path getBiologicalPath(); | ||
@JsonView(PackingJob.class) | ||
Path getOtherPath(); | ||
@JsonView(PackingJob.class) | ||
Path getDocumentsPath(); | ||
@JsonView(PackingJob.class) | ||
Path getCalibrationDocumentsPath(); | ||
@JsonView(PackingJob.class) | ||
Path getNavigationPath(); | ||
@JsonView(PackingJob.class) | ||
@NotNull | ||
Path getSourcePath(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
pace-data/src/main/java/edu/colorado/cires/pace/data/object/SoundClipsPackingJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package edu.colorado.cires.pace.data.object; | ||
|
||
import java.nio.file.Path; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@SuperBuilder | ||
@Jacksonized | ||
public class SoundClipsPackingJob extends SoundClipsDataset implements PackingJob { | ||
|
||
private final Path temperaturePath; | ||
private final Path biologicalPath; | ||
private final Path otherPath; | ||
private final Path documentsPath; | ||
private final Path calibrationDocumentsPath; | ||
private final Path navigationPath; | ||
private final Path sourcePath; | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
pace-data/src/main/java/edu/colorado/cires/pace/data/object/SoundLevelMetricsPackingJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package edu.colorado.cires.pace.data.object; | ||
|
||
import java.nio.file.Path; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
@SuperBuilder | ||
@Jacksonized | ||
public class SoundLevelMetricsPackingJob extends SoundClipsDataset implements PackingJob { | ||
|
||
private final Path temperaturePath; | ||
private final Path biologicalPath; | ||
private final Path otherPath; | ||
private final Path documentsPath; | ||
private final Path calibrationDocumentsPath; | ||
private final Path navigationPath; | ||
private final Path sourcePath; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.