You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2007/01/05 20:41:56 UTC
Single JCas source class change
After thinking harder about this - I'm concluding that users will need
to run a migration tool in any case to convert old JCas source classes
to the Apache form, and that tool can just as well do a conversion of
the previous 2 source class format to the new single source format.
Anyone see any issues with this approach?
-Marshall
Re: Single JCas source class change
Posted by Marshall Schor <ms...@schor.com>.
Adam Lally wrote:
> On 1/5/07, Marshall Schor <ms...@schor.com> wrote:
>> Adam Lally wrote:
>> > Another thought... can we continue to support the existing source
>> > classes with their separate _Type source files, while changing JCasGen
>> > to generate only one source file from now on?
>>
>> Yes, but why? If the user has to convert, and the conversion does the
>> merge, then we have just one file.
>> The code is a little bit simpler if it doesn't have to support both
>> ways.
>>
>
> Just wondering if that would be a simpler way to go, but it may not be...
>
> How complex do you think the conversion will be?
I'm not too sure which conversion you're talking about. If this is the
conversion of older
JCas-generated classes - then there's a 2-stage conversion possible:
1) using your migration routine to rename things
2) using a code fragment I'm working on right now to imbed the XXX_Type
file contents as
an inner class in the the XXX class file. That's not too hard.
The change in JCasImpl is pretty small/easy.
The main difficulty I see is that the superclass name of the _Type files
also need to change,
but that's also a pretty mechanical change.
It would be difficult to support both kinds of superclass names for
_Type files. For instance,
if someone had a class Foo, with supertype Bar, then the inner class
Foo_Type is written
as extending Bar_Type. The import needed to make this work changes,
depending on
whether or not Bar is in the new or old format. If we allow both
formats, this is not
decidable, I think, so there isn't a solution that always works. If we
convert to the new format,
we can just use the new way of naming the _Type reference.
(I hope this is clear enough :-)...
My sense is that we may not get enough improvement (esthetic,
simplification, etc.) out of this to justify doing it, if we
try and keep the additional complexities of supporting the old way
alongside the new one.
-Marshall
Re: Single JCas source class change
Posted by Adam Lally <al...@alum.rpi.edu>.
On 1/5/07, Marshall Schor <ms...@schor.com> wrote:
> Adam Lally wrote:
> > Another thought... can we continue to support the existing source
> > classes with their separate _Type source files, while changing JCasGen
> > to generate only one source file from now on?
>
> Yes, but why? If the user has to convert, and the conversion does the
> merge, then we have just one file.
> The code is a little bit simpler if it doesn't have to support both ways.
>
Just wondering if that would be a simpler way to go, but it may not be...
How complex do you think the conversion will be?
-Adam
Re: Single JCas source class change
Posted by Marshall Schor <ms...@schor.com>.
Adam Lally wrote:
>> On 1/5/07, Marshall Schor <ms...@schor.com> wrote:
>> > After thinking harder about this - I'm concluding that users will need
>> > to run a migration tool in any case to convert old JCas source classes
>> > to the Apache form, and that tool can just as well do a conversion of
>> > the previous 2 source class format to the new single source format.
>> >
>> > Anyone see any issues with this approach?
>> >
>>
>
> Another thought... can we continue to support the existing source
> classes with their separate _Type source files, while changing JCasGen
> to generate only one source file from now on?
Yes, but why? If the user has to convert, and the conversion does the
merge, then we have just one file.
The code is a little bit simpler if it doesn't have to support both ways.
-Marshall
Re: Single JCas source class change
Posted by Adam Lally <al...@alum.rpi.edu>.
> On 1/5/07, Marshall Schor <ms...@schor.com> wrote:
> > After thinking harder about this - I'm concluding that users will need
> > to run a migration tool in any case to convert old JCas source classes
> > to the Apache form, and that tool can just as well do a conversion of
> > the previous 2 source class format to the new single source format.
> >
> > Anyone see any issues with this approach?
> >
>
Another thought... can we continue to support the existing source
classes with their separate _Type source files, while changing JCasGen
to generate only one source file from now on?
-Adam
Re: Single JCas source class change
Posted by Adam Lally <al...@alum.rpi.edu>.
On 1/5/07, Marshall Schor <ms...@schor.com> wrote:
> After thinking harder about this - I'm concluding that users will need
> to run a migration tool in any case to convert old JCas source classes
> to the Apache form, and that tool can just as well do a conversion of
> the previous 2 source class format to the new single source format.
>
> Anyone see any issues with this approach?
>
That should be fine as long as the changes are easy enough to do with
regex replacement.
-Adam