ArmorQuery

Querying commands for Armor Python API –ArmorPy.

class armor_api.armor_query_client.ArmorQueryClient(client)[source]

Bases: object

check_ind_exists(ind_name)[source]

Utility function to check if an arbitrary named individual exists.

Parameters:

ind_name (str) – the individual to be checked

Returns:

True if individual exists, else False

Return type:

bool

Raises:
  • armor_api.exceptions.ArmorServiceCallError – if call to ARMOR fails.
  • armor_api.exceptions.ArmorServiceInternalError – if ARMOR reports an internal error.
dataprop_b2_ind(dataprop_name, ind_name)[source]

Query all values of a data property associated with an individual.

Parameters:
  • dataprop_name (str) – data property whose value you want to query.
  • ind_name (str) – individual whose value you want to query.
Returns:

list – list of queried values as strings.

Return type:

str

ind_b2_class(class_name)[source]

Query the list of all individuals belonging to a class.

Parameters:

class_name (str) – a class in the ontology

Returns:

list – the list of individual belonging to the class

Return type:

str

Raises:
  • armor_api.exceptions.ArmorServiceCallError – if call to ARMOR fails.
  • armor_api.exceptions.ArmorServiceInternalError – if ARMOR reports an internal error.