-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathPlace.cs
More file actions
205 lines (181 loc) · 7.7 KB
/
Place.cs
File metadata and controls
205 lines (181 loc) · 7.7 KB
1
2
3
4
5
6
7
8
9
10
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#region License
// Copyright (c) 2015 1010Tires.com
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System.Collections.Generic;
using Newtonsoft.Json;
using MXTires.Microdata.Intangible;
using MXTires.Microdata.Intangible.StructuredValues;
using System;
using MXTires.Microdata.Validators;
namespace MXTires.Microdata
{
/// <summary>
/// Entities that have a somewhat fixed, physical extension.
/// </summary>
public class Place : Thing, MXTires.Microdata.Places.IPlace
{
object additionalProperty;
/// <summary>
/// A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic
/// for which there is no matching property in schema.org.
/// Note: Publishers should be aware that applications designed to use specific schema.org properties
/// (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...)
/// will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
/// </summary>
/// <value>The additional property.</value>
[JsonProperty("additionalProperty")]
public object AdditionalProperty
{
get
{
return additionalProperty;
}
set
{
var validator = new TypeValidator(new List<Type>() { typeof(PropertyValue), typeof(IList<PropertyValue>), typeof(List<PropertyValue>) });
validator.Validate(value);
additionalProperty = value;
}
}
/// <summary>
/// The location of the event, organization or action.
/// </summary>
[JsonProperty("geo")]
public GeoCoordinates Geo { get; set; }
/// <summary>
/// A URL to a map of the place. Supersedes <see cref="Map" />, <see cref="Maps" />.
/// </summary>
[JsonProperty("hasMap")]
public object HasMap { get; set; }
/// <summary>
/// Boolean - A flag to signal that the item, event, or place is accessible for free. Supersedes free.
/// </summary>
[JsonProperty("isAccessibleForFree")]
public bool? IsAccessibleForFree { get; set; }
/// <summary>
/// A URL to a map of the place.
/// Superseded by <see cref="HasMap" />.
/// </summary>
[JsonProperty("maps")]
public List<string> Maps { get; set; }
/// <summary>
/// A URL to a map of the place.
/// Superseded by <see cref="HasMap" />.
/// </summary>
[JsonProperty("map")]
public string Map { get; set; }
/// <summary>
/// OpeningHoursSpecification - The opening hours of a certain place.
/// </summary>
[JsonProperty("openingHoursSpecification")]
public List<OpeningHoursSpecification> OpeningHoursSpecification { get; set; }
/// <summary>
/// PostalAddress - Physical address of the item.
/// </summary>
public PostalAddress Address
{
set
{
Addresses = Addresses ?? new List<PostalAddress>();
Addresses.Add(value);
}
}
/// <summary>
/// PostalAddress - Physical addresses of the item.
/// </summary>
[JsonProperty("address")]
public List<PostalAddress> Addresses { get; set; }
/// <summary>
/// AggregateRating - The overall rating, based on a collection of reviews or ratings, of the item.
/// </summary>
[JsonProperty("aggregateRating")]
public AggregateRating AggregateRating { get; set; }
/// <summary>
/// Place - The basic containment relation between places.
/// </summary>
[JsonProperty("containedIn")]
public Place ContainedIn { get; set; }
/// <summary>
/// Event - Upcoming or past event associated with this place, organization, or action. Supersedes events.
/// </summary>
[JsonProperty("event")]
public Event Event { get; set; }
/// <summary>
/// Text - The fax number.
/// </summary>
[JsonProperty("faxNumber")]
public string FaxNumber { get; set; }
/// <summary>
/// Text - The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.
/// </summary>
[JsonProperty("globalLocationNumber")]
public string GlobalLocationNumber { get; set; }
/// <summary>
/// Text - A count of a specific user interactions with this item—for example, 20 UserLikes, 5 UserComments, or 300 UserDownloads. The user interaction type should be one of the sub types of UserInteraction.
/// </summary>
[JsonProperty("interactionCount")]
public string InteractionCount { get; set; }
/// <summary>
/// Text The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.
/// </summary>
[JsonProperty("isicV4")]
public string IsicV4 { get; set; }
/// <summary>
/// ImageObject or URL - An associated logo.
/// </summary>
[JsonProperty("logo")]
public object Logo { get; set; }
/// <summary>
/// Photograph or ImageObject A photograph of this place. Supersedes photos.
/// </summary>
[JsonProperty("photo")]
public Thing Photo { get; set; }
/// <summary>
/// Photos.
/// </summary>
[JsonProperty("photos")]
public IList<Thing> Photos { get; set; }
/// <summary>
/// Boolean - A flag to signal that the Place is open to public visitors. If this property is omitted there is no assumed default boolean value
/// </summary>
[JsonProperty("publicAccess")]
public Boolean? PublicAccess { get; set; }
/// <summary>
/// Review - A review of the item. Supersedes <see cref="Reviews" />.
/// </summary>
[JsonProperty("review")]
public Review Review { get; set; }
/// <summary>
/// Reviews.
/// Superseded by <see cref="Review" />.
/// </summary>
[JsonProperty("reviews")]
public IList<Review> Reviews { get; set; }
/// <summary>
/// Text - The telephone number.
/// </summary>
[JsonProperty("telephone")]
public string Telephone { get; set; }
}
}