Module: Chemicalml::Convention::SimpleUnit

Extended by:
Base
Defined in:
lib/chemicalml/convention/simple_unit.rb,
lib/chemicalml/convention/simple_unit/constraints.rb,
lib/chemicalml/convention/simple_unit/constraints/unit_must_have_power.rb,
lib/chemicalml/convention/simple_unit/constraints/unit_must_have_symbol.rb,
lib/chemicalml/convention/simple_unit/constraints/root_must_be_unit_list.rb

Overview

The simpleUnit convention — the worked example from the CMLLite paper. A toy convention demonstrating the convention framework.

Namespace: http://www.xml-cml.org/convention/simpleUnit

Constraints:

  • the root MUST be a <unitList> declaring convention="convention:simpleUnit"
  • each <unit> MUST have a power attribute (integer)
  • each <unit> MUST have a non-empty symbol attribute

Defined Under Namespace

Modules: Constraints

Constant Summary collapse

QNAME =
'convention:simpleUnit'
NAMESPACE_URI =
"#{Chemicalml::Convention::CONVENTION_NAMESPACE}simpleUnit".freeze

Class Method Summary collapse

Methods included from Base

constraint_count, constraints, namespace_uri, qname, register, reset_constraints!, validate, validate_report

Class Method Details

.namespace_uriObject



28
29
30
# File 'lib/chemicalml/convention/simple_unit.rb', line 28

def self.namespace_uri
  NAMESPACE_URI
end

.qnameObject



24
25
26
# File 'lib/chemicalml/convention/simple_unit.rb', line 24

def self.qname
  QNAME
end