You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by tw...@apache.org on 2007/05/22 16:44:01 UTC
svn commit: r540600 - in
/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl:
CASImpl.java TypeSystemImpl.java XCASSerializer.java XmiCasSerializer.java
Author: twgoetz
Date: Tue May 22 07:44:00 2007
New Revision: 540600
URL: http://svn.apache.org/viewvc?view=rev&rev=540600
Log:
Jira UIMA-408: CASImpl API clean-up.
https://issues.apache.org/jira/browse/UIMA-408
Modified:
incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CASImpl.java
incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java
incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XCASSerializer.java
incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CASImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CASImpl.java?view=diff&rev=540600&r1=540599&r2=540600
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CASImpl.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CASImpl.java Tue May 22 07:44:00 2007
@@ -1696,7 +1696,7 @@
return Double.toString(this.getDoubleValue(addr, feat));
} else {
CASRuntimeException e = new CASRuntimeException(CASRuntimeException.INAPPROP_RANGE,
- new String[] { ts.ll_getFeatureForCode(feat).getName(), ts.getTypeName(typeCode) });
+ new String[] { ts.ll_getFeatureForCode(feat).getName(), ts.ll_getTypeForCode(typeCode).getName() });
throw e;
}
@@ -1723,7 +1723,7 @@
this.setFeatureValue(fsref, feat, Double.parseDouble(value));
} else {
CASRuntimeException e = new CASRuntimeException(CASRuntimeException.INAPPROP_TYPE,
- new String[] { ts.ll_getFeatureForCode(feat).getName(), ts.getTypeName(typeCode) });
+ new String[] { ts.ll_getFeatureForCode(feat).getName(), ts.ll_getTypeForCode(typeCode).getName() });
throw e;
}
}
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java?view=diff&rev=540600&r1=540599&r2=540600
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java Tue May 22 07:44:00 2007
@@ -495,21 +495,6 @@
}
/**
- * Get a type object for a given code.
- *
- * @param typeCode
- * The code of the type.
- * @return A type object, or <code>null</code> if no such type exists.
- */
-// public Type getType(int typeCode) {
-// return (Type) this.types.get(typeCode);
-// }
-
- public String getTypeName(int typeCode) {
- return this.typeNameST.getSymbol(typeCode);
- }
-
- /**
* Get a type object for a given name.
*
* @param typeName
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XCASSerializer.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XCASSerializer.java?view=diff&rev=540600&r1=540599&r2=540600
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XCASSerializer.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XCASSerializer.java Tue May 22 07:44:00 2007
@@ -715,7 +715,7 @@
}
private final String getTypeName(int addr) {
- return ts.getTypeName(cas.getHeapValue(addr));
+ return ts.ll_getTypeForCode(cas.getHeapValue(addr)).getName();
}
private final int classifyType(int type) {
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java?view=diff&rev=540600&r1=540599&r2=540600
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java Tue May 22 07:44:00 2007
@@ -382,7 +382,7 @@
return;
}
if (isFiltering) {
- String typeName = cas.getTypeSystemImpl().getTypeName(cas.getHeapValue(addr));
+ String typeName = cas.getTypeSystemImpl().ll_getTypeForCode(cas.getHeapValue(addr)).getName();
if (filterTypeSystem.getType(typeName) == null) {
return; // this type is not in the target type system
}
@@ -403,7 +403,7 @@
}
int typeCode = cas.getHeapValue(addr);
if (isFiltering) {
- String typeName = cas.getTypeSystemImpl().getTypeName(typeCode);
+ String typeName = cas.getTypeSystemImpl().ll_getTypeForCode(typeCode).getName();
if (filterTypeSystem.getType(typeName) == null) {
return; // this type is not in the target type system
}
@@ -636,7 +636,7 @@
}
if (isFiltering) // return as null any references to types not in target TS
{
- String typeName = cas.getTypeSystemImpl().getTypeName(cas.getHeapValue(addr));
+ String typeName = cas.getTypeSystemImpl().ll_getTypeForCode(cas.getHeapValue(addr)).getName();
if (filterTypeSystem.getType(typeName) == null) {
return null;
}