package de.hft.stuttgart.citygml.green.osm.jaxb;

import java.util.ArrayList;
import java.util.List;

import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElements;

public class OsmMember {

	@XmlAttribute
	private String type;
	
	@XmlAttribute
	private String ref;
	
	@XmlAttribute
	private String role;
	
	@XmlElements(value = { @XmlElement(name = "nd", type = WayNode.class) })
	private List<WayNode> nodes;
	
	public List<WayNode> getNodes() {
		if (nodes == null) {
			nodes = new ArrayList<>();
		}
		return nodes;
	}
	
	public String getRef() {
		return ref;
	}
	
	public String getRole() {
		return role;
	}
	
	public String getType() {
		return type;
	}

}
