}
/**
+ * <ksj:BusStop gml:id="ED01_1">
+ * <ksj:position xlink:href="#n1"/>
+ * <ksj:busStopName>城堀</ksj:busStopName>
+ * <ksj:busRouteInformation>
+ * <ksj:BusRouteInformation>
+ * <ksj:busType>1</ksj:busType>
+ * <ksj:busOperationCompany>箱根登山バス</ksj:busOperationCompany>
+ * <ksj:busLineName>小01</ksj:busLineName>
+ * </ksj:BusRouteInformation>
+ * </ksj:busRouteInformation>
+ * <ksj:busRouteInformation>
+ * <ksj:BusRouteInformation>
+ * <ksj:busType>1</ksj:busType>
+ * <ksj:busOperationCompany>箱根登山バス</ksj:busOperationCompany>
+ * <ksj:busLineName>湯07</ksj:busLineName>
+ * </ksj:BusRouteInformation>
+ * </ksj:busRouteInformation>
+ * <ksj:busRouteInformation>
+ * <ksj:BusRouteInformation>
+ * <ksj:busType>1</ksj:busType>
+ * <ksj:busOperationCompany>箱根登山バス</ksj:busOperationCompany>
+ * <ksj:busLineName>湯11</ksj:busLineName>
+ * </ksj:BusRouteInformation>
+ * </ksj:busRouteInformation>
+ * </ksj:BusStop>
*
* @param con
* @param node
rset6.close();
code++;
- System.out.println("code="+code);
+ System.out.println("course="+ code +" : "+ rtn[0] +" : "+ rtn[1] +" : "+ rtn[2] );
ps4.setInt(1, code);
ps4.setInt(2, Integer.parseInt(rtn[0]));
ps4.setString(3, rtn[2]);
return rtn;
}
+ /**
+ *
+ * <ksj:busRouteInformation>
+ * <ksj:BusRouteInformation>
+ * <ksj:busType>1</ksj:busType>
+ * <ksj:busOperationCompany>箱根登山バス</ksj:busOperationCompany>
+ * <ksj:busLineName>小01</ksj:busLineName>
+ * </ksj:BusRouteInformation>
+ * </ksj:busRouteInformation>
+ *
+ * @param briNode
+ * @return
+ */
public static String[] anaCommJGD(Node briNode) {
String[] rtn = new String[3];
- rtn[0] = ""; // corp type
- rtn[1] = ""; // course name
- rtn[2] = ""; // corp name
+ int vcnt = 0;
- NodeList nodes = briNode.getChildNodes();
- for (int i=0; i < nodes.getLength(); i++) {
- Node node2 = nodes.item(i);
+ NodeList nodes2 = briNode.getChildNodes();
+ for (int i=0; i < nodes2.getLength(); i++) {
+ Node node2 = nodes2.item(i);
if (node2.getNodeName().equals("ksj:BusRouteInformation")) {
NodeList nodes3 = node2.getChildNodes();
for (int j=0; j < nodes3.getLength(); j++) {
- Node node = nodes3.item(j);
- if (node.getNodeName().equals("ksj:busType")) {
- rtn[0] = node.getTextContent();
+ Node node3 = nodes3.item(j);
+ if (node3.getNodeName().equals("ksj:busType")) {
+ rtn[0] = new String(node3.getTextContent());
+ vcnt++;
}
- else if (node2.getNodeName().equals("ksj:busLineName")) {
- rtn[1] = node.getTextContent();
+ else if (node3.getNodeName().equals("ksj:busLineName")) {
+ rtn[1] = new String(node3.getTextContent());
+ vcnt++;
}
- else if (node.getNodeName().equals("ksj:busOperationCompany")) {
- rtn[2] = node.getTextContent();
+ else if (node3.getNodeName().equals("ksj:busOperationCompany")) {
+ rtn[2] = new String(node3.getTextContent());
+ vcnt++;
}
}
}
}
- return rtn;
+ if (vcnt > 0) {
+ return rtn;
+ }
+ return null;
}
public static void showGmPoint(Connection con, Node node) throws IOException, SQLException {