smia.css_ontology.css_ontology_utils module¶
- class smia.css_ontology.css_ontology_utils.CapabilitySkillOntologyUtils[source]¶
Bases:
objectThis class contains all information about the proposal of the ontology based on Capability-Skill model. This information groups the required semanticIDs or the qualifiers to analyze AAS models.
- static get_ontology_file_path()[source]¶
This method gets the valid file path of the ontology file. The file is obtained from the AASX package or from the configuration folder inside the SMIA Archive, depending on the definition in the properties file.
- Returns:
file path to the ontology file.
- Return type:
str
- static get_possible_values_of_datatype(datatype)[source]¶
This method returns all possible values of an OWL data type. If the data type does not have the equivalent ‘OneOf’, so the values do not need to be constrained and validated, it returns None.
- Parameters:
datatype (owlready2.Oneof) – OWL datatype object.
- Returns:
possible values of datatype in form of a list of strings.
- Return type:
set
- static check_and_get_xsd_datatypes(datatype)[source]¶
This method checks whether the given OWL data type is one of those defined in XSD and, if true, returns the associated data type. If false, it returns None.
- Parameters:
datatype (owlready2.Oneof) – OWL datatype object.
- Returns:
value of datatype defined in XSD (None if it is not found).
- Return type:
object
- static check_whether_part_of_domain(owl_instance, domain)[source]¶
This method checks whether a given instance class is part of a given domain.
- Parameters:
owl_instance (ThingClass) – instance of the OWL class to be checked.
domain (CallbackList) – list of all classes within the given domain.
- Returns:
result of the check.
- Return type:
bool
- static get_aas_classes_from_object_property(object_property_class)[source]¶
This method gets the AAS class related to the of the ontology classes of a given Object Property. If the attribute of the AAS class does not exist, it raises an exception.
- Parameters:
object_property_class (ObjectPropertyClass) – class object of the ObjectProperty.
- Returns:
AAS class value of the domain and range ontology classes.
- Return type:
object, object
- MANUFACTURING_CAPABILITY_TYPE = 'ManufacturingCapability'¶
- ASSET_CAPABILITY_TYPE = 'AssetCapability'¶
- AGENT_CAPABILITY_TYPE = 'AgentCapability'¶
- CAPABILITY_TYPE_POSSIBLE_VALUES = ['ManufacturingCapability', 'AssetCapability', 'AgentCapability']¶
- SEMANTICID_REL_SKILL_PARAMETER_SKILL_INTERFACE = 'urn:ehu:gcis:capabilityskillontology:1:1:skillparameterexposedthrough'¶
- QUALIFIER_CAPABILITY_TYPE = 'ExpressionSemantic'¶
- QUALIFIER_CAPABILITY_POSSIBLE_VALUES = ['REQUIREMENT', 'OFFER', 'ASSURANCE']¶
- QUALIFIER_SKILL_TYPE = 'SkillImplementationType'¶
- QUALIFIER_SKILL_POSSIBLE_VALUES = ['STATE', 'TRIGGER', 'OPERATION', 'FUNCTIONBLOCK']¶
- QUALIFIER_FEASIBILITY_CHECKING_TYPE = 'FeasibilityCheckingCondition'¶
- QUALIFIER_FEASIBILITY_CHECKING_POSSIBLE_VALUES = ['PRECONDITION', 'INVARIANT', 'POSTCONDITION']¶
- CONCEPT_DESCRIPTION_ID_NEGOTIATION_CRITERIA = 'urn:ehu:gcis:conceptdescriptions:1:1:negotiationcriteria'¶
- class smia.css_ontology.css_ontology_utils.CapabilitySkillOntologyInfo[source]¶
Bases:
objectThis class contains information related to the ontology of Capability-Skill: namespaces, OWL file…
- CSS_ONTOLOGY_BASE_NAMESPACE = 'http://www.w3id.org/hsu-aut/css#'¶
- CSS_ONTOLOGY_SMIA_NAMESPACE = 'http://www.w3id.org/upv-ehu/gcis/css-smia#'¶
- CSS_ONTOLOGY_CAPABILITY_IRI = 'http://www.w3id.org/hsu-aut/css#Capability'¶
- CSS_ONTOLOGY_AGENT_CAPABILITY_IRI = 'http://www.w3id.org/upv-ehu/gcis/css-smia#AgentCapability'¶
- CSS_ONTOLOGY_ASSET_CAPABILITY_IRI = 'http://www.w3id.org/upv-ehu/gcis/css-smia#AssetCapability'¶
- CSS_ONTOLOGY_CAPABILITY_CONSTRAINT_IRI = 'http://www.w3id.org/hsu-aut/css#CapabilityConstraint'¶
- CSS_ONTOLOGY_SKILL_IRI = 'http://www.w3id.org/hsu-aut/css#Skill'¶
- CSS_ONTOLOGY_SKILL_INTERFACE_IRI = 'http://www.w3id.org/hsu-aut/css#SkillInterface'¶
- CSS_ONTOLOGY_SKILL_PARAMETER_IRI = 'http://www.w3id.org/hsu-aut/css#SkillParameter'¶
- CSS_ONTOLOGY_SKILL_STATE_MACHINE_IRI = 'http://www.w3id.org/hsu-aut/css#StateMachine'¶
- CSS_ONTOLOGY_PROP_ISREALIZEDBY_IRI = 'http://www.w3id.org/hsu-aut/css#isRealizedBy'¶
- CSS_ONTOLOGY_PROP_ISRESTRICTEDBY_IRI = 'http://www.w3id.org/hsu-aut/css#isRestrictedBy'¶
- CSS_ONTOLOGY_PROP_ACCESSIBLETHROUGH_IRI = 'http://www.w3id.org/hsu-aut/css#accessibleThrough'¶
- CSS_ONTOLOGY_PROP_ACCESSIBLETHROUGH_ASSET_IRI = 'http://www.w3id.org/upv-ehu/gcis/css-smia#accessibleThroughAssetService'¶
- CSS_ONTOLOGY_PROP_ACCESSIBLETHROUGH_AGENT_IRI = 'http://www.w3id.org/upv-ehu/gcis/css-smia#accessibleThroughAgentService'¶
- CSS_ONTOLOGY_PROP_HASPARAMETER_IRI = 'http://www.w3id.org/hsu-aut/css#hasParameter'¶
- CSS_ONTOLOGY_PROP_BEHAVIOURSCONFORMSTO_IRI = 'http://www.w3id.org/hsu-aut/css#behaviorConformsTo'¶
- CSS_ONTOLOGY_THING_CLASSES_IRIS = ['http://www.w3id.org/hsu-aut/css#Capability', 'http://www.w3id.org/upv-ehu/gcis/css-smia#AgentCapability', 'http://www.w3id.org/upv-ehu/gcis/css-smia#AssetCapability', 'http://www.w3id.org/hsu-aut/css#CapabilityConstraint', 'http://www.w3id.org/hsu-aut/css#Skill', 'http://www.w3id.org/hsu-aut/css#SkillInterface', 'http://www.w3id.org/hsu-aut/css#SkillParameter', 'http://www.w3id.org/hsu-aut/css#StateMachine']¶
- CSS_ONTOLOGY_OBJECT_PROPERTIES_IRIS = ['http://www.w3id.org/hsu-aut/css#isRealizedBy', 'http://www.w3id.org/hsu-aut/css#isRestrictedBy', 'http://www.w3id.org/hsu-aut/css#accessibleThrough', 'http://www.w3id.org/upv-ehu/gcis/css-smia#accessibleThroughAssetService', 'http://www.w3id.org/upv-ehu/gcis/css-smia#accessibleThroughAgentService', 'http://www.w3id.org/hsu-aut/css#hasParameter', 'http://www.w3id.org/hsu-aut/css#behaviorConformsTo']¶
- class smia.css_ontology.css_ontology_utils.CSSModelAASModelInfo[source]¶
Bases:
objectThis class contains information about the relation between the Capability-Skill-Service model and the AAS model.
- extended_submodel = <module 'smia.aas_model.extended_submodel' from '/home/docs/checkouts/readthedocs.org/user_builds/i4-0-smia/checkouts/latest/src/smia/aas_model/extended_submodel.py'>¶
- CSS_ONTOLOGY_AAS_MODEL_LINK = {'http://www.w3id.org/hsu-aut/css#Capability': <class 'smia.aas_model.extended_submodel.ExtendedCapability'>, 'http://www.w3id.org/hsu-aut/css#CapabilityConstraint': <class 'smia.aas_model.extended_submodel.ExtendedCapabilityConstraint'>, 'http://www.w3id.org/hsu-aut/css#Skill': <class 'smia.aas_model.extended_submodel.ExtendedSkill'>, 'http://www.w3id.org/hsu-aut/css#SkillInterface': <class 'smia.aas_model.extended_submodel.ExtendedSkillInterface'>, 'http://www.w3id.org/hsu-aut/css#SkillParameter': <class 'smia.aas_model.extended_submodel.ExtendedSkillParameter'>, 'http://www.w3id.org/upv-ehu/gcis/css-smia#AgentCapability': <class 'smia.aas_model.extended_submodel.ExtendedCapability'>, 'http://www.w3id.org/upv-ehu/gcis/css-smia#AssetCapability': <class 'smia.aas_model.extended_submodel.ExtendedCapability'>}¶
- class smia.css_ontology.css_ontology_utils.CapabilitySkillACLInfo[source]¶
Bases:
objectThis subclass of CapabilitySkillOntology contains information about the structure of the message that are sent between DTs in relation to Capability-Skill model.
- REQUIRED_CAPABILITY_NAME = 'capabilityName'¶
- REQUIRED_CAPABILITY_TYPE = 'capabilityType'¶
- REQUIRED_CAPABILITY_CONSTRAINTS = 'capabilityConstraints'¶
- REQUIRED_SKILL_INFO = 'skillInfo'¶
- REQUIRED_SKILL_NAME = 'skillName'¶
- REQUIRED_SKILL_ELEMENT_TYPE = 'smeType'¶
- REQUIRED_SKILL_PARAMETERS = 'skillParameters'¶
- REQUIRED_SKILL_PARAMETERS_VALUES = 'skillParameterValues'¶
- REQUIRED_SKILL_INPUT_PARAMETERS = 'inputs'¶
- REQUIRED_SKILL_OUTPUT_PARAMETERS = 'outputs'¶
- REQUIRED_SKILL_INTERFACE_NAME = 'skillInterfaceName'¶