Class RadarSchemaRules
- java.lang.Object
-
- org.radarbase.schema.validation.rules.RadarSchemaRules
-
- All Implemented Interfaces:
SchemaRules
public class RadarSchemaRules extends java.lang.Object implements SchemaRules
Schema validation rules enforced for the RADAR-Schemas repository.
-
-
Constructor Summary
Constructors Constructor Description RadarSchemaRules(ExcludeConfig config)RadarSchemaRules(ExcludeConfig config, RadarSchemaFieldRules fieldRules)RADAR-Schema validation rules.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Validator<org.apache.avro.Schema>fields(Validator<SchemaField> validator)Validates all fields of records.SchemaFieldRulesgetFieldRules()java.util.Map<java.lang.String,org.apache.avro.Schema>getSchemaStore()Validator<org.apache.avro.Schema>validateAvroData()Validator<org.apache.avro.Schema>validateName()Checks schema name format.Validator<org.apache.avro.Schema>validateNameSpace()Checks schema namespace format.Validator<org.apache.avro.Schema>validateNotTimeCompleted()TODO.Validator<org.apache.avro.Schema>validateNotTimeReceived()Checks that schemas should not have atimeReceivedfield.Validator<org.apache.avro.Schema>validateSchemaDocumentation()Checks schema documentation presence and format.Validator<org.apache.avro.Schema>validateSymbols()Checks that the symbols of enums have the required format.Validator<org.apache.avro.Schema>validateTime()TODO.Validator<org.apache.avro.Schema>validateTimeCompleted()TODO.Validator<org.apache.avro.Schema>validateTimeReceived()Checks that schemas should have atimeReceivedfield.Validator<org.apache.avro.Schema>validateUniqueness()Checks that schemas are unique compared to already validated schemas.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.radarbase.schema.validation.rules.SchemaRules
messageSchema, validateActiveSource, validateEnum, validateMonitor, validatePassive, validateRecord
-
-
-
-
Constructor Detail
-
RadarSchemaRules
public RadarSchemaRules(ExcludeConfig config, RadarSchemaFieldRules fieldRules)
RADAR-Schema validation rules.- Parameters:
config- validation configuration
-
RadarSchemaRules
public RadarSchemaRules(ExcludeConfig config)
-
-
Method Detail
-
getFieldRules
public SchemaFieldRules getFieldRules()
- Specified by:
getFieldRulesin interfaceSchemaRules
-
validateUniqueness
public Validator<org.apache.avro.Schema> validateUniqueness()
Description copied from interface:SchemaRulesChecks that schemas are unique compared to already validated schemas.- Specified by:
validateUniquenessin interfaceSchemaRules
-
validateNameSpace
public Validator<org.apache.avro.Schema> validateNameSpace()
Description copied from interface:SchemaRulesChecks schema namespace format.- Specified by:
validateNameSpacein interfaceSchemaRules
-
validateName
public Validator<org.apache.avro.Schema> validateName()
Description copied from interface:SchemaRulesChecks schema name format.- Specified by:
validateNamein interfaceSchemaRules
-
validateSchemaDocumentation
public Validator<org.apache.avro.Schema> validateSchemaDocumentation()
Description copied from interface:SchemaRulesChecks schema documentation presence and format.- Specified by:
validateSchemaDocumentationin interfaceSchemaRules
-
validateSymbols
public Validator<org.apache.avro.Schema> validateSymbols()
Description copied from interface:SchemaRulesChecks that the symbols of enums have the required format.- Specified by:
validateSymbolsin interfaceSchemaRules
-
validateTime
public Validator<org.apache.avro.Schema> validateTime()
TODO.- Specified by:
validateTimein interfaceSchemaRules- Returns:
- TODO
-
validateTimeCompleted
public Validator<org.apache.avro.Schema> validateTimeCompleted()
TODO.- Specified by:
validateTimeCompletedin interfaceSchemaRules- Returns:
- TODO
-
validateNotTimeCompleted
public Validator<org.apache.avro.Schema> validateNotTimeCompleted()
TODO.- Specified by:
validateNotTimeCompletedin interfaceSchemaRules- Returns:
- TODO
-
validateTimeReceived
public Validator<org.apache.avro.Schema> validateTimeReceived()
Description copied from interface:SchemaRulesChecks that schemas should have atimeReceivedfield.- Specified by:
validateTimeReceivedin interfaceSchemaRules
-
validateNotTimeReceived
public Validator<org.apache.avro.Schema> validateNotTimeReceived()
Description copied from interface:SchemaRulesChecks that schemas should not have atimeReceivedfield.- Specified by:
validateNotTimeReceivedin interfaceSchemaRules
-
validateAvroData
public Validator<org.apache.avro.Schema> validateAvroData()
- Specified by:
validateAvroDatain interfaceSchemaRules
-
fields
public Validator<org.apache.avro.Schema> fields(Validator<SchemaField> validator)
Description copied from interface:SchemaRulesValidates all fields of records. Validation will fail on non-record types or records with no fields.- Specified by:
fieldsin interfaceSchemaRules
-
getSchemaStore
public java.util.Map<java.lang.String,org.apache.avro.Schema> getSchemaStore()
-
-