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
> {
26 private static final long serialVersionUID
= -6633266304860008601L;
32 public Marker(MarkerType markerType
, Boolean flag
) {
33 this.typeUuid
= markerType
.getUuid();
34 this.typeLabel
= markerType
.getTitleCache();
37 public UUID
getTypeUuid() {return typeUuid
;}
38 public String
getTypeLabel() {return typeLabel
;}
39 public Boolean
getFlag() {return flag
;}
42 private Marker marker
;
44 public MarkedEntityDTO(MarkerType markerType
, Boolean flag
, T entity
){
46 this.marker
= new Marker(markerType
, flag
);
49 public MarkedEntityDTO(MarkerType markerType
, Boolean flag
, UUID entityUuid
, String titleCache
){
50 super(entityUuid
, titleCache
);
51 this.marker
= new Marker(markerType
, flag
);
54 public Marker
getMarker() {
63 public String
toString() {
64 return "(" + marker
.typeLabel
+ "; " + cdmEntity
.getTitleCache() + "; " + cdmEntity
.getUuid() + ")";