public class DefaultReferenceCacheStrategy extends StrategyBase implements INomenclaturalReferenceCacheStrategy
references
.
As we do have only one Reference
class left which implements multiple interfaces,
we may also only need 1 single cache strategy. However, care must be taken as the formatting
differs dependent on the type an the in-reference structure.
Generally the cache strategy computes allows 3 formattings:titleCache
).abbrevTitleCache
),
but without micro reference (detail).IReferenceCacheStrategy.getCitation(Reference)
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNDEFINED_JOURNAL |
Constructor and Description |
---|
DefaultReferenceCacheStrategy() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createShortCitation(Reference reference) |
java.lang.String |
getBeforeMicroReference()
Returns the character sequence before the micro reference (e.g.
|
java.lang.String |
getCitation(Reference reference)
Returns a short version of the reference, suitable for citation (e.g.
|
java.lang.String |
getFullAbbrevTitleString(Reference reference)
Returns the full abbreviated title string which
is a string representation of Reference which
preferably uses the
abbrev title
of the reference instead of the title. |
java.lang.String |
getNomenclaturalCache(Reference reference)
Computes the nomenclatural cache.
|
java.lang.String |
getNomenclaturalCitation(Reference reference,
java.lang.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 . |
java.lang.String |
getTitleCache(Reference reference)
Returns the computed
title cache . |
protected java.util.UUID |
getUuid() |
protected static boolean |
isNomRef(ReferenceType type)
Returns
true if the type of the reference originally corresponded to a cache strategy
which inherited from NomRefDefaultCacheStrategyBase . |
static DefaultReferenceCacheStrategy |
NewInstance() |
static java.lang.String |
putAuthorToEndOfString(java.lang.String referenceTitleCache,
java.lang.String authorTitleCache) |
isBlank, isCollection, isNotBlank, isPrimitive, isSingleCdmBaseObject, isUserType, Nz
public static final java.lang.String UNDEFINED_JOURNAL
public static DefaultReferenceCacheStrategy NewInstance()
protected java.util.UUID getUuid()
getUuid
in class StrategyBase
public java.lang.String getTitleCache(Reference reference)
IIdentifiableEntityCacheStrategy
title cache
.getTitleCache
in interface IIdentifiableEntityCacheStrategy<Reference>
reference
- the identifiable entitypublic java.lang.String getFullAbbrevTitleString(Reference reference)
IReferenceCacheStrategy
abbrev title
of the reference instead of the title. This is not the same as
the {@link INomenclaturalReferenceCacheStrategy#nomenclaturalTitleCachegetFullAbbrevTitleString
in interface IReferenceCacheStrategy
public java.lang.String getCitation(Reference reference)
IReferenceCacheStrategy
getCitation
in interface IReferenceCacheStrategy
public java.lang.String createShortCitation(Reference reference)
public java.lang.String getNomenclaturalCache(Reference reference)
INomenclaturalReferenceCacheStrategy
nomenclaturalCitation
without microReference.getNomenclaturalCache
in interface INomenclaturalReferenceCacheStrategy
reference
- the referencepublic java.lang.String getBeforeMicroReference()
INomenclaturalReferenceCacheStrategy
getBeforeMicroReference
in interface INomenclaturalReferenceCacheStrategy
protected static boolean isNomRef(ReferenceType type)
true
if the type of the reference originally corresponded to a cache strategy
which inherited from NomRefDefaultCacheStrategyBase
.type
- public java.lang.String getNomenclaturalCitation(Reference reference, java.lang.String microReference)
INomenclaturalReferenceCacheStrategy
reference
supplied - including
(abbreviated) title but not authors - and on the given details.cache strategy
.getNomenclaturalCitation
in interface INomenclaturalReferenceCacheStrategy
reference
- the nomenclatural referencemicroReference
- the string with the details (generally pages)
corresponding to the nomenclatural reference supplied
as the first argumentINomenclaturalReference.getNomenclaturalCitation(String)
,
name.TaxonName#getNomenclaturalReference()
public static java.lang.String putAuthorToEndOfString(java.lang.String referenceTitleCache, java.lang.String authorTitleCache)
Copyright © 2007-2020 EDIT. All Rights Reserved.