You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2007/01/11 23:41:48 UTC

svn commit: r495415 - in /incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools: annot_view/FSNode.java annot_view/FSTreeModel.java annot_view/MainFrame.java jcasgen/Jg.java

Author: eae
Date: Thu Jan 11 14:41:47 2007
New Revision: 495415

URL: http://svn.apache.org/viewvc?view=rev&rev=495415
Log:
UIMA-115 First step on the path: eliminate TCASImpl

Modified:
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSNode.java
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSNode.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSNode.java?view=diff&rev=495415&r1=495414&r2=495415
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSNode.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSNode.java Thu Jan 11 14:41:47 2007
@@ -27,7 +27,7 @@
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FeatureImpl;
 import org.apache.uima.cas.impl.LowLevelCAS;
-import org.apache.uima.cas.impl.TCASImpl;
+import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.text.AnnotationFS;
 
 class FSNode extends FSTreeNode {
@@ -103,7 +103,7 @@
       return;
     }
     Type type = getType();
-    TCASImpl cas = this.fSTreeModel.getCas();
+    CASImpl cas = this.fSTreeModel.getCas();
     if (this.fSTreeModel.getCas().isArrayType(type)) {
       int arrayLength = cas.getArraySize((int) this.addr);
       if (arrayLength > 20) {
@@ -216,7 +216,7 @@
   }
 
   private String getValueString() {
-    TCASImpl cas = this.fSTreeModel.getCas();
+    CASImpl cas = this.fSTreeModel.getCas();
     switch (this.nodeClass) {
       case INT_FS:
       case BYTE_FS:
@@ -303,12 +303,12 @@
   }
 
   Type getType() {
-    TCASImpl cas = this.fSTreeModel.getCas();
+    CASImpl cas = this.fSTreeModel.getCas();
     return cas.getTypeSystemImpl().getType(cas.getHeapValue((int) this.addr));
   }
 
   boolean isAnnotation() {
-    TCASImpl cas = this.fSTreeModel.getCas();
+    CASImpl cas = this.fSTreeModel.getCas();
     if (this.nodeClass != STD_FS || this.addr == 0) {
       return false;
     }
@@ -321,7 +321,7 @@
   }
 
   int getStart() {
-    TCASImpl cas = this.fSTreeModel.getCas();
+    CASImpl cas = this.fSTreeModel.getCas();
     if (isAnnotation()) {
       final FeatureImpl feat1 = (FeatureImpl) cas.getBeginFeature();
       return cas.getHeapValue((int) this.addr + cas.getFeatureOffset(feat1.getCode()));
@@ -330,7 +330,7 @@
   }
 
   int getEnd() {
-    TCASImpl cas = this.fSTreeModel.getCas();
+    CASImpl cas = this.fSTreeModel.getCas();
     if (isAnnotation()) {
       final FeatureImpl feat1 = (FeatureImpl) cas.getEndFeature();
       return cas.getHeapValue((int) this.addr + cas.getFeatureOffset(feat1.getCode()));

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java?view=diff&rev=495415&r1=495414&r2=495415
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java Thu Jan 11 14:41:47 2007
@@ -33,7 +33,7 @@
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TCASImpl;
+import org.apache.uima.cas.impl.CASImpl;
 
 /**
  * Insert comment for enclosing_type here.
@@ -44,7 +44,7 @@
 
   private FSTreeNode root;
 
-  private TCASImpl cas;
+  private CASImpl cas;
 
   private ArrayList treeModelListeners = new ArrayList();
 
@@ -66,7 +66,7 @@
 
   public void update(String indexName, FSIndex index, CAS cas1) {
     // this.indexName = indexName;
-    this.cas = (TCASImpl) cas1;
+    this.cas = (CASImpl) cas1;
     final int size = index.size();
     this.rootString = "<html><font color=green>" + indexName + "</font> - <font color=blue>"
             + index.getType().getName() + "</font> [" + size + "]</html>";
@@ -218,9 +218,9 @@
   }
 
   /**
-   * @return TCASImpl
+   * @return CASImpl
    */
-  TCASImpl getCas() {
+  CASImpl getCas() {
     return this.cas;
   }
 

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java?view=diff&rev=495415&r1=495414&r2=495415
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java Thu Jan 11 14:41:47 2007
@@ -129,7 +129,6 @@
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.TypeSystem;
 import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.TCASImpl;
 import org.apache.uima.cas.impl.TypeSystem2Xml;
 import org.apache.uima.cas.impl.XCASDeserializer;
 import org.apache.uima.cas.impl.XCASSerializer;
@@ -478,7 +477,7 @@
       MainFrame.this.isAnnotIndex = label.equals(TCAS.STD_ANNOTATION_INDEX);
       MainFrame.this.index = MainFrame.this.cas.getIndexRepository().getIndex(label, type);
       updateFSTree(label, MainFrame.this.index);
-      MainFrame.this.allAnnotViewerItem.setEnabled(((TCASImpl) MainFrame.this.cas)
+      MainFrame.this.allAnnotViewerItem.setEnabled(((CASImpl) MainFrame.this.cas)
               .isAnnotationType(type));
       MainFrame.this.textArea.getCaret().setVisible(true);
     }

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java?view=diff&rev=495415&r1=495414&r2=495415
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java Thu Jan 11 14:41:47 2007
@@ -53,7 +53,6 @@
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.TypeSystem;
 import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.TCASImpl;
 import org.apache.uima.cas.text.TCAS;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.resource.ResourceManager;
@@ -130,7 +129,7 @@
       // never get here
     }
 
-    builtInTypeSystem = ((TCASImpl) tcas).getTypeSystemImpl();
+    builtInTypeSystem = ((CASImpl) tcas).getTypeSystemImpl();
     ((CASImpl) tcas).commitTypeSystem();
 
     for (Iterator it = builtInTypeSystem.getTypeIterator(); it.hasNext();) {