X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdmlib.git/blobdiff_plain/b4631f67f889792c48ad8a2becf4d2d6790c649a..2c7ad04b1ad3723cf4299782e40ca2a0cc0d0f0e:/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/portal/TaxonPageDtoLoaderBase.java diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/portal/TaxonPageDtoLoaderBase.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/portal/TaxonPageDtoLoaderBase.java index 8ba993d9e2..9831656cc9 100644 --- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/portal/TaxonPageDtoLoaderBase.java +++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/portal/TaxonPageDtoLoaderBase.java @@ -119,7 +119,7 @@ public abstract class TaxonPageDtoLoaderBase { //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() @@ -135,7 +135,7 @@ public abstract class TaxonPageDtoLoaderBase { 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 @@ -175,7 +175,7 @@ public abstract class TaxonPageDtoLoaderBase { 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); } @@ -218,11 +218,13 @@ public abstract class TaxonPageDtoLoaderBase { 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 links = ref.getLinks(); @@ -235,6 +237,7 @@ public abstract class TaxonPageDtoLoaderBase { sourceDto.addLink(link.getUri()); } } + sourceDto.setSortableDate(ref.getSortableDateString()); } //label