On Wed, May 13, 2009 at 5:29 PM, Cawley, Tim
<[email protected]> wrote:
> I find a common problem is that parameter names in a descriptor can be
> misspelt. While the problem settles down once the code and descriptors
> are stable, it still got me thinking about two things.
>
>        1. Could parameter names in a component descriptor be a
> reference to a "public static final String" in the implementing class.

For what it's worth, in ClearTK we've stopped using analysis engine
and CPE descriptors entirely because of the issues with keeping them
in sync. Replacing them with code means that we can now just refer to
our static final variables directly, and the compiler enforces that we
didn't misspell anything (and fixes references automatically when we
refactor).

>        2. Secondly do we need a way of setting acceptable values for a
> parameter?  If these acceptable values are accessible both in the
> descriptor and in the code, then it probably doesn't mater where they
> are defined (i.e. desc or code). If I had a list or enumeration of
> acceptable values available then my parameter validation starts getting
> neater to write or possibly even disappears totally . Obviously this
> could not be a mandatory thing, but there are situations where I see it
> being very useful.
>
> What do people think?

Personally, I think trying to fit extra name and type checking to
descriptors is a lost cause - at some point you'll basically end up
having to write the Java compiler for XML. ;-)

Steve
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy

Reply via email to