smia.css_ontology.capability_skill_module module

class smia.css_ontology.capability_skill_module.ExtendedThing(name=None, namespace=None, is_a=None, **kargs)[source]

Bases: Thing

namespace = get_ontology("http://www.w3.org/2002/07/owl#")
classmethod get_associated_aas_class()[source]

This method gets the associated AAS model class of this ontology class. The associated AAS model class will be obtained from the CSS ontology utils class using the IRI of the class.

Returns:

AAS model class.

Return type:

basyx.aas.model.SubmodelElement

seek_associated_data_properties()[source]

This method seeks possible limited values for attributes of Capability, in order to validate when the attribute value is assigned. The possible values for limited attributes are stored in a global dictionary.

check_valid_data_property_value(data_property_name, data_property_value)[source]

This method checks if the given value of a given data property is valid, in terms of the type of the data. If the data property type is simple, the type will be directly checked, and in case of an enumeration, if the given value is within the possible values will be checked.

Parameters:
  • data_property_name (str) – the name of the data property.

  • data_property_value (str) – the value of the data property to be checked.

set_data_property_value(data_property_name, data_property_value)[source]
This method sets the value of a data property associated to the self instance only if the given value is within

the possible values for this attribute.

Parameters:
  • data_property_name (str) – the name of the data property.

  • data_property_value (str) – the value of the data property to be stored.

get_data_properties_names()[source]

This method gets all names of the data properties associated to the self instance class (obtained during the initialization of the class).

Returns:

list with all names of the data properties.

Return type:

list(str)

get_data_properties_iris()[source]

This method gets all IRIs of the data properties associated to the self instance class (obtained during the initialization of the class).

Returns:

list with all IRIs of the data properties.

Return type:

list(str)

get_data_property_name_by_iri(property_iri)[source]

This method gets the name of the data property associated to the self instance class (obtained during the initialization of the class). It is found by its IRI.

Parameters:

property_iri (str) – IRI of the data property to find.

Returns:

name of the desired data property.

Return type:

str

get_aas_sme_ref()[source]

This method gets the AAS submodel element (SME) related to this instance class.

Returns:

reference to the submodel element of the AAS model.

Return type:

aas_ref (str)

set_aas_sme_ref(aas_ref)[source]

This method sets the AAS submodel element (SME) related to this instance class.

Parameters:

aas_ref (str) – reference to the submodel element of the AAS model.

This method checks if there is some Object Property defined that connects the self instance class with the given instance class,i.e., if the instances are related within the ontology. If the relation is valid, it also returns the related ThingClass.

Parameters:

other_instance_name (ThingClass) – name of the other instance class.

Returns:

the result of the check, and if True, the class of the related instance

Return type:

bool, ThingClass

is_a = [owl.Thing]
storid = 'http://www.w3.org/2002/07/owl#ExtendedThing'
class smia.css_ontology.capability_skill_module.Capability(name=None, namespace=None, is_a=None, **kargs)[source]

Bases: ExtendedThing

This class represent the OWL class for Capabilities. It contains all necessary methods to ensure the correct execution of SMIA software.

check_instance()[source]

This method checks whether the Capability instance is valid: if the required attributes are set and if all the added properties are valid. In case of invalid Capability, it raises the exception related to the checking error.

get_associated_skill_instances()[source]

This method gets all associated skill instances and, if there is no skill, returns the None object.

Returns:

generator with all associated skill instances.

Return type:

IndividualValueList

get_associated_constraint_instances()[source]

This method gets all associated constraint instances and, if there is no one, returns the None object.

Returns:

generator with all associated constraint instances.

Return type:

IndividualValueList

is_a = [owl.ExtendedThing]
namespace = get_ontology("http://www.w3.org/2002/07/owl#")
storid = 'http://www.w3.org/2002/07/owl#Capability'
class smia.css_ontology.capability_skill_module.CapabilityConstraint(name=None, namespace=None, is_a=None, **kargs)[source]

Bases: ExtendedThing

is_a = [owl.ExtendedThing]
namespace = get_ontology("http://www.w3.org/2002/07/owl#")
storid = 'http://www.w3.org/2002/07/owl#CapabilityConstraint'
class smia.css_ontology.capability_skill_module.Skill(name=None, namespace=None, is_a=None, **kargs)[source]

Bases: ExtendedThing

check_instance()[source]
This method checks whether the Skill instance is valid: if the required attributes are set and if all the added

properties are valid. In case of invalid Skill, it raises the exception related to the checking error.

get_associated_skill_interface_instances()[source]

This method gets all associated skill interface instances and, if there is no one, returns the None object.

Returns:

generator with all associated skill interface instances.

Return type:

IndividualValueList

get_associated_skill_parameter_instances()[source]

This method gets all associated skill parameter instances and, if there is no one, returns the None object.

Returns:

generator with all associated skill parameter instances.

Return type:

IndividualValueList

is_a = [owl.ExtendedThing]
namespace = get_ontology("http://www.w3.org/2002/07/owl#")
storid = 'http://www.w3.org/2002/07/owl#Skill'
class smia.css_ontology.capability_skill_module.SkillInterface(name=None, namespace=None, is_a=None, **kargs)[source]

Bases: ExtendedThing

check_instance()[source]

This method checks whether the SkillInterface instance is valid: if the required attributes are set and if all the added properties are valid. In case of invalid SkillInterface, it raises the exception related to the checking error.

is_a = [owl.ExtendedThing]
namespace = get_ontology("http://www.w3.org/2002/07/owl#")
storid = 'http://www.w3.org/2002/07/owl#SkillInterface'
class smia.css_ontology.capability_skill_module.SkillParameter(name=None, namespace=None, is_a=None, **kargs)[source]

Bases: ExtendedThing

is_a = [owl.ExtendedThing]
is_skill_parameter_type(parameter_type_values)[source]

This method checks whether the SkillParameter instance has one of the given values for the related DataType.

Parameters:

parameter_type_values – the values to check the SkillParameter instance for.

Returns:

True if the SkillParameter instance has one of the given values for the related DataType.

Return type:

bool

namespace = get_ontology("http://www.w3.org/2002/07/owl#")
storid = 'http://www.w3.org/2002/07/owl#SkillParameter'
class smia.css_ontology.capability_skill_module.StateMachine(name=None, namespace=None, is_a=None, **kargs)[source]

Bases: ExtendedThing

is_a = [owl.ExtendedThing]
namespace = get_ontology("http://www.w3.org/2002/07/owl#")
storid = 'http://www.w3.org/2002/07/owl#StateMachine'