fix compilation errors

git-svn-id: https://osmand.googlecode.com/svn/trunk@64 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-05-17 14:38:56 +00:00
parent 1f256f2bfd
commit 8292016d10
3 changed files with 12 additions and 7 deletions

View file

@ -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);
}

View file

@ -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(){
}

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry excluding="**/MapPanel*|com/osmand/LogUtil.java|com/osmand/osm/io/OSMStorageWriter.java|com/osmand/DataExtraction.java|com/osmand/swing/|com/osmand/data/preparation/DataExtraction.java|com/osmand/data/preparation/DataIndexBuilder.java" kind="src" path="use"/>
<classpathentry excluding="**/MapPanel*|com/osmand/LogUtil.java|com/osmand/osm/io/OSMStorageWriter.java|com/osmand/DataExtraction.java|com/osmand/swing/|com/osmand/data/preparation/DataExtraction.java|com/osmand/data/preparation/DataIndexBuilder.java|com/osmand/osm/io/OsmStorageWriter.java" kind="src" path="use"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="lib" path="lib/bzip2-20090327.jar"/>