|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.util.BasicTextDecoder
gov.nasa.worldwind.ogc.kml.impl.KMLBalloonTextDecoder
public class KMLBalloonTextDecoder
Text decoder that performs entity substitution for KML description balloons. This class is thread safe.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class gov.nasa.worldwind.util.BasicTextDecoder |
|---|
decodedText, lastUpdateTime, text |
| Constructor Summary | |
|---|---|
KMLBalloonTextDecoder(KMLAbstractFeature feature)
Create a decoder to generate balloon text for a feature. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class gov.nasa.worldwind.util.BasicTextDecoder |
|---|
getLastUpdateTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,String> entityCache
protected KMLAbstractFeature feature
protected boolean isUnresolved
| Constructor Detail |
|---|
public KMLBalloonTextDecoder(KMLAbstractFeature feature)
feature - Feature that is the context of entity replacements.| Method Detail |
|---|
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.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||