## 4 Semantic Management Component
### Import Ontology Service
For this case the algorithm is as follows:  
```
INPUT: nondirected graph \(\text{G}_{\text{init}}\)=(\(V_{\text{init}}\), \(\text{E}_{\text{init}}\), w), with \(e^{\textit{init}}\in E_{\textit{init}}\) edges and \((v_{1}^{\textit{init}},v_{2}^{\textit{init}},\ldots,v_{i}^{\textit{init}})\in V _{\textit{init}}\), vertices and edge weights \(w_{\textit{e}^{\textit{init}}}\in R\) for all \(w\in E_{\textit{init}}\), nondirected graph \(\text{G}_{\text{imp}}\)=(\(V_{\text{imp}}\), \(E_{\text{imp}}\)), with \(e^{\textit{imp}}\in E_{\textit{imp}}\) edges and \((v_{1}^{\textit{imp}},v_{2}^{\textit{imp}},\ldots,v_{j}^{\textit{imp}})\in V _{\textit{imp}}\) vertices for each\(e^{\textit{init}}\) in \(E_{\textit{init}}\)do if\(e^{\textit{imp}}\in E_{\textit{init}}\)then  imported edge exists in the initial model \(\rightarrow\) skip else \(E_{\textit{init}}\cup\ E_{\textit{imp}}\) endif endfor each\((v_{i}^{\textit{init}},v_{j}^{\textit{init}})\) in \(V_{\textit{init}}\)do if\((v_{k}^{\textit{imp}},v_{l}^{\textit{imp}})\ \in\ V_{\textit{init}}\)then  imported vertices exist in this initial model \(\rightarrow\) skip else \(w_{\textit{e}^{\textit{init}}}=\frac{w_{\textit{e}^{\textit{init}}-1}}{1+w_{ \textit{e}^{\textit{init}}-1}}\) endif endfor each OUTPUT:\(G_{\textit{res}}\)
```  
**Algorithm 2** Suggestion building for each concept in the origin model  
As mentioned before, if the database is not empty and the imported ontology contains some concepts with the same names as in the database, in other words they equally labelled, they are ignored by importOntology, but the relationships are created or updated. The importOntology can be used in conjunction with the getMappingSuggestion service, which provides the necessary design patterns to apply to groups of concepts. Finally, all users of vf-OS having the permit to create and update the ontologies and can contribute to the evolution of the ontology development environment. The procedure of requesting the importOntology service is presented in Figure 6.  
The importOntology service algorithm has a similar starting point compared to all implemented services; when a request has been sent, an authentication procedure is passed, and the session is launched. Then, the semantic plugin is required to parse and insert the ontology, with all concepts and relations, into Neo4j. After this is accomplished, duplicate concepts are removed, and, if relationships are identical between the imported ontology and the database, the weight of the relationship is updated. In the next step, each concept is labelled within Neo4j, and the name property is extracted. Considering the treatment of replicas, as in the example given in [50], concepts with equal names are removed. However, while importing two ontologies with similar concepts and applying unification procedures, the resulting concept class possesses all properties from the initial ontologies. In this work, all concepts with equal names are also removed, although we follow the approach that all properties of the concepts are inserted as separate concepts. For instance, the concept of \"cake\" has the property \"sweet\", which, after insertion, appears as another concept having a relation to \"cake\". This allows concepts with similar properties to be interrelated and, thus, enriches the knowledge base and avoids the creation of redundant entities. Moreover, a matching approach is made possible, which is commonly and widely used. This approach is illustrated in [51], where two ontologies are merged combining equal root concepts while differentiating between similar, but not equivalent, concepts. The process of matching ontologies is also considered in [52]. However, the authors were mostly focused on ontology matching or alignment from the same domain, and they did not consider importing cross-domain ontologies. The importOntology service enables RDF/OWL ontologies to be imported.