use of edu.stanford.bmir.protege.web.shared.merge.ComputeProjectMergeResult in project webprotege by protegeproject.
the class ComputeProjectMergeActionHandler method execute.
@Nonnull
@Override
public ComputeProjectMergeResult execute(@Nonnull ComputeProjectMergeAction action, @Nonnull ExecutionContext executionContext) {
try {
DocumentId documentId = action.getProjectDocumentId();
OWLOntology uploadedRootOntology = loadUploadedOntology(documentId);
Set<OntologyDiff> diffs = computeDiff(uploadedRootOntology, projectRootOntology);
List<DiffElement<String, SafeHtml>> transformedDiff = renderDiff(uploadedRootOntology, diffs);
return new ComputeProjectMergeResult(transformedDiff);
} catch (Exception e) {
logger.info("An error occurred whilst merging ontologies", e);
throw new RuntimeException(e);
}
}
Aggregations