diff --git a/docs/api/crud/query_edit.rst b/docs/api/crud/query_edit.rst index 9b8c200..199ab2b 100644 --- a/docs/api/crud/query_edit.rst +++ b/docs/api/crud/query_edit.rst @@ -14,10 +14,6 @@ to retrieve, add, or remove axioms, annotations, and other constructs. .. doxygengroup:: CowlOntology :content-only: -.. doxygenstruct:: CowlOntologyId -.. doxygengroup:: CowlOntologyId - :content-only: - .. _querying: Querying ontologies @@ -53,8 +49,7 @@ Editing ontologies Ontologies can be edited by adding or removing axioms, annotations and other constructs, as allowed by the :struct:`CowlOntology` API. They can also be created from scratch by calling -:func:`cowl_manager_get_ontology()` and specifying a unique :struct:`CowlOntologyId` -or a ``NULL`` one, in which case an anonymous ontology is created. +:func:`cowl_manager_new_ontology()`. Access to syntactical details that are not relevant to logic, such as the mapping between prefixed and full IRIs, is provided by a :struct:`CowlSymTable` instance retrievable by calling diff --git a/examples/07_ostream.c b/examples/07_ostream.c index 2121a2b..2d727c9 100644 --- a/examples/07_ostream.c +++ b/examples/07_ostream.c @@ -56,7 +56,7 @@ int main(void) { uvec_push(CowlObjectPtr, &imports, import_iri); CowlOntologyHeader header = { - .id = { iri }, + .iri = iri, .imports = &imports, }; diff --git a/include/cowl.h b/include/cowl.h index d23d4dd..c0de460 100644 --- a/include/cowl.h +++ b/include/cowl.h @@ -96,7 +96,6 @@ #include "cowl_object_type.h" #include "cowl_ontology.h" #include "cowl_ontology_header.h" -#include "cowl_ontology_id.h" #include "cowl_ostream.h" #include "cowl_owl_vocab.h" #include "cowl_position.h" diff --git a/include/cowl_manager.h b/include/cowl_manager.h index e116351..1997300 100644 --- a/include/cowl_manager.h +++ b/include/cowl_manager.h @@ -13,6 +13,7 @@ #ifndef COWL_MANAGER_H #define COWL_MANAGER_H +#include "cowl_attrs.h" #include "cowl_error_handler.h" #include "cowl_import_loader.h" #include "cowl_istream_handlers.h" @@ -24,7 +25,6 @@ COWL_BEGIN_DECLS /// @cond cowl_struct_decl(CowlIStream); cowl_struct_decl(CowlOntology); -cowl_struct_decl(CowlOntologyId); cowl_struct_decl(CowlOStream); /// @endcond @@ -146,29 +146,41 @@ COWL_API bool cowl_manager_iterate_ontologies(CowlManager *manager, CowlIterator *iter); /** - * Gets the ontology with the specified identifier. - * If no existing ontology has the specified identifier, a new ontology is returned. + * Returns a new empty ontology. * * @param manager The manager. - * @param id The ontology identifier. - * @return Ontology with the specified identifier. + * @return New ontology. + */ +COWL_API +COWL_RETAINED +CowlOntology *cowl_manager_new_ontology(CowlManager *manager); + +/** + * Gets the ontology with the specified IRI and version. + * If no existing ontology has the specified IRI and version, a new ontology is returned. + * + * @param manager The manager. + * @param iri The ontology IRI. + * @param version The ontology version. + * @return Ontology with the specified IRI and version. * - * @note You can pass NULL as the ontology identifier, in which case the function returns + * @note You can pass NULL as the IRI and version, in which case the function returns * a new anonymous ontology. */ COWL_API COWL_RETAINED -CowlOntology *cowl_manager_get_ontology(CowlManager *manager, CowlOntologyId const *id); +CowlOntology *cowl_manager_get_ontology(CowlManager *manager, CowlIRI *iri, CowlIRI *version); /** - * Gets the ontology with the specified identifier, if it exists. + * Gets the ontology with the specified IRI and version, if it exists. * * @param manager The manager. - * @param id The ontology identifier. - * @return Ontology with the specified identifier, or NULL if it does not exist. + * @param iri The ontology IRI. + * @param version The ontology version. + * @return Ontology with the specified IRI and version, or NULL if it does not exist. */ COWL_API -CowlOntology *cowl_manager_retrieve_ontology(CowlManager *manager, CowlOntologyId const *id); +CowlOntology *cowl_manager_retrieve_ontology(CowlManager *manager, CowlIRI *iri, CowlIRI *version); /** * Reads an ontology from the file at the specified path. diff --git a/include/cowl_ontology.h b/include/cowl_ontology.h index 9f2e649..a87c8f3 100644 --- a/include/cowl_ontology.h +++ b/include/cowl_ontology.h @@ -17,7 +17,6 @@ #include "cowl_axiom_type.h" #include "cowl_iterator.h" #include "cowl_object.h" -#include "cowl_ontology_id.h" #include "cowl_position.h" #include "cowl_ret.h" @@ -68,14 +67,14 @@ COWL_PURE CowlSymTable *cowl_ontology_get_sym_table(CowlOntology *onto); /** - * Gets the ontology ID. + * Gets the IRI of the ontology. * * @param onto The ontology. - * @return The ontology ID. + * @return The ontology IRI. */ COWL_API COWL_PURE -CowlOntologyId cowl_ontology_get_id(CowlOntology *onto); +CowlIRI *cowl_ontology_get_iri(CowlOntology *onto); /** * Sets the IRI of the ontology. @@ -86,6 +85,16 @@ CowlOntologyId cowl_ontology_get_id(CowlOntology *onto); COWL_API void cowl_ontology_set_iri(CowlOntology *onto, CowlIRI *iri); +/** + * Gets the version of the ontology. + * + * @param onto The ontology. + * @return The version IRI. + */ +COWL_API +COWL_PURE +CowlIRI *cowl_ontology_get_version(CowlOntology *onto); + /** * Sets the version IRI of the ontology. * diff --git a/include/cowl_ontology_header.h b/include/cowl_ontology_header.h index 71a704d..7fa558d 100644 --- a/include/cowl_ontology_header.h +++ b/include/cowl_ontology_header.h @@ -13,7 +13,6 @@ #ifndef COWL_ONTOLOGY_HEADER_H #define COWL_ONTOLOGY_HEADER_H -#include "cowl_ontology_id.h" #include "cowl_vector.h" COWL_BEGIN_DECLS @@ -21,8 +20,11 @@ COWL_BEGIN_DECLS /// Models an ontology header. typedef struct CowlOntologyHeader { - /// Ontology identifier. - CowlOntologyId id; + /// Ontology IRI. + CowlIRI *iri; + + /// Ontology version. + CowlIRI *version; /// Import IRIs. UVec(CowlObjectPtr) const *imports; @@ -45,7 +47,7 @@ typedef struct CowlOntologyHeader { COWL_CONST COWL_INLINE CowlOntologyHeader cowl_ontology_header_empty(void) { - CowlOntologyHeader header = { cowl_ontology_id_anonymous(), NULL, NULL }; + CowlOntologyHeader header = { NULL, NULL, NULL, NULL }; return header; } diff --git a/include/cowl_ontology_id.h b/include/cowl_ontology_id.h deleted file mode 100644 index b11eb12..0000000 --- a/include/cowl_ontology_id.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Declares CowlOntologyId and its API. - * - * @author Ivano Bilenchi - * - * @copyright Copyright (c) 2019 SisInf Lab, Polytechnic University of Bari - * @copyright - * @copyright SPDX-License-Identifier: EPL-2.0 - * - * @file - */ - -#ifndef COWL_ONTOLOGY_ID_H -#define COWL_ONTOLOGY_ID_H - -#include "cowl_attrs.h" -#include "cowl_macros.h" - -COWL_BEGIN_DECLS - -/// @cond -cowl_struct_decl(CowlIRI); -cowl_struct_decl(CowlString); -/// @endcond - -/** - * An object that identifies an ontology. - * - * @see [Ontology IRI and version IRI] - * - * [Ontology IRI and version IRI]: https://www.w3.org/TR/owl2-syntax/#Ontology_IRI_and_Version_IRI - */ -typedef struct CowlOntologyId { - - /// The ontology IRI. - CowlIRI *iri; - - /// The version IRI. - CowlIRI *version; - -} CowlOntologyId; - -/** - * @defgroup CowlOntologyId CowlOntologyId API - * @{ - */ - -/** - * Creates the ID of an anonymous ontology. - * - * @return ID of an anonymous ontology. - */ -COWL_CONST -COWL_INLINE -CowlOntologyId cowl_ontology_id_anonymous(void) { - CowlOntologyId id = { NULL, NULL }; - return id; -} - -/** - * Equality function. - * - * @param lhs LHS of the equality relation. - * @param rhs RHS of the equality relation. - * @return True if the equality relation holds, false otherwise. - * - * @note Ontology IDs are considered equal if they have the same ontology IRI and version IRI. - * Since OWL 2 allows for both the ontology and version IRIs to be simultaneously empty, - * in that case the ontology IDs are considered different unless they are the same instance. - */ -COWL_API -COWL_PURE -bool cowl_ontology_id_equals(CowlOntologyId lhs, CowlOntologyId rhs); - -/** - * Hash function. - * - * @param id The ontology ID. - * @return The hash value. - */ -COWL_API -COWL_PURE -ulib_uint cowl_ontology_id_hash(CowlOntologyId id); - -/// @} - -COWL_END_DECLS - -#endif // COWL_ONTOLOGY_ID_H diff --git a/src/cowl_error_handler.c b/src/cowl_error_handler.c index fefb9a0..be1903f 100644 --- a/src/cowl_error_handler.c +++ b/src/cowl_error_handler.c @@ -67,7 +67,7 @@ cowl_ret cowl_handle_syntax_error(UString desc, CowlAny *origin, CowlErrorLoc lo bool release_source = false; if (!loc.source && cowl_get_type(origin) == COWL_OT_ONTOLOGY) { - loc.source = cowl_to_string(cowl_ontology_get_id(origin).iri); + loc.source = cowl_to_string(cowl_ontology_get_iri(origin)); release_source = true; } diff --git a/src/cowl_istream.c b/src/cowl_istream.c index b949a01..37c9dd8 100644 --- a/src/cowl_istream.c +++ b/src/cowl_istream.c @@ -128,10 +128,14 @@ cowl_ret cowl_istream_process_ontology(CowlIStream *stream, CowlOntology *onto) cowl_ret ret = COWL_OK; CowlIStreamHandlers *handle = &stream->handlers; - if (handle->iri || handle->version) { - CowlOntologyId id = cowl_ontology_get_id(onto); - if (handle->iri && (ret = handle->iri(handle->ctx, id.iri))) return ret; - if (handle->version && (ret = handle->version(handle->ctx, id.version))) return ret; + if (handle->iri) { + CowlIRI *iri = cowl_ontology_get_iri(onto); + if (iri && (ret = handle->iri(handle->ctx, iri))) return ret; + } + + if (handle->version) { + CowlIRI *version = cowl_ontology_get_version(onto); + if (version && (ret = handle->version(handle->ctx, version))) return ret; } if (handle->annot) { diff --git a/src/cowl_manager.c b/src/cowl_manager.c index 4cd9ac6..57feb5c 100644 --- a/src/cowl_manager.c +++ b/src/cowl_manager.c @@ -20,7 +20,6 @@ #include "cowl_object_private.h" #include "cowl_object_type.h" #include "cowl_ontology.h" -#include "cowl_ontology_id.h" #include "cowl_ontology_private.h" #include "cowl_ostream.h" #include "cowl_ostream_private.h" @@ -232,32 +231,35 @@ bool cowl_manager_iterate_ontologies(CowlManager *manager, CowlIterator *iter) { return true; } -CowlOntology *cowl_manager_retrieve_ontology(CowlManager *manager, CowlOntologyId const *id) { - uvec_foreach (CowlObjectPtr, &manager->ontos, onto) { - if (cowl_ontology_id_equals(cowl_ontology_get_id(*onto.item), *id)) { - return *onto.item; - } - } - return NULL; +CowlOntology *cowl_manager_new_ontology(CowlManager *manager) { + return cowl_ontology(manager); } -CowlOntology *cowl_manager_get_ontology(CowlManager *manager, CowlOntologyId const *id) { - if (id) { - CowlOntology *onto = cowl_manager_retrieve_ontology(manager, id); +CowlOntology *cowl_manager_get_ontology(CowlManager *manager, CowlIRI *iri, CowlIRI *version) { + if (iri) { + CowlOntology *onto = cowl_manager_retrieve_ontology(manager, iri, version); if (onto) return cowl_retain(onto); } - CowlOntology *onto = cowl_ontology(manager); + CowlOntology *onto = cowl_manager_new_ontology(manager); if (!onto) return NULL; - if (id) { - cowl_ontology_set_iri(onto, id->iri); - cowl_ontology_set_version(onto, id->version); - } + if (iri) cowl_ontology_set_iri(onto, iri); + if (version) cowl_ontology_set_version(onto, version); return onto; } +CowlOntology *cowl_manager_retrieve_ontology(CowlManager *manager, CowlIRI *iri, CowlIRI *version) { + uvec_foreach (CowlObjectPtr, &manager->ontos, onto) { + if (cowl_ontology_get_iri(*onto.item) == iri && + cowl_ontology_get_version(*onto.item) == version) { + return *onto.item; + } + } + return NULL; +} + cowl_ret cowl_manager_add_ontology(CowlManager *manager, CowlOntology *onto) { return uvec_push(CowlObjectPtr, &manager->ontos, onto) ? COWL_ERR_MEM : COWL_OK; } diff --git a/src/cowl_object.c b/src/cowl_object.c index fbe0e09..780ec38 100644 --- a/src/cowl_object.c +++ b/src/cowl_object.c @@ -235,7 +235,7 @@ CowlIRI *cowl_get_iri(CowlAny *object) { CowlObjectType type = cowl_get_type(object); if (type_is_entity(type)) return cowl_entity_get_iri(object); if (type == COWL_OT_IRI) return object; - return type == COWL_OT_ONTOLOGY ? cowl_ontology_get_id(object).iri : NULL; + return type == COWL_OT_ONTOLOGY ? cowl_ontology_get_iri(object) : NULL; } bool cowl_has_iri(CowlAny *object, CowlIRI *iri) { diff --git a/src/cowl_ontology.c b/src/cowl_ontology.c index 2bcbb52..93cf6a0 100644 --- a/src/cowl_ontology.c +++ b/src/cowl_ontology.c @@ -24,7 +24,6 @@ #include "cowl_object.h" #include "cowl_object_private.h" #include "cowl_object_type.h" -#include "cowl_ontology_id.h" #include "cowl_ontology_private.h" #include "cowl_position.h" #include "cowl_primitive.h" @@ -79,8 +78,8 @@ void cowl_ontology_free(CowlOntology *onto) { cowl_release(onto->manager); cowl_release(onto->st); - cowl_release(onto->id.iri); - cowl_release(onto->id.version); + cowl_release(onto->iri); + cowl_release(onto->version); cowl_release(onto->imports); cowl_release(onto->annot); @@ -107,8 +106,12 @@ CowlSymTable *cowl_ontology_get_sym_table(CowlOntology *onto) { return onto->st; } -CowlOntologyId cowl_ontology_get_id(CowlOntology *onto) { - return onto->id; +CowlIRI *cowl_ontology_get_iri(CowlOntology *onto) { + return onto->iri; +} + +CowlIRI *cowl_ontology_get_version(CowlOntology *onto) { + return onto->version; } CowlVector *cowl_ontology_get_annot(CowlOntology *onto) { @@ -117,16 +120,15 @@ CowlVector *cowl_ontology_get_annot(CowlOntology *onto) { bool cowl_ontology_equals(CowlOntology *lhs, CowlOntology *rhs) { if (lhs == rhs) return true; - - // If the ontology IRIs are both NULL, then both ontologies are anonymous. - // If they were equal, they would have passed the pointer equality check. - if (!(lhs->id.iri || rhs->id.iri)) return false; - - return cowl_ontology_id_equals(lhs->id, rhs->id); + if (!(lhs->iri || rhs->iri)) return false; + return lhs->iri == rhs->iri && lhs->version == rhs->version; } ulib_uint cowl_ontology_hash(CowlOntology *onto) { - return cowl_ontology_id_hash(onto->id); + if (!onto->iri) return 0; + ulib_uint hash = cowl_primitive_hash(onto->iri); + if (onto->version) hash = ulib_hash_combine(hash, cowl_primitive_hash(onto->version)); + return hash; } ulib_uint cowl_ontology_axiom_count(CowlOntology *onto, bool imports) { @@ -503,13 +505,13 @@ bool cowl_ontology_iterate_related(CowlOntology *onto, CowlAnyPrimitive *primiti } void cowl_ontology_set_iri(CowlOntology *onto, CowlIRI *iri) { - cowl_release(onto->id.iri); - onto->id.iri = iri ? cowl_retain(iri) : NULL; + cowl_release(onto->iri); + onto->iri = iri ? cowl_retain(iri) : NULL; } void cowl_ontology_set_version(CowlOntology *onto, CowlIRI *version) { - cowl_release(onto->id.version); - onto->id.version = version ? cowl_retain(version) : NULL; + cowl_release(onto->version); + onto->version = version ? cowl_retain(version) : NULL; } typedef struct CowlAxiomCtx { diff --git a/src/cowl_ontology_id.c b/src/cowl_ontology_id.c deleted file mode 100644 index 55fd573..0000000 --- a/src/cowl_ontology_id.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Ivano Bilenchi - * - * @copyright Copyright (c) 2019 SisInf Lab, Polytechnic University of Bari - * @copyright - * @copyright SPDX-License-Identifier: EPL-2.0 - * - * @file - */ - -#include "cowl_ontology_id.h" -#include "cowl_primitive_private.h" -#include "ulib.h" - -bool cowl_ontology_id_equals(CowlOntologyId lhs, CowlOntologyId rhs) { - if (lhs.iri != rhs.iri && !cowl_primitive_equals(lhs.iri, rhs.iri)) return false; - if (lhs.version != rhs.version && !cowl_primitive_equals(lhs.version, rhs.version)) - return false; - return true; -} - -ulib_uint cowl_ontology_id_hash(CowlOntologyId id) { - if (id.iri) { - ulib_uint hash = cowl_primitive_hash(id.iri); - if (id.version) hash = ulib_hash_combine(hash, cowl_primitive_hash(id.version)); - return hash; - } - if (id.version) return cowl_primitive_hash(id.version); - return 0; -} diff --git a/src/cowl_ontology_private.h b/src/cowl_ontology_private.h index f246ed1..f9d15ff 100644 --- a/src/cowl_ontology_private.h +++ b/src/cowl_ontology_private.h @@ -14,7 +14,6 @@ #include "cowl_axiom_type.h" #include "cowl_object_private.h" #include "cowl_ontology.h" -#include "cowl_ontology_id.h" #include "cowl_table.h" #include "cowl_vector.h" @@ -24,7 +23,8 @@ cowl_struct_decl(CowlSymTable); struct CowlOntology { CowlObject super; - CowlOntologyId id; + CowlIRI *iri; + CowlIRI *version; CowlManager *manager; CowlSymTable *st; CowlTable *imports; diff --git a/src/cowl_ostream.c b/src/cowl_ostream.c index 4d70874..5bc4cf0 100644 --- a/src/cowl_ostream.c +++ b/src/cowl_ostream.c @@ -144,7 +144,8 @@ static cowl_ret cowl_ostream_write_ontology_stream(CowlOStream *stream, CowlOnto } CowlOntologyHeader header = { - .id = cowl_ontology_get_id(onto), + .iri = cowl_ontology_get_iri(onto), + .version = cowl_ontology_get_version(onto), .imports = &imports, .annotations = cowl_vector_get_data(cowl_ontology_get_annot(onto)), }; diff --git a/src/cowl_types.h b/src/cowl_types.h index 333b8fc..8650c20 100644 --- a/src/cowl_types.h +++ b/src/cowl_types.h @@ -24,7 +24,6 @@ #include "cowl_nary_axiom_type.h" #include "cowl_nary_type.h" #include "cowl_object_type.h" -#include "cowl_ontology_id.h" #include "cowl_primitive_flags.h" #include "cowl_primitive_type.h" #include "cowl_quant_type.h" diff --git a/src/cowl_writer.c b/src/cowl_writer.c index 6160bf7..738490d 100644 --- a/src/cowl_writer.c +++ b/src/cowl_writer.c @@ -88,9 +88,13 @@ ustream_ret cowl_write_error(UOStream *s, CowlError const *error) { break; } case COWL_OT_ONTOLOGY: { - CowlOntology *onto = error->origin; - cowl_write_static(s, "ontology "); - cowl_write_iri(s, cowl_ontology_get_id(onto).iri); + CowlIRI *iri = cowl_ontology_get_iri(error->origin); + if (iri) { + cowl_write_static(s, "ontology "); + cowl_write_iri(s, iri); + } else { + cowl_write_static(s, "anonymous ontology"); + } break; } default: { diff --git a/src/writer/functional/cowl_func_writer.c b/src/writer/functional/cowl_func_writer.c index 2fd62b6..4b57454 100644 --- a/src/writer/functional/cowl_func_writer.c +++ b/src/writer/functional/cowl_func_writer.c @@ -24,7 +24,6 @@ #include "cowl_object.h" #include "cowl_object_type.h" #include "cowl_ontology_header.h" -#include "cowl_ontology_id.h" #include "cowl_primitive_private.h" #include "cowl_ret.h" #include "cowl_sub_obj_prop_axiom.h" @@ -325,12 +324,12 @@ static ustream_ret cowl_func_write_import(UOStream *s, CowlIRI *iri) { return s->state; } -static ustream_ret cowl_func_write_onto_id(UOStream *s, CowlOntologyId *id) { - if (id->iri) cowl_func_write_full_iri(s, id->iri); +static ustream_ret cowl_func_write_onto_iri_version(UOStream *s, CowlIRI *iri, CowlIRI *version) { + if (iri) cowl_func_write_full_iri(s, iri); - if (id->version) { - if (id->iri) cowl_write_static(s, " "); - cowl_func_write_full_iri(s, id->version); + if (version) { + if (iri) cowl_write_static(s, " "); + cowl_func_write_full_iri(s, version); } return s->state; @@ -360,7 +359,7 @@ cowl_func_write_onto_header(UOStream *s, CowlOntologyHeader header, CowlSymTable cowl_write_static(s, "Ontology"); cowl_write_static(s, "("); - cowl_func_write_onto_id(s, &header.id); + cowl_func_write_onto_iri_version(s, header.iri, header.version); cowl_write_static(s, "\n"); if (header.imports) { diff --git a/test/tests/cowl_manager_tests.c b/test/tests/cowl_manager_tests.c index f18b551..9735c60 100644 --- a/test/tests/cowl_manager_tests.c +++ b/test/tests/cowl_manager_tests.c @@ -160,7 +160,7 @@ static bool filter_axiom(void *cls, CowlAny *axiom) { bool cowl_test_manager_edit_ontology(void) { CowlManager *manager = cowl_manager(); - CowlOntology *onto = cowl_manager_get_ontology(manager, NULL); + CowlOntology *onto = cowl_manager_new_ontology(manager); utest_assert_not_null(onto); utest_assert_uint(cowl_manager_ontology_count(manager), ==, 1); utest_assert_uint(cowl_ontology_axiom_count(onto, false), ==, 0); diff --git a/test/tests/cowl_ontology_tests.c b/test/tests/cowl_ontology_tests.c index 74544b2..cf9a753 100644 --- a/test/tests/cowl_ontology_tests.c +++ b/test/tests/cowl_ontology_tests.c @@ -89,14 +89,11 @@ bool cowl_test_ontology_deinit(void) { return true; } -bool cowl_test_ontology_get_id(void) { +bool cowl_test_ontology_get_iri_version(void) { CowlIRI *expected_onto_iri = cowl_iri_from_static(test_onto_iri); - cowl_assert_equal(iri, cowl_get_iri(onto), expected_onto_iri); - - CowlOntologyId id = cowl_ontology_get_id(onto); - cowl_assert_equal(iri, id.iri, expected_onto_iri); + cowl_assert_equal(iri, cowl_ontology_get_iri(onto), expected_onto_iri); + utest_assert_ptr(cowl_ontology_get_version(onto), ==, NULL); cowl_release(expected_onto_iri); - return true; } diff --git a/test/tests/cowl_ontology_tests.h b/test/tests/cowl_ontology_tests.h index 3ba5467..eb10ce4 100644 --- a/test/tests/cowl_ontology_tests.h +++ b/test/tests/cowl_ontology_tests.h @@ -19,7 +19,7 @@ COWL_BEGIN_DECLS bool cowl_test_ontology_init(void); bool cowl_test_ontology_deinit(void); -bool cowl_test_ontology_get_id(void); +bool cowl_test_ontology_get_iri_version(void); bool cowl_test_ontology_axiom_count(void); bool cowl_test_ontology_imports_count(void); bool cowl_test_ontology_axiom_count_for_type(void); @@ -30,7 +30,7 @@ bool cowl_test_ontology_has_primitive(void); bool cowl_test_ontology_has_axiom(void); #define COWL_ONTOLOGY_TESTS \ - cowl_test_ontology_init, cowl_test_ontology_get_id, cowl_test_ontology_axiom_count, \ + cowl_test_ontology_init, cowl_test_ontology_get_iri_version, cowl_test_ontology_axiom_count, \ cowl_test_ontology_imports_count, cowl_test_ontology_axiom_count_for_type, \ cowl_test_ontology_axiom_count_for_types, cowl_test_ontology_primitives_count, \ cowl_test_ontology_axiom_count_for_primitive, cowl_test_ontology_has_primitive, \