[Schmitzm-commits] r1263 - in trunk: . src/schmitzm/geotools/feature

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Nov 11 21:30:38 CET 2010


Author: alfonx
Date: 2010-11-11 21:30:38 +0100 (Thu, 11 Nov 2010)
New Revision: 1263

Removed:
   trunk/dist/
Modified:
   trunk/src/schmitzm/geotools/feature/FeatureUtil.java
Log:


Modified: trunk/src/schmitzm/geotools/feature/FeatureUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/feature/FeatureUtil.java	2010-11-11 13:35:48 UTC (rev 1262)
+++ trunk/src/schmitzm/geotools/feature/FeatureUtil.java	2010-11-11 20:30:38 UTC (rev 1263)
@@ -2545,6 +2545,26 @@
 						.getLocalPart());
 			}
 		}
+		
+		// Checking for exact match, after all non ASCII characters have been
+		// transformed to � characters in both strings.
+		for (AttributeDescriptor d : attributeDescriptors) {
+			if (d.getName().getLocalPart().replaceAll("[^\\p{ASCII}]", "�")
+					.equals(localName.replaceAll("[^\\p{ASCII}]", "�"))) {
+				return new NameImpl(d.getName().getNamespaceURI(), d.getName()
+						.getLocalPart());
+			}
+		}
+		
+		// Checking for IGNORECASE match, after all non ASCII characters have been
+		// transformed to � characters in both strings.
+		for (AttributeDescriptor d : attributeDescriptors) {
+			if (d.getName().getLocalPart().replaceAll("[^\\p{ASCII}]", "�")
+					.equalsIgnoreCase(localName.replaceAll("[^\\p{ASCII}]", "�"))) {
+				return new NameImpl(d.getName().getNamespaceURI(), d.getName()
+						.getLocalPart());
+			}
+		}
 
 		// Checking for excact match with a CLEANED version of the localname
 		for (AttributeDescriptor d : attributeDescriptors) {



More information about the Schmitzm-commits mailing list