/** * Gets the feature string. * * @return the feature string */ private String getFeatureString() { return "<i>" + this.feat.getShortName() + "</i>"; }
@Override public boolean isHiddenFeature(Feature aFeature) { return aFeature.getShortName().equals(nextFeature); } }
@Override public boolean isHiddenFeature(Feature aFeature) { return aFeature.getShortName().equals(nextFeature); } }
@Override public boolean isHiddenFeature(Feature aFeature) { return asList(sourceFeature, targetFeature).contains(aFeature.getShortName()); }
@Override public boolean isHiddenFeature(Feature aFeature) { return asList(sourceFeature, targetFeature).contains(aFeature.getShortName()); }
private boolean isCorefType(AnnotationFS aFS) { for (Feature f : MergeCas.getAllFeatures(aFS)) { if (f.getShortName().equals(WebAnnoConst.COREFERENCE_RELATION_FEATURE) || f.getShortName().equals(WebAnnoConst.COREFERENCE_TYPE_FEATURE)) { return true; } } return false; }
private boolean isCorefType(AnnotationFS aFS) { for (Feature f : MergeCas.getAllFeatures(aFS)) { if (f.getShortName().equals(WebAnnoConst.COREFERENCE_RELATION_FEATURE) || f.getShortName().equals(WebAnnoConst.COREFERENCE_TYPE_FEATURE)) { return true; } } return false; }
@Override public String getShortName() { checkDelegate(); return delegate.getShortName(); }
/** * return the actual type name : short-feature-name. * * @param feature the feature * @return the actual type name : short-feature-name */ protected String getTypeFeature(Feature feature) { return selectedType.getName() + ':' + feature.getShortName(); }
@Override public void print(StringBuilder out, FST fs) { String featValue = fs.getFeatureValueAsString(feature); out.append(feature.getShortName()).append("=").append(featValue); } }
@Override public void print(StringBuilder out, S value) { out.append(feature.getShortName()).append("="); E featValue = getValue(value); if (featValue == null) { out.append((Object) null); } else { valueMatcher.print(out, featValue); } }
@Override public void print(StringBuilder out, FST value) { Collection<E> col = getCollection(value); out.append(feature.getShortName()); out.append("="); collectionMatcherDelegate.print(out, col); } }
public List<TsvColumn> getColumns(Type aType) { return getColumns().stream() .filter(c -> c.uimaType.equals(aType)) // Sort by name so we get a stable column order even if type systems are merged // in different orders, e.g. in unit tests. .sorted((a, b) -> compare( a.getUimaFeature() != null ? a.getUimaFeature().getShortName() : null, b.getUimaFeature() != null ? b.getUimaFeature().getShortName() : null)) .collect(Collectors.toList()); }
public List<TsvColumn> getColumns(Type aType) { return getColumns().stream() .filter(c -> c.uimaType.equals(aType)) // Sort by name so we get a stable column order even if type systems are merged // in different orders, e.g. in unit tests. .sorted((a, b) -> compare( a.getUimaFeature() != null ? a.getUimaFeature().getShortName() : null, b.getUimaFeature() != null ? b.getUimaFeature().getShortName() : null)) .collect(Collectors.toList()); }
private void fillFeatures(FeatureStructure oldFS, FeatureStructure newFS, Type newType, Map<Integer, Integer> new2oldBegin, Map<Integer, Integer> new2oldEnd, RutaStream stream, RuleMatch match) { for (Object obj : newType.getFeatures()) { Feature feature = (Feature) obj; String sn = feature.getShortName(); if (!"sofa".equals(sn) && !"begin".equals(sn) && !"end".equals(sn)) { Feature oldFeature = oldFS.getType().getFeatureByBaseName(sn); fillFeature(oldFS, oldFeature, newFS, feature, new2oldBegin, new2oldEnd, stream, match); } } }
private void fillFeatures(FeatureStructure oldFS, FeatureStructure newFS, Type newType, Map<Integer, Integer> new2oldBegin, Map<Integer, Integer> new2oldEnd, TextMarkerStream stream, RuleMatch match) { for (Object obj : newType.getFeatures()) { Feature feature = (Feature) obj; String sn = feature.getShortName(); if (!"sofa".equals(sn) && !"begin".equals(sn) && !"end".equals(sn)) { Feature oldFeature = oldFS.getType().getFeatureByBaseName(sn); fillFeature(oldFS, oldFeature, newFS, feature, new2oldBegin, new2oldEnd, stream, match); } } }
public PrimitiveColumn(Feature feature) { super(new String[] { feature.getShortName() }); this.datatype = Datatype.fromString(feature.getRange().getName()); this.feature = feature; }
public static void collect(Set<FeatureStructure> aFSes, FeatureStructure aFS) { if (aFS != null && !aFSes.contains(aFS)) { aFSes.add(aFS); for (Feature f : aFS.getType().getFeatures()) { if (!f.getRange().isPrimitive() && !CAS.FEATURE_BASE_NAME_SOFA.equals(f.getShortName())) { collect(aFSes, aFS.getFeatureValue(f)); } } } }
public static void collect(Set<FeatureStructure> aFSes, FeatureStructure aFS) { if (aFS != null && !aFSes.contains(aFS)) { aFSes.add(aFS); for (Feature f : aFS.getType().getFeatures()) { if (!f.getRange().isPrimitive() && !CAS.FEATURE_BASE_NAME_SOFA.equals(f.getShortName())) { collect(aFSes, aFS.getFeatureValue(f)); } } } }
public static void collect(Set<FeatureStructure> aFSes, FeatureStructure aFS) { if (aFS != null && !aFSes.contains(aFS)) { aFSes.add(aFS); for (Feature f : aFS.getType().getFeatures()) { if (!f.getRange().isPrimitive() && !CAS.FEATURE_BASE_NAME_SOFA.equals(f.getShortName())) { collect(aFSes, aFS.getFeatureValue(f)); } } } }