br.zuq.osm.parser.model.OSM Maven / Gradle / Ivy
package br.zuq.osm.parser.model;
import java.util.HashSet;
import java.util.Set;
/**
*
* @author Willy Tiengo
*/
public class OSM {
private Set nodes;
private Set ways;
private Set relations;
public OSM() {
nodes = new HashSet();
ways = new HashSet();
relations = new HashSet();
}
public OSM(Set nodes, Set ways,
Set relations) {
this.nodes = nodes;
this.ways = ways;
this.relations = relations;
}
public Set getNodes() {
return nodes;
}
public Set getRelations() {
return relations;
}
public Set getWays() {
return ways;
}
public Way getWay(String id) {
for (Way way : ways) {
if (way.id.equals(id)) {
return way;
}
}
return null;
}
}