Class Summarizer<T>
Object
org.anchoranalysis.bean.AnchorBean<Summarizer<T>>
org.anchoranalysis.plugin.io.bean.summarizer.Summarizer<T>
- Type Parameters:
T- type of element to be summarized
- Direct Known Subclasses:
SummarizerAggregate,SummarizerCount,SummarizerImageMetadata,SummarizerInputFromManager,SummarizerListMultiline,SummarizerPath,SummarizerSplitMoreThan
public abstract class Summarizer<T> extends org.anchoranalysis.bean.AnchorBean<Summarizer<T>>
Summarizes a set of elements by outputting a descriptive string.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description Summarizer() -
Method Summary
Modifier and Type Method Description abstract voidadd(T element)Adds a element to the summary.voidaddAll(Collection<T> elements)Adds the elements to the summary.abstract Stringdescribe()A string summarizing this item.abstract booleanrequiresImageMetadata()Whether aImageMetadataInputis required as an input.
-
Constructor Details
-
Summarizer
public Summarizer()
-
-
Method Details
-
addAll
public void addAll(Collection<T> elements) throws org.anchoranalysis.core.exception.OperationFailedExceptionAdds the elements to the summary.- Parameters:
elements- the elements to add.- Throws:
org.anchoranalysis.core.exception.OperationFailedException
-
add
public abstract void add(T element) throws org.anchoranalysis.core.exception.OperationFailedExceptionAdds a element to the summary.- Parameters:
element- the element to add.- Throws:
org.anchoranalysis.core.exception.OperationFailedException
-
describe
A string summarizing this item.- Returns:
- the description.
- Throws:
org.anchoranalysis.core.exception.OperationFailedException
-
requiresImageMetadata
public abstract boolean requiresImageMetadata() throws org.anchoranalysis.core.exception.OperationFailedExceptionWhether aImageMetadataInputis required as an input.- Returns:
- true if the summarize requires
ImageMetadataInputas input, or false if any input is acceptable. - Throws:
org.anchoranalysis.core.exception.OperationFailedException- if this cannot be established.
-