Interface TemplateEngineDataProvider
-
- All Known Implementing Classes:
AudioMarker
,ButtonMarker
,ImageMarker
,Marker
,Node
,OsmPrimitive
,PlayHeadMarker
,Relation
,TaggingPresetItemGuiSupport
,Way
,WayPoint
,WebMarker
public interface TemplateEngineDataProvider
Interface for objects that can be used with a template to generate a string.Provides the necessary information for the template to be applied.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
evaluateCondition(SearchCompiler.Match condition)
Check if a condition holds for the object represented by thisTemplateEngineDataProvider
.java.util.Collection<java.lang.String>
getTemplateKeys()
Get the collection of all keys that can be mapped to values.java.lang.Object
getTemplateValue(java.lang.String key, boolean special)
Map a key to a value given the properties of the object.
-
-
-
Method Detail
-
getTemplateKeys
java.util.Collection<java.lang.String> getTemplateKeys()
Get the collection of all keys that can be mapped to values.- Returns:
- all keys that can be mapped to values
-
getTemplateValue
java.lang.Object getTemplateValue(java.lang.String key, boolean special)
Map a key to a value given the properties of the object.- Parameters:
key
- the key to mapspecial
- if the key is a "special:*" keyword that is used to get certain information or automated behavior- Returns:
- a value that the key is mapped to or "special" information in case
special
is true
-
evaluateCondition
boolean evaluateCondition(SearchCompiler.Match condition)
Check if a condition holds for the object represented by thisTemplateEngineDataProvider
.- Parameters:
condition
- the condition to check (which is a search expression)- Returns:
- true if the condition holds
-
-