Class SurrogateQueryRegistry
java.lang.Object
tools.refinery.interpreter.matchers.context.surrogate.SurrogateQueryRegistry
-
Method Summary
Modifier and TypeMethodDescriptionaddDynamicSurrogateQueryForFeature
(IInputKey feature, PQuery surrogateQuery) addDynamicSurrogateQueryForFeature
(IInputKey feature, IProvider<PQuery> surrogateQuery) getSurrogateQuery
(IInputKey feature) boolean
hasSurrogateQueryFQN
(IInputKey feature) static SurrogateQueryRegistry
instance()
registerSurrogateQueryForFeature
(IInputKey feature, PQuery surrogateQuery) registerSurrogateQueryForFeature
(IInputKey feature, IProvider<PQuery> surrogateQueryProvider)
-
Method Details
-
instance
-
registerSurrogateQueryForFeature
- Parameters:
feature
-surrogateQuery
-- Returns:
- the previous surrogate query associated with feature, or null if there was no such query FQN registered
- Throws:
IllegalArgumentException
- if feature or surrogateQuery is null
-
registerSurrogateQueryForFeature
public IProvider<PQuery> registerSurrogateQueryForFeature(IInputKey feature, IProvider<PQuery> surrogateQueryProvider) - Parameters:
feature
-surrogateQuery
-- Returns:
- the previous surrogate query associated with feature, or null if there was no such query registered
- Throws:
IllegalArgumentException
- if feature or surrogateQuery is null
-
addDynamicSurrogateQueryForFeature
-
addDynamicSurrogateQueryForFeature
-
removeDynamicSurrogateQueryForFeature
-
hasSurrogateQueryFQN
- Parameters:
feature
- that may have surrogate query defined, null not allowed- Returns:
- true if the feature has a surrogate query defined
- Throws:
IllegalArgumentException
- if feature is null
-
getSurrogateQuery
- Parameters:
feature
- for which the surrogate query FQN should be returned- Returns:
- the surrogate query FQN defined for the feature
- Throws:
IllegalArgumentException
- if feature is nullNoSuchElementException
- if the feature has no surrogate query defined, usehasSurrogateQueryFQN(tools.refinery.interpreter.matchers.context.IInputKey)
to check
-
getRegisteredSurrogateQueries
- Returns:
- an unmodifiable set of features with registered surrogate queries
-
getDynamicSurrogateQueries
- Returns:
- an unmodifiable set of features with dynamically added surrogate queries
-
getAllSurrogateQueries
- Returns:
- an unmodifiable set that contains all features with surrogate queries.
-