3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
.dto
;
12 import java
.util
.UUID
;
14 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
15 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
18 * DTO for IdentifiableEntities matching a certain marker.
24 //might extend AnnotatableEntity in future
25 public class MarkedEntityDTO
<T
extends IdentifiableEntity
> extends EntityDTOBase
<T
> {
31 public Marker(MarkerType markerType
, Boolean flag
) {
32 this.typeUuid
= markerType
.getUuid();
33 this.typeLabel
= markerType
.getTitleCache();
36 public UUID
getTypeUuid() {return typeUuid
;}
37 public String
getTypeLabel() {return typeLabel
;}
38 public Boolean
getFlag() {return flag
;}
41 private Marker marker
;
43 public MarkedEntityDTO(MarkerType markerType
, Boolean flag
, T entity
){
45 this.marker
= new Marker(markerType
, flag
);
48 public MarkedEntityDTO(MarkerType markerType
, Boolean flag
, UUID entityUuid
, String titleCache
){
49 super(entityUuid
, titleCache
);
50 this.marker
= new Marker(markerType
, flag
);
53 public Marker
getMarker() {
62 public String
toString() {
63 return "(" + marker
.typeLabel
+ "; " + cdmEntity
.getTitleCache() + "; " + cdmEntity
.cdmUuid
+ ")";