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 2015/11/04 20:58:49 UTC
svn commit: r1712624 -
/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/
Author: schor
Date: Wed Nov 4 19:58:47 2015
New Revision: 1712624
URL: http://svn.apache.org/viewvc?rev=1712624&view=rev
Log:
[UIMA-4666] update test JCas classes
Removed:
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/EndOfSentence_Type.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Sentence_Type.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Separator_Type.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/TokenType_Type.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Token_Type.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Word_Type.java
Modified:
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/EndOfSentence.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Sentence.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Separator.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Token.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/TokenType.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Word.java
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/EndOfSentence.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/EndOfSentence.java?rev=1712624&r1=1712623&r2=1712624&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/EndOfSentence.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/EndOfSentence.java Wed Nov 4 19:58:47 2015
@@ -1,57 +1,78 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package x.y.z;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.cas.TOP_Type;
-/* comment 6 of 14 */
-public class EndOfSentence extends TokenType {
+
+/* Apache UIMA v3 - First created by JCasGen Tue Nov 03 17:48:38 EST 2015 */
- public final static int typeIndexID = org.apache.uima.jcas.JCasRegistry.register(EndOfSentence.class);
+package x.y.z;
- public final static int type = typeIndexID;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
- public int getTypeIndexID() {
- return typeIndexID;
- }
- // Never called. Disable default constructor
- protected EndOfSentence() {
- }
- /* Internal - Constructor used by generator */
- public EndOfSentence(int addr, TOP_Type type) {
- super(addr, type);
+/**
+ * Updated by JCasGen Tue Nov 03 17:48:38 EST 2015
+ * XML source: C:/au/svnCheckouts/branches/uimaj/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/jcas/test/generatedx.xml
+ * @generated */
+public class EndOfSentence extends TokenType {
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int typeIndexID = JCasRegistry.register(EndOfSentence.class);
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int type = typeIndexID;
+ /** @generated
+ * @return index of the type
+ */
+ @Override
+ public int getTypeIndexID() {return typeIndexID;}
+
+
+ /* *****************
+ * Local Data *
+ * *****************/
+
+ /* Register Features */
+
+
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected EndOfSentence() {/* intentionally empty block */}
+
+ /** Internal - constructor used by generator
+ * @generated
+ * @param casImpl the CAS this Feature Structure belongs to
+ * @param type the type of this Feature Structure
+ */
+ public EndOfSentence(TypeImpl type, CASImpl casImpl) {
+ super(type, casImpl);
+ readObject();
}
-
+
+ /** @generated
+ * @param jcas JCas to which this Feature Structure belongs
+ */
public EndOfSentence(JCas jcas) {
super(jcas);
- }
+ readObject();
+ }
- /**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
+ /**
+ * <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ *
+ * @generated modifiable
*/
- private void readObject() {
- }
-
+ private void readObject() {/*default - does nothing empty block */}
+
}
+
+
\ No newline at end of file
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Sentence.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Sentence.java?rev=1712624&r1=1712623&r2=1712624&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Sentence.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Sentence.java Wed Nov 4 19:58:47 2015
@@ -1,65 +1,79 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package x.y.z;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-/* comment 1 of 14 */
-public class Sentence extends Annotation {
+
+/* Apache UIMA v3 - First created by JCasGen Tue Nov 03 17:48:38 EST 2015 */
- public final static int typeIndexID = org.apache.uima.jcas.JCasRegistry.register(Sentence.class);
+package x.y.z;
- public final static int type = typeIndexID;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
- public int getTypeIndexID() {
- return typeIndexID;
- }
+import org.apache.uima.jcas.tcas.Annotation;
- // Never called. Disable default constructor
- protected Sentence() {
- }
- /* Internal - Constructor used by generator */
- public Sentence(int addr, TOP_Type type) {
- super(addr, type);
+/**
+ * Updated by JCasGen Tue Nov 03 17:48:38 EST 2015
+ * XML source: C:/au/svnCheckouts/branches/uimaj/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/jcas/test/generatedx.xml
+ * @generated */
+public class Sentence extends Annotation {
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int typeIndexID = JCasRegistry.register(Sentence.class);
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int type = typeIndexID;
+ /** @generated
+ * @return index of the type
+ */
+ @Override
+ public int getTypeIndexID() {return typeIndexID;}
+
+
+ /* *****************
+ * Local Data *
+ * *****************/
+
+ /* Register Features */
+
+
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected Sentence() {/* intentionally empty block */}
+
+ /** Internal - constructor used by generator
+ * @generated
+ * @param casImpl the CAS this Feature Structure belongs to
+ * @param type the type of this Feature Structure
+ */
+ public Sentence(TypeImpl type, CASImpl casImpl) {
+ super(type, casImpl);
+ readObject();
}
-
+
+ /** @generated
+ * @param jcas JCas to which this Feature Structure belongs
+ */
public Sentence(JCas jcas) {
super(jcas);
- }
+ readObject();
+ }
- public Sentence(JCas jcas, int begin, int end) {
- super(jcas);
- setBegin(begin);
- setEnd(end);
- readObject();
- }
-
- /**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
+ /**
+ * <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ *
+ * @generated modifiable
*/
- private void readObject() {
- }
-
+ private void readObject() {/*default - does nothing empty block */}
+
}
+
+
\ No newline at end of file
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Separator.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Separator.java?rev=1712624&r1=1712623&r2=1712624&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Separator.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Separator.java Wed Nov 4 19:58:47 2015
@@ -1,57 +1,78 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package x.y.z;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.cas.TOP_Type;
-/* comment 5 of 14 */
-public class Separator extends TokenType {
+
+/* Apache UIMA v3 - First created by JCasGen Tue Nov 03 17:48:38 EST 2015 */
- public final static int typeIndexID = org.apache.uima.jcas.JCasRegistry.register(Separator.class);
+package x.y.z;
- public final static int type = typeIndexID;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
- public int getTypeIndexID() {
- return typeIndexID;
- }
- // Never called. Disable default constructor
- protected Separator() {
- }
- /* Internal - Constructor used by generator */
- public Separator(int addr, TOP_Type type) {
- super(addr, type);
+/**
+ * Updated by JCasGen Tue Nov 03 17:48:38 EST 2015
+ * XML source: C:/au/svnCheckouts/branches/uimaj/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/jcas/test/generatedx.xml
+ * @generated */
+public class Separator extends TokenType {
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int typeIndexID = JCasRegistry.register(Separator.class);
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int type = typeIndexID;
+ /** @generated
+ * @return index of the type
+ */
+ @Override
+ public int getTypeIndexID() {return typeIndexID;}
+
+
+ /* *****************
+ * Local Data *
+ * *****************/
+
+ /* Register Features */
+
+
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected Separator() {/* intentionally empty block */}
+
+ /** Internal - constructor used by generator
+ * @generated
+ * @param casImpl the CAS this Feature Structure belongs to
+ * @param type the type of this Feature Structure
+ */
+ public Separator(TypeImpl type, CASImpl casImpl) {
+ super(type, casImpl);
+ readObject();
}
-
+
+ /** @generated
+ * @param jcas JCas to which this Feature Structure belongs
+ */
public Separator(JCas jcas) {
super(jcas);
- }
+ readObject();
+ }
- /**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
+ /**
+ * <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ *
+ * @generated modifiable
*/
- private void readObject() {
- }
-
+ private void readObject() {/*default - does nothing empty block */}
+
}
+
+
\ No newline at end of file
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Token.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Token.java?rev=1712624&r1=1712623&r2=1712624&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Token.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Token.java Wed Nov 4 19:58:47 2015
@@ -1,170 +1,198 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
+
+
+
+/* Apache UIMA v3 - First created by JCasGen Tue Nov 03 17:48:38 EST 2015 */
package x.y.z;
-import org.apache.uima.jcas.JCas;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+
import org.apache.uima.jcas.cas.StringArray;
-import org.apache.uima.jcas.cas.TOP_Type;
import org.apache.uima.jcas.tcas.Annotation;
-/* comment 2 of 14 */
-public class Token extends Annotation {
-
- public final static int typeIndexID = org.apache.uima.jcas.JCasRegistry.register(Token.class);
+/**
+ * Updated by JCasGen Tue Nov 03 17:48:38 EST 2015
+ * XML source: C:/au/svnCheckouts/branches/uimaj/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/jcas/test/generatedx.xml
+ * @generated */
+public class Token extends Annotation {
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int typeIndexID = JCasRegistry.register(Token.class);
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
public final static int type = typeIndexID;
-
- public int getTypeIndexID() {
- return typeIndexID;
- }
-
- // Never called. Disable default constructor
- protected Token() {
- }
-
- /* Internal - Constructor used by generator */
- public Token(int addr, TOP_Type type) {
- super(addr, type);
+ /** @generated
+ * @return index of the type
+ */
+ @Override
+ public int getTypeIndexID() {return typeIndexID;}
+
+
+ /* *****************
+ * Local Data *
+ * *****************/
+
+ /* Register Features */
+ public final static int _FI_ttype = JCasRegistry.registerFeature(typeIndexID);
+ public final static int _FI_tokenFloatFeat = JCasRegistry.registerFeature(typeIndexID);
+ public final static int _FI_lemma = JCasRegistry.registerFeature(typeIndexID);
+ public final static int _FI_sentenceLength = JCasRegistry.registerFeature(typeIndexID);
+ public final static int _FI_lemmaList = JCasRegistry.registerFeature(typeIndexID);
+
+
+ private TokenType _F_ttype; //
+ private float _F_tokenFloatFeat; //
+ private String _F_lemma; //
+ private int _F_sentenceLength; //
+ private StringArray _F_lemmaList; //
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected Token() {/* intentionally empty block */}
+
+ /** Internal - constructor used by generator
+ * @generated
+ * @param casImpl the CAS this Feature Structure belongs to
+ * @param type the type of this Feature Structure
+ */
+ public Token(TypeImpl type, CASImpl casImpl) {
+ super(type, casImpl);
+ readObject();
}
-
+
+ /** @generated
+ * @param jcas JCas to which this Feature Structure belongs
+ */
public Token(JCas jcas) {
super(jcas);
- }
-
- public Token(JCas jcas, int begin, int end) {
- super(jcas);
- setBegin(begin);
- setEnd(end);
- readObject();
- }
+ readObject();
+ }
- /**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
+ /**
+ * <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ *
+ * @generated modifiable
+ */
+ private void readObject() {/*default - does nothing empty block */}
+
+
+
+ //*--------------*
+ //* Feature: ttype
+
+ /** getter for ttype - gets
+ * @generated
+ * @return value of the feature
+ */
+ public TokenType getTtype() { return _F_ttype;}
+
+ /** setter for ttype - sets
+ * @generated
+ * @param v value to set into the feature
*/
- private void readObject() {
- }
-
- // *------------------*
- // * Feature: ttype
- /* getter for ttype * */
- public TokenType getTtype() {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_ttype == null)
- this.jcasType.jcas.throwFeatMissing("ttype", "x.y.z.Token");
- return (TokenType) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
- ((Token_Type) jcasType).casFeatCode_ttype)));
- }
-
- /* setter for ttype * */
public void setTtype(TokenType v) {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_ttype == null)
- this.jcasType.jcas.throwFeatMissing("ttype", "x.y.z.Token");
- jcasType.ll_cas.ll_setRefValue(addr, ((Token_Type) jcasType).casFeatCode_ttype, jcasType.ll_cas
- .ll_getFSRef(v));
- }
-
- // *------------------*
- // * Feature: tokenFloatFeat
- /* getter for tokenFloatFeat * */
- public float getTokenFloatFeat() {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_tokenFloatFeat == null)
- this.jcasType.jcas.throwFeatMissing("tokenFloatFeat", "x.y.z.Token");
- return jcasType.ll_cas.ll_getFloatValue(addr,
- ((Token_Type) jcasType).casFeatCode_tokenFloatFeat);
- }
-
- /* setter for tokenFloatFeat * */
+
+ _casView.setWithJournalJFRI(this, _FI_ttype, () -> _F_ttype = v);
+ }
+
+
+ //*--------------*
+ //* Feature: tokenFloatFeat
+
+ /** getter for tokenFloatFeat - gets
+ * @generated
+ * @return value of the feature
+ */
+ public float getTokenFloatFeat() { return _F_tokenFloatFeat;}
+
+ /** setter for tokenFloatFeat - sets
+ * @generated
+ * @param v value to set into the feature
+ */
public void setTokenFloatFeat(float v) {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_tokenFloatFeat == null)
- this.jcasType.jcas.throwFeatMissing("tokenFloatFeat", "x.y.z.Token");
- jcasType.ll_cas.ll_setFloatValue(addr, ((Token_Type) jcasType).casFeatCode_tokenFloatFeat, v);
- }
-
- // *------------------*
- // * Feature: lemma
- /* getter for lemma * */
- public String getLemma() {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_lemma == null)
- this.jcasType.jcas.throwFeatMissing("lemma", "x.y.z.Token");
- return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type) jcasType).casFeatCode_lemma);
- }
-
- /* setter for lemma * */
+ _casView.setWithCheckAndJournalJFRI(this, _FI_tokenFloatFeat, () -> _F_tokenFloatFeat = v);
+ }
+
+
+ //*--------------*
+ //* Feature: lemma
+
+ /** getter for lemma - gets
+ * @generated
+ * @return value of the feature
+ */
+ public String getLemma() { return _F_lemma;}
+
+ /** setter for lemma - sets
+ * @generated
+ * @param v value to set into the feature
+ */
public void setLemma(String v) {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_lemma == null)
- this.jcasType.jcas.throwFeatMissing("lemma", "x.y.z.Token");
- jcasType.ll_cas.ll_setStringValue(addr, ((Token_Type) jcasType).casFeatCode_lemma, v);
- }
-
- // *------------------*
- // * Feature: sentenceLength
- /* getter for sentenceLength * */
- public int getSentenceLength() {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_sentenceLength == null)
- this.jcasType.jcas.throwFeatMissing("sentenceLength", "x.y.z.Token");
- return jcasType.ll_cas.ll_getIntValue(addr, ((Token_Type) jcasType).casFeatCode_sentenceLength);
- }
-
- /* setter for sentenceLength * */
+ _casView.setWithCheckAndJournalJFRI(this, _FI_lemma, () -> _F_lemma = v);
+ }
+
+
+ //*--------------*
+ //* Feature: sentenceLength
+
+ /** getter for sentenceLength - gets
+ * @generated
+ * @return value of the feature
+ */
+ public int getSentenceLength() { return _F_sentenceLength;}
+
+ /** setter for sentenceLength - sets
+ * @generated
+ * @param v value to set into the feature
+ */
public void setSentenceLength(int v) {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_sentenceLength == null)
- this.jcasType.jcas.throwFeatMissing("sentenceLength", "x.y.z.Token");
- jcasType.ll_cas.ll_setIntValue(addr, ((Token_Type) jcasType).casFeatCode_sentenceLength, v);
- }
-
- // *------------------*
- // * Feature: lemmaList
- /* getter for lemmaList * */
- public StringArray getLemmaList() {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_lemmaList == null)
- this.jcasType.jcas.throwFeatMissing("lemmaList", "x.y.z.Token");
- return (StringArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
- ((Token_Type) jcasType).casFeatCode_lemmaList)));
- }
-
- /** indexed getter for lemmaList * */
- public String getLemmaList(int i) {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_lemmaList == null)
- this.jcasType.jcas.throwFeatMissing("lemmaList", "x.y.z.Token");
- jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
- ((Token_Type) jcasType).casFeatCode_lemmaList), i);
- return jcasType.ll_cas.ll_getStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
- ((Token_Type) jcasType).casFeatCode_lemmaList), i);
- }
-
- /* setter for lemmaList * */
+ _casView.setWithCheckAndJournalJFRI(this, _FI_sentenceLength, () -> _F_sentenceLength = v);
+ }
+
+
+ //*--------------*
+ //* Feature: lemmaList
+
+ /** getter for lemmaList - gets
+ * @generated
+ * @return value of the feature
+ */
+ public StringArray getLemmaList() { return _F_lemmaList;}
+
+ /** setter for lemmaList - sets
+ * @generated
+ * @param v value to set into the feature
+ */
public void setLemmaList(StringArray v) {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_lemmaList == null)
- this.jcasType.jcas.throwFeatMissing("lemmaList", "x.y.z.Token");
- jcasType.ll_cas.ll_setRefValue(addr, ((Token_Type) jcasType).casFeatCode_lemmaList,
- jcasType.ll_cas.ll_getFSRef(v));
- }
+
+ _casView.setWithJournalJFRI(this, _FI_lemmaList, () -> _F_lemmaList = v);
+ }
+
+ /** indexed getter for lemmaList - gets an indexed value -
+ * @generated
+ * @param i index in the array to get
+ * @return value of the element at index i
+ */
+ public String getLemmaList(int i) {
+ return getLemmaList().get(i);}
- /** indexed setter for lemmaList * */
+ /** indexed setter for lemmaList - sets an indexed value -
+ * @generated
+ * @param i index in the array to set
+ * @param v value to set into the array
+ */
public void setLemmaList(int i, String v) {
- if (Token_Type.featOkTst && ((Token_Type) jcasType).casFeat_lemmaList == null)
- this.jcasType.jcas.throwFeatMissing("lemmaList", "x.y.z.Token");
- jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
- ((Token_Type) jcasType).casFeatCode_lemmaList), i);
- jcasType.ll_cas.ll_setStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
- ((Token_Type) jcasType).casFeatCode_lemmaList), i, v);
+ getLemmaList().set(i, v);}
}
-}
+
+
\ No newline at end of file
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/TokenType.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/TokenType.java?rev=1712624&r1=1712623&r2=1712624&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/TokenType.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/TokenType.java Wed Nov 4 19:58:47 2015
@@ -1,58 +1,79 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package x.y.z;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.cas.TOP;
-import org.apache.uima.jcas.cas.TOP_Type;
-/* comment 3 of 14 */
-public class TokenType extends TOP {
+
+/* Apache UIMA v3 - First created by JCasGen Tue Nov 03 17:48:38 EST 2015 */
- public final static int typeIndexID = org.apache.uima.jcas.JCasRegistry.register(TokenType.class);
+package x.y.z;
- public final static int type = typeIndexID;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
- public int getTypeIndexID() {
- return typeIndexID;
- }
+import org.apache.uima.jcas.cas.TOP;
- // Never called. Disable default constructor
- protected TokenType() {
- }
- /* Internal - Constructor used by generator */
- public TokenType(int addr, TOP_Type type) {
- super(addr, type);
+/**
+ * Updated by JCasGen Tue Nov 03 17:48:38 EST 2015
+ * XML source: C:/au/svnCheckouts/branches/uimaj/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/jcas/test/generatedx.xml
+ * @generated */
+public class TokenType extends TOP {
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int typeIndexID = JCasRegistry.register(TokenType.class);
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int type = typeIndexID;
+ /** @generated
+ * @return index of the type
+ */
+ @Override
+ public int getTypeIndexID() {return typeIndexID;}
+
+
+ /* *****************
+ * Local Data *
+ * *****************/
+
+ /* Register Features */
+
+
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected TokenType() {/* intentionally empty block */}
+
+ /** Internal - constructor used by generator
+ * @generated
+ * @param casImpl the CAS this Feature Structure belongs to
+ * @param type the type of this Feature Structure
+ */
+ public TokenType(TypeImpl type, CASImpl casImpl) {
+ super(type, casImpl);
+ readObject();
}
-
+
+ /** @generated
+ * @param jcas JCas to which this Feature Structure belongs
+ */
public TokenType(JCas jcas) {
super(jcas);
- }
+ readObject();
+ }
- /**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
+ /**
+ * <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ *
+ * @generated modifiable
*/
- private void readObject() {
- }
-
+ private void readObject() {/*default - does nothing empty block */}
+
}
+
+
\ No newline at end of file
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Word.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Word.java?rev=1712624&r1=1712623&r2=1712624&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Word.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/x/y/z/Word.java Wed Nov 4 19:58:47 2015
@@ -1,57 +1,78 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package x.y.z;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.cas.TOP_Type;
-/* comment 4 of 14 */
-public class Word extends TokenType {
+
+/* Apache UIMA v3 - First created by JCasGen Tue Nov 03 17:48:38 EST 2015 */
- public final static int typeIndexID = org.apache.uima.jcas.JCasRegistry.register(Word.class);
+package x.y.z;
- public final static int type = typeIndexID;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
- public int getTypeIndexID() {
- return typeIndexID;
- }
- // Never called. Disable default constructor
- protected Word() {
- }
- /* Internal - Constructor used by generator */
- public Word(int addr, TOP_Type type) {
- super(addr, type);
+/**
+ * Updated by JCasGen Tue Nov 03 17:48:38 EST 2015
+ * XML source: C:/au/svnCheckouts/branches/uimaj/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/jcas/test/generatedx.xml
+ * @generated */
+public class Word extends TokenType {
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int typeIndexID = JCasRegistry.register(Word.class);
+ /** @generated
+ * @ordered
+ */
+ @SuppressWarnings ("hiding")
+ public final static int type = typeIndexID;
+ /** @generated
+ * @return index of the type
+ */
+ @Override
+ public int getTypeIndexID() {return typeIndexID;}
+
+
+ /* *****************
+ * Local Data *
+ * *****************/
+
+ /* Register Features */
+
+
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected Word() {/* intentionally empty block */}
+
+ /** Internal - constructor used by generator
+ * @generated
+ * @param casImpl the CAS this Feature Structure belongs to
+ * @param type the type of this Feature Structure
+ */
+ public Word(TypeImpl type, CASImpl casImpl) {
+ super(type, casImpl);
+ readObject();
}
-
+
+ /** @generated
+ * @param jcas JCas to which this Feature Structure belongs
+ */
public Word(JCas jcas) {
super(jcas);
- }
+ readObject();
+ }
- /**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
+ /**
+ * <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ *
+ * @generated modifiable
*/
- private void readObject() {
- }
-
+ private void readObject() {/*default - does nothing empty block */}
+
}
+
+
\ No newline at end of file