// Path: src/main/java/org/openstreetmap/osmaxil/Application.java
// @Component("OsmaxilApp")
// public class Application {
// 
// 	@Value("${osmaxil.flow}")
// 	public String flow;
// 	
// 	public static final String NAME = "Osmaxil";
// 
// 	private static ClassPathXmlApplicationContext applicationContext;
// 
// 	static private final Logger LOGGER = Logger.getLogger(Application.class);
// 
// 	static protected final Logger LOGGER_FOR_STATS = Logger.getLogger("LoggerForStats");
// 
// 	public static void main(String[] args) {
// 		applicationContext = new ClassPathXmlApplicationContext("spring.xml");
// 		Application app = (Application) applicationContext.getBean("OsmaxilApp");
// 		LOGGER.info("=== Starting Osmaxil ===");
// 		long startTime = System.currentTimeMillis();
// 		try {
// 			app.run();
// 		} catch (Exception e) {
// 			LOGGER.error(e);
// 		}
// 		LOGGER_FOR_STATS.info("Job has been executed in " + (System.currentTimeMillis() - startTime) / 1000 + " seconds");
// 		LOGGER.info("=== Osmaxil has finished its job ===");
// 		applicationContext.close();
// 	}
// 	
// 	public void run() throws Exception {
// 		__AbstractImportFlow<?, ?> flow = (__AbstractImportFlow<?, ?>) applicationContext.getBean(this.flow);
// 		flow.load();
// 		flow.process();
// 		flow.synchronize();
// 		flow.displayLoadingStatistics();
// 		flow.displayProcessingStatistics();
// 	}
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/dao/xml/osm/OsmXmlRoot.java
// @XmlRootElement(name = "osm")
// public class OsmXmlRoot {
// 
// 	@XmlAttribute
// 	public float version;
// 
// 	@XmlAttribute
// 	public String generator;
// 
// 	@XmlElement(name = "node")
// 	public List<OsmXmlNode> nodes = new ArrayList<>();;
// 
// 	@XmlElement(name = "way")
// 	public List<OsmXmlWay> ways = new ArrayList<>();;
// 
// 	@XmlElement(name = "relations")
// 	public List<OsmXmlRelation> relations = new ArrayList<>();
// 
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/dao/xml/osm/OsmXmlTag.java
// public class OsmXmlTag {
// 
// 	@XmlAttribute
// 	public String v;
// 
// 	@XmlAttribute
// 	public String k;
// 	
// 	public OsmXmlTag() {
// 	}
// 	
// 	public OsmXmlTag(String key, String value) {
// 		this.k = key;
// 		this.v = value;
// 	}
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/model/misc/MatchableObject.java
// public class MatchableObject {
// 
// 	protected float matchingScore;
// 
// 	public float getMatchingScore() {
// 		return matchingScore;
// 	}
// 
// 	public void setMatchingScore(float matchingScore) {
// 		this.matchingScore = matchingScore;
// 	}
// }


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.openstreetmap.osmaxil.Application;
import org.openstreetmap.osmaxil.dao.xml.osm.OsmXmlRoot;
import org.openstreetmap.osmaxil.dao.xml.osm.OsmXmlTag;
import org.openstreetmap.osmaxil.model.misc.MatchableObject;

package org.openstreetmap.osmaxil.model;



public abstract class AbstractElement extends MatchableObject {

	protected Long osmId;

	protected OsmXmlRoot apiData;

	private Long relationId;

	private boolean altered;

	private String geometryString;

	private List<AbstractImport> matchingImports;

	private Map<String, String> originalValuesByTagNames;

	private Integer computedHeight;

	static protected final Logger LOGGER = Logger.getLogger(Application.class);

	// =========================================================================
	// Abstract methods
	// =========================================================================

	abstract public ElementType getType();

	abstract public void updateChangeset(long changesetId);

	abstract public List<OsmXmlTag> getTags();

	abstract public void setTags(List<OsmXmlTag> tags);

	// =========================================================================
	// Public methods
	// =========================================================================

	public AbstractElement(long osmId) {
		this.osmId = osmId;
		this.altered = false;
		this.matchingImports = new ArrayList<AbstractImport>();
		this.originalValuesByTagNames = new HashMap<String, String>();
	}

	public List<AbstractImport> getMatchingImports() {
		return this.matchingImports;
	}

	public String getTagValue(String key) {

// Path: src/main/java/org/openstreetmap/osmaxil/Application.java
// @Component("OsmaxilApp")
// public class Application {
// 
// 	@Value("${osmaxil.flow}")
// 	public String flow;
// 	
// 	public static final String NAME = "Osmaxil";
// 
// 	private static ClassPathXmlApplicationContext applicationContext;
// 
// 	static private final Logger LOGGER = Logger.getLogger(Application.class);
// 
// 	static protected final Logger LOGGER_FOR_STATS = Logger.getLogger("LoggerForStats");
// 
// 	public static void main(String[] args) {
// 		applicationContext = new ClassPathXmlApplicationContext("spring.xml");
// 		Application app = (Application) applicationContext.getBean("OsmaxilApp");
// 		LOGGER.info("=== Starting Osmaxil ===");
// 		long startTime = System.currentTimeMillis();
// 		try {
// 			app.run();
// 		} catch (Exception e) {
// 			LOGGER.error(e);
// 		}
// 		LOGGER_FOR_STATS.info("Job has been executed in " + (System.currentTimeMillis() - startTime) / 1000 + " seconds");
// 		LOGGER.info("=== Osmaxil has finished its job ===");
// 		applicationContext.close();
// 	}
// 	
// 	public void run() throws Exception {
// 		__AbstractImportFlow<?, ?> flow = (__AbstractImportFlow<?, ?>) applicationContext.getBean(this.flow);
// 		flow.load();
// 		flow.process();
// 		flow.synchronize();
// 		flow.displayLoadingStatistics();
// 		flow.displayProcessingStatistics();
// 	}
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/dao/xml/osm/OsmXmlRoot.java
// @XmlRootElement(name = "osm")
// public class OsmXmlRoot {
// 
// 	@XmlAttribute
// 	public float version;
// 
// 	@XmlAttribute
// 	public String generator;
// 
// 	@XmlElement(name = "node")
// 	public List<OsmXmlNode> nodes = new ArrayList<>();;
// 
// 	@XmlElement(name = "way")
// 	public List<OsmXmlWay> ways = new ArrayList<>();;
// 
// 	@XmlElement(name = "relations")
// 	public List<OsmXmlRelation> relations = new ArrayList<>();
// 
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/dao/xml/osm/OsmXmlTag.java
// public class OsmXmlTag {
// 
// 	@XmlAttribute
// 	public String v;
// 
// 	@XmlAttribute
// 	public String k;
// 	
// 	public OsmXmlTag() {
// 	}
// 	
// 	public OsmXmlTag(String key, String value) {
// 		this.k = key;
// 		this.v = value;
// 	}
// }
// 
// Path: src/main/java/org/openstreetmap/osmaxil/model/misc/MatchableObject.java
// public class MatchableObject {
// 
// 	protected float matchingScore;
// 
// 	public float getMatchingScore() {
// 		return matchingScore;
// 	}
// 
// 	public void setMatchingScore(float matchingScore) {
// 		this.matchingScore = matchingScore;
// 	}
// }


// Path: src/main/java/org/openstreetmap/osmaxil/model/AbstractElement.java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.openstreetmap.osmaxil.Application;
import org.openstreetmap.osmaxil.dao.xml.osm.OsmXmlRoot;
import org.openstreetmap.osmaxil.dao.xml.osm.OsmXmlTag;
import org.openstreetmap.osmaxil.model.misc.MatchableObject;

package org.openstreetmap.osmaxil.model;



public abstract class AbstractElement extends MatchableObject {

	protected Long osmId;

	protected OsmXmlRoot apiData;

	private Long relationId;

	private boolean altered;

	private String geometryString;

	private List<AbstractImport> matchingImports;

	private Map<String, String> originalValuesByTagNames;

	private Integer computedHeight;

	static protected final Logger LOGGER = Logger.getLogger(Application.class);

	// =========================================================================
	// Abstract methods
	// =========================================================================

	abstract public ElementType getType();

	abstract public void updateChangeset(long changesetId);

	abstract public List<OsmXmlTag> getTags();

	abstract public void setTags(List<OsmXmlTag> tags);

	// =========================================================================
	// Public methods
	// =========================================================================

	public AbstractElement(long osmId) {
		this.osmId = osmId;
		this.altered = false;
		this.matchingImports = new ArrayList<AbstractImport>();
		this.originalValuesByTagNames = new HashMap<String, String>();
	}

	public List<AbstractImport> getMatchingImports() {
		return this.matchingImports;
	}

	public String getTagValue(String key) {

		List<OsmXmlTag> tags = this.getTags();
