From 8292016d10237d481e72bcf2822558933624b6fd Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 May 2010 14:38:56 +0000 Subject: [PATCH] fix compilation errors git-svn-id: https://osmand.googlecode.com/svn/trunk@64 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- .../src/com/osmand/osm/io/OsmIndexStorage.java | 13 +++++++++---- .../src/com/osmand/osm/io/OsmStorageWriter.java | 4 ++-- OsmAnd/.classpath | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/DataExtractionOSM/src/com/osmand/osm/io/OsmIndexStorage.java b/DataExtractionOSM/src/com/osmand/osm/io/OsmIndexStorage.java index e0ee851f80..d8fff03f70 100644 --- a/DataExtractionOSM/src/com/osmand/osm/io/OsmIndexStorage.java +++ b/DataExtractionOSM/src/com/osmand/osm/io/OsmIndexStorage.java @@ -13,7 +13,7 @@ import com.osmand.data.Amenity.AmenityType; import com.osmand.data.City.CityType; import com.osmand.osm.Entity; -public class OSMIndexStorage extends OsmBaseStorage { +public class OsmIndexStorage extends OsmBaseStorage { protected static final String ELEM_OSMAND = "osmand"; protected static final String ELEM_INDEX = "index"; protected static final String ELEM_CITY = "city"; @@ -31,10 +31,14 @@ public class OSMIndexStorage extends OsmBaseStorage { protected Region region; - public OSMIndexStorage(Region region){ + public OsmIndexStorage(Region region){ this.region = region; } + public Region getRegion() { + return region; + } + protected City currentParsedCity = null; protected Street currentParsedStreet = null; @@ -72,7 +76,7 @@ public class OSMIndexStorage extends OsmBaseStorage { initRootElement(uri, localName, name, attributes); } else if(ELEM_INDEX.equals(name)){ } else if(ELEM_CITY.equals(name)){ - CityType t = CityType.valueOf(attributes.getValue(ATTR_CITYTYPE)); + CityType t = CityType.valueFromString(attributes.getValue(ATTR_CITYTYPE)); City c = new City(t); parseMapObject(c, attributes); region.registerCity(c); @@ -93,7 +97,8 @@ public class OSMIndexStorage extends OsmBaseStorage { a.setType(AmenityType.fromString(attributes.getValue(ATTR_TYPE))); a.setSubType(attributes.getValue(ATTR_SUBTYPE)); parseMapObject(a, attributes); - currentParsedStreet.registerBuilding(building); + region.registerAmenity(a); + } else { super.startElement(uri, localName, name, attributes); } diff --git a/DataExtractionOSM/src/com/osmand/osm/io/OsmStorageWriter.java b/DataExtractionOSM/src/com/osmand/osm/io/OsmStorageWriter.java index 30786ab6e3..3fbb80b746 100644 --- a/DataExtractionOSM/src/com/osmand/osm/io/OsmStorageWriter.java +++ b/DataExtractionOSM/src/com/osmand/osm/io/OsmStorageWriter.java @@ -47,14 +47,14 @@ import com.osmand.osm.Way; import com.sun.org.apache.xerces.internal.impl.PropertyManager; import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl; -public class OSMStorageWriter { +public class OsmStorageWriter { private final String INDENT = " "; private final String INDENT2 = INDENT + INDENT; private final String INDENT3 = INDENT + INDENT + INDENT; - public OSMStorageWriter(){ + public OsmStorageWriter(){ } diff --git a/OsmAnd/.classpath b/OsmAnd/.classpath index a212a99534..1406c7b416 100644 --- a/OsmAnd/.classpath +++ b/OsmAnd/.classpath @@ -1,7 +1,7 @@ - +