Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.align.model.impl
Class AbstractCellExplanation

java.lang.Object
  extended by eu.esdihumboldt.hale.common.align.model.impl.AbstractCellExplanation
All Implemented Interfaces:
CellExplanation
Direct Known Subclasses:
AssignExplanation, CalculateAreaExplanation, CalculateLengthExplanation, CentroidExplanation, ClassificationMappingExplanation, DateExtractionExplanation, FormattedStringExplanation, GeographicalNameExplanation, GroovyExplanation, IdentifierExplanation, JoinExplanation, MathematicalExpressionExplanation, MergeExplanation, NetworkExpansionExplanation, OrdinatesToPointExplanation, RenameExplanation, RetypeExplanation

public abstract class AbstractCellExplanation
extends Object
implements CellExplanation

Abstract cell explanation implementation.

Author:
Simon Templer

Constructor Summary
AbstractCellExplanation()
           
 
Method Summary
protected  String formatEntity(Entity entity, boolean html, boolean indexInFront)
          Format an entity for inclusion in an explanation.
protected  String getEntityNameWithoutCondition(Entity entity)
          Returns an entity name without condition strings (e.g.
 String getExplanation(Cell cell)
          Get the explanation for the given cell.
protected abstract  String getExplanation(Cell cell, boolean html)
          Get the explanation string in the specified format.
 String getExplanationAsHtml(Cell cell)
          Get the explanation in html format for the given cell
protected  boolean hasIndexCondition(Entity entity)
          Checks whether the given entity has an index condition.
protected  String quoteText(String text, boolean html)
          Quote or otherwise format (in case of HTML) the given text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCellExplanation

public AbstractCellExplanation()
Method Detail

getExplanation

public String getExplanation(Cell cell)
Description copied from interface: CellExplanation
Get the explanation for the given cell.

Specified by:
getExplanation in interface CellExplanation
Parameters:
cell - the cell
Returns:
the cell explanation, null if none is available
See Also:
CellExplanation.getExplanation(Cell)

getExplanationAsHtml

public String getExplanationAsHtml(Cell cell)
Description copied from interface: CellExplanation
Get the explanation in html format for the given cell

Specified by:
getExplanationAsHtml in interface CellExplanation
Parameters:
cell - the cell
Returns:
the cell explanation in html format, null if none is available
See Also:
CellExplanation.getExplanationAsHtml(Cell)

getExplanation

protected abstract String getExplanation(Cell cell,
                                         boolean html)
Get the explanation string in the specified format.

Parameters:
cell - the cell to create an explanation for
html - if the format should be HMTL, otherwise the format is just text
Returns:
the explanation or null

formatEntity

protected String formatEntity(Entity entity,
                              boolean html,
                              boolean indexInFront)
Format an entity for inclusion in an explanation.

Parameters:
entity - the entity, may be null
html - if the format should be HMTL, otherwise the format is just text
indexInFront - whether index conditions should be in front of the property name or behind in brackets
Returns:
the formatted entity name or null in case of null input

getEntityNameWithoutCondition

protected String getEntityNameWithoutCondition(Entity entity)
Returns an entity name without condition strings (e.g. "part1.part2").

Parameters:
entity - the entity
Returns:
the entity name

hasIndexCondition

protected boolean hasIndexCondition(Entity entity)
Checks whether the given entity has an index condition.

Parameters:
entity - the entity to check
Returns:
true, if the entity has an index condition

quoteText

protected String quoteText(String text,
                           boolean html)
Quote or otherwise format (in case of HTML) the given text.

Parameters:
text - the text, may be null
html - if the format should be HMTL, otherwise the format is just text
Returns:
the quoted text or null in case of null input

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d