Class SchemaValidator


  • public class SchemaValidator
    extends java.lang.Object
    Validator for a set of RADAR-Schemas.
    • Constructor Detail

      • SchemaValidator

        public SchemaValidator​(java.nio.file.Path root,
                               ExcludeConfig config)
        Schema validator for given RADAR-Schemas directory.
        Parameters:
        root - RADAR-Schemas directory.
        config - configuration to exclude certain schemas or fields from validation.
    • Method Detail

      • analyseFiles

        public java.util.stream.Stream<ValidationException> analyseFiles​(org.radarbase.schema.Scope scope,
                                                                         SchemaCatalogue schemaCatalogue)
        TODO.
        Parameters:
        scope - TODO.
      • validate

        public java.util.stream.Stream<ValidationException> validate​(org.apache.avro.Schema schema,
                                                                     java.nio.file.Path path,
                                                                     org.radarbase.schema.Scope scope)
        Validate a single schema in given path.
      • format

        public static java.lang.String format​(java.util.stream.Stream<ValidationException> exceptionStream)
        Formats a stream of validation exceptions.
      • isAvscFile

        public static boolean isAvscFile​(java.nio.file.Path file)
        TODO.
        Parameters:
        file - TODO
        Returns:
        TODO
      • getPath

        public static java.lang.String getPath​(java.nio.file.Path path)
        TODO.
        Parameters:
        path - TODO
        Returns:
        TODO
      • getValidatedSchemas

        public java.util.Map<java.lang.String,​org.apache.avro.Schema> getValidatedSchemas()