ref #9597 handle MediaSpecimen and its sources correctly in TypeDesignationSet format...
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 30 Apr 2021 19:35:13 +0000 (21:35 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 30 Apr 2021 19:35:13 +0000 (21:35 +0200)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/OriginalSourceType.java

index a35718301663d55aef53e4e595ea699312b47256..86221177ead33351555575153eca622abdd68a30 100644 (file)
@@ -160,4 +160,16 @@ public enum OriginalSourceType implements IEnumTerm<OriginalSourceType> {
        public static OriginalSourceType getByKey(String key){return delegateVoc.getByKey(key);}
        public static OriginalSourceType getByUuid(UUID uuid) {return delegateVoc.getByUuid(uuid);}
 
+    public boolean isPrimaryMediaSource() {
+        return this == PrimaryMediaSource;
+    }
+
+    public boolean isPrimaryTaxonomicSource() {
+        return this == PrimaryTaxonomicSource;
+    }
+
+    public boolean isPrimarySource() {
+        return isPrimaryMediaSource() || isPrimaryTaxonomicSource();
+    }
+
 }