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

public abstract static class SchemaUtil.SchemaTraversal<T extends Exception> extends Object
a class that can be used to traverse all nested schemas in a schema
  • Constructor Details

    • SchemaTraversal

      public SchemaTraversal()
  • Method Details

    • visitSchema

      public void visitSchema(Schema schema, String fieldPath) throws T
      This method will be called for each and every schema
      Parameters:
      schema - the current schema
      fieldPath - field path
      Throws:
      T - exception class supplied as a parameter
    • visitField

      public void visitField(Schema.Field field, String fieldPath) throws T
      This method will be called for each and every field in the schema, including nested fields and fields in lists of tuples
      Parameters:
      field - field
      fieldPath - field path
      Throws:
      T - exception type
    • run

      public void run(CompleteDataType cdt, String path) throws T
      Run traversal
      Parameters:
      cdt - complete data type
      path - schema path
      Throws:
      T - exception type
    • run

      public void run(Schema schema, String path) throws T
      Run the schema visitor
      Parameters:
      schema - the schema to visit
      path - path
      Throws:
      T - exception class supplied as a parameter