ArmorUtils¶
System utility commands for Armor Python API –ArmorPy.
-
class
armor_api.armor_utils_client.
ArmorUtilsClient
(client)[source]¶ Bases:
object
-
apply_buffered_changes
()[source]¶ Apply buffered manipulations to the ontology when its reference has been initialized in buffered manipulation mode
Returns: True if ontology is consistent, False otherwise
Return type: bool
Raises: armor_api.exceptions.ArmorServiceCallError
– if call to ARMOR failsarmor_api.exceptions.ArmorServiceInternalError
– if ARMOR reports an internal error
Note
It returns the boolean consistency state of the ontology. This value is not updated to the last operation if you are working in buffered reasoner or manipulation mode!
-
load_ref_from_file
(owl_file_path, iri, buffered_manipulation=False, reasoner='PELLET', buffered_reasoner=False, mounted=False)[source]¶ Loads an ontology into armor from an .owl file.
Parameters: - owl_file_path (str) –
- iri (str) –
- buffered_manipulation (bool) – set buffered manipulations, default False
- reasoner (str) – set which reasoner to use (PELLET, HERMIT, SNOROCKET, FACT), default PELLET
- buffered_reasoner (bool) – set if reasoner should be buffered, default False
- mounted (bool) – set if the client should be mounted on the reference, default False
Raises: armor_api.exceptions.ArmorServiceCallError
– if call to ARMOR failsarmor_api.exceptions.ArmorServiceInternalError
– if ARMOR reports an internal error
-
mount_on_ref
()[source]¶ Mounts a client on an ontology reference.
Raises: armor_api.exceptions.ArmorServiceCallError
– if call to ARMOR failsarmor_api.exceptions.ArmorServiceInternalError
– if ARMOR reports an internal error
-
save_ref_with_inferences
(filepath)[source]¶ Save ontology with latest inferred axioms to specified filepath
Parameters: filepath (str) –
Returns: Return type: None
Raises: armor_api.exceptions.ArmorServiceCallError
– if call to ARMOR failsarmor_api.exceptions.ArmorServiceInternalError
– if ARMOR reports an internal error
-
set_log_to_file
(switch, filepath='')[source]¶ Set ARMOR to log to file.
Parameters: - switch (bool) –
- filepath (str) –
Raises: armor_api.exceptions.ArmorServiceCallError
– if call to ARMOR failsarmor_api.exceptions.ArmorServiceInternalError
– if ARMOR reports an internal error
-
set_log_to_terminal
(switch)[source]¶ Set ARMOR to log to terminal.
Parameters: switch (bool) –
Raises: armor_api.exceptions.ArmorServiceCallError
– if call to ARMOR failsarmor_api.exceptions.ArmorServiceInternalError
– if ARMOR reports an internal error
-
sync_buffered_reasoner
()[source]¶ Sync ontology reference reasoner when operating in buffered reasoner mode
Returns: True if ontology is consistent, False otherwise
Return type: bool
Raises: armor_api.exceptions.ArmorServiceCallError
– if call to ARMOR failsarmor_api.exceptions.ArmorServiceInternalError
– if ARMOR reports an internal error
-