Module: SchemaOrg::Mixins::GeoShape

Includes:
StructuredValue
Included in:
GeoShape, GeoCircle
Defined in:
lib/schema_org/mixins/geo_shape.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
85
86
87
88
89
90
91
92
93
94
# File 'lib/schema_org/mixins/geo_shape.rb', line 11

def self.schema_property_definitions
  {
    address: {
      schema_name: "address",
      schema_url: "https://schema.org/address",
      comment_lines: ["Physical address of the item."].freeze,
      ranges: ["PostalAddress", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    address_country: {
      schema_name: "addressCountry",
      schema_url: "https://schema.org/addressCountry",
      comment_lines: ["The country. Recommended to be in 2-letter [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1) format, for example \"US\". For backward compatibility, a 3-letter [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code such as \"SGP\" or a full country name such as \"Singapore\" can also be used."].freeze,
      ranges: ["Country", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    box: {
      schema_name: "box",
      schema_url: "https://schema.org/box",
      comment_lines: ["A box is the area enclosed by the rectangle formed by two points. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    circle: {
      schema_name: "circle",
      schema_url: "https://schema.org/circle",
      comment_lines: ["A circle is the circular region of a specified radius centered at a specified latitude and longitude. A circle is expressed as a pair followed by a radius in meters."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    elevation: {
      schema_name: "elevation",
      schema_url: "https://schema.org/elevation",
      comment_lines: ["The elevation of a location ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)). Values may be of the form 'NUMBER UNIT\\_OF\\_MEASUREMENT' (e.g., '1,000 m', '3,200 ft') while numbers alone should be assumed to be a value in meters."].freeze,
      ranges: ["Number", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    line: {
      schema_name: "line",
      schema_url: "https://schema.org/line",
      comment_lines: ["A line is a point-to-point path consisting of two or more points. A line is expressed as a series of two or more point objects separated by space."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    polygon: {
      schema_name: "polygon",
      schema_url: "https://schema.org/polygon",
      comment_lines: ["A polygon is the area enclosed by a point-to-point path for which the starting and ending points are the same. A polygon is expressed as a series of four or more space delimited points where the first and final points are identical."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    postal_code: {
      schema_name: "postalCode",
      schema_url: "https://schema.org/postalCode",
      comment_lines: ["The postal code. For example, 94043."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#addressObject

Physical address of the item.



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

def address
  read_property(:address)
end

#address=(value) ⇒ Object

Physical address of the item.



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

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

#address_countryObject

The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example "US". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as "SGP" or a full country name such as "Singapore" can also be used.



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

def address_country
  read_property(:address_country)
end

#address_country=(value) ⇒ Object

The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example "US". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as "SGP" or a full country name such as "Singapore" can also be used.



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

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

#boxObject

A box is the area enclosed by the rectangle formed by two points. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character.



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

def box
  read_property(:box)
end

#box=(value) ⇒ Object

A box is the area enclosed by the rectangle formed by two points. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character.



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

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

#circleObject

A circle is the circular region of a specified radius centered at a specified latitude and longitude. A circle is expressed as a pair followed by a radius in meters.



127
128
129
# File 'lib/schema_org/mixins/geo_shape.rb', line 127

def circle
  read_property(:circle)
end

#circle=(value) ⇒ Object

A circle is the circular region of a specified radius centered at a specified latitude and longitude. A circle is expressed as a pair followed by a radius in meters.



132
133
134
# File 'lib/schema_org/mixins/geo_shape.rb', line 132

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

#elevationObject

The elevation of a location (WGS 84). Values may be of the form 'NUMBER UNIT_OF_MEASUREMENT' (e.g., '1,000 m', '3,200 ft') while numbers alone should be assumed to be a value in meters.



137
138
139
# File 'lib/schema_org/mixins/geo_shape.rb', line 137

def elevation
  read_property(:elevation)
end

#elevation=(value) ⇒ Object

The elevation of a location (WGS 84). Values may be of the form 'NUMBER UNIT_OF_MEASUREMENT' (e.g., '1,000 m', '3,200 ft') while numbers alone should be assumed to be a value in meters.



142
143
144
# File 'lib/schema_org/mixins/geo_shape.rb', line 142

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

#lineObject

A line is a point-to-point path consisting of two or more points. A line is expressed as a series of two or more point objects separated by space.



147
148
149
# File 'lib/schema_org/mixins/geo_shape.rb', line 147

def line
  read_property(:line)
end

#line=(value) ⇒ Object

A line is a point-to-point path consisting of two or more points. A line is expressed as a series of two or more point objects separated by space.



152
153
154
# File 'lib/schema_org/mixins/geo_shape.rb', line 152

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

#polygonObject

A polygon is the area enclosed by a point-to-point path for which the starting and ending points are the same. A polygon is expressed as a series of four or more space delimited points where the first and final points are identical.



157
158
159
# File 'lib/schema_org/mixins/geo_shape.rb', line 157

def polygon
  read_property(:polygon)
end

#polygon=(value) ⇒ Object

A polygon is the area enclosed by a point-to-point path for which the starting and ending points are the same. A polygon is expressed as a series of four or more space delimited points where the first and final points are identical.



162
163
164
# File 'lib/schema_org/mixins/geo_shape.rb', line 162

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

#postal_codeObject

The postal code. For example, 94043.



167
168
169
# File 'lib/schema_org/mixins/geo_shape.rb', line 167

def postal_code
  read_property(:postal_code)
end

#postal_code=(value) ⇒ Object

The postal code. For example, 94043.



172
173
174
# File 'lib/schema_org/mixins/geo_shape.rb', line 172

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