Package com.streambase.sb
Class SchemaUtil.SchemaTraversal<T extends Exception>
java.lang.Object
com.streambase.sb.SchemaUtil.SchemaTraversal<T>
- Type Parameters:
T- exception class
- Enclosing class:
- com.streambase.sb.SchemaUtil
a class that can be used to traverse all nested schemas in a schema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun(CompleteDataType cdt, String path) Run traversalvoidRun the schema visitorvoidvisitField(Schema.Field field, String fieldPath) This method will be called for each and every field in the schema, including nested fields and fields in lists of tuplesvoidvisitSchema(Schema schema, String fieldPath) This method will be called for each and every schema
-
Constructor Details
-
SchemaTraversal
public SchemaTraversal()
-
-
Method Details
-
visitSchema
This method will be called for each and every schema- Parameters:
schema- the current schemafieldPath- field path- Throws:
T- exception class supplied as a parameter
-
visitField
This method will be called for each and every field in the schema, including nested fields and fields in lists of tuples- Parameters:
field- fieldfieldPath- field path- Throws:
T- exception type
-
run
Run traversal- Parameters:
cdt- complete data typepath- schema path- Throws:
T- exception type
-
run
Run the schema visitor- Parameters:
schema- the schema to visitpath- path- Throws:
T- exception class supplied as a parameter
-