Class: Hyrax::FlexibleSchemaValidators::CoreMetadataValidator Private
- Inherits:
-
Object
- Object
- Hyrax::FlexibleSchemaValidators::CoreMetadataValidator
- Defined in:
- app/services/hyrax/flexible_schema_validators/core_metadata_validator.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Validates the core metadata properties of a flexible metadata profile.
Instance Method Summary collapse
-
#initialize(profile:, errors:) ⇒ CoreMetadataValidator
constructor
private
A new instance of CoreMetadataValidator.
-
#validate! ⇒ void
private
Validate the profile against the core metadata requirements and append any human-readable error messages to #errors.
Constructor Details
#initialize(profile:, errors:) ⇒ CoreMetadataValidator
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CoreMetadataValidator.
13 14 15 16 |
# File 'app/services/hyrax/flexible_schema_validators/core_metadata_validator.rb', line 13 def initialize(profile:, errors:) @profile = profile @errors = errors end |
Instance Method Details
#validate! ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Validate the profile against the core metadata requirements and append any human-readable error messages to #errors.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/services/hyrax/flexible_schema_validators/core_metadata_validator.rb', line 22 def validate! ['attributes'].each do |property, config| next unless validate_property_exists(property) validate_property_multi_value(property, config) validate_property_indexing(property, config) validate_property_predicate(property, config) validate_property_available_on(property) validate_property_cardinality(property, config) end validate_keyword_property end |