private List<Tag> listTags() { if (selectedTagSet.getObject() != null) { return annotationSchemaService.listTags(selectedTagSet.getObject()); } else { return Collections.emptyList(); } } }
private List<Tag> listTags() { if (selectedTagSet.getObject() != null) { return annotationSchemaService.listTags(selectedTagSet.getObject()); } else { return Collections.emptyList(); } } }
private List<Tag> listTags() { if (feature.getObject().getTagset() != null) { return annotationService.listTags(feature.getObject().getTagset()); } else { return Collections.emptyList(); } }
private List<Tag> listTags() { if (feature.getObject().getTagset() != null) { return annotationService.listTags(feature.getObject().getTagset()); } else { return Collections.emptyList(); } }
Map<String, String> getBindTags() { AnnotationFeature f = annotationService .listAnnotationFeature(getModelObject().getSelectedAnnotationLayer()).get(0); TagSet tagSet = f.getTagset(); Map<Character, String> tagNames = new LinkedHashMap<>(); Map<String, String> bindTag2Key = new LinkedHashMap<>(); for (Tag tag : annotationService.listTags(tagSet)) { if (tagNames.containsKey(tag.getName().toLowerCase().charAt(0))) { String oldBinding = tagNames.get(tag.getName().toLowerCase().charAt(0)); String newBinding = oldBinding + tag.getName().toLowerCase().charAt(0); tagNames.put(tag.getName().toLowerCase().charAt(0), newBinding); bindTag2Key.put(newBinding, tag.getName()); } else { tagNames.put(tag.getName().toLowerCase().charAt(0), tag.getName().toLowerCase().substring(0, 1)); bindTag2Key.put(tag.getName().toLowerCase().substring(0, 1), tag.getName()); } } return bindTag2Key; }
private boolean isForwardable() { AnnotatorState state = getModelObject(); AnnotationLayer selectedLayer = state.getSelectedAnnotationLayer(); if (isNull(selectedLayer) || isNull(selectedLayer.getId())) { return false; } if (!selectedLayer.getType().equals(WebAnnoConst.SPAN_TYPE)) { return false; } if (!SINGLE_TOKEN.equals(selectedLayer.getAnchoringMode())) { return false; } // no forward annotation for multi-feature and zero-feature layers (where features count // which are are both enabled and visible). if (getEnabledFeatures(selectedLayer).size() != 1) { return false; } // we allow forward annotation only for a feature with a tagset if (annotationService.listAnnotationFeature(selectedLayer).get(0).getTagset() != null) { // there should be at least one tag in the tagset TagSet tagSet = annotationService.listAnnotationFeature(selectedLayer).get(0) .getTagset(); return !annotationService.listTags(tagSet).isEmpty(); } // Or layers with a single visible/enabled free-text feature. return true; }
featureState.tagset = annotationService.listTags(featureState.feature.getTagset());
featureState.tagset = annotationService.listTags(featureState.feature.getTagset());
@Override public void exportData(ProjectExportRequest aRequest, ExportedProject aExProject, File aStage) throws Exception { List<ExportedTagSet> extTagSets = new ArrayList<>(); for (TagSet tagSet : annotationService.listTagSets(aRequest.getProject())) { ExportedTagSet exTagSet = new ExportedTagSet(); exTagSet.setCreateTag(tagSet.isCreateTag()); exTagSet.setDescription(tagSet.getDescription()); exTagSet.setLanguage(tagSet.getLanguage()); exTagSet.setName(tagSet.getName()); List<ExportedTag> exTags = new ArrayList<>(); for (Tag tag : annotationService.listTags(tagSet)) { ExportedTag exTag = new ExportedTag(); exTag.setDescription(tag.getDescription()); exTag.setName(tag.getName()); exTags.add(exTag); } exTagSet.setTags(exTags); extTagSets.add(exTagSet); } aExProject.setTagSets(extTagSets); }
@Override public void exportData(ProjectExportRequest aRequest, ExportedProject aExProject, File aStage) throws Exception { List<ExportedTagSet> extTagSets = new ArrayList<>(); for (TagSet tagSet : annotationService.listTagSets(aRequest.getProject())) { ExportedTagSet exTagSet = new ExportedTagSet(); exTagSet.setCreateTag(tagSet.isCreateTag()); exTagSet.setDescription(tagSet.getDescription()); exTagSet.setLanguage(tagSet.getLanguage()); exTagSet.setName(tagSet.getName()); List<ExportedTag> exTags = new ArrayList<>(); for (Tag tag : annotationService.listTags(tagSet)) { ExportedTag exTag = new ExportedTag(); exTag.setDescription(tag.getDescription()); exTag.setName(tag.getName()); exTags.add(exTag); } exTagSet.setTags(exTags); extTagSets.add(exTagSet); } aExProject.setTagSets(extTagSets); }
List<Tag> tagList = annotationService.listTags(feat.getTagset()); List<Tag> reorderedTagList = new ArrayList<>(); if (tagList.size() > 0) {
List<Tag> tagList = annotationService.listTags(feat.getTagset()); List<Tag> reorderedTagList = new ArrayList<>(); if (tagList.size() > 0) {
List<Tag> valuesFromTagset = annotationService.listTags(aModel.feature.getTagset());
.listTags(featureState.feature.getTagset());
boolean isRepeatable = false; for (Tag tag : annotationService.listTags(tagSet)) { if (fs.getFeatureValueAsString(feat) == null) { break; // this is new annotation without values
boolean isRepeatable = false; for (Tag tag : annotationService.listTags(tagSet)) { if (fs.getFeatureValueAsString(feat) == null) { break; // this is new annotation without values
for (Tag tag : aAnnotationService.listTags(tagSet)) { ExportedTag exTag = new ExportedTag(); exTag.setDescription(tag.getDescription());
for (Tag tag : aAnnotationService.listTags(tagSet)) { ExportedTag exTag = new ExportedTag(); exTag.setDescription(tag.getDescription());
for (Tag tag : annotationService.listTags(tagSet)) { ExportedTag exTag = new ExportedTag(); exTag.setDescription(tag.getDescription());
for (Tag tag : annotationService.listTags(tagSet)) { ExportedTag exTag = new ExportedTag(); exTag.setDescription(tag.getDescription());