Class StreamFactory
- java.lang.Object
-
- org.apache.solr.client.solrj.io.stream.expr.StreamFactory
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DefaultStreamFactory
public class StreamFactory extends Object implements Serializable
Used to convert strings into stream expressions- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StreamFactory()
StreamFactory(HashMap<String,Supplier<Class<? extends Expressible>>> functionNames)
-
Method Summary
-
-
-
Constructor Detail
-
StreamFactory
public StreamFactory()
-
StreamFactory
public StreamFactory(HashMap<String,Supplier<Class<? extends Expressible>>> functionNames)
-
-
Method Detail
-
withCollectionZkHost
public StreamFactory withCollectionZkHost(String collectionName, String zkHost)
-
getDefaultCollection
public String getDefaultCollection()
-
withDefaultZkHost
public StreamFactory withDefaultZkHost(String zkHost)
-
withDefaultSort
public StreamFactory withDefaultSort(String sort)
-
getDefaultSort
public String getDefaultSort()
-
getDefaultZkHost
public String getDefaultZkHost()
-
getFunctionNames
public Map<String,Supplier<Class<? extends Expressible>>> getFunctionNames()
-
withFunctionName
public StreamFactory withFunctionName(String functionName, Class<? extends Expressible> clazz)
-
withFunctionName
public StreamFactory withFunctionName(String functionName, Supplier<Class<? extends Expressible>> clazz)
-
withoutFunctionName
public StreamFactory withoutFunctionName(String functionName)
-
getOperand
public StreamExpressionParameter getOperand(StreamExpression expression, int parameterIndex)
-
getValueOperands
public List<String> getValueOperands(StreamExpression expression)
-
getValueOperand
public String getValueOperand(StreamExpression expression, int parameterIndex)
Given an expression, will return the value parameter at the given index, or null if doesn't exist
-
getNamedOperands
public List<StreamExpressionNamedParameter> getNamedOperands(StreamExpression expression)
-
getNamedOperand
public StreamExpressionNamedParameter getNamedOperand(StreamExpression expression, String name)
-
getExpressionOperands
public List<StreamExpression> getExpressionOperands(StreamExpression expression)
-
getExpressionOperands
public List<StreamExpression> getExpressionOperands(StreamExpression expression, String functionName)
-
getOperandsOfType
public List<StreamExpressionParameter> getOperandsOfType(StreamExpression expression, Class<?>... clazzes)
-
getExpressionOperandsRepresentingTypes
public List<StreamExpression> getExpressionOperandsRepresentingTypes(StreamExpression expression, Class<?>... clazzes)
-
doesRepresentTypes
public boolean doesRepresentTypes(StreamExpression expression, Class<?>... clazzes)
-
getIntOperand
public int getIntOperand(StreamExpression expression, String paramName, Integer defaultValue) throws IOException
- Throws:
IOException
-
getBooleanOperand
public boolean getBooleanOperand(StreamExpression expression, String paramName, Boolean defaultValue) throws IOException
- Throws:
IOException
-
constructStream
public TupleStream constructStream(String expressionClause) throws IOException
- Throws:
IOException
-
constructStream
public TupleStream constructStream(StreamExpression expression) throws IOException
- Throws:
IOException
-
constructMetric
public Metric constructMetric(String expressionClause) throws IOException
- Throws:
IOException
-
constructMetric
public Metric constructMetric(StreamExpression expression) throws IOException
- Throws:
IOException
-
constructComparator
public StreamComparator constructComparator(String comparatorString, Class<? extends StreamComparator> comparatorType) throws IOException
- Throws:
IOException
-
constructEqualitor
public StreamEqualitor constructEqualitor(String equalitorString, Class<? extends StreamEqualitor> equalitorType) throws IOException
- Throws:
IOException
-
constructOperation
public Metric constructOperation(String expressionClause) throws IOException
- Throws:
IOException
-
constructOperation
public StreamOperation constructOperation(StreamExpression expression) throws IOException
- Throws:
IOException
-
constructEvaluator
public StreamEvaluator constructEvaluator(String expressionClause) throws IOException
- Throws:
IOException
-
constructEvaluator
public StreamEvaluator constructEvaluator(StreamExpression expression) throws IOException
- Throws:
IOException
-
isStream
public boolean isStream(StreamExpression expression) throws IOException
- Throws:
IOException
-
isEvaluator
public boolean isEvaluator(StreamExpression expression) throws IOException
- Throws:
IOException
-
createInstance
public <T> T createInstance(Class<T> clazz, Class<?>[] paramTypes, Object[] params) throws IOException
- Throws:
IOException
-
getFunctionName
public String getFunctionName(Class<? extends Expressible> clazz) throws IOException
- Throws:
IOException
-
-