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 (JIRA)" <ui...@incubator.apache.org> on 2006/12/26 20:29:22 UTC

[jira] Resolved: (UIMA-143) JCas and CAS interface and impl refactoring for more sharing

     [ http://issues.apache.org/jira/browse/UIMA-143?page=all ]

Marshall Schor resolved UIMA-143.
---------------------------------

    Resolution: Fixed
      Assignee: Adam Lally  (was: Marshall Schor)

Interfaces refactored.  JCas Impl forward to CASImpl in many cases.

Assigned to Adam to review - but Eddie / Thilo may also want to.  (All tests run)

> JCas and CAS interface and impl refactoring for more sharing
> ------------------------------------------------------------
>
>                 Key: UIMA-143
>                 URL: http://issues.apache.org/jira/browse/UIMA-143
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>    Affects Versions: 2.1
>            Reporter: Marshall Schor
>         Assigned To: Adam Lally
>            Priority: Minor
>
> Now that there is a JCas interface, look into some refactoring to share the interface definitions where possible.  This includes:
> Adding some methods to JCas to make it more like the CAS.  
> Cases where different types are returned can't be shared; e.g. one returns a CAS the other a JCas.
> Shared items put into new class BaseCas.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Resolved: (UIMA-143) JCas and CAS interface and impl refactoring for more sharing

Posted by Adam Lally <al...@alum.rpi.edu>.
On 12/27/06, Thilo Goetz <tw...@gmx.de> wrote:
> Changes look ok, but I'm wondering: we now have CAS, CommonCas,
> AbstractCas and AbstractCas_ImplBase, all in org.apache.uima.cas.  Why
> is AbstractCas_ImplBase in the interfaces package?  Can we please move
> it to the appropriate impl package?  Any chance we can consolidate
> AbstractCas and CommonCas?
>

AbstractCas is meant to be the superinterface of any CAS interface we
might ever have in UIMA - someday this might even be extensible by
users.  So we can't add the methods from CommonCas, which are specific
to our particular CAS and JCas interface.  The only methods on
AbstractCas are those that the framework absolutely requires any CAS
to implement.  Possibly, the type name constants might be moved to
AbstractCas, since those may be considered a core part of our CAS
data, independent of the actual interface... but even this is not so
clear to me.  If we move closer to adopting Ecore/XMI we may have an
interface that doesn't use the names like "uima.cas.Integer", but
instead uses standard Ecore names.  I think maybe we should leave
AbstractCas alone for now.

I'm OK with moving AbstractCas_ImplBase to the impl package.  Either
Marshall could do this while he's in there or I can do it later.

The only argument I can think of for why I put I didn't put it under
impl is that someday this might be extensible by users, and our other
ImplBase classes that our extensible by users are also in the
"interfaces" package.  (It's not really a package intended for only
interfaces, but a "public API" package.)  However, even if this does
become extensible the vast majority of users would not care, so I
think it would be fine to put it in the impl package.

-Adam

Re: [jira] Resolved: (UIMA-143) JCas and CAS interface and impl refactoring for more sharing

Posted by Marshall Schor <ms...@schor.com>.
Thilo Goetz wrote:
> Changes look ok, but I'm wondering: we now have CAS, CommonCas, 
> AbstractCas and AbstractCas_ImplBase, all in org.apache.uima.cas.  Why 
> is AbstractCas_ImplBase in the interfaces package?  Can we please move 
> it to the appropriate impl package?  Any chance we can consolidate 
> AbstractCas and CommonCas?
I was taking the refactoring a step at a time, and re-running tests 
along the way :-) 

The AbstractCas has common things for all CAS impls related to 
management of the CAS. 

The CommonCas is a factoring out of common things between 2 specific 
impls / interfaces to the CAS.

Another round of refactoring might now be reasonable to consider which 
of the methods/etc. in the CommonCas would be appropriate for all CAS 
impls (Plain CAS, JCas, and unspecified future CAS interfaces).

-Marshall

Re: [jira] Resolved: (UIMA-143) JCas and CAS interface and impl refactoring for more sharing

Posted by Thilo Goetz <tw...@gmx.de>.
Changes look ok, but I'm wondering: we now have CAS, CommonCas, 
AbstractCas and AbstractCas_ImplBase, all in org.apache.uima.cas.  Why 
is AbstractCas_ImplBase in the interfaces package?  Can we please move 
it to the appropriate impl package?  Any chance we can consolidate 
AbstractCas and CommonCas?

--Thilo