eu.etaxonomy.cdm.strategy.cache.reference
Class NomRefDefaultCacheStrategyBase<T extends Reference>

java.lang.Object
  extended by eu.etaxonomy.cdm.strategy.StrategyBase
      extended by eu.etaxonomy.cdm.strategy.cache.reference.NomRefDefaultCacheStrategyBase<T>
All Implemented Interfaces:
IIdentifiableEntityCacheStrategy<T>, INomenclaturalReferenceCacheStrategy<T>, IReferenceBaseCacheStrategy<T>, IStrategy, Serializable
Direct Known Subclasses:
ArticleDefaultCacheStrategy, BookDefaultCacheStrategy, CdDvdDefaultCacheStrategy, InRefDefaultCacheStrategyBase, ThesisDefaultCacheStrategy

public abstract class NomRefDefaultCacheStrategyBase<T extends Reference>
extends StrategyBase
implements INomenclaturalReferenceCacheStrategy<T>

Version:
1.0
Author:
a.mueller
See Also:
Serialized Form

Field Summary
protected  String afterAuthor
           
protected  String afterYear
           
protected  String beforeMicroReference
           
protected  String beforeYear
           
 
Constructor Summary
NomRefDefaultCacheStrategyBase()
           
 
Method Summary
protected  String addYear(String string, T nomRef, boolean useFullDatePublished)
           
 String getBeforeMicroReference()
          Returns the character sequence before the micro reference (e.g.
 String getCitation(T referenceBase)
          Returns a short version of the reference, suitable for citation (e.g.
 String getNomenclaturalCitation(T nomenclaturalReference, String microReference)
          Returns a formatted string containing the entire citation used for nomenclatural purposes based on the reference supplied - including (abbreviated) title but not authors - and on the given details.
The returned string is build according to the corresponding cache strategy.
protected abstract  String getNomRefTitleWithoutYearAndAuthor(T reference)
           
 String getTitleCache(T nomenclaturalReference)
          returns the composed scientific taxon name string without authors nor year
 String getTokenizedNomenclaturalTitel(T nomenclaturalReference)
          returns the composed author string
 
Methods inherited from class eu.etaxonomy.cdm.strategy.StrategyBase
getUuid, isCollection, isPrimitive, isSingleCdmBaseObject, isUserType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beforeYear

protected String beforeYear

beforeMicroReference

protected String beforeMicroReference

afterYear

protected String afterYear

afterAuthor

protected String afterAuthor
Constructor Detail

NomRefDefaultCacheStrategyBase

public NomRefDefaultCacheStrategyBase()
Method Detail

getTokenizedNomenclaturalTitel

public String getTokenizedNomenclaturalTitel(T nomenclaturalReference)
Description copied from interface: INomenclaturalReferenceCacheStrategy
returns the composed author string

Specified by:
getTokenizedNomenclaturalTitel in interface INomenclaturalReferenceCacheStrategy<T extends Reference>
Returns:

getTitleCache

public String getTitleCache(T nomenclaturalReference)
Description copied from interface: INomenclaturalReferenceCacheStrategy
returns the composed scientific taxon name string without authors nor year

Specified by:
getTitleCache in interface IIdentifiableEntityCacheStrategy<T extends Reference>
Specified by:
getTitleCache in interface INomenclaturalReferenceCacheStrategy<T extends Reference>
Returns:

getCitation

public String getCitation(T referenceBase)
Description copied from interface: IReferenceBaseCacheStrategy
Returns a short version of the reference, suitable for citation (e.g. ${authorname}, ${year})

Specified by:
getCitation in interface IReferenceBaseCacheStrategy<T extends Reference>
Returns:

getBeforeMicroReference

public String getBeforeMicroReference()
Description copied from interface: INomenclaturalReferenceCacheStrategy
Returns the character sequence before the micro reference (e.g. ": ")

Specified by:
getBeforeMicroReference in interface INomenclaturalReferenceCacheStrategy<T extends Reference>
Returns:

addYear

protected String addYear(String string,
                         T nomRef,
                         boolean useFullDatePublished)

getNomRefTitleWithoutYearAndAuthor

protected abstract String getNomRefTitleWithoutYearAndAuthor(T reference)

getNomenclaturalCitation

public String getNomenclaturalCitation(T nomenclaturalReference,
                                       String microReference)
Description copied from interface: INomenclaturalReferenceCacheStrategy
Returns a formatted string containing the entire citation used for nomenclatural purposes based on the reference supplied - including (abbreviated) title but not authors - and on the given details.
The returned string is build according to the corresponding cache strategy.

Specified by:
getNomenclaturalCitation in interface INomenclaturalReferenceCacheStrategy<T extends Reference>
Parameters:
nomenclaturalReference - The nomenclatural reference
microReference - the string with the details (generally pages) corresponding to the nomenclatural reference supplied as the first argument
Returns:
the formatted string representing the nomenclatural citation
See Also:
INomenclaturalReference.getNomenclaturalCitation(String), name.TaxonNameBase#getNomenclaturalReference(), strategy.cache.reference.INomenclaturalReferenceCacheStrategy


Copyright © 2007-2013 EDIT. All Rights Reserved.