// -----------------------------------------------------------------------
//
// TODO: Update copyright text.
//
// -----------------------------------------------------------------------
namespace OsmReader.OsmData.Elements
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
///
/// TODO: Update summary.
///
public class OsmRelation : AbstractTaggedOsmElement
{
[XmlAttribute(AttributeName = "id")]
public long id { get; set; }
[XmlAttribute(AttributeName = "user")]
public string user { get; set; }
[XmlAttribute(AttributeName = "uid")]
public int uid { get; set; }
[XmlAttribute(AttributeName = "visible")]
public bool visible { get; set; }
[XmlAttribute(AttributeName = "version")]
public int version { get; set; }
[XmlAttribute(AttributeName = "changeset")]
public long changeset { get; set; }
[XmlAttribute(AttributeName = "timestamp")]
public string timestamp { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
[XmlElement(ElementName = "member")]
public List member { get; set; }
[XmlIgnore]
public string IsIn
{
get
{
return getTagValue("is_in");
}
}
[XmlIgnore]
public string Ref
{
get
{
return getTagValue("ref");
}
}
[XmlIgnore]
public string Route
{
get
{
return getTagValue("route");
}
}
[XmlIgnore]
public string RelationType
{
get
{
return getTagValue("type");
}
}
/*
* The fields below are valid when one of the following is valid:
* - Type is 'route' and Route is 'bus'
* - Type is 'route_master' and RouteMaster is 'bus'
*/
#region RELATION_BUS
[XmlIgnore]
public string From
{
get
{
return getTagValue("from");
}
}
[XmlIgnore]
public string To
{
get
{
return getTagValue("to");
}
}
[XmlIgnore]
public string Operator
{
get
{
return getTagValue("operator");
}
}
[XmlIgnore]
public string Network
{
get
{
return getTagValue("network");
}
}
[XmlIgnore]
public string RouteMaster
{
get
{
return getTagValue("route_master");
}
}
#endregion
}
}