ontouml_models_lib

The __init__.py file for the OntoUML/UFO catalog package.

This package provides a set of tools for manipulating and querying ontology models within the OntoUML/UFO framework. The library is designed to help users work with concepts and models that conform to the standards and practices outlined in the OntoUML/UFO Catalog, a structured and open-source repository containing high-quality, curated OntoUML and UFO ontology models.

About the OntoUML/UFO Catalog

The OntoUML/UFO Catalog, also known as the FAIR Model Catalog for Ontology-Driven Conceptual Modeling Research, is a comprehensive and collaborative repository that supports empirical research in OntoUML and UFO, as well as in general conceptual modeling. It offers a diverse collection of models in machine-readable formats (JSON and Turtle) that are accessible via permanent identifiers. These models cover various domains and are created by modelers with differing levels of expertise.

Public API

This file defines the public API of the package, exposing the following classes and enumerations:

Public Classes

  • Catalog: Manages a collection of ontology models, enabling queries across multiple models within the catalog.

  • Query: Encapsulates SPARQL queries, providing methods for loading, hashing, and executing queries.

  • Model: Represents an individual ontology model, allowing for querying and metadata management.

Public Enumerations

  • OntologyPurpose: Enumerates the standardized purposes for which an ontology model may be designed.

  • OntologyDevelopmentContext: Enumerates the possible development contexts for an ontology model.

  • OntologyRepresentationStyle: Enumerates the representation styles adopted in an ontology model.

  • OntologyType: Enumerates the categories of ontologies according to their scope.

Intended Use

This library is specifically designed to assist users in manipulating and querying ontology models that conform to the OntoUML/UFO standards. It provides a robust framework for interacting with the formal representations of concepts, relations, and constraints that are central to the OntoUML/UFO modeling approach.

Example:

>>> from ontouml_models_lib import Catalog, Query, Model
>>> catalog = Catalog('/path/to/catalog')
>>> query = Query('/path/to/query.sparql')
>>> model = Model('/path/to/ontology_model_folder')

For more information on the OntoUML/UFO project and to access the latest models, please visit the official repository: https://github.com/OntoUML/ontouml-models

Subpackages

Submodules

Classes

Catalog

Manages a collection of ontology models in the OntoUML/UFO Catalog.

Query

Represents a SPARQL query for execution within the OntoUML/UFO catalog.

Model

Represents an individual ontology model within the OntoUML/UFO catalog.

OntologyPurpose

Represents the purposes for which ontologies are created.

OntologyDevelopmentContext

Represents the different contexts in which ontologies are developed.

OntologyRepresentationStyle

Represents the styles of ontology representation.

OntologyType

Represents the types of ontologies based on their scope and application.

Package Contents

class ontouml_models_lib.Catalog(catalog_path, limit_num_models=0)

Bases: ontouml_models_lib.utils.queryable_element.QueryableElement

Manages a collection of ontology models in the OntoUML/UFO Catalog.

The Catalog class allows loading, managing, and executing queries on multiple ontology models. It compiles graphs of individual models into a cohesive dataset, enabling complex queries across the entire catalog. This class inherits from QueryableElement, which provides functionality to execute SPARQL queries using RDFLib.

Variables:
  • path (str) – The path to the catalog directory.

  • path_models (str) – The path to the directory containing the ontology model subfolders.

  • models (list[Model]) – A list of Model instances representing the loaded ontology models.

  • graph (rdflib.Graph) – An RDFLib Graph object representing the merged graph of all ontology models.

Parameters:
  • catalog_path (Union[pathlib.Path, str])

  • limit_num_models (int)

Examples

Basic usage example of the Catalog class:

>>> from ontouml_models_lib import Catalog
>>> from ontouml_models_lib import Query
>>> # Initialize the catalog with the path to the directory
>>> catalog = Catalog('/path/to/catalog')
>>> # Load a specific query from a file
>>> query = Query('./queries/query.sparql')
>>> # Execute the query on all models in the catalog
>>> catalog.execute_query_on_all_models(query)
>>> # Execute multiple queries on all models in the catalog
>>> queries = Query.load_queries('./queries')
>>> catalog.execute_queries_on_all_models(queries)
>>> # Execute multiple queries on a specific model
>>> model = catalog.get_model('some_model_id')
>>> catalog.execute_queries_on_model(queries, model)
catalog_path
path: pathlib.Path
path_models: pathlib.Path
models: list[ontouml_models_lib.model.Model] = []
graph: rdflib.Graph
execute_query_on_models(query, models, results_path=None)

Execute a specific Query on a specific Model and save the results.

This method runs a single SPARQL query on a specific ontology model and saves the results to the specified directory. If no directory is provided, the results are saved in the default “./results” directory.

Parameters:
  • query (Query) – A Query instance representing the SPARQL query to be executed.

  • models (list[Model]) – A list of Model instances on which the query will be executed.

  • results_path (Optional[Union[str, Path]]) – Optional; Path to the directory where the query results should be saved. If not provided, defaults to “./results”.

Raises:
  • FileNotFoundError – If the provided results path does not exist and cannot be created.

  • Exception – For any other errors that occur during query execution.

Return type:

None

Example:

>>> from ontouml_models_lib import Catalog
>>> from ontouml_models_lib import Query
>>> catalog = Catalog('/path/to/catalog')
>>> query = Query('./queries/query.sparql')  # Load a SPARQL query from a file
>>> model = catalog.get_model('some_model_id')  # Retrieve a model by its ID
>>> catalog.execute_query_on_model(query, model)
execute_query_on_all_models(query, results_path=None)

Execute a single Query instance on all loaded Model instances in the catalog and save the results.

This method runs a single SPARQL query across all ontology models loaded in the catalog. The results are saved in the specified directory, or in the default “./results” directory if no directory is provided.

Parameters:
  • query (Query) – A Query instance representing the SPARQL query to be executed on all models.

  • results_path (Optional[Union[str, Path]]) – Optional; Path to the directory where the query results should be saved. If not provided, defaults to “./results”.

Raises:
  • FileNotFoundError – If the provided results path does not exist and cannot be created.

  • Exception – For any other errors that occur during query execution.

Return type:

None

Example:

>>> from ontouml_models_lib import Catalog
>>> from ontouml_models_lib import Query
>>> catalog = Catalog('/path/to/catalog')
>>> query = Query('./queries/query.sparql')  # Load a SPARQL query from a file
>>> catalog.execute_query_on_all_models(query)  # Execute the query on all models
execute_queries_on_model(queries, model, results_path=None)

Execute a list of Query instances on a specific Model instance and save the results.

This method runs multiple SPARQL queries on a specific ontology model. The results of each query are saved in the specified directory, or in the default “./results” directory if no directory is provided.

Parameters:
  • queries (list[Query]) – A list of Query instances to be executed on the model.

  • model (Model) – A Model instance on which the queries will be executed.

  • results_path (Optional[Union[str, Path]]) – Optional; Path to the directory where the query results should be saved. If not provided, defaults to “./results”.

Raises:
  • FileNotFoundError – If the provided results path does not exist and cannot be created.

  • Exception – For any other errors that occur during query execution.

Return type:

None

Example:

>>> from ontouml_models_lib import Catalog
>>> from ontouml_models_lib import Query
>>> catalog = Catalog('/path/to/catalog')
>>> model = catalog.get_model('some_model_id')  # Retrieve a model by its ID
>>> queries = Query.load_queries('./queries')  # Load multiple SPARQL queries from a directory
>>> catalog.execute_queries_on_model(queries, model)
execute_queries_on_models(queries, models, results_path=None)

Execute a list of Query instances on a list of Model instances and save the results.

This method runs multiple SPARQL queries across a specified set of ontology models in the catalog. The results of each query on each model are saved in the specified directory, or in the default “./results” directory if no directory is provided.

Parameters:
  • queries (list[Query]) – A list of Query instances to be executed on the models.

  • models (list[Model]) – A list of Model instances on which the queries will be executed.

  • results_path (Optional[Union[str, Path]]) – Optional; Path to the directory where the query results should be saved. If not provided, defaults to “./results”.

Raises:
  • FileNotFoundError – If the provided results path does not exist and cannot be created.

  • Exception – For any other errors that occur during query execution.

Return type:

None

Example:

>>> from ontouml_models_lib import Catalog
>>> from ontouml_models_lib import Query
>>> catalog = Catalog('/path/to/catalog')
>>> models = catalog.get_models(language="en")  # Filter models by language
>>> queries = Query.load_queries('./queries')  # Load multiple SPARQL queries from a directory
>>> catalog.execute_queries_on_models(queries, models)
execute_queries_on_all_models(queries, results_path=None)

Execute a list of Query instances on all loaded Model instances in the catalog and save the results.

This method runs multiple SPARQL queries across all ontology models loaded in the catalog. The results of each query on each model are saved in the specified directory, or in the default “./results” directory if no directory is provided.

Parameters:
  • queries (list[Query]) – A list of Query instances to be executed on all models.

  • results_path (Optional[Union[str, Path]]) – Optional; Path to the directory where the query results should be saved. If not provided, defaults to “./results”.

Raises:
  • FileNotFoundError – If the provided results path does not exist and cannot be created.

  • Exception – For any other errors that occur during query execution.

Return type:

None

Example:

>>> from ontouml_models_lib import Catalog
>>> from ontouml_models_lib import Query
>>> catalog = Catalog('/path/to/catalog')
>>> queries = Query.load_queries('./queries')  # Load multiple SPARQL queries from a directory
>>> catalog.execute_queries_on_all_models(queries)  # Execute the queries on all models
get_model(model_id)

Retrieve a model from the catalog by its ID.

This method searches for a model within the catalog’s loaded models by its unique ID. If a model with the specified ID is found, it is returned. Otherwise, a ValueError is raised.

Parameters:

model_id (str) – The ID of the model to retrieve.

Returns:

The model with the specified ID.

Return type:

Model

Raises:

ValueError – If no model with the specified ID is found.

Example:

>>> from ontouml_models_lib import Catalog
>>> catalog = Catalog('/path/to/catalog')
>>> model = catalog.get_model('some_model_id')  # Retrieve a model by its unique ID
get_models(operand='and', **filters)

Return a list of models that match the given attribute restrictions.

This method filters the loaded models based on specified attribute restrictions. It supports logical operations (“and” or “or”) to combine multiple filters. If only a single filter is provided, the operand is ignored.

Parameters:
  • operand (str) – Logical operand for combining filters (“and” or “or”). Defaults to “and”.

  • filters (dict[str, Any]) – Attribute restrictions to filter models. Attribute names and values should be passed as keyword arguments. Multiple values for the same attribute can be provided as a list.

Returns:

List of models that match the restrictions.

Return type:

list[Model]

Raises:

ValueError – If an invalid operand is provided.

Example:

>>> from ontouml_models_lib import Catalog
>>> catalog = Catalog('/path/to/catalog')
>>> # Filter models by a single attribute (language)
>>> filtered_models = catalog.get_models(language="en")
>>> # Filter models by multiple keywords
>>> filtered_models = catalog.get_models(operand="or", keyword=["safety", "geology"])
>>> # Filter models by multiple attributes (keyword and language)
>>> filtered_models = catalog.get_models(operand="and", keyword="safety", language="en")
remove_model_by_id(model_id)

Remove a model from the catalog by its ID.

This method searches for a model within the catalog’s loaded models by its unique ID. If a model with the specified ID is found, it is removed from the catalog. Otherwise, a ValueError is raised.

Parameters:

model_id (str) – The ID of the model to remove.

Raises:

ValueError – If no model with the specified ID is found.

Return type:

None

Example:

>>> from ontouml_models_lib import Catalog
>>> catalog = Catalog('/path/to/catalog')
>>> catalog.remove_model_by_id('some_model_id')  # Remove a model by its unique ID
_load_models(limit_num_models)

Load ontology models from the catalog directory.

This method scans the catalog directory for subfolders, each representing an ontology model. It loads the models from these subfolders and initializes them as instances of the Model class. The loaded models are stored in the models attribute of the Catalog instance.

Parameters:

limit_num_models (int) – The maximum number of models to load. If 0, load all models.

Raises:

FileNotFoundError – If the catalog directory does not contain any model subfolders.

Return type:

None

_get_subfolders()

Retrieve the names of all subfolders in the catalog directory.

This method identifies all subfolders within the catalog’s path_models directory, which represent individual ontology models. The subfolders are expected to have the necessary ontology and metadata files for each model.

Returns:

A list of subfolder names within the catalog directory.

Return type:

list

_create_catalog_graph()

Create a merged RDFLib graph from all loaded models in the catalog.

This method combines the RDF graphs of all loaded models into a single RDFLib Graph object. The merged graph allows for executing SPARQL queries across the entire catalog, enabling comprehensive queries that span multiple models.

Returns:

A merged RDFLib graph containing all triples from the models in the catalog.

Return type:

Graph

_match_model(model, filters, operand)

Check if a model matches the specified attribute filters.

This method evaluates whether a model meets the attribute restrictions defined in the filters dictionary. It supports combining multiple filters using logical operations (“and” or “or”), and returns a boolean indicating whether the model satisfies the filter conditions.

Parameters:
  • model (Model) – The model to be checked against the filters.

  • filters (dict[str, Any]) – A dictionary of attribute restrictions used to filter models. Attribute names and values are passed as keyword arguments.

  • operand (str) – Logical operand for combining filters (“and” or “or”). Defaults to “and”.

Returns:

True if the model matches the filter conditions; False otherwise.

Return type:

bool

Raises:

ValueError – If an invalid operand is provided (not “and” or “or”).

_match_single_filter(model, attr, value)

Check if a model matches a single attribute filter.

This method evaluates whether a model meets a single attribute restriction. It compares the model’s attribute value to the provided filter value and returns a boolean indicating whether there is a match. It handles both single-value and list-value comparisons.

Parameters:
  • model (Model) – The model to be checked against the filter.

  • attr (str) – The name of the attribute to filter by.

  • value (Any) – The expected value or list of values to filter by.

Returns:

True if the model’s attribute matches the filter; False otherwise.

Return type:

bool

class ontouml_models_lib.Query(query_file)

Represents a SPARQL query for execution within the OntoUML/UFO catalog.

The Query class encapsulates a SPARQL query, providing methods for loading the query from a file, computing a persistent hash for the query content, and managing multiple queries through batch loading. This class ensures that queries are handled consistently, facilitating their reuse and reliable execution across RDF graphs representing ontology models.

Variables:
  • query_file_path (Path) – The path to the file from which the SPARQL query was loaded.

  • query_content (str) – The content of the SPARQL query as a string.

  • hash (int) – A persistent hash value computed from the query content, used to ensure consistent result management.

Parameters:

query_file (Union[str, pathlib.Path])

Example:

>>> from ontouml_models_lib import Query
>>> query = Query('/path/to/query.sparql')
>>> print(query.query_content)
# Output: "SELECT ?s WHERE { ?s ?p ?o }"
query_file
query_file_path: pathlib.Path
name: str
query_content: str
hash: int
static load_queries(queries_path)

Load all query_content files from the specified directory catalog_path and return a list of Query instances.

Parameters:

queries_path (Path) – Path to the directory containing query_content files.

Returns:

List of Query instances.

Return type:

list[Query]

execute_on_models(models, results_path=None)

Execute the query on a list of models and consolidate the results into a single file.

This method executes the query across multiple ontology models and saves all results into a single consolidated file.

Parameters:
  • models (list[Model]) – A list of Model instances on which the query will be executed.

  • results_path (Optional[Union[str, Path]]) – Optional; Path to the directory where the query results should be saved. If not provided, defaults to “./results”.

Raises:

Exception – For any errors that occur during query execution.

Return type:

None

_save_results(results, results_path, suffix='')

Save the results to a file.

This method is responsible for saving the results of the query execution to a file.

Parameters:
  • results (list[dict]) – The results to save.

  • results_path (Path) – The path to save the results file.

  • suffix (str) – An optional suffix for the filename to distinguish different types of results.

Return type:

None

static _read_query_file(query_file)

Read the content of a SPARQL query file.

This method opens a SPARQL query file, reads its content, and returns it as a string. The file is read using UTF-8 encoding to ensure compatibility with a wide range of characters.

Parameters:

query_file (Path) – The path to the SPARQL query file.

Returns:

The content of the SPARQL query file as a string.

Return type:

str

Raises:
  • FileNotFoundError – If the specified query file does not exist.

  • OSError – If an error occurs while reading the query file.

static _compute_persistent_hash(content)

Compute a persistent hash value for the content of a SPARQL query.

This method generates a SHA-256 hash from the content of a SPARQL query string. The hash is computed in a way that ensures consistency across executions, facilitating the identification and management of query results.

Parameters:

content (str) – The content of the SPARQL query to be hashed.

Returns:

The computed hash value for the query content.

Return type:

int

class ontouml_models_lib.Model(model_path)

Bases: ontouml_models_lib.utils.queryable_element.QueryableElement

Represents an individual ontology model within the OntoUML/UFO catalog.

The Model class extends the QueryableElement class to manage and interact with RDF graphs representing ontology models. It provides methods for loading RDF graphs, extracting metadata from associated YAML files, and executing SPARQL queries. This class ensures that ontology data is consistently managed and that metadata attributes are easily accessible.

Variables:
  • title (str) – The title of the ontology model, as determined by the dct:title property. There must be at most one title per language.

  • keyword (list[str]) – A list of keywords associated with the ontology model, aiding in the categorization and searchability of the model.

  • acronym (Optional[str]) – An optional acronym for the ontology model, providing a shorthand identifier.

  • source (Optional[str]) – The source or origin of the ontology model, typically a publication, organization, or project. It is recommended to use persistent and resolvable identifiers, such as DOIs or DBLP URIs, to refer to these resources.

  • language (Optional[str]) – The language in which the lexical labels of the ontology model are written. The use of values from the IANA Language Sub Tag Registry (e.g., “en”, “pt”) is required.

  • designedForTask (list[OntologyPurpose]) – A list of standardized purposes for which the ontology model was designed, categorized using the OntologyPurpose enumeration. Examples include Conceptual Clarification, Data Publication, and Decision Support Systems.

  • context (list[OntologyDevelopmentContext]) – The development context of the ontology model, classified under the OntologyDevelopmentContext enumeration. Examples include Research, Industry, and Classroom.

  • representationStyle (Optional[OntologyRepresentationStyle]) – The representation style of the ontology model, categorized under the OntologyRepresentationStyle enumeration. Examples include OntoumlStyle and UfoStyle.

  • ontologyType (Optional[OntologyType]) – The type of ontology, categorized under the OntologyType enumeration. Examples include Core, Domain, and Application.

  • theme (Optional[str]) – The central theme of the ontology model, identified according to a theme taxonomy such as the Library of Congress Classification (LCC).

  • contributor (Optional[str]) – An optional contributor to the ontology model, typically a person or organization that contributed to its development.

  • editorialNote (Optional[str]) – An optional editorial note providing additional context or comments regarding the ontology model.

  • issued (Optional[int]) – The year the ontology model was issued or published, represented as an integer.

  • landingPage (Optional[str]) – A URL representing the landing page or home page for the ontology model.

  • license (Optional[str]) – The license under which the ontology model is distributed. It is recommended to use a standard license identifier, such as those from SPDX (e.g., “CC-BY-4.0”).

  • modified (Optional[int]) – The year the ontology model was last modified, represented as an integer.

Parameters:

model_path (Union[pathlib.Path, str])

Example:

>>> from ontouml_models_lib import Model
>>> model = Model('/path/to/ontology_model_folder')
>>> print(model.title)
# Output: "Example Ontology Title"
>>> print(model.keyword)
# Output: ["ontology", "example"]
acronym: str | None = None
context: list[ontouml_models_lib.enumerations.OntologyDevelopmentContext] = []
contributor: str | None = None
designedForTask: list[ontouml_models_lib.enumerations.OntologyPurpose] = []
editorialNote: str | None = None
issued: int | None = None
keyword: list[str] = []
landingPage: str | None = None
language: str | None = None
license: str | None = None
modified: int | None = None
ontologyType: ontouml_models_lib.enumerations.OntologyType | None = None
representationStyle: ontouml_models_lib.enumerations.OntologyRepresentationStyle | None = None
source: str | None = None
theme: str | None = None
title: str = ''
model_path: pathlib.Path
path_model_graph
path_metadata_graph
path_metadata_yaml
_compute_consistent_hash(graph)

Compute a consistent hash value for an RDFLib graph.

This method generates a SHA-256 hash for an RDFLib graph by first serializing it to a canonical format (N-Triples), sorting the serialized triples, and then encoding the sorted serialization to UTF-8. The resulting hash value is used to ensure consistency and integrity of the graph’s content.

Parameters:

graph (Graph) – The RDFLib graph to be hashed.

Returns:

The computed hash value for the RDFLib graph.

Return type:

int

_load_graph_safely(ontology_file)

Safely load an RDFLib graph from a file.

This method loads an RDFLib graph from a specified ontology file, ensuring that the file exists and is correctly parsed. It determines the file format based on its extension and returns the loaded graph.

Parameters:

ontology_file (Path) – The path to the ontology file to be loaded.

Returns:

The loaded RDFLib graph.

Return type:

Graph

Raises:
  • FileNotFoundError – If the ontology file does not exist.

  • OSError – If an error occurs during the parsing of the ontology file.

_populate_attributes(yaml_file)

Populate the model’s attributes from a YAML metadata file.

This method reads a YAML file containing metadata and assigns the corresponding values to the model’s attrs. It handles enumerations by matching the string values in the YAML file to the appropriate enumeration members. The method supports both single-value and list-value attributes.

Parameters:

yaml_file (Path) – The path to the YAML file containing the metadata.

Raises:
  • FileNotFoundError – If the YAML metadata file does not exist.

  • ValueError – If an invalid value is encountered for an enumeration attribute.

Return type:

None

class ontouml_models_lib.OntologyPurpose(*args, **kwds)

Bases: enum.Enum

Represents the purposes for which ontologies are created.

Variables:
  • CONCEPTUAL_CLARIFICATION – Created to clarify and untangle complex notions and relations through ontological analysis.

  • DATA_PUBLICATION – Created to support data publication, such as generating an OWL vocabulary to publish data as linked open data.

  • DECISION_SUPPORT_SYSTEM – Created during the development of a decision support system.

  • EXAMPLE – Created to demonstrate OntoUML’s application, support an experiment, or exemplify model reuse in specific scenarios.

  • INFORMATION_RETRIEVAL – Created to support the design of an information retrieval system.

  • INTEROPERABILITY – Created to support data integration, vocabulary alignment, or interoperability between software systems.

  • LANGUAGE_ENGINEERING – Created for the design of a domain-specific modeling language.

  • LEARNING – Created by authors to learn UFO and OntoUML, often as part of a course assignment.

  • ONTOLOGIC_ANALYSIS – Created as part of a broader ontological analysis.

  • SOFTWARE_ENGINEERING – Created during the development of an information system, such as generating a relational database schema.

These purposes categorize ontologies based on their intended use, from data publication to software engineering and conceptual analysis.

CONCEPTUAL_CLARIFICATION = 'ConceptualClarification'
DATA_PUBLICATION = 'DataPublication'
DECISION_SUPPORT_SYSTEM = 'DecisionSupportSystem'
EXAMPLE = 'Example'
INFORMATION_RETRIEVAL = 'InformationRetrieval'
INTEROPERABILITY = 'Interoperability'
LANGUAGE_ENGINEERING = 'LanguageEngineering'
LEARNING = 'Learning'
ONTOLOGIC_ALANALYSIS = 'OntologicalAnalysis'
SOFTWARE_ENGINEERING = 'SoftwareEngineering'
class ontouml_models_lib.OntologyDevelopmentContext(*args, **kwds)

Bases: enum.Enum

Represents the different contexts in which ontologies are developed.

Variables:
  • CLASSROOM – Indicates that the ontology was developed within an educational setting, such as a classroom.

  • INDUSTRY – Indicates that the ontology was developed for or within an industrial or corporate context.

  • RESEARCH – Indicates that the ontology was developed as part of a research project, often associated with academic publications.

These contexts categorize ontologies based on their origin, whether they are created in educational, industrial, or research environments.

CLASSROOM = 'Classroom'
INDUSTRY = 'Industry'
RESEARCH = 'Research'
class ontouml_models_lib.OntologyRepresentationStyle(*args, **kwds)

Bases: enum.Enum

Represents the styles of ontology representation.

Variables:
  • ONTOUML_STYLE – Characterizes a model that contains at least one class, relation, or property using a valid OntoUML stereotype.

  • UFO_STYLE – Characterizes a model that contains at least one class or relation from UFO (Unified Foundational Ontology) without an OntoUML stereotype.

These representation styles classify ontologies based on whether they adhere to OntoUML stereotypes or use foundational ontology elements from UFO.

ONTOUML_STYLE = 'OntoumlStyle'
UFO_STYLE = 'UfoStyle'
class ontouml_models_lib.OntologyType(*args, **kwds)

Bases: enum.Enum

Represents the types of ontologies based on their scope and application.

Variables:
  • CORE – An ontology that grasps central concepts and relations of a given domain, often integrating several domain ontologies and being applicable in multiple scenarios.

  • DOMAIN – An ontology that describes how a community conceptualizes a phenomenon of interest, typically narrower in scope than a core ontology.

  • APPLICATION – An ontology that specializes a domain ontology for a particular application, representing a model of a domain according to a specific viewpoint.

These types classify ontologies based on their scope, from core ontologies applicable in multiple domains to specialized application ontologies.

CORE = 'Core'
DOMAIN = 'Domain'
APPLICATION = 'Application'