In order to foster semantic interoperability and compliance to standards, appropriate functionality for importing third-party ontologies and aligning them with the goodFlows Information Model ontology has been implemented. The requirements for a generic ontologies’ import functionality were mainly derived from the structure and alignment needs of the DPV and ODRL ontologies; class mappings to the equivalent goodFlows Information Model classes, as well as handling of hierarchical and other relationships, provided key insights into designing a flexible import mechanism that supports subclassing, specialisation and inclusion properties, and multi-step ontology integration. Table~\ref{tab:mapping} summarises the findings regarding alignment of goodFlows Information Model and DPV and ODRL.

\begin{table*}
	\caption{goodFlows IM – DPV/ODRL mapping}
	\label{tab:mapping}
	\renewcommand{\arraystretch}{1.2}
		\begin{tabularx}{\textwidth}{p{2.5cm} p{2.7cm} p{2.7cm} X}
		\toprule
		goodFlows IM & DPV & ODRL & Comments\\
		\midrule
		Class individuals & Classes & Class individuals & Both goodFlows IM and the ODRL ontology represent vocabulary for a class as class individuals, whereas DPV defines them as subclasses \\
		IM:Purposes class & dpv:Purpose class & - & dpv:Purpose class corresponds to IM:AnyPurpose instance. All subclasses of dpv:Purpose are inserted as IM:Purposes class individuals \\
		IM:Roles class& dpv:Entity class& -& dpv:Entity class corresponds to IM:AnyRole instance. All subclasses of dpv:Entity are inserted as IM:Roles class individuals\\
		IM:Operations class& dpv:Processing& odrl:Action& dpv:Processing class corresponds to IM:AnyOperation instance. All subclasses of dpv:Processing are inserted as IM:Operations class individuals\\
		IM:DataTypes class& dpv:Data& -& dpv:Data class corresponds to IM:AnyDataType instance. All subclasses of dpv:Data are inserted as IM:DataTypes class individuals\\
		IM:ContextTypes class& dpv:Context, dpv:Location& odrl:LeftOperand& dpv:Context class corresponds to IM:AnyContextType instance. All subclasses of dpv:Context and dpv:Location are inserted as IM:ContextTypes class individuals\\
		IM:Attributes class& ObjectProperty, DatatypeProperty& ObjectProperty, DatatypeProperty& IM:Attributes individuals are generated for properties defined in ODRL and DPV ontologies.\\
		IM:isA& subclassing& odrl:includedIn& DPV subclassing forms specialisation hierarchies in IM leveraging IM:isA relationship. Specialisation relations between ODRL individuals are translated to IM:isA\\
		\bottomrule
	\end{tabularx}
\end{table*}

Based on the findings of Table~\ref{tab:mapping}, that can be generalised for importing and aligning any third-party ontology, a dedicated structure for the import configuration has been designed. It follows a structured approach that allows, e.g., for both subclassing and class individual mappings, depending on the ontology being imported. The configuration is represented as a JSON array of mappings, where each object corresponds to a different ontology import; each mapping object contains the following key elements:

\begin{itemize}
	\item \texttt{classesMappings}: Defines how concepts from the imported ontology are mapped to goodFlows IM classes.
	\begin{itemize}
		\item \texttt{sourceClasses}: A list of one or more ontology classes that are mapped to a single goodFlows IM class. For example, both "Context" and "Location" from DPV are mapped to "ContextTypes", ensuring semantic consistency.
		\item \texttt{targetClass}: Specifies the corresponding goodFlows IM class where the source classes should be aligned.
	\end{itemize}
	\item \texttt{namespace} and \texttt{namespaceDelimiter}: Define the imported ontology's namespace and its delimiter, ensuring that imported entities are correctly referenced.
	\item \texttt{orderOfImporting}: Specifies the sequence in which ontologies are processed, thus ensuring dependencies are resolved correctly.
	\item \texttt{subclassing}: Determines whether the imported ontology forms the vocabulary associated with a class as subclasses (true), as in DPV case, or as class individuals (false), as in ODRL case.
	\item \texttt{specialisationProperties}: Complementary to subclassing processing, in case the last is set to false. Present in the import configuration, it declares specialisation relationships between imported ontology individuals (e.g., odrl:includedIn and skos:broaderTransitive used in ODRL) to be translated into \texttt{isA} relations in goodFlows IM.
	\item \texttt{inclusionProperties}: Present in the import configuration, this property declares inclusion relationships between imported ontology individuals to be translated into \texttt{isPartOf} relations in goodFlows IM.
\end{itemize}

Figure~\ref{fig:alignment-excerpt} shows an excerpt from the goodFlows Information Model ontology created after importing and aligning the DPV and ODRL ontologies; the \texttt{Derive} individual in the Information Model ontology has been aligned with equivalent concepts in both the DPV and ODRL ontologies. As part of the ontology import and alignment process, two owl:sameAs properties have been inserted, associating "http://www.ict-abovo.eu/ontologies/InformationModel\#Derive" to "https://w3id.org/dpv/dpv-owl\#Derive" from DPV and "http://www.w3.org/ns/odrl/2/derive" from ODRL. This ensures semantic interoperability by explicitly stating that these concepts represent the same meaning across different ontologies.


\begin{figure}[!htb]
	\centering
	\includegraphics[width=\linewidth]{figs/alignment-excerpt}
	\caption{Excerpt from the Information Model Ontology}
	\label{fig:alignment-excerpt}
\end{figure}

