本文整理汇总了Java中org.apache.uima.cas.impl.FeatureImpl类的典型用法代码示例。如果您正苦于以下问题:Java FeatureImpl类的具体用法?Java FeatureImpl怎么用?Java FeatureImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FeatureImpl类属于org.apache.uima.cas.impl包,在下文中一共展示了FeatureImpl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: forceSetFeatureValue
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
private static void forceSetFeatureValue(FeatureStructure aFS, String aFeatureName,
String aValue)
{
CASImpl casImpl = (CASImpl) aFS.getCAS().getLowLevelCAS();
TypeSystemImpl ts = (TypeSystemImpl) aFS.getCAS().getTypeSystem();
Feature feat = aFS.getType().getFeatureByBaseName(aFeatureName);
int featCode = ((FeatureImpl) feat).getCode();
int thisType = ((TypeImpl) aFS.getType()).getCode();
if (!ts.isApprop(thisType, featCode)) {
throw new IllegalArgumentException("Feature structure does not have that feature");
}
if (!ts.subsumes(ts.getType(CAS.TYPE_NAME_STRING), feat.getRange())) {
throw new IllegalArgumentException("Not a string feature!");
}
casImpl.ll_setStringValue(casImpl.ll_getFSRef(aFS), featCode, aValue);
}
示例2: SwanLink_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public SwanLink_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_linkBegin = jcas.getRequiredFeatureDE(casType, "linkBegin", "de.unisaarland.swan.export.model.uima.SwanAnnotation", featOkTst);
casFeatCode_linkBegin = (null == casFeat_linkBegin) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_linkBegin).getCode();
casFeat_linkEnd = jcas.getRequiredFeatureDE(casType, "linkEnd", "de.unisaarland.swan.export.model.uima.SwanAnnotation", featOkTst);
casFeatCode_linkEnd = (null == casFeat_linkEnd) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_linkEnd).getCode();
casFeat_Labels = jcas.getRequiredFeatureDE(casType, "Labels", "uima.cas.FSList", featOkTst);
casFeatCode_Labels = (null == casFeat_Labels) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_Labels).getCode();
casFeat_AnnotatorId = jcas.getRequiredFeatureDE(casType, "AnnotatorId", "uima.cas.String", featOkTst);
casFeatCode_AnnotatorId = (null == casFeat_AnnotatorId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_AnnotatorId).getCode();
}
示例3: SwanAnnotation_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public SwanAnnotation_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_SpanType = jcas.getRequiredFeatureDE(casType, "SpanType", "uima.cas.String", featOkTst);
casFeatCode_SpanType = (null == casFeat_SpanType) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_SpanType).getCode();
casFeat_AnnotatorId = jcas.getRequiredFeatureDE(casType, "AnnotatorId", "uima.cas.String", featOkTst);
casFeatCode_AnnotatorId = (null == casFeat_AnnotatorId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_AnnotatorId).getCode();
casFeat_Labels = jcas.getRequiredFeatureDE(casType, "Labels", "uima.cas.FSList", featOkTst);
casFeatCode_Labels = (null == casFeat_Labels) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_Labels).getCode();
casFeat_Links = jcas.getRequiredFeatureDE(casType, "Links", "uima.cas.FSList", featOkTst);
casFeatCode_Links = (null == casFeat_Links) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_Links).getCode();
casFeat_AnnotationId = jcas.getRequiredFeatureDE(casType, "AnnotationId", "uima.cas.String", featOkTst);
casFeatCode_AnnotationId = (null == casFeat_AnnotationId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_AnnotationId).getCode();
}
示例4: Token_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public Token_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_filename = jcas.getRequiredFeatureDE(casType, "filename", "uima.cas.String", featOkTst);
casFeatCode_filename = (null == casFeat_filename) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_filename).getCode();
casFeat_tokenId = jcas.getRequiredFeatureDE(casType, "tokenId", "uima.cas.Integer", featOkTst);
casFeatCode_tokenId = (null == casFeat_tokenId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_tokenId).getCode();
casFeat_sentId = jcas.getRequiredFeatureDE(casType, "sentId", "uima.cas.Integer", featOkTst);
casFeatCode_sentId = (null == casFeat_sentId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_sentId).getCode();
casFeat_pos = jcas.getRequiredFeatureDE(casType, "pos", "uima.cas.String", featOkTst);
casFeatCode_pos = (null == casFeat_pos) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_pos).getCode();
}
示例5: Dct_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public Dct_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_filename = jcas.getRequiredFeatureDE(casType, "filename", "uima.cas.String", featOkTst);
casFeatCode_filename = (null == casFeat_filename) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_filename).getCode();
casFeat_value = jcas.getRequiredFeatureDE(casType, "value", "uima.cas.String", featOkTst);
casFeatCode_value = (null == casFeat_value) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_value).getCode();
casFeat_timexId = jcas.getRequiredFeatureDE(casType, "timexId", "uima.cas.String", featOkTst);
casFeatCode_timexId = (null == casFeat_timexId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_timexId).getCode();
}
示例6: Parse_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public Parse_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_parseType = jcas.getRequiredFeatureDE(casType, "parseType", "uima.cas.String", featOkTst);
casFeatCode_parseType = (null == casFeat_parseType) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_parseType).getCode();
casFeat_children = jcas.getRequiredFeatureDE(casType, "children", "uima.cas.FSArray", featOkTst);
casFeatCode_children = (null == casFeat_children) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_children).getCode();
casFeat_prob = jcas.getRequiredFeatureDE(casType, "prob", "uima.cas.Double", featOkTst);
casFeatCode_prob = (null == casFeat_prob) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_prob).getCode();
}
示例7: VerbFeatures_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public VerbFeatures_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_tense = jcas.getRequiredFeatureDE(casType, "tense", "uima.cas.String", featOkTst);
casFeatCode_tense = (null == casFeat_tense) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_tense).getCode();
casFeat_voice = jcas.getRequiredFeatureDE(casType, "voice", "uima.cas.String", featOkTst);
casFeatCode_voice = (null == casFeat_voice) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_voice).getCode();
casFeat_headOfVerbChain = jcas.getRequiredFeatureDE(casType, "headOfVerbChain", "uima.tcas.Annotation", featOkTst);
casFeatCode_headOfVerbChain = (null == casFeat_headOfVerbChain) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_headOfVerbChain).getCode();
}
示例8: SourceDocumentInformation_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public SourceDocumentInformation_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_AbsolutePath = jcas.getRequiredFeatureDE(casType, "AbsolutePath", "uima.cas.String", featOkTst);
casFeatCode_AbsolutePath = (null == casFeat_AbsolutePath) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_AbsolutePath).getCode();
casFeat_DocId = jcas.getRequiredFeatureDE(casType, "DocId", "uima.cas.String", featOkTst);
casFeatCode_DocId = (null == casFeat_DocId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_DocId).getCode();
casFeat_hasPdtbAnnotations = jcas.getRequiredFeatureDE(casType, "hasPdtbAnnotations", "uima.cas.Boolean", featOkTst);
casFeatCode_hasPdtbAnnotations = (null == casFeat_hasPdtbAnnotations) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_hasPdtbAnnotations).getCode();
}
示例9: Answer_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public Answer_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_id = jcas.getRequiredFeatureDE(casType, "id", "uima.cas.String", featOkTst);
casFeatCode_id = (null == casFeat_id) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_id).getCode();
casFeat_uri = jcas.getRequiredFeatureDE(casType, "uri", "uima.cas.String", featOkTst);
casFeatCode_uri = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_uri).getCode();
casFeat_isBest = jcas.getRequiredFeatureDE(casType, "isBest", "uima.cas.Boolean", featOkTst);
casFeatCode_isBest = (null == casFeat_isBest) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_isBest).getCode();
}
示例10: DocumentMetadata_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public DocumentMetadata_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_sourceUri = jcas.getRequiredFeatureDE(casType, "sourceUri", "uima.cas.String", featOkTst);
casFeatCode_sourceUri = (null == casFeat_sourceUri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_sourceUri).getCode();
casFeat_offsetInSource = jcas.getRequiredFeatureDE(casType, "offsetInSource", "uima.cas.Long", featOkTst);
casFeatCode_offsetInSource = (null == casFeat_offsetInSource) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_offsetInSource).getCode();
casFeat_documentSize = jcas.getRequiredFeatureDE(casType, "documentSize", "uima.cas.Long", featOkTst);
casFeatCode_documentSize = (null == casFeat_documentSize) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_documentSize).getCode();
casFeat_startProcessingTime = jcas.getRequiredFeatureDE(casType, "startProcessingTime", "uima.cas.Long", featOkTst);
casFeatCode_startProcessingTime = (null == casFeat_startProcessingTime) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_startProcessingTime).getCode();
}
示例11: Person_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public Person_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_mentionType = jcas.getRequiredFeatureDE(casType, "mentionType", "uima.cas.String", featOkTst);
casFeatCode_mentionType = (null == casFeat_mentionType) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_mentionType).getCode();
casFeat_name = jcas.getRequiredFeatureDE(casType, "name", "test.PersonName", featOkTst);
casFeatCode_name = (null == casFeat_name) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_name).getCode();
casFeat_words = jcas.getRequiredFeatureDE(casType, "words", "uima.cas.FSArray", featOkTst);
casFeatCode_words = (null == casFeat_words) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_words).getCode();
}
示例12: SimplyWord_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public SimplyWord_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_posTag = jcas.getRequiredFeatureDE(casType, "posTag", "uima.cas.String", featOkTst);
casFeatCode_posTag = (null == casFeat_posTag) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_posTag).getCode();
casFeat_grammems = jcas.getRequiredFeatureDE(casType, "grammems", "uima.cas.StringArray", featOkTst);
casFeatCode_grammems = (null == casFeat_grammems) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_grammems).getCode();
casFeat_lemma = jcas.getRequiredFeatureDE(casType, "lemma", "uima.cas.String", featOkTst);
casFeatCode_lemma = (null == casFeat_lemma) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_lemma).getCode();
casFeat_lemmaId = jcas.getRequiredFeatureDE(casType, "lemmaId", "uima.cas.Integer", featOkTst);
casFeatCode_lemmaId = (null == casFeat_lemmaId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_lemmaId).getCode();
casFeat_token = jcas.getRequiredFeatureDE(casType, "token", "com.textocat.textokit.tokenizer.fstype.Token", featOkTst);
casFeatCode_token = (null == casFeat_token) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_token).getCode();
}
示例13: DictionaryMatch_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public DictionaryMatch_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_firstToken = jcas.getRequiredFeatureDE(casType, "firstToken", "uima.tcas.Annotation", featOkTst);
casFeatCode_firstToken = (null == casFeat_firstToken) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_firstToken).getCode();
casFeat_tag = jcas.getRequiredFeatureDE(casType, "tag", "uima.cas.String", featOkTst);
casFeatCode_tag = (null == casFeat_tag) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_tag).getCode();
casFeat_dictionaryRecordId = jcas.getRequiredFeatureDE(casType, "dictionaryRecordId", "uima.cas.String", featOkTst);
casFeatCode_dictionaryRecordId = (null == casFeat_dictionaryRecordId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_dictionaryRecordId).getCode();
}
示例14: QSegment_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/**
* initialize variables to correspond with Cas Type and Features
*
* @param jcas JCas
* @param casType Type
* @generated
*/
public QSegment_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
casFeat_contentBegin = jcas.getRequiredFeatureDE(casType, "contentBegin", "uima.cas.Integer", featOkTst);
casFeatCode_contentBegin = (null == casFeat_contentBegin) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_contentBegin).getCode();
casFeat_contentEnd = jcas.getRequiredFeatureDE(casType, "contentEnd", "uima.cas.Integer", featOkTst);
casFeatCode_contentEnd = (null == casFeat_contentEnd) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_contentEnd).getCode();
casFeat_parentSegment = jcas.getRequiredFeatureDE(casType, "parentSegment", "uima.tcas.Annotation", featOkTst);
casFeatCode_parentSegment = (null == casFeat_parentSegment) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_parentSegment).getCode();
}
示例15: Phrase_Type
import org.apache.uima.cas.impl.FeatureImpl; //导入依赖的package包/类
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public Phrase_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_head = jcas.getRequiredFeatureDE(casType, "head", "com.textocat.textokit.morph.fs.Wordform", featOkTst);
casFeatCode_head = (null == casFeat_head) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_head).getCode();
casFeat_dependentWords = jcas.getRequiredFeatureDE(casType, "dependentWords", "uima.cas.FSArray", featOkTst);
casFeatCode_dependentWords = (null == casFeat_dependentWords) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_dependentWords).getCode();
casFeat_dependentPhrases = jcas.getRequiredFeatureDE(casType, "dependentPhrases", "uima.cas.FSArray", featOkTst);
casFeatCode_dependentPhrases = (null == casFeat_dependentPhrases) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_dependentPhrases).getCode();
}