Revision 11435 trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/bindings/FolderBinding.java

View differences:

FolderBinding.java
53 53
 *
54 54
 * $Id$
55 55
 * $Log$
56
 * Revision 1.3  2007-04-20 08:38:59  jorpiell
56
 * Revision 1.4  2007-05-02 11:46:50  jorpiell
57
 * Writing tests updated
58
 *
59
 * Revision 1.3  2007/04/20 08:38:59  jorpiell
57 60
 * Tests updating
58 61
 *
59 62
 * Revision 1.2  2007/04/13 13:16:21  jorpiell
......
86 89
	 * An application layer
87 90
	 * @throws KmlBodyParseException
88 91
	 */
89
	public static Object parse(XmlPullParser parser,GPEKmlParser handler) throws KmlBodyParseException {
92
	public static Object parse(XmlPullParser parser,GPEKmlParser handler, Object parentLayer) throws KmlBodyParseException {
90 93
		boolean endFeature = false;
91 94
		int currentTag;			
92 95
		
93 96
		String id = AFeatureBinding.getID(parser, handler);
94
		Object layer = handler.getContentHandler().startLayer(id, null, null, null, null, null);
95
		
97
		Object layer = handler.getContentHandler().startLayer(id, null, null, null, parentLayer, null);
98
				
96 99
		try {
100
			parser.next();
97 101
			String tag = parser.getName();
98 102
			currentTag = parser.getEventType();
99 103
			
......
111 115
					}else if (tag.compareTo(KmlTags.PLACEMARK) == 0){
112 116
						Object feature = PlaceMarketBinding.parse(parser, handler);
113 117
						handler.getContentHandler().addFeatureToLayer(feature, layer);
118
					}else if (tag.compareTo(KmlTags.FOLDER) == 0){
119
						FolderBinding.parse(parser, handler, layer);
114 120
					}
115 121
					break;
116 122
				case KXmlParser.END_TAG:

Also available in: Unified diff