tagSet = annotationService.getTagSet(tagSetName, project); annotationService.removeAllTags(tagSet);
tagSet = annotationService.getTagSet(tagSetName, project); annotationService.removeAllTags(tagSet);
private static TagSet replaceTagSet(Project project, ExportedTagSet importedTagSet, AnnotationSchemaService aAnnotationService) throws IOException { String importedTagSetName = importedTagSet.getName(); de.tudarmstadt.ukp.clarin.webanno.model.TagSet tagsetInUse = aAnnotationService .getTagSet(importedTagSetName, project); // Remove all tags associated with Tagset aAnnotationService.removeAllTags(tagsetInUse); // Copy and update TagSet Information from imported tagset tagsetInUse.setDescription(importedTagSet.getDescription()); tagsetInUse.setName(importedTagSetName); tagsetInUse.setLanguage(importedTagSet.getLanguage()); tagsetInUse.setProject(project); aAnnotationService.createTagSet(tagsetInUse); // Add all tags from imported tagset for (ExportedTag tag : importedTagSet.getTags()) { Tag newTag = new Tag(); newTag.setDescription(tag.getDescription()); newTag.setName(tag.getName()); newTag.setTagSet(tagsetInUse); aAnnotationService.createTag(newTag); } return tagsetInUse; }
private static TagSet replaceTagSet(Project project, ExportedTagSet importedTagSet, AnnotationSchemaService aAnnotationService) throws IOException { String importedTagSetName = importedTagSet.getName(); de.tudarmstadt.ukp.clarin.webanno.model.TagSet tagsetInUse = aAnnotationService .getTagSet(importedTagSetName, project); // Remove all tags associated with Tagset aAnnotationService.removeAllTags(tagsetInUse); // Copy and update TagSet Information from imported tagset tagsetInUse.setDescription(importedTagSet.getDescription()); tagsetInUse.setName(importedTagSetName); tagsetInUse.setLanguage(importedTagSet.getLanguage()); tagsetInUse.setProject(project); aAnnotationService.createTagSet(tagsetInUse); // Add all tags from imported tagset for (ExportedTag tag : importedTagSet.getTags()) { Tag newTag = new Tag(); newTag.setDescription(tag.getDescription()); newTag.setName(tag.getName()); newTag.setTagSet(tagsetInUse); aAnnotationService.createTag(newTag); } return tagsetInUse; }
TagSet tagset = annotationService.getTagSet(aExFeature.getTagSet().getName(), aProject); aFeature.setTagset(tagset);
TagSet tagset = annotationService.getTagSet(aExFeature.getTagSet().getName(), aProject); aFeature.setTagset(tagset);
if (exTagset != null && annotationService.existsTagSet(exTagset.getName(), project)) { tagSet = annotationService.getTagSet(exTagset.getName(), project); ImportUtil.createTagSet(tagSet, exTagset, project, aUser, annotationService);
if (exTagset != null && annotationService.existsTagSet(exTagset.getName(), project)) { tagSet = annotationService.getTagSet(exTagset.getName(), project); ImportUtil.createTagSet(tagSet, exTagset, project, aUser, annotationService);