has_many :old_nodes, :foreign_key => :id
belongs_to :user
-
def self.from_xml(xml, create=false)
p = XML::Parser.new
p.string = xml
el1['id'] = self.id.to_s
el1['lat'] = self.latitude.to_s
el1['lon'] = self.longitude.to_s
+ el1['user'] = self.user.display_name if self.user.data_public?
Node.split_tags(el1, self.tags)
el1['visible'] = self.visible.to_s
el1['timestamp'] = self.timestamp.xmlschema
el1['id'] = self.id.to_s
el1['lat'] = self.latitude.to_s
el1['lon'] = self.longitude.to_s
+ el1['user'] = self.user.display_name if self.user.data_public?
Node.split_tags(el1, self.tags)
el1['visible'] = self.visible.to_s
el1['timestamp'] = self.timestamp.xmlschema
el1['id'] = self.id.to_s
el1['from'] = self.node_a.to_s
el1['to'] = self.node_b.to_s
+ el1['user'] = self.user.display_name if self.user.data_public?
Segment.split_tags(el1, self.tags)
el1['visible'] = self.visible.to_s
el1['timestamp'] = self.timestamp.xmlschema
el1['id'] = self.id.to_s
el1['visible'] = self.visible.to_s
el1['timestamp'] = self.timestamp.xmlschema
+ el1['user'] = self.user.display_name if self.user.data_public?
self.old_segments.each do |seg| # FIXME need to make sure they come back in the right order
e = XML::Node.new 'seg'
el1['id'] = self.id.to_s
el1['from'] = self.node_a.to_s
el1['to'] = self.node_b.to_s
+ el1['user'] = self.user.display_name if self.user.data_public?
Segment.split_tags(el1, self.tags)
el1['visible'] = self.visible.to_s
el1['timestamp'] = self.timestamp.xmlschema
el1['id'] = self.id.to_s
el1['visible'] = self.visible.to_s
el1['timestamp'] = self.timestamp.xmlschema
-
+ el1['user'] = self.user.display_name if self.user.data_public?
# make sure segments are output in sequence_id order\r
ordered_segments = []\r
self.way_segments.each do |seg| \r