public class KMLBalloonTextDecoder extends BasicTextDecoder
| Modifier and Type | Field and Description | 
|---|---|
protected Map<String,String> | 
entityCache
Keep a cache of entities that have been resolved so that we don't have to re-resolve them every time the decoded
 text is requested. 
 | 
protected KMLAbstractFeature | 
feature
Feature to use as context for entity replacements. 
 | 
protected boolean | 
isUnresolved
True if there are entities in the balloon text which may refer to unresolved schema. 
 | 
decodedText, lastUpdateTime, text| Constructor and Description | 
|---|
KMLBalloonTextDecoder(KMLAbstractFeature feature)
Create a decoder to generate balloon text for a feature. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected String | 
decode(String textToDecode)
Perform entity substitution. 
 | 
String | 
getDecodedText()
Get the balloon text after entity substitutions (for example, $[name], $[description], etc) have been made. 
 | 
KMLAbstractFeature | 
getFeature()
Get the feature used as context for resolving entity references. 
 | 
protected String | 
getGeDirectionsText()
Get the text used to replace the $[geDirections] entity. 
 | 
protected String | 
resolveEntityReference(String pattern)
Resolve an entity reference. 
 | 
void | 
setText(String input)
Set the input text which the decoder will process. 
 | 
getLastUpdateTimeprotected Map<String,String> entityCache
protected KMLAbstractFeature feature
protected boolean isUnresolved
public KMLBalloonTextDecoder(KMLAbstractFeature feature)
feature - Feature that is the context of entity replacements.protected String decode(String textToDecode)
decode in class BasicTextDecodertextToDecode - The text to decode.public String getDecodedText()
getDecodedText in interface TextDecodergetDecodedText in class BasicTextDecoderpublic KMLAbstractFeature getFeature()
protected String getGeDirectionsText()
protected String resolveEntityReference(String pattern)
FeatureField DataField DataField/displayName SchemaName/SchemaField SchemaName/SchemaField/displayNameSee the KML spec for details.
pattern - Pattern of entity to resolve.public void setText(String input)
setText in interface TextDecodersetText in class BasicTextDecoderinput - Text to decode.