[Schmitzm-commits] r1168 - trunk/src/schmitzm/geotools/feature

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 26 03:31:15 CEST 2010


Author: alfonx
Date: 2010-10-26 03:31:14 +0200 (Tue, 26 Oct 2010)
New Revision: 1168

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-10-26 01:16:05 UTC (rev 1167)
+++ trunk/src/schmitzm/geotools/feature/FeatureUtil.java	2010-10-26 01:31:14 UTC (rev 1168)
@@ -2431,7 +2431,15 @@
 		if (attributeDescriptors.size() == 0) {
 			LOGGER.warn("The schmema has no attributes!");
 		}
+		
+		
+		
+		
 
+		
+		
+		
+
 		// Checking for exact match
 		for (AttributeDescriptor d : attributeDescriptors) {
 			if (d.getName().getLocalPart().equals(localName))
@@ -2520,33 +2528,31 @@
 		 * Für solche Fälle ersetzen wir alle � mit . in RegEx und versuchen
 		 * etwas zu finden
 		 */
-
-		// Checking for IGNORECASE match with a CLEANED version of the localname
 		for (AttributeDescriptor d : attributeDescriptors) {
-			//
-			// if (d.getLocalName().startsWith("DENSI")) {
-			// System.out.println(localName);
-			// }
-			String s1 = localName;
-			String s2 = s1.replaceAll("[^\\w]", "[\\w]");
-			String s3 = Pattern.quote(s2);
+			
+			String s2 = Pattern.quote(localName);
+			s2 = s2.substring(2,s2.length()-2);
+			String s3 = s2.replaceAll("[^\\w]", "[^\\w]");
 			Pattern compile = Pattern.compile(s3);
 			Matcher matcher = compile.matcher(d.getLocalName());
 
-			Log.info("New Matching Debug " + s1+" "+s2+" "+s3+" "+localName+" "
+			System.out.println("New Matching Debug " +" "+s2+" "+s3+" "+localName+" "
 					+ d.getLocalName());
-			System.out.println("New Matching Debug " + s1+" "+s2+" "+s3+" "+localName+" "
-					+ d.getLocalName());
 			
 			if (matcher.find()) {
 				Log.info("New Matching Debug " + localName + " zu "
 						+ d.getLocalName());
+				
+				System.out.println("New Matching Debug !!! " + localName + " zu "
+						+ d.getLocalName());
 
 				return new NameImpl(d.getName().getNamespaceURI(), d.getName()
 						.getLocalPart());
 			}
 		}
+		
 
+
 		return null;
 	}
 



More information about the Schmitzm-commits mailing list