org.apache.solr.client.solrj.io.stream.expr

## Class StreamFactory

- java.lang.Object
- - org.apache.solr.client.solrj.io.stream.expr.StreamFactory

All Implemented Interfaces:
  Serializable

    public class StreamFactory
    extends Object
    implements Serializable

Used to convert strings into stream expressions

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`StreamFactory()`

### Method Summary

All Methods Instance Methods Concrete Methods
`StreamComparator` `constructComparator(String comparatorString, Class comparatorType)`
`StreamEqualitor` `constructEqualitor(String equalitorString, Class equalitorType)`
`Metric` `constructMetric(StreamExpression expression)`
`Metric` `constructMetric(String expressionClause)`
`StreamOperation` `constructOperation(StreamExpression expression)`
`Metric` `constructOperation(String expressionClause)`
`Object` `constructPrimitiveObject(String original)`
`TupleStream` `constructStream(StreamExpression expression)`
`TupleStream` `constructStream(String expressionClause)`
`<T> T` `createInstance(Class<T> clazz, Class<?>[] paramTypes, Object[] params)`
`boolean` `getBooleanOperand(StreamExpression expression, String paramName, Boolean defaultValue)`
`String` `getCollectionZkHost(String collectionName)`
`String` `getDefaultZkHost()`
`List<StreamExpression>` `getExpressionOperands(StreamExpression expression)`
`List<StreamExpression>` `getExpressionOperands(StreamExpression expression, String functionName)`
`List<StreamExpression>` `getExpressionOperandsRepresentingTypes(StreamExpression expression, Class... clazzes)`
`String` `getFunctionName(Class<? extends Expressible> clazz)`
`Map<String,Class<? extends Expressible>>` `getFunctionNames()`
`int` `getIntOperand(StreamExpression expression, String paramName, Integer defaultValue)`
`StreamExpressionNamedParameter` `getNamedOperand(StreamExpression expression, String name)`
`List<StreamExpressionNamedParameter>` `getNamedOperands(StreamExpression expression)`
`StreamExpressionParameter` `getOperand(StreamExpression expression, int parameterIndex)`
`List<StreamExpressionParameter>` `getOperandsOfType(StreamExpression expression, Class... clazzes)`
`String` `getValueOperand(StreamExpression expression, int parameterIndex)` Given an expression, will return the value parameter at the given index, or null if doesn't exist
`StreamFactory` `withCollectionZkHost(String collectionName, String zkHost)`
`StreamFactory` `withDefaultZkHost(String zkHost)`
`StreamFactory` `withFunctionName(String functionName, Class<? extends Expressible> clazz)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### StreamFactory

    public StreamFactory()

### Method Detail

#### withCollectionZkHost

    public StreamFactory withCollectionZkHost(String collectionName,
                                              String zkHost)

#### withDefaultZkHost

    public StreamFactory withDefaultZkHost(String zkHost)

#### getDefaultZkHost

    public String getDefaultZkHost()

#### getCollectionZkHost

    public String getCollectionZkHost(String collectionName)

#### getFunctionNames

    public Map<String,Class<? extends Expressible>> getFunctionNames()

#### withFunctionName

    public StreamFactory withFunctionName(String functionName,
                                          Class<? extends Expressible> clazz)

#### getOperand

    public StreamExpressionParameter getOperand(StreamExpression expression,
                                                int parameterIndex)

#### 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)

#### 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 comparatorType)
                                         throws IOException

Throws:
  `IOException`

#### constructEqualitor

    public StreamEqualitor constructEqualitor(String equalitorString,
                                              Class 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`

#### 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`

#### constructPrimitiveObject

    public Object constructPrimitiveObject(String original)