@Deprecated public static void setLayer(AnnotationSchemaService aAnnotationService, AnnotationLayer aLayer, ExportedAnnotationLayer aExLayer, Project aProject, User aUser) throws IOException { aLayer.setAllowStacking(aExLayer.isAllowStacking()); aLayer.setBuiltIn(aExLayer.isBuiltIn()); aLayer.setReadonly(aExLayer.isReadonly()); aLayer.setCrossSentence(aExLayer.isCrossSentence()); aLayer.setDescription(aExLayer.getDescription()); aLayer.setEnabled(aExLayer.isEnabled()); if (aExLayer.getAnchoringMode() == null) { // This allows importing old projects which did not have the anchoring mode yet aLayer.setAnchoringMode(aExLayer.isLockToTokenOffset(), aExLayer.isMultipleTokens()); } else { aLayer.setAnchoringMode(aExLayer.getAnchoringMode()); } aLayer.setLinkedListBehavior(aExLayer.isLinkedListBehavior()); aLayer.setUiName(aExLayer.getUiName()); aLayer.setName(aExLayer.getName()); aLayer.setProject(aProject); aLayer.setType(aExLayer.getType()); aAnnotationService.createLayer(aLayer); }
@Deprecated public static void setLayer(AnnotationSchemaService aAnnotationService, AnnotationLayer aLayer, ExportedAnnotationLayer aExLayer, Project aProject, User aUser) throws IOException { aLayer.setAllowStacking(aExLayer.isAllowStacking()); aLayer.setBuiltIn(aExLayer.isBuiltIn()); aLayer.setReadonly(aExLayer.isReadonly()); aLayer.setCrossSentence(aExLayer.isCrossSentence()); aLayer.setDescription(aExLayer.getDescription()); aLayer.setEnabled(aExLayer.isEnabled()); if (aExLayer.getAnchoringMode() == null) { // This allows importing old projects which did not have the anchoring mode yet aLayer.setAnchoringMode(aExLayer.isLockToTokenOffset(), aExLayer.isMultipleTokens()); } else { aLayer.setAnchoringMode(aExLayer.getAnchoringMode()); } aLayer.setValidationMode(aExLayer.getValidationMode() != null ? aExLayer.getValidationMode() : ValidationMode.NEVER); aLayer.setLinkedListBehavior(aExLayer.isLinkedListBehavior()); aLayer.setUiName(aExLayer.getUiName()); aLayer.setName(aExLayer.getName()); aLayer.setProject(aProject); aLayer.setType(aExLayer.getType()); aAnnotationService.createLayer(aLayer); }
public void importLayer(AnnotationLayer aLayer, ExportedAnnotationLayer aExLayer, Project aProject) throws IOException { aLayer.setAllowStacking(aExLayer.isAllowStacking()); aLayer.setBuiltIn(aExLayer.isBuiltIn()); aLayer.setReadonly(aExLayer.isReadonly()); aLayer.setCrossSentence(aExLayer.isCrossSentence()); aLayer.setDescription(aExLayer.getDescription()); aLayer.setEnabled(aExLayer.isEnabled()); if (aExLayer.getAnchoringMode() == null) { // This allows importing old projects which did not have the anchoring mode yet aLayer.setAnchoringMode(aExLayer.isLockToTokenOffset(), aExLayer.isMultipleTokens()); } else { aLayer.setAnchoringMode(aExLayer.getAnchoringMode()); } aLayer.setLinkedListBehavior(aExLayer.isLinkedListBehavior()); aLayer.setUiName(aExLayer.getUiName()); aLayer.setName(aExLayer.getName()); aLayer.setProject(aProject); aLayer.setType(aExLayer.getType()); annotationService.createLayer(aLayer); }
public void importLayer(AnnotationLayer aLayer, ExportedAnnotationLayer aExLayer, Project aProject) throws IOException { aLayer.setAllowStacking(aExLayer.isAllowStacking()); aLayer.setBuiltIn(aExLayer.isBuiltIn()); aLayer.setReadonly(aExLayer.isReadonly()); aLayer.setCrossSentence(aExLayer.isCrossSentence()); aLayer.setDescription(aExLayer.getDescription()); aLayer.setEnabled(aExLayer.isEnabled()); if (aExLayer.getAnchoringMode() == null) { // This allows importing old projects which did not have the anchoring mode yet aLayer.setAnchoringMode(aExLayer.isLockToTokenOffset(), aExLayer.isMultipleTokens()); } else { aLayer.setAnchoringMode(aExLayer.getAnchoringMode()); } aLayer.setValidationMode(aExLayer.getValidationMode() != null ? aExLayer.getValidationMode() : ValidationMode.NEVER); aLayer.setLinkedListBehavior(aExLayer.isLinkedListBehavior()); aLayer.setUiName(aExLayer.getUiName()); aLayer.setName(aExLayer.getName()); aLayer.setProject(aProject); aLayer.setType(aExLayer.getType()); annotationService.createLayer(aLayer); }
AnnotationLayer layer; if (annotationService.existsLayer(aExLayer.getName(), aExLayer.getType(), project)) { layer = annotationService.getLayer(aExLayer.getName(), project); ImportUtil.setLayer(annotationService, layer, aExLayer, project, aUser);
AnnotationLayer layer; if (annotationService.existsLayer(aExLayer.getName(), aExLayer.getType(), project)) { layer = annotationService.getLayer(aExLayer.getName(), project); ImportUtil.setLayer(annotationService, layer, aExLayer, project, aUser);
if (annotationService.existsLayer(exLayer.getName(), exLayer.getType(), aProject)) { AnnotationLayer layer = annotationService.getLayer(exLayer.getName(), aProject); importLayer(layer, exLayer, aProject);
if (annotationService.existsLayer(exLayer.getName(), exLayer.getType(), aProject)) { AnnotationLayer layer = annotationService.getLayer(exLayer.getName(), aProject); importLayer(layer, exLayer, aProject);