2 * Copyright (C) 2009 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.
10 package eu
.etaxonomy
.cdm
.strategy
;
12 import java
.io
.Serializable
;
14 import java
.util
.Collection
;
15 import java
.util
.UUID
;
17 import org
.apache
.log4j
.Logger
;
18 import org
.joda
.time
.DateTime
;
20 import eu
.etaxonomy
.cdm
.model
.agent
.Contact
;
21 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
22 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
23 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
26 public abstract class StrategyBase
implements IStrategy
, Serializable
{
27 private static final long serialVersionUID
= -274791080847215663L;
28 @SuppressWarnings("unused")
29 private static final Logger logger
= Logger
.getLogger(StrategyBase
.class);
31 final static UUID uuid
= UUID
.fromString("2ff2b1d6-17a6-4807-a55f-f6b45bf429b7");
33 abstract protected UUID
getUuid();
35 protected StrategyBase(){
45 protected static boolean isCollection(Class
<?
> fieldType
) {
46 if (Collection
.class.isAssignableFrom(fieldType
) ){
57 protected boolean isPrimitive(Class
<?
> fieldType
) {
58 if (fieldType
.isPrimitive()){
69 protected boolean isSingleCdmBaseObject(Class
<?
> fieldType
) {
70 if (CdmBase
.class.isAssignableFrom(fieldType
)){
81 protected boolean isUserType(Class
<?
> fieldType
) {
82 if ( fieldType
== TimePeriod
.class ||
83 fieldType
== DateTime
.class ||
84 fieldType
== LSID
.class ||
85 fieldType
== Contact
.class ||
86 fieldType
== URI
.class