Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Obsolete Proposal for CAS and CAS View Interface Redesign

IMPORTANT: This proposal did not acheive a consensus among developers and will not be implemented. It is being left here only for informational purposes, so that we might refer to it in any future redesign.

This page lists the methods on each interface in the proposed redesign. For rationale and discussion see http://www.mail-archive.com/uima-dev@incubator.apache.org/msg00945.htmlImage Removed.

"D-" before a method name indicates that the method is deprecated.

...

  • CONSTANTS
  • D- addFsToIndexes(FS)
  • createFeaturePath()
  • createFeatureValuePath()
  • createFilteredIterator(FSIterator, FSMatchConstraint)
  • fs2listIterator(FSIterator)
  • getConstraintFactory()
  • D- getDocumentLanaguage()
  • D- getDocumentText()
  • D- getIndexRepository()
  • D- getSofaDataArray()
  • D- getSofaDataStream()
  • D- getSofaDataURI()
  • getSofaIterator()
  • D- getViewName()
  • D- removeFsFromIndexes(FS)
  • reset()
  • D- setDocumentLanguage(String)
  • D- setDocumentText(String)
  • D- setSofaDataArray(FeatureStrucutre, String)
  • D- setSofaDataString(String, String)
  • D- setSofaDataURI(String, String)
  • size()

Deleted

...

  • D- createSofa(SofaID, String) \ [deprecated since 2.0, and this proposal breaks compatibility for multi-sofa code anyway}

CommonCasView

  • addFsToIndexes(FS)
  • getDocumentLanaguage()
  • getDocumentText()
  • getIndexRepository()
  • getSofaDataArray()
  • getSofaDataStream()
  • getSofaDataURI()
  • getViewName()
  • removeFsFromIndexes(FS)
  • setDocumentLanguage(String)
  • setDocumentText(String)
  • setSofaDataArray(FeatureStrucutre, String)
  • setSofaDataString(String, String)
  • setSofaDataURI(String, String)

...

  • D- createAnnotation(Type, int, int)
  • createArrayFS(int)
  • createBooleanArrayFS(int)
  • createDoubleArrayFS(int)
  • createFloatArrayFS(int)
  • createFS(Type)
  • createIntArrayFS(int)
  • createLongArrayFS(int)
  • createStringArrayFS(int)
  • Wiki MarkupcreateView(String) \ [CHANGED - now returns type CasView]
  • D- getAnnotationIndex()
  • D- getAnnotationIndex(Type)
  • getAnnotationType()
  • getBeginFeature()
  • D- getDocumentAnnotation()
  • getEndFeature()
  • getJCas()
  • getLowLevelCAS()
  • D- getSofa()unmigrated-wiki-markup
  • getView(SofaFS) \ [CHANGED - now returns type CasView]unmigrated-wiki-markup
  • getView(String) \ [CHANGED - now returns type CasView]
  • setCurrentComponentInfo(ComponentInfo)
  • Wiki MarkupgetCurrentView() \ [NEW]
  • Wiki MarkupcreateAnnotation(Type, int, int, SofaFS) \ [NEW]

Deleted

...

  • getJCas(SofaFS) \ [can be replaced by getView(SofaFS).getJCas()]unmigrated-wiki-markup
  • D- getJCas(SofaID) \ [deprecated since 2.0] Wiki Markup
  • D- getSofa(SofaID) \ [deprecated since 2.0]
  • Wiki MarkupD- getTCAS() \ [deprecated since 2.0, replaced by getView()] Wiki Markup
  • D- getTCAS(SofaFS) \ [deprecated since 2.0, replaced by getView(String)]

CasView

(extends CommonCasView)

  • createAnnotation(Type, int, int)
  • getAnnotationIndex()
  • getAnnotationIndex(Type)
  • getDocumentAnnotation()
  • getSofa()unmigrated-wiki-markup
  • getCAS() \ [NEW - gets the CAS that contains this view)

Also we will add the following convenience methods that forward to the same method on CAS (this is still the subject of some debate)

...

  • checkArrayBounds(int ,int)
  • createView(String)
  • getCas()
  • getCasImpl()
  • getCasType(int)
  • Wiki MarkupD- getDocumentAnnotation() \ [deprecated since 1.4]
  • D- getDocumentAnnotationFs()
  • getFloatArray0L()
  • getFSArray0L()
  • D- getFSIndexRepository()
  • getIntegerArray0L()
  • getJfsFromCaddr(int)
  • D- getJFSIndexRepository()
  • getLowLevelCas()
  • getLowLevelIndexRepository()
  • getRequiredFeature(Type, String)
  • getRequiredFeatureDE(Type, String, String, boolean)
  • getRequiredType(String)
  • D- getSofa()
  • getStringArray0L()
  • getType(int)unmigrated-wiki-markup
  • D- getType(TOP) \ [was already deprecated - time to remove yet??]unmigrated-wiki-markup
  • getView(SofaFS) \ [CHANGED - now returns type JCasView] Wiki Markup
  • getView(String) \ [CHANGED - now returns type JCasView]unmigrated-wiki-markup
  • D- processInit() \ [was already deprecated - time to remove yet??]
  • putJfsFromCaddr(int, FeatureStructure)unmigrated-wiki-markup
  • getCurrentView() \ [NEW]

Deleted

  • Wiki MarkupgetJCas(Sofa) \ [replaced by getView(Sofa)]
  • Wiki MarkupD- getSofa(SofaID) \ [deprecated since 2.0]unmigrated-wiki-markup
  • getTypeSystem() \ [not necessary to define on JCas since it is already on CommonCas]

JCasView

(extends CommonCasView)

  • getDocumentAnnotationFs()
  • getJFSIndexRepository()
  • getSofa()unmigrated-wiki-markup
  • getJCas() \ [NEW - gets the JCas that contains this view)

LowLevelCAS

It's not clear exactly what to do with the Low Level CAS APIs. There don't appear to be Sofa data access APIs here, so I think we could just do only the following changes:

  • Deprecate ll_getIndexRepository()
  • Wiki MarkupAdd ll_getView(String) \ [return type LowLevelCasView]unmigrated-wiki-markup
  • Add ll_getCurrentView() \ [return type LowLevelCasView]
  • Change return type of ll_getSofaCasView(int) to LowLevelCasView
  • Define new interface LowLevelCasView with just one method: ll_getIndexRepository()

...