Hi all,

I wanted to continue on with some chat about the FunctionName interface.
Jody recently modified it to return a list of argument names. However as
Andrea noted in that thread it does not give any information about the types
of those arguments.

Well as it turns out for wfs 2.0/fes 2.0 the filter capabilities requires
information about argument type. I could just do something lame and stick in
xs:any or something like that but I figure it might be worth some
modifications to the interface.

Furthermore the spec requires that a function declare its return type as
well. So the idea would be to modify FunctionName as follows:

interface FunctionName {

  List<FunctionParameter> getArguments();

  FunctionParameter getReturn();
}

interface FunctionParameter {
  String getName();
  Class getType();
}

Now Andrea also brought up the issue of functions that take a variable
number of arguments. One possibly solution might be to add some sort of flag
like:

interface FunctionName {
  boolean hasVariableArguments();
}

Or perhaps follow VolatileFunction and come with an interface called
VariableArgumentFunction. Such functions would return an empty argument
list. Or depending on if all the arguments are the same type maybe a single
argument. Actually following this thought maybe a flag on FunctionParameter
makes more sense:

interface FunctionParameter {
  ...
  boolean isVariable();
}


Anyways thoughts?

-Justin


-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to