exLayer.getAttachType().getName(), project); AnnotationFeature attachFeature = annotationService .getFeature(exLayer.getAttachFeature().getName(), attachLayer); layer.setAttachFeature(attachFeature);
exLayer.getAttachType().getName(), project); AnnotationFeature attachFeature = annotationService .getFeature(exLayer.getAttachFeature().getName(), attachLayer); layer.setAttachFeature(attachFeature);
.getLayer(exTemplate.getTrainFeature().getLayer(), aProject); AnnotationFeature trainingFeature = annotationService .getFeature(exTemplate.getTrainFeature().getName(), trainingLayer); template.setTrainFeature(trainingFeature); Set<AnnotationFeature> otherFeatures = new HashSet<>(); for (ExportedAnnotationFeatureReference other : exTemplate.getOtherFeatures()) { AnnotationLayer layer = annotationService.getLayer(other.getLayer(), aProject); AnnotationFeature feature = annotationService.getFeature(other.getName(), layer); otherFeatures.add(feature);
private void importTrainingDocuments(ExportedProject aExProject, Project aProject) throws IOException { ExportedTrainingDocument[] trainingDocuments = aExProject .getArrayProperty(TRAINING_DOCUMENTS, ExportedTrainingDocument.class); for (ExportedTrainingDocument importedTrainingDocument : trainingDocuments) { TrainingDocument trainingDocument = new TrainingDocument(); trainingDocument.setFormat(importedTrainingDocument.getFormat()); trainingDocument.setName(importedTrainingDocument.getName()); trainingDocument.setState(importedTrainingDocument.getState()); trainingDocument.setProject(aProject); trainingDocument.setTimestamp(importedTrainingDocument.getTimestamp()); trainingDocument.setSentenceAccessed(importedTrainingDocument.getSentenceAccessed()); if (importedTrainingDocument.getFeature() != null) { AnnotationLayer trainingLayer = annotationService .getLayer(importedTrainingDocument.getFeature().getLayer(), aProject); AnnotationFeature trainingFeature = annotationService .getFeature(importedTrainingDocument.getFeature().getName(), trainingLayer); trainingDocument.setFeature(trainingFeature); } automationService.createTrainingDocument(trainingDocument); } }
if (exLayer.getAttachFeature() != null) { AnnotationFeature attachFeature = annotationService .getFeature(exLayer.getAttachFeature().getName(), attachLayer); layer.setAttachFeature(attachFeature);
if (exLayer.getAttachFeature() != null) { AnnotationFeature attachFeature = annotationService .getFeature(exLayer.getAttachFeature().getName(), attachLayer); layer.setAttachFeature(attachFeature);