Revision 26245 trunk/libraries/libGeocoding/src/org/gvsig/normalization/operations/NormAlgorithm.java

View differences:

NormAlgorithm.java
66 66
	@SuppressWarnings("unused")
67 67
	private int row;
68 68

  
69
	private Element[] aad;
69
	private Element[] elements;
70 70

  
71 71
	@SuppressWarnings("unchecked")
72 72
	private ArrayList listeners = new ArrayList();
......
78 78
	 *            Normalization pattern
79 79
	 */
80 80
	public NormAlgorithm(Patternnormalization _pat) {
81
		pat = _pat;
82
		aad = pat.getArrayElements();
83
		numFields = aad.length;
81
		this.pat = _pat;
82
		this.elements = pat.getArrayElements();
83
		this.numFields = elements.length;
84 84
	}
85 85

  
86 86
	// METHODS
......
120 120
					return subStrings;
121 121
				} else {
122 122

  
123
					fw = aad[i].getFieldwidth();
123
					fw = elements[i].getFieldwidth();
124 124
					// Cut chain with fixed width
125 125
					if (fw > 0 && preChain.length() > fw) {
126 126
						subChain = preChain.substring(init, fw);
......
135 135
					// Cut chain with separators
136 136
					else {
137 137
						// Load specific separators
138
						List separators = loadSpecificSeparators(aad[i]);
139
						boolean join = withJoinSeparators(aad[i]);
138
						List separators = loadSpecificSeparators(elements[i]);
139
						boolean join = withJoinSeparators(elements[i]);
140 140
						// Search the first delimiter in the chain
141 141
						int posi = calculatePosition(separators, preChain);
142 142
						int tamSep = calculateSizeSep(separators, preChain);
......
306 306

  
307 307
		for (int i = 0; i < numFields; i++) {
308 308

  
309
			nft = aad[i].getFieldtype();
309
			nft = elements[i].getFieldtype();
310 310

  
311
			decsep = aad[i].getInfieldseparators().getDecimalseparator().trim();
311
			decsep = elements[i].getInfieldseparators().getDecimalseparator().trim();
312 312
			cdecsep = decsep.compareTo("") == 0 ? (char) 0x20 : decsep
313 313
					.charAt(0);
314
			thosep = aad[i].getInfieldseparators().getThousandseparator()
314
			thosep = elements[i].getInfieldseparators().getThousandseparator()
315 315
					.trim();
316 316
			cthosep = thosep.compareTo("") == 0 ? (char) 0x20 : thosep
317 317
					.charAt(0);
318 318

  
319
			txsep = aad[i].getInfieldseparators().getTextseparator().trim();
319
			txsep = elements[i].getInfieldseparators().getTextseparator().trim();
320 320

  
321 321
			if (txsep.compareToIgnoreCase("\"") == 0) {
322 322
				txsep = "\"";

Also available in: Unified diff