Class PropertyAliases
- java.lang.Object
-
- com.yahoo.processing.request.Properties
-
- com.yahoo.search.query.Properties
-
- com.yahoo.search.query.properties.PropertyAliases
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
QueryPropertyAliases
public class PropertyAliases extends Properties
A properties implementation which translates the incoming name to its standard name if it is a registered alias.Aliases are case insensitive. One standard name may have multiple aliases.
This is multithread safe or not depending on the status of the passed map of aliases. Cloning will not deep copy the set of aliases.
- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description PropertyAliases(Map<String,com.yahoo.processing.request.CompoundName> aliases)
Creates an instance with a set of aliases.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
get(com.yahoo.processing.request.CompoundName name, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
Map<String,Object>
listProperties(com.yahoo.processing.request.CompoundName property, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
void
set(com.yahoo.processing.request.CompoundName name, Object value, Map<String,String> context)
protected com.yahoo.processing.request.CompoundName
unalias(com.yahoo.processing.request.CompoundName nameOrAlias)
Returns the standard name for an alias, or the given name if it is not a registered alias-
Methods inherited from class com.yahoo.search.query.Properties
chained, clone, getParentQuery, setParentQuery
-
Methods inherited from class com.yahoo.processing.request.Properties
asBoolean, asDouble, asInteger, asLong, asString, chain, clearAll, clearAll, clearAll, clearAll, clone, cloneMap, get, get, get, get, get, get, get, getBoolean, getBoolean, getBoolean, getBoolean, getDouble, getDouble, getDouble, getDouble, getInstance, getInteger, getInteger, getInteger, getInteger, getLong, getLong, getLong, getLong, getString, getString, getString, getString, listProperties, listProperties, listProperties, listProperties, listProperties, listProperties, listProperties, set, set, set
-
-
-
-
Method Detail
-
unalias
protected com.yahoo.processing.request.CompoundName unalias(com.yahoo.processing.request.CompoundName nameOrAlias)
Returns the standard name for an alias, or the given name if it is not a registered alias- Parameters:
nameOrAlias
- the name to check if is an alias- Returns:
- the real name if an alias or the input name itself
-
listProperties
public Map<String,Object> listProperties(com.yahoo.processing.request.CompoundName property, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
- Overrides:
listProperties
in classcom.yahoo.processing.request.Properties
-
get
public Object get(com.yahoo.processing.request.CompoundName name, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
- Overrides:
get
in classcom.yahoo.processing.request.Properties
-
-