[Schmitzm-commits] r568 - in branches/1.0-gt2-2.6/src/schmitzm: geotools/feature swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 24 17:31:03 CET 2009


Author: alfonx
Date: 2009-11-24 17:31:02 +0100 (Tue, 24 Nov 2009)
New Revision: 568

Added:
   branches/1.0-gt2-2.6/src/schmitzm/swing/ParserOperatorsHints.java
Modified:
   branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/CQLFilterParser.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureOperationTreeParser.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FilterParser.java
Log:
* New ParserOperatorsHints

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/CQLFilterParser.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/CQLFilterParser.java	2009-11-24 15:56:20 UTC (rev 567)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/CQLFilterParser.java	2009-11-24 16:31:02 UTC (rev 568)
@@ -30,6 +30,8 @@
 
 package schmitzm.geotools.feature;
 
+import java.util.Vector;
+
 import org.apache.log4j.Logger;
 import org.geotools.filter.text.cql2.CQL;
 import org.geotools.filter.text.cql2.CQLException;
@@ -78,4 +80,27 @@
     }
   }
 
+	@Override
+	public String getOperatorDescription(String operator) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public int getOperatorParameterCount(String operator) {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	@Override
+	public String getOperatorTitle(String operator) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public Vector<String> getOperators() {
+		return null;
+	}
+
 }

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureOperationTreeParser.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureOperationTreeParser.java	2009-11-24 15:56:20 UTC (rev 567)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureOperationTreeParser.java	2009-11-24 16:31:02 UTC (rev 568)
@@ -29,6 +29,8 @@
  ******************************************************************************/
 package schmitzm.geotools.feature;
 
+import java.util.Vector;
+
 import org.opengis.filter.Filter;
 
 import schmitzm.lang.tree.BinaryTreeNode;
@@ -99,5 +101,29 @@
     return new FeatureOperationTreeFilter(rule);
   }
 
+ at Override
+public String getOperatorDescription(String operator) {
+	// TODO Auto-generated method stub
+	return null;
 }
 
+ at Override
+public int getOperatorParameterCount(String operator) {
+	// TODO Auto-generated method stub
+	return 0;
+}
+
+ at Override
+public String getOperatorTitle(String operator) {
+	// TODO Auto-generated method stub
+	return null;
+}
+
+ at Override
+public Vector<String> getOperators() {
+	// TODO Auto-generated method stub
+	return null;
+}
+
+}
+

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FilterParser.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FilterParser.java	2009-11-24 15:56:20 UTC (rev 567)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FilterParser.java	2009-11-24 16:31:02 UTC (rev 568)
@@ -30,14 +30,18 @@
 
 package schmitzm.geotools.feature;
 
+import java.util.Vector;
+
 import org.opengis.filter.Filter;
 
+import schmitzm.swing.ParserOperatorsHints;
+
 /**
  * This interface defines a parser which creates a {@link Filter}
  * from a rule string.
  * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a>
  */
-public interface FilterParser {
+public interface FilterParser extends ParserOperatorsHints {
   /**
    * Creates a {@link Filter} by parsing a rule string. Should return Filter.EXCLUDE if the given ruleString is empty or null.
    * @param rule rule string

Added: branches/1.0-gt2-2.6/src/schmitzm/swing/ParserOperatorsHints.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/swing/ParserOperatorsHints.java	2009-11-24 15:56:20 UTC (rev 567)
+++ branches/1.0-gt2-2.6/src/schmitzm/swing/ParserOperatorsHints.java	2009-11-24 16:31:02 UTC (rev 568)
@@ -0,0 +1,29 @@
+package schmitzm.swing;
+
+import java.util.Vector;
+
+public interface ParserOperatorsHints {
+
+	/**
+	 * Returns a list of operators. The string must be valid operators for the
+	 * language.
+	 */
+    public Vector<String> getOperators();
+  
+	/**
+	 * Returns a String that describes how an operator will appear in the
+	 * ComboBox/GUI
+	 */
+    public String getOperatorTitle(String operator);
+    
+	/**
+	 * Returns a String that describes how an operator will do. Used for tooltips.
+	 */
+    public String getOperatorDescription(String operator);
+
+	/**
+	 * Returns the number of parameters an operator expects in his
+	 * bracket-encapsulated parameters.	 
+	 */
+    public int getOperatorParameterCount(String operator);
+}


Property changes on: branches/1.0-gt2-2.6/src/schmitzm/swing/ParserOperatorsHints.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id URL
Name: svn:eol-style
   + native



More information about the Schmitzm-commits mailing list