-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed IdentifierType to an interface
easier to use with Hibernate
- Loading branch information
Showing
2 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
27 changes: 7 additions & 20 deletions
27
dina-base-api/src/main/java/ca/gc/aafc/dina/entity/IdentifierType.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,26 @@ | ||
package ca.gc.aafc.dina.entity; | ||
|
||
import ca.gc.aafc.dina.i18n.MultilingualTitle; | ||
import ca.gc.aafc.dina.vocabulary.VocabularyElement; | ||
|
||
import java.util.List; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
@SuperBuilder | ||
@Getter | ||
public abstract class IdentifierType implements VocabularyElement, DinaEntity { | ||
import ca.gc.aafc.dina.vocabulary.VocabularyElement; | ||
|
||
public interface IdentifierType extends VocabularyElement, DinaEntity { | ||
|
||
/** | ||
* The key should not contain dot(.) See {@link VocabularyElement#getKey()} | ||
* @param key | ||
*/ | ||
@Setter | ||
private String key; | ||
|
||
private String name; | ||
|
||
// usually a URI | ||
private String term; | ||
|
||
private MultilingualTitle multilingualTitle; | ||
void setKey(String key); | ||
|
||
/** | ||
* The component (material-sample, project) where this identifier type is expected to be used. | ||
*/ | ||
private List<String> dinaComponents; | ||
List<String> getDinaComponents(); | ||
|
||
/** | ||
* Like wikidata. A URI template where "$1" can be automatically replaced with the value | ||
* assigned to the identifier. | ||
*/ | ||
private String uriTemplate; | ||
String getUriTemplate(); | ||
|
||
} |
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