Package ru.spbu.math.ontologycomparison.zhukova.visualisation.modelbuilding

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.modelbuilding.IGraphModelBuilder


            }
            this.main.log("Merging ontologies...");
            IOntologyComparator ontologyComparator = new OntologyComparator(firstOntologyGraph[0], secondOntologyGraph, this.main);
            IOntologyGraph ontologyGraph = ontologyComparator.mapOntologies().getFirst();
            int similarity = (int) (ontologyComparator.getSimilarity() * 100);
            final IGraphModelBuilder myGraphModelBuilder =
                    new GraphModelBuilder(firstOntologyGraph[0], secondOntologyGraph, ontologyGraph, similarity, this.main);
            this.main.log("Visualising ontologies...");
            GraphModel graphModel = myGraphModelBuilder.buildGraphModel(main.getGraphPane(), main.areUnmappedConceptsVisible(), main.areUnmappedConceptsWithSynsetsVisible());
            OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
            OWLOntology result = OntologyManager.saveOntologies(manager, firstOntologyManager.getOntology(), secondOntologyManager.getOntology());
            onGraphModelBuilt(manager, result);
            this.main.setGraphModel(graphModel);
            ITreeBuilder firstTreeBuilder = new TreeBuilder(firstFile.getName(), firstOntologyGraph[0].getRoots());
            ITreeBuilder secondTreeBuilder = new TreeBuilder(secondFile.getName(), secondOntologyGraph.getRoots());
            this.main.setTrees(firstTreeBuilder.buildTree(main.areUnmappedConceptsVisible(), main.areUnmappedConceptsWithSynsetsVisible()), secondTreeBuilder.buildTree(main.areUnmappedConceptsVisible(), main.areUnmappedConceptsWithSynsetsVisible()));
            int similarityCount = myGraphModelBuilder.getSimilarity();
            this.main.info(String.format(
                    "Comparing ontology %s (blue) to %s (green). (Absolutely equal concepts are colored orange) <br> The similarity is %d %%. <br> To remove a mapping right-click on it",
                    firstFile.getName(), secondFile.getName(), similarityCount)
            );
            this.main.hideProgressBar();
View Full Code Here

TOP

Related Classes of ru.spbu.math.ontologycomparison.zhukova.visualisation.modelbuilding.IGraphModelBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.