//Dstl (c) Crown Copyright 2017
/* First created by JCasGen Thu Oct 13 13:31:25 BST 2016 */
package uk.gov.dstl.baleen.types.structure;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.cas.TOP_Type;
/** A caption of a Figure.
* Updated by JCasGen Thu Dec 22 22:42:17 CET 2016
* XML source: /Users/chrisflatley/Projects/railroad/baleen/baleen/baleen-uima/src/main/resources/types/structure_type_system.xml
* @generated */
public class Caption extends Structure {
/** @generated
* @ordered
*/
@SuppressWarnings ("hiding")
public final static int typeIndexID = JCasRegistry.register(Caption.class);
/** @generated
* @ordered
*/
@SuppressWarnings ("hiding")
public final static int type = typeIndexID;
/** @generated
* @return index of the type
*/
@Override
public int getTypeIndexID() {return typeIndexID;}
/** Never called. Disable default constructor
* @generated */
protected Caption() {/* intentionally empty block */}
/** Internal - constructor used by generator
* @generated
* @param addr low level Feature Structure reference
* @param type the type of this Feature Structure
*/
public Caption(int addr, TOP_Type type) {
super(addr, type);
readObject();
}
/** @generated
* @param jcas JCas to which this Feature Structure belongs
*/
public Caption(JCas jcas) {
super(jcas);
readObject();
}
/** @generated
* @param jcas JCas to which this Feature Structure belongs
* @param begin offset to the begin spot in the SofA
* @param end offset to the end spot in the SofA
*/
public Caption(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
*/
private void readObject() {/*default - does nothing empty block */}
//*--------------*
//* Feature: figure
/** getter for figure - gets The figure this caption refers to.
* @generated
* @return value of the feature
*/
public Figure getFigure() {
if (Caption_Type.featOkTst && ((Caption_Type)jcasType).casFeat_figure == null)
jcasType.jcas.throwFeatMissing("figure", "uk.gov.dstl.baleen.types.structure.Caption");
return (Figure)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Caption_Type)jcasType).casFeatCode_figure)));}
/** setter for figure - sets The figure this caption refers to.
* @generated
* @param v value to set into the feature
*/
public void setFigure(Figure v) {
if (Caption_Type.featOkTst && ((Caption_Type)jcasType).casFeat_figure == null)
jcasType.jcas.throwFeatMissing("figure", "uk.gov.dstl.baleen.types.structure.Caption");
jcasType.ll_cas.ll_setRefValue(addr, ((Caption_Type)jcasType).casFeatCode_figure, jcasType.ll_cas.ll_getFSRef(v));}
}