public abstract class PartitionableConverterBase<CONFIG extends DwcaDataImportConfiguratorBase,STATE extends StreamImportStateBase<CONFIG,StreamImportBase>> extends java.lang.Object implements IPartitionableConverter<StreamItem,IReader<CdmBase>,java.lang.String>
Modifier and Type | Field and Description |
---|---|
protected CONFIG |
config |
protected STATE |
state |
Constructor and Description |
---|
PartitionableConverterBase(STATE state) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
exists(TermUri term,
StreamItem item)
Checks if the given term has a value in item that is not blank (null, empty or whitespace only).
|
protected void |
fire(IIoEvent event) |
protected void |
fireWarningEvent(java.lang.String message,
StreamItem item,
java.lang.Integer severity) |
protected void |
fireWarningEvent(java.lang.String message,
java.lang.String dataLocation,
java.lang.Integer severity) |
protected void |
fireWarningEvent(java.lang.String message,
java.lang.String dataLocation,
java.lang.Integer severity,
int stackDepth) |
protected Language |
getDcLanguage(StreamItem item,
java.util.List<MappedCdmBase<? extends CdmBase>> resultList) |
ItemFilter<StreamItem> |
getItemFilter()
Returns an item filter if a stream needs to be filtered (e.g.
|
protected java.util.Set<java.lang.String> |
getKeySet(java.lang.String key,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> fkMap)
Returns the key set for a given key or creates a new one.
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getPartitionForeignKeys(IReader<StreamItem> instream)
Returns those foreign keys included in the input streams partition separated by namespaces.
|
protected <T extends TaxonBase<?>> |
getTaxonBase(java.lang.String id,
StreamItem item,
java.lang.Class<T> clazz,
STATE state) |
protected TaxonDescription |
getTaxonDescription(Taxon taxon,
boolean isImageGallery) |
protected java.lang.String |
getValue(StreamItem item,
TermUri term)
Returns the value for the given term in the item.
|
protected boolean |
hasValue(java.lang.String string)
False if string is null, empty or whitespace only.
|
protected boolean |
isBlank(java.lang.String str) |
protected boolean |
isNotBlank(java.lang.String str) |
protected abstract void |
makeForeignKeysForItem(StreamItem next,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> foreignKeyMap)
Fills the the foreign key map with foreign keys required for this item.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredSourceNamespaces
getSourceId, map
protected STATE extends StreamImportStateBase<CONFIG,StreamImportBase> state
protected CONFIG extends DwcaDataImportConfiguratorBase config
public PartitionableConverterBase(STATE state)
protected void fireWarningEvent(java.lang.String message, StreamItem item, java.lang.Integer severity)
protected void fireWarningEvent(java.lang.String message, java.lang.String dataLocation, java.lang.Integer severity)
protected void fireWarningEvent(java.lang.String message, java.lang.String dataLocation, java.lang.Integer severity, int stackDepth)
protected void fire(IIoEvent event)
protected java.lang.String getValue(StreamItem item, TermUri term)
protected boolean exists(TermUri term, StreamItem item)
term
- item
- public ItemFilter<StreamItem> getItemFilter()
IPartitionableConverter
null
otherwise.getItemFilter
in interface IPartitionableConverter<StreamItem,IReader<CdmBase>,java.lang.String>
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getPartitionForeignKeys(IReader<StreamItem> instream)
IPartitionableConverter
getPartitionForeignKeys
in interface IPartitionableConverter<StreamItem,IReader<CdmBase>,java.lang.String>
protected abstract void makeForeignKeysForItem(StreamItem next, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> foreignKeyMap)
next
- foreignKeyMap
- protected boolean hasValue(java.lang.String string)
string
- String to test.protected java.util.Set<java.lang.String> getKeySet(java.lang.String key, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> fkMap)
key
- fkMap
- protected <T extends TaxonBase<?>> T getTaxonBase(java.lang.String id, StreamItem item, java.lang.Class<T> clazz, STATE state)
protected TaxonDescription getTaxonDescription(Taxon taxon, boolean isImageGallery)
protected Language getDcLanguage(StreamItem item, java.util.List<MappedCdmBase<? extends CdmBase>> resultList)
protected boolean isNotBlank(java.lang.String str)
protected boolean isBlank(java.lang.String str)
Copyright © 2007-2017 EDIT. All Rights Reserved.