Project

General

Profile

Revision 3e5f990d

ID3e5f990dcdf3a72e053ecc0b7742fd6371811cbe
Parent aac942e0
Child cc0fa0be

Added by Andreas Müller 9 months ago

ref #8017 cleanup

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/IdentifiableEntity.java
158 158
    @NotNull
159 159
    private List<Identifier> identifiers = new ArrayList<>();
160 160

  
161
//    @XmlElementWrapper(name = "Sources", nillable = true)
162
//    @XmlElement(name = "IdentifiableSource")
163
//    @OneToMany(fetch = FetchType.LAZY)
164
//    @Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE})
165
//    @Merge(MergeMode.ADD_CLONE)
166
//    @NotNull
167
//    private Set<IdentifiableSource> sources = new HashSet<>();
168

  
169 161
    @XmlTransient
170 162
    @Transient
171 163
    protected S cacheStrategy;
......
549 541
     * {@inheritDoc}
550 542
     */
551 543
    @Override
552
    protected IdentifiableSource createNewInstance(OriginalSourceType type, String idInSource, String idNamespace,
544
    protected IdentifiableSource createNewSource(OriginalSourceType type, String idInSource, String idNamespace,
553 545
            Reference reference, String microReference, String originalInfo) {
554 546
        return IdentifiableSource.NewInstance(type, idInSource, idNamespace, reference, microReference, originalInfo);
555 547
    }
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/SourcedEntityBase.java
94 94
        if (id == null && idNamespace == null && citation == null && microCitation == null){
95 95
            return null;
96 96
        }
97
        SOURCE source = createNewInstance(type, id, idNamespace, citation, microCitation, null);
97
        SOURCE source = createNewSource(type, id, idNamespace, citation, microCitation, null);
98 98
        addSource(source);
99 99
        return source;
100 100
    }
......
113 113
        if (id == null && idNamespace == null && citation == null && microCitation == null){
114 114
            return null;
115 115
        }
116
        SOURCE source = createNewInstance(OriginalSourceType.Import, id, idNamespace, citation, microCitation, null);
116
        SOURCE source = createNewSource(OriginalSourceType.Import, id, idNamespace, citation, microCitation, null);
117 117
        addSource(source);
118 118
        return source;
119 119
    }
......
123 123
        if (citation == null && microCitation == null){
124 124
            return null;
125 125
        }
126
        SOURCE source = createNewInstance(OriginalSourceType.PrimaryTaxonomicSource, null, null, citation, microCitation, null);
126
        SOURCE source = createNewSource(OriginalSourceType.PrimaryTaxonomicSource, null, null, citation, microCitation, null);
127 127
        addSource(source);
128 128
        return source;
129 129
    }
......
157 157
        this.sources.clear();
158 158
    }
159 159

  
160
    protected abstract SOURCE createNewInstance(OriginalSourceType type, String idInSource, String idNamespace, Reference citation, String microReference, String originalNameString);
160
    protected abstract SOURCE createNewSource(OriginalSourceType type, String idInSource, String idNamespace, Reference citation, String microReference, String originalNameString);
161 161

  
162 162
//****************** CLONE ************************************************/
163 163

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TypeDesignationBase.java
277 277
     * {@inheritDoc}
278 278
     */
279 279
    @Override
280
    protected IdentifiableSource createNewInstance(OriginalSourceType type, String idInSource, String idNamespace,
280
    protected IdentifiableSource createNewSource(OriginalSourceType type, String idInSource, String idNamespace,
281 281
            Reference reference, String microReference, String originalInfo) {
282 282
        return IdentifiableSource.NewInstance(type, idInSource, idNamespace, reference, microReference, originalInfo);
283 283
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)