-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from gdi-be/create-interface
Introduces create interface
- Loading branch information
Showing
11 changed files
with
172 additions
and
31 deletions.
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
mde-services/src/main/java/de/terrestris/mde/mde_backend/enumeration/MetadataProfile.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,7 @@ | ||
package de.terrestris.mde.mde_backend.enumeration; | ||
|
||
public enum MetadataProfile { | ||
ISO, | ||
INSPIRE_HARMONISED, | ||
INSPIRE_IDENTIFIED | ||
} |
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
27 changes: 9 additions & 18 deletions
27
mde-services/src/main/java/de/terrestris/mde/mde_backend/model/IsoMetadata.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,39 +1,30 @@ | ||
package de.terrestris.mde.mde_backend.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import de.terrestris.mde.mde_backend.model.json.JsonIsoMetadata; | ||
import io.hypersistence.utils.hibernate.type.json.JsonBinaryType; | ||
import jakarta.persistence.Cacheable; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import lombok.*; | ||
import org.hibernate.annotations.Cache; | ||
import org.hibernate.annotations.CacheConcurrencyStrategy; | ||
import org.hibernate.annotations.DynamicUpdate; | ||
import org.hibernate.annotations.Type; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@DynamicUpdate | ||
@NoArgsConstructor | ||
@Entity | ||
@Cacheable | ||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "isometadata") | ||
@Table(name = "iso_metadata") | ||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@ToString(callSuper = true) | ||
@JsonTypeInfo( | ||
use = JsonTypeInfo.Id.NAME, | ||
include = JsonTypeInfo.As.PROPERTY, | ||
property = "@type" | ||
) | ||
@Data | ||
public class IsoMetadata extends BaseMetadata { | ||
|
||
@Column | ||
@Type(JsonBinaryType.class) | ||
@ToString.Exclude | ||
private JsonIsoMetadata data; | ||
|
||
public IsoMetadata (String title, String metadataId) { | ||
super(); | ||
setTitle(title); | ||
setMetadataId(metadataId); | ||
setData(new JsonIsoMetadata()); | ||
} | ||
|
||
} |
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
19 changes: 19 additions & 0 deletions
19
mde-services/src/main/java/de/terrestris/mde/mde_backend/model/dto/MetadataCreationData.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,19 @@ | ||
package de.terrestris.mde.mde_backend.model.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import de.terrestris.mde.mde_backend.enumeration.MetadataProfile; | ||
import jakarta.validation.constraints.Null; | ||
import lombok.Data; | ||
|
||
@Data | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class MetadataCreationData { | ||
|
||
private MetadataProfile metadataProfile; | ||
|
||
private String title; | ||
|
||
@Null | ||
private String cloneMetadataId; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...vices/src/main/java/de/terrestris/mde/mde_backend/model/dto/MetadataCreationResponse.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,14 @@ | ||
package de.terrestris.mde.mde_backend.model.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.Data; | ||
|
||
@Data | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class MetadataCreationResponse { | ||
|
||
private String title; | ||
|
||
private String metadataId; | ||
|
||
} |
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