Revision 469

View differences:

branches/v02_desarrollo/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfFeatureMaker.java
2194 2194
	 * Quita los atributos repetidos.
2195 2195
	 */
2196 2196
	public void depureAttributes() {
2197
		String[] att = null;
2197
		//String[] att = null;
2198 2198
		/*Set conjunto = new HashSet();
2199 2199
		for (int i=0;i<attributes.size();i++) {
2200 2200
			att = (String[])attributes.get(i);
......
2211 2211
			}
2212 2212
		}*/
2213 2213
		
2214
		String[] lastAtt = new String[2];
2214 2215
		for (int i=0;i<attributes.size();i++) {
2215
			att = (String[])attributes.get(i);
2216
			String[] att = (String[])attributes.get(i);
2216 2217
			for (int j=i+1;j<attributes.size();j++) {
2218
				//System.out.println("depureAttributes(): j = " + j);
2217 2219
				String[] st = (String[])attributes.get(j);
2218 2220
				String st1 = att[0];
2219 2221
				String st2 = st[0];
......
2223 2225
					//System.out.println("depureAttributes(): Borra el st2");
2224 2226
					attributes.remove(j);
2225 2227
				}
2228
				if (i==attributes.size()-1) {
2229
					lastAtt = att;
2230
				}
2226 2231
			}
2227 2232
		}
2233
		for (int i=attributes.size()-2;i>=0;i--) {
2234
			String[] att = (String[])attributes.get(i);
2235
			String st1 = lastAtt[0];
2236
			String st2 = att[0];
2237
			if (st2.equals(st1)) {
2238
				attributes.remove(i);
2239
			}
2240
		}
2228 2241
		
2229 2242
		/*String[] attStrs = new String[attributes.size()];
2230 2243
		Vector attribs = new Vector();

Also available in: Unified diff