Feature governorFeature = type.getFeatureByBaseName(typeAdapter.getSourceFeatureName()); Type spanType = getType(aJcas.getCas(), typeAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(typeAdapter.getAttachFeatureName());
Feature governorFeature = type.getFeatureByBaseName(typeAdapter.getSourceFeatureName()); Type spanType = getType(aJcas.getCas(), typeAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(typeAdapter.getAttachFeatureName());
public static FeatureStructure[] resolve(RelationAdapter aAdapter, AnnotationFS aRelation) { Type type = aRelation.getType(); Feature targetFeature = type.getFeatureByBaseName(aAdapter.getTargetFeatureName()); Feature sourceFeature = type.getFeatureByBaseName(aAdapter.getSourceFeatureName()); FeatureStructure targetFs; FeatureStructure sourceFs; if (aAdapter.getAttachFeatureName() != null) { Type spanType = getType(aRelation.getCAS(), aAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(aAdapter.getAttachFeatureName()); targetFs = aRelation.getFeatureValue(targetFeature).getFeatureValue(arcSpanFeature); sourceFs = aRelation.getFeatureValue(sourceFeature).getFeatureValue(arcSpanFeature); } else { targetFs = aRelation.getFeatureValue(targetFeature); sourceFs = aRelation.getFeatureValue(sourceFeature); } return new FeatureStructure[] { sourceFs, targetFs }; } }
public static FeatureStructure[] resolve(RelationAdapter aAdapter, AnnotationFS aRelation) { Type type = aRelation.getType(); Feature targetFeature = type.getFeatureByBaseName(aAdapter.getTargetFeatureName()); Feature sourceFeature = type.getFeatureByBaseName(aAdapter.getSourceFeatureName()); FeatureStructure targetFs; FeatureStructure sourceFs; if (aAdapter.getAttachFeatureName() != null) { Type spanType = getType(aRelation.getCAS(), aAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(aAdapter.getAttachFeatureName()); targetFs = aRelation.getFeatureValue(targetFeature).getFeatureValue(arcSpanFeature); sourceFs = aRelation.getFeatureValue(sourceFeature).getFeatureValue(arcSpanFeature); } else { targetFs = aRelation.getFeatureValue(targetFeature); sourceFs = aRelation.getFeatureValue(sourceFeature); } return new FeatureStructure[] { sourceFs, targetFs }; } }
Type spanType = getType(aJCas.getCas(), aAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(aAdapter.getAttachFeatureName());
Type spanType = getType(aJCas.getCas(), aAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(aAdapter.getAttachFeatureName());
Type spanType = getType(jCas.getCas(), adapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(adapter.getAttachFeatureName());
Type spanType = getType(jCas.getCas(), adapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(adapter.getAttachFeatureName());
Type spanType = getType(jCas.getCas(), adapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(adapter.getAttachFeatureName());
Type spanType = getType(jCas.getCas(), adapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(adapter.getAttachFeatureName());