2 * Copyright (C) 2014 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.api
.service
.dto
;
11 import java
.util
.UUID
;
13 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
14 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
17 * DTO for IdentifiableEntities matching a certain marker.
23 //might extend AnnotatableEntity in future
24 public class MarkedEntityDTO
<T
extends IdentifiableEntity
> extends EntityDTOBase
<T
> {
30 public Marker(MarkerType markerType
, Boolean flag
) {
31 this.typeUuid
= markerType
.getUuid();
32 this.typeLabel
= markerType
.getTitleCache();
35 public UUID
getTypeUuid() {return typeUuid
;}
36 public String
getTypeLabel() {return typeLabel
;}
37 public Boolean
getFlag() {return flag
;}
40 private Marker marker
;
42 public MarkedEntityDTO(MarkerType markerType
, Boolean flag
, T entity
){
44 this.marker
= new Marker(markerType
, flag
);
47 public MarkedEntityDTO(MarkerType markerType
, Boolean flag
, UUID entityUuid
, String titleCache
){
48 super(entityUuid
, titleCache
);
49 this.marker
= new Marker(markerType
, flag
);
52 public Marker
getMarker() {
61 public String
toString() {
62 return "(" + marker
.typeLabel
+ "; " + cdmEntity
.getTitleCache() + "; " + cdmEntity
.cdmUuid
+ ")";