Newer
Older
osmCoverage / src / osm / jp / api / OsmnodeNd.java
@hayashi hayashi on 25 Sep 2017 975 bytes Caverage_fuel 完成
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package osm.jp.api;
  7.  
  8. import java.sql.Connection;
  9. import org.w3c.dom.NamedNodeMap;
  10. import org.w3c.dom.Node;
  11.  
  12. /**
  13. * OSM.xml の「Area(way)」ノード
  14. * 例)
  15. * <pre>{@code
  16. * <nd ref="1738352013"/>
  17. * <nd ref="1738351984"/>
  18. * <nd ref="1738352019"/>
  19. * <nd ref="1738352024"/>
  20. * }</pre>
  21. *
  22. * @author yuu
  23. */
  24. public class OsmnodeNd {
  25. Node ndnode = null;
  26. String ref = null;
  27. public OsmnodeNd(Node node) {
  28. this.ndnode = node;
  29. NamedNodeMap nodeMap2 = this.ndnode.getAttributes();
  30. for (int j=0; j < nodeMap2.getLength(); j++) {
  31. if (nodeMap2.item(j).getNodeName().equals("ref")) {
  32. ref = nodeMap2.item(j).getNodeValue();
  33. }
  34. }
  35. }
  36. public String getRef() {
  37. return ref;
  38. }
  39.  
  40. }