Adam Lally wrote:
On 12/13/06, Thilo Goetz <[EMAIL PROTECTED]> wrote:
I couldn't agree more (except for the default bag indexes). It makes no
sense at all that global indexes must be accessed via a particular view.
I can't tell what exactly you're agreeing to. Are you thinking that
anything indexed in a view would also be by definition indexed in the
"global" view? Do we need different index definitions for the global
view (so we don't have a global index over annotations sorted by
begin, end but containing annotations from multiple Sofas)?
I was agreeing to your statement that non-sofa (i.e., non-annotation)
indexes make sense in a global view.
I would think that annotations for different sofas would be in different
indexes. Not sure what we currently do though. All those indexes might
be accessible from the global view.
In that case, a view could be seen as just a set of indexes, with
possibly just two methods: getIndexes() (and variations) and
addToIndexes(FS). The base CAS would be a view on everything. A view
might be what we now call index repository. In fact, if we just rename
the index repository to "view", we're done ;-). Just a little
implementation to make more than one index repository possible.
We haven't addressed Sofas yet.
The base CAS does not have a single subject of anlaysis, so methods
like getDocumentText() and its relatives are a problem. These methods
should belong to a view. (According to the spec, not all views
necessarily have a Sofa, but it is a common use case supported by the
particular kind of view called an Anchored View.)
Sure, those would be on the view as well. Would we then have
text-specific views, like TCasView? I'm not proposing this, mind you,
just asking.
So no CAS cas = inCas.getView()?
Certainly, I never liked that idea but are we back to essentially
requiring:
CasView viewOfMySofa = inCas.getView() ?
+1 to that.
Since inCas.getDocumentText() would not work, and inCas cannot be used
to iterate over or index annotations belonging to a particular Sofa.
inCas.getDocumentText() would not work, +1 to that. However, I was
thinking that you would be able to access *all* indexes (and their
contents of course) from the CAS, not just the sofa-neutral ones.
Perhaps you wouldn't know how to interpret the sofa information, but the
annotations would still be accessible. I think this is consistent with
your idea/proposal that the CAS is the container of all data. Was this
also what you were thinking?
--Thilo