Package com.yahoo.search.query.profile
Class QueryProfileRegistry
java.lang.Object
com.yahoo.component.provider.ComponentRegistry<QueryProfile>
com.yahoo.search.query.profile.QueryProfileRegistry
public class QueryProfileRegistry
extends com.yahoo.component.provider.ComponentRegistry<QueryProfile>
A set of query profiles. This also holds the query profile types as a dependent registry
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompile()
com.yahoo.component.ComponentId
createAnonymousId
(String name) findQueryProfile
(String idString) Returns a query profile for the given request string, or null if a suitable one is not found.void
freeze()
Freezes this, and all owned query profiles and query profile typesReturns a query profile type by name, or null if not foundReturns the type registry attached to thisvoid
register
(QueryProfile profile) Register this type by its idMethods inherited from class com.yahoo.component.provider.ComponentRegistry
allComponents, allComponentsById, findBestMatch, getComponent, getComponent, getComponent, getComponentCount, isFrozen, register, singleton, unregister
-
Constructor Details
-
QueryProfileRegistry
public QueryProfileRegistry()
-
-
Method Details
-
register
Register this type by its id -
getType
Returns a query profile type by name, or null if not found -
getTypeRegistry
Returns the type registry attached to this -
findQueryProfile
Returns a query profile for the given request string, or null if a suitable one is not found.
The request string must be a validComponentId
or null.If the string is null, the profile named "default" is returned, or null if that does not exists.
The version part (if any) is matched used the usual component version patching rules. If the name part matches a query profile name perfectly, that profile is returned. If not, and the name is a slash-separated path, the profile with the longest matching left sub-path which has a type which allows path mahting is used. If there is no such profile, null is returned.
-
freeze
public void freeze()Freezes this, and all owned query profiles and query profile types- Overrides:
freeze
in classcom.yahoo.component.provider.ComponentRegistry<QueryProfile>
-
compile
-
createAnonymousId
-