//annotation
for (Annotation annotation : annotatable.getAnnotations()) {
if ((annotation.getAnnotationType() != null
- //config == null currently needs to be allowed as it is also used by DistributionInfoBuilder an
+ //config == null currently needs to be allowed as it is also used by DistributionInfoBuilder and
//also for now empty annotation types needs to be interpreted as "no filter" as we do not distinguish
//null and empty yet, this may change in future
&& (config == null || config.getAnnotationTypes().isEmpty()
UUID uuidAnnotationType = annotation.getAnnotationType() == null ? null :annotation.getAnnotationType().getUuid();
annotationDto.setTypeUuid(uuidAnnotationType);
//language etc. currently not yet used
- }else if (config != null && !config.getAnnotationTypes().isEmpty() && config.getAnnotationTypes().contains(AnnotationType.uuidUntyped) && (annotation.getAnnotationType() == null)){
+ }else if (config != null && config.getAnnotationTypes().contains(AnnotationType.uuidUntyped) && (annotation.getAnnotationType() == null)){
AnnotationDto annotationDto = new AnnotationDto();
annotatableDto.addAnnotation(annotationDto);
//TODO id needed? but need to adapt dto and container then
SingleSourcedEntityBase sourced = CdmBase.deproxy(cdmBase, SingleSourcedEntityBase.class);
SingleSourcedDto sourcedDto = (SingleSourcedDto)dto;
NamedSource source = sourced.getSource();
- if (source != null && isPublicSource(source) && !source.checkEmpty()) {
+ if (source != null && isPublicSource(source) && !source.checkEmpty(true)) {
SourceDto sourceDto = makeSource(config, source);
sourcedDto.setSource(sourceDto);
}
linkedObject = source.getCdmSource();
}
+ sourceDto.setCitationDetail(source.getCitationMicroReference());
//citation doi & uri & links
Reference ref = source.getCitation();
if (ref != null) {
- sourceDto.setDoi(ref.getDoiString());
+ sourceDto.setDoi(ref.getDoiUriString());
sourceDto.setUri(ref.getUri());
+ //TODO do we really want to take the sourceDto.uuid from the ref.uuid?
sourceDto.setUuid(ref.getUuid());
sourceDto.setOriginalInfo(source.getOriginalInfo());
Set<ExternalLink> links = ref.getLinks();
sourceDto.addLink(link.getUri());
}
}
+ sourceDto.setSortableDate(ref.getSortableDateString());
}
//label