Class: Chemicalml::Convention::Dictionary::Constraints::DictionaryMustHaveNamespace
- Inherits:
-
Constraint::NodeConstraint
- Object
- Constraint
- Constraint::NodeConstraint
- Chemicalml::Convention::Dictionary::Constraints::DictionaryMustHaveNamespace
- Defined in:
- lib/chemicalml/convention/dictionary/constraints/dictionary_must_have_namespace.rb
Overview
A <dictionary> element MUST have a namespace attribute
whose value is a valid URI defining the scope within which
the entry terms are unique.
Instance Method Summary collapse
Methods inherited from Constraint::NodeConstraint
Instance Method Details
#check_node(node, path) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/chemicalml/convention/dictionary/constraints/dictionary_must_have_namespace.rb', line 12 def check_node(node, path) return [] unless node.namespace.to_s.empty? [violation(path: path.join('/'), message: 'dictionary must have a namespace attribute')] end |