Module: SchemaOrg::Mixins::QuantitativeValue

Includes:
StructuredValue
Included in:
Observation, QuantitativeValue
Defined in:
lib/schema_org/mixins/quantitative_value.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Thing

#additional_type, #additional_type=, #alternate_name, #alternate_name=, #description, #description=, #disambiguating_description, #disambiguating_description=, #identifier, #identifier=, #image, #image=, #main_entity_of_page, #main_entity_of_page=, #name, #name=, #owner, #owner=, #potential_action, #potential_action=, #same_as, #same_as=, #subject_of, #subject_of=, #url, #url=

Class Method Details

.schema_property_definitionsObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/schema_org/mixins/quantitative_value.rb', line 11

def self.schema_property_definitions
  {
    additional_property: {
      schema_name: "additionalProperty",
      schema_url: "https://schema.org/additionalProperty",
      comment_lines: ["A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.\\n\\nNote: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism."].freeze,
      ranges: ["PropertyValue"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    max_value: {
      schema_name: "maxValue",
      schema_url: "https://schema.org/maxValue",
      comment_lines: ["The upper value of some characteristic or property."].freeze,
      ranges: ["Number"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    min_value: {
      schema_name: "minValue",
      schema_url: "https://schema.org/minValue",
      comment_lines: ["The lower value of some characteristic or property."].freeze,
      ranges: ["Number"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    unit_code: {
      schema_name: "unitCode",
      schema_url: "https://schema.org/unitCode",
      comment_lines: ["The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon."].freeze,
      ranges: ["Text", "URL"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    unit_text: {
      schema_name: "unitText",
      schema_url: "https://schema.org/unitText",
      comment_lines: ["A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for", "<a href='unitCode'>unitCode</a>."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    value: {
      schema_name: "value",
      schema_url: "https://schema.org/value",
      comment_lines: ["The value of a [[QuantitativeValue]] (including [[Observation]]) or property value node.\\n\\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\\n* For [[PropertyValue]], it can be 'Text', 'Number', 'Boolean', or 'StructuredValue'.\\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator."].freeze,
      ranges: ["Boolean", "Number", "StructuredValue", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    value_reference: {
      schema_name: "valueReference",
      schema_url: "https://schema.org/valueReference",
      comment_lines: ["A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement."].freeze,
      ranges: ["DefinedTerm", "Enumeration", "MeasurementTypeEnumeration", "PropertyValue", "QualitativeValue", "QuantitativeValue", "StructuredValue", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#additional_propertyObject

A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.\n\nNote: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.



87
88
89
# File 'lib/schema_org/mixins/quantitative_value.rb', line 87

def additional_property
  read_property(:additional_property)
end

#additional_property=(value) ⇒ Object

A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.\n\nNote: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.



92
93
94
# File 'lib/schema_org/mixins/quantitative_value.rb', line 92

def additional_property=(value)
  write_property(:additional_property, value)
end

#max_valueObject

The upper value of some characteristic or property.



97
98
99
# File 'lib/schema_org/mixins/quantitative_value.rb', line 97

def max_value
  read_property(:max_value)
end

#max_value=(value) ⇒ Object

The upper value of some characteristic or property.



102
103
104
# File 'lib/schema_org/mixins/quantitative_value.rb', line 102

def max_value=(value)
  write_property(:max_value, value)
end

#min_valueObject

The lower value of some characteristic or property.



107
108
109
# File 'lib/schema_org/mixins/quantitative_value.rb', line 107

def min_value
  read_property(:min_value)
end

#min_value=(value) ⇒ Object

The lower value of some characteristic or property.



112
113
114
# File 'lib/schema_org/mixins/quantitative_value.rb', line 112

def min_value=(value)
  write_property(:min_value, value)
end

#unit_codeObject

The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.



117
118
119
# File 'lib/schema_org/mixins/quantitative_value.rb', line 117

def unit_code
  read_property(:unit_code)
end

#unit_code=(value) ⇒ Object

The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.



122
123
124
# File 'lib/schema_org/mixins/quantitative_value.rb', line 122

def unit_code=(value)
  write_property(:unit_code, value)
end

#unit_textObject

A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode.



128
129
130
# File 'lib/schema_org/mixins/quantitative_value.rb', line 128

def unit_text
  read_property(:unit_text)
end

#unit_text=(value) ⇒ Object

A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode.



134
135
136
# File 'lib/schema_org/mixins/quantitative_value.rb', line 134

def unit_text=(value)
  write_property(:unit_text, value)
end

#valueObject

The value of a [[QuantitativeValue]] (including [[Observation]]) or property value node.\n\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\n* For [[PropertyValue]], it can be 'Text', 'Number', 'Boolean', or 'StructuredValue'.\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.



139
140
141
# File 'lib/schema_org/mixins/quantitative_value.rb', line 139

def value
  read_property(:value)
end

#value=(value) ⇒ Object

The value of a [[QuantitativeValue]] (including [[Observation]]) or property value node.\n\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\n* For [[PropertyValue]], it can be 'Text', 'Number', 'Boolean', or 'StructuredValue'.\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.



144
145
146
# File 'lib/schema_org/mixins/quantitative_value.rb', line 144

def value=(value)
  write_property(:value, value)
end

#value_referenceObject

A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement.



149
150
151
# File 'lib/schema_org/mixins/quantitative_value.rb', line 149

def value_reference
  read_property(:value_reference)
end

#value_reference=(value) ⇒ Object

A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement.



154
155
156
# File 'lib/schema_org/mixins/quantitative_value.rb', line 154

def value_reference=(value)
  write_property(:value_reference, value)
end