Class SchemaCatalogue


  • public class SchemaCatalogue
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SchemaCatalogue​(java.nio.file.Path root)  
      SchemaCatalogue​(java.nio.file.Path root, org.radarbase.schema.Scope scope)  
    • Constructor Detail

      • SchemaCatalogue

        public SchemaCatalogue​(java.nio.file.Path root)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • SchemaCatalogue

        public SchemaCatalogue​(java.nio.file.Path root,
                               org.radarbase.schema.Scope scope)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getGenericAvroTopic

        public org.radarbase.topic.AvroTopic<org.apache.avro.generic.GenericRecord,​org.apache.avro.generic.GenericRecord> getGenericAvroTopic​(org.radarbase.config.AvroTopicConfig config)
        Returns an avro topic with the schemas from this catalogue.
        Parameters:
        config - avro topic configuration
        Returns:
        AvroTopic with
        Throws:
        java.util.NoSuchElementException - if the key or value schema do not exist in this catalogue.
        java.lang.NullPointerException - if the key or value schema configurations are null
        java.lang.IllegalArgumentException - if the topic configuration is null
      • getSchemas

        public java.util.Map<java.lang.String,​SchemaMetadata> getSchemas()
      • getUnmappedAvroFiles

        public java.util.List<SchemaMetadata> getUnmappedAvroFiles()
      • getSchemaMetadata

        public kotlin.Pair<SchemaMetadata,​SchemaMetadata> getSchemaMetadata​(org.radarbase.config.AvroTopicConfig config)
        Returns an avro topic with the schemas from this catalogue.
        Parameters:
        config - avro topic configuration
        Returns:
        AvroTopic with
        Throws:
        java.util.NoSuchElementException - if the key or value schema do not exist in this catalogue.
        java.lang.NullPointerException - if the key or value schema configurations are null
        java.lang.IllegalArgumentException - if the topic configuration is null