You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2017/10/31 20:55:31 UTC
svn commit: r1813930 - in
/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl:
CasSerializerSupport.java SelectFSs_impl.java
Author: schor
Date: Tue Oct 31 20:55:31 2017
New Revision: 1813930
URL: http://svn.apache.org/viewvc?rev=1813930&view=rev
Log:
[UIMA-5633] generics update
Modified:
uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java
uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java?rev=1813930&r1=1813929&r2=1813930&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java Tue Oct 31 20:55:31 2017
@@ -1084,8 +1084,8 @@ public class CasSerializerSupport {
* @param addr
* Address of an FSList
*/
- private void enqueueFSListElements(FSList node) throws SAXException {
- node.walkList( n -> enqueueFsAndMaybeFeatures(((NonEmptyFSList)n).getHead()), null);
+ private void enqueueFSListElements(FSList<TOP> node) throws SAXException {
+ node.walkList( n -> enqueueFsAndMaybeFeatures(((NonEmptyFSList<TOP>)n).getHead()), null);
}
/*
Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java?rev=1813930&r1=1813929&r2=1813930&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java Tue Oct 31 20:55:31 2017
@@ -90,7 +90,9 @@ import org.apache.uima.jcas.tcas.Annotat
* for 3 other boundings:
* - use subiterator, pass in strict and skipeq
*
- finish this javadoc comment edit
+ finish this javadoc comment edit
+ * extends FeatureStructure, not TOP, because of ref from FSIndex
+ * which uses FeatureStructure for backwards compatibility
*/
public class SelectFSs_impl <T extends FeatureStructure> implements SelectFSs<T> {
@@ -171,14 +173,14 @@ public class SelectFSs_impl <T extends F
* @param <N> type of returned Feature Structures
* @return -
*/
- public <N extends FeatureStructure> SelectFSs_impl<N> index(String indexName) {
+ public SelectFSs_impl<T> index(String indexName) {
this.index = view.indexRepository.getIndex(indexName);
- return (SelectFSs_impl<N>) this;
+ return this;
}
- public <N extends FeatureStructure> SelectFSs_impl<N> index(FSIndex<N> aIndex) {
+ public SelectFSs_impl<T> index(FSIndex<T> aIndex) {
this.index = (LowLevelIndex<T>) aIndex;
- return (SelectFSs_impl<N>) this;
+ return this;
}
/*
@@ -186,22 +188,22 @@ public class SelectFSs_impl <T extends F
* if not specified defaults to the index's uppermost type.
*/
- public <N extends FeatureStructure> SelectFSs_impl<N> type(Type uimaType) {
+ public <N extends T> SelectFSs_impl<N> type(Type uimaType) {
this.ti = (TypeImpl) uimaType;
return (SelectFSs_impl<N>) this;
}
- public <N extends FeatureStructure> SelectFSs_impl<N> type(String fullyQualifiedTypeName) {
+ public <N extends T> SelectFSs_impl<N> type(String fullyQualifiedTypeName) {
this.ti = view.getTypeSystemImpl().getType(fullyQualifiedTypeName);
return (SelectFSs_impl<N>) this;
}
- public <N extends FeatureStructure> SelectFSs_impl<N> type(int jcasClass_dot_type) {
+ public <N extends T> SelectFSs_impl<N> type(int jcasClass_dot_type) {
this.ti = (TypeImpl) view.getJCas().getCasType(jcasClass_dot_type);
return (SelectFSs_impl<N>) this;
}
- public <N extends FeatureStructure> SelectFSs_impl<N> type(Class<N> jcasClass_dot_class) {
+ public <N extends T> SelectFSs_impl<N> type(Class<N> jcasClass_dot_class) {
this.ti = (TypeImpl) view.getJCasImpl().getCasType(jcasClass_dot_class);
return (SelectFSs_impl<N>) this;
}