aas_core3_2.verification
Verify that the instances of the meta-model satisfy the invariants.
Here is an example how to verify an instance of aas_core3_2.types.Extension:
import aas_core3_2.types as our_types
import aas_core3_2.verification as our_verification
an_instance = our_types.Extension(
# ... some constructor arguments ...
)
for error in our_verification.verify(an_instance):
print(f"{error.cause} at: {error.path}")
- aas_core3_2.verification.matches_id_short(text: str) bool[source]
Check that
textis a valid short ID.
- aas_core3_2.verification.matches_version_type(text: str) bool[source]
Check that
textis a valid version string.
- aas_core3_2.verification.matches_revision_type(text: str) bool[source]
Check that
textis a valid revision string.
- aas_core3_2.verification.matches_xs_date_time_utc(text: str) bool[source]
Check that
textconforms to the pattern of anxs:dateTime.The time zone must be fixed to UTC. We verify only that the
textmatches a pre-defined pattern. We do not verify that the day of month is correct nor do we check for leap seconds.See: https://www.w3.org/TR/xmlschema-2/#dateTime
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.is_xs_date_time_utc(text: str) bool[source]
Check that
textis axs:dateTimewith time zone set to UTC.The
textis assumed to match a pre-defined pattern forxs:dateTimewith the time zone set to UTC. In this function, we check for days of month (e.g., February 29th).See: https://www.w3.org/TR/xmlschema-2/#dateTime
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:dateTimein UTC
- aas_core3_2.verification.matches_mime_type(text: str) bool[source]
Check that
textconforms to the pattern of MIME type.The definition has been taken from: https://www.rfc-editor.org/rfc/rfc7231#section-3.1.1.1, https://www.rfc-editor.org/rfc/rfc7230#section-3.2.3 and https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6.
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_rfc_2396(text: str) bool[source]
Check that
textmatches to the URI pattern defined in RFC 2396The definition has been taken from: https://datatracker.ietf.org/doc/html/rfc2396
Note that RFX 2396 alone is not enough for specifying
xs:anyURIfor XSD version 1.0, as that specifies URI together with the amendment of RFC 2732.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_bcp_47(text: str) bool[source]
Check that
textis a valid BCP 47 language tag.
- aas_core3_2.verification.lang_strings_have_unique_languages(lang_strings: Sequence[AbstractLangString]) bool[source]
Check that the
lang_stringsdo not have overlappingtypes.AbstractLangString.language’s
- aas_core3_2.verification.qualifier_types_are_unique(qualifiers: Sequence[Qualifier]) bool[source]
Check that
types.Qualifier.type’s ofqualifiersare unique.- Parameters
qualifiers¶ – to be checked
- Returns
True if all
types.Qualifier.type’s are unique
- aas_core3_2.verification.matches_xml_serializable_string(text: str) bool[source]
Check that
textconforms to the pattern of the Constraint AASd-130.Ensures that encoding is possible and interoperability between different serializations is possible.
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_any_uri(text: str) bool[source]
Check that
textconforms to the pattern of anxs:anyURI.See: https://www.w3.org/TR/xmlschema-2/#anyURI and https://datatracker.ietf.org/doc/html/rfc2396 and https://datatracker.ietf.org/doc/html/rfc2732
Note, that version 1.0 of the XSD specification defines
xs:anyURIas “defined by RFC 2396, as amended by RFC 2732”. Therefore, we use a pattern here that implements the amendments of RFC 2732. This should not be confused withmatches_RFC_2396, which does not include those amendments and is used in different parts of the specification.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_base_64_binary(text: str) bool[source]
Check that
textconforms to the pattern of anxs:base64Binary.See: https://www.w3.org/TR/xmlschema-2/#base64Binary
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_boolean(text: str) bool[source]
Check that
textconforms to the pattern of anxs:boolean.See: https://www.w3.org/TR/xmlschema-2/#boolean
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_date(text: str) bool[source]
Check that
textconforms to the pattern of anxs:date.See: https://www.w3.org/TR/xmlschema-2/#date
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.is_xs_date(text: str) bool[source]
Check that
textis a validxs:date.We check that the
textmatches the pattern ofxs:date, and that the day exists in the month (e.g., February 29th only in leap years).See: https://www.w3.org/TR/xmlschema-2/#date
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:date
- aas_core3_2.verification.matches_xs_date_time(text: str) bool[source]
Check that
textconforms to the pattern of anxs:dateTime.See: https://www.w3.org/TR/xmlschema-2/#dateTime
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.is_xs_date_time(text: str) bool[source]
Check that
textis axs:dateTime.The
textis assumed to match a pre-defined pattern forxs:dateTime. In this function, we check for days of month (e.g., February 29th).See: https://www.w3.org/TR/xmlschema-2/#dateTime
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:dateTime
- aas_core3_2.verification.date_time_utc_less(that: str, other: str) Optional[bool][source]
Check that the date-time
thatis beforeother.We compare the years as integers, and the rest of the texts part by part as strings, since the fraction of a second can be arbitrarily long.
We do not compare the years with more than 15 digits, as they do not safely fit into an integer. Such years are valid in
xs:dateTime, but not realistic.The end of a day,
24:00:00, is the same instant as the start of the next day, see the note at https://www.w3.org/TR/xmlschema-2/#dateTime.
- aas_core3_2.verification.date_time_utc_less_or_equal_or_invalid(that: str, other: str) bool[source]
Check that the date-time
thatis before or at the same instant asother, unless either of them is invalid.The invalid date-times are reported by the invariants of
DateTimeUTC, so that we do not report them twice. Seedate_time_utc_less().
- aas_core3_2.verification.matches_xs_decimal(text: str) bool[source]
Check that
textconforms to the pattern of anxs:decimal.See: https://www.w3.org/TR/xmlschema-2/#decimal
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_double(text: str) bool[source]
Check that
textconforms to the pattern of anxs:double.See: https://www.w3.org/TR/xmlschema-2/#double
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_duration(text: str) bool[source]
Check that
textconforms to the pattern of anxs:duration.See: https://www.w3.org/TR/xmlschema-2/#duration
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_float(text: str) bool[source]
Check that
textconforms to the pattern of anxs:float.See: https://www.w3.org/TR/xmlschema-2/#float
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_g_day(text: str) bool[source]
Check that
textconforms to the pattern of anxs:gDay.See: https://www.w3.org/TR/xmlschema-2/#gDay
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_g_month(text: str) bool[source]
Check that
textconforms to the pattern of anxs:gMonth.See: https://www.w3.org/TR/xmlschema-2/#gMonth
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_g_month_day(text: str) bool[source]
Check that
textconforms to the pattern of anxs:gMonthDay.See: https://www.w3.org/TR/xmlschema-2/#gMonthDay
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_g_year(text: str) bool[source]
Check that
textconforms to the pattern of anxs:gYear.See: https://www.w3.org/TR/xmlschema-2/#gYear
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_g_year_month(text: str) bool[source]
Check that
textconforms to the pattern of anxs:gYearMonth.See: https://www.w3.org/TR/xmlschema-2/#gYearMonth
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_hex_binary(text: str) bool[source]
Check that
textconforms to the pattern of anxs:hexBinary.See: https://www.w3.org/TR/xmlschema-2/#hexBinary
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_time(text: str) bool[source]
Check that
textconforms to the pattern of anxs:time.See: https://www.w3.org/TR/xmlschema-2/#time
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_integer(text: str) bool[source]
Check that
textconforms to the pattern of anxs:integer.See: https://www.w3.org/TR/xmlschema-2/#integer
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_long(text: str) bool[source]
Check that
textconforms to the pattern of anxs:long.See: https://www.w3.org/TR/xmlschema-2/#long
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_int(text: str) bool[source]
Check that
textconforms to the pattern of anxs:int.See: https://www.w3.org/TR/xmlschema-2/#int
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_short(text: str) bool[source]
Check that
textconforms to the pattern of anxs:short.See: https://www.w3.org/TR/xmlschema-2/#short
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_byte(text: str) bool[source]
Check that
textconforms to the pattern of anxs:byte.See: https://www.w3.org/TR/xmlschema-2/#byte
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_non_negative_integer(text: str) bool[source]
Check that
textconforms to the pattern of anxs:nonNegativeInteger.See: https://www.w3.org/TR/xmlschema-2/#nonNegativeInteger
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_positive_integer(text: str) bool[source]
Check that
textconforms to the pattern of anxs:positiveInteger.See: https://www.w3.org/TR/xmlschema-2/#positiveInteger
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_unsigned_long(text: str) bool[source]
Check that
textconforms to the pattern of anxs:unsignedLong.See: https://www.w3.org/TR/xmlschema-2/#unsignedLong
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_unsigned_int(text: str) bool[source]
Check that
textconforms to the pattern of anxs:unsignedInt.See: https://www.w3.org/TR/xmlschema-2/#unsignedInt
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_unsigned_short(text: str) bool[source]
Check that
textconforms to the pattern of anxs:unsignedShort.See: https://www.w3.org/TR/xmlschema-2/#unsignedShort
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_unsigned_byte(text: str) bool[source]
Check that
textconforms to the pattern of anxs:unsignedByte.See: https://www.w3.org/TR/xmlschema-2/#unsignedByte
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_non_positive_integer(text: str) bool[source]
Check that
textconforms to the pattern of anxs:nonPositiveInteger.See: https://www.w3.org/TR/xmlschema-2/#nonPositiveInteger
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_negative_integer(text: str) bool[source]
Check that
textconforms to the pattern of anxs:negativeInteger.See: https://www.w3.org/TR/xmlschema-2/#negativeInteger
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_xs_string(text: str) bool[source]
Check that
textconforms to the pattern of anxs:string.See: https://www.w3.org/TR/xmlschema-2/#string
- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.is_xs_double(text: str) bool[source]
Check that
textis a validxs:double.We check that the
textmatches the pattern ofxs:double, and that it does not overflow, i.e., that it does not round to infinity unless it isINFor-INF. Seeconstants.XS_DOUBLE_OVERFLOW_THRESHOLD.See: https://www.w3.org/TR/xmlschema-2/#double
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:double
- aas_core3_2.verification.is_xs_float(text: str) bool[source]
Check that
textis a validxs:float.We check that the
textmatches the pattern ofxs:float, and that it does not overflow, i.e., that it does not round to infinity unless it isINFor-INF. Seeconstants.XS_FLOAT_OVERFLOW_THRESHOLD.See: https://www.w3.org/TR/xmlschema-2/#float
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:float
- aas_core3_2.verification.is_xs_g_month_day(text: str) bool[source]
Check that
textis a validxs:gMonthDay.We check that the
textmatches the pattern ofxs:gMonthDay, and that the day exists in the month. February 29th is valid, as there is no year to tell otherwise.See: https://www.w3.org/TR/xmlschema-2/#gMonthDay
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:gMonthDay
- aas_core3_2.verification.is_xs_long(text: str) bool[source]
Check that
textis a validxs:long.We check that the
textmatches the pattern ofxs:long, and that the number is within the range ofxs:long.See: https://www.w3.org/TR/xmlschema-2/#long
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:long
- aas_core3_2.verification.is_xs_int(text: str) bool[source]
Check that
textis a validxs:int.We check that the
textmatches the pattern ofxs:int, and that the number is within the range ofxs:int.See: https://www.w3.org/TR/xmlschema-2/#int
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:int
- aas_core3_2.verification.is_xs_short(text: str) bool[source]
Check that
textis a validxs:short.We check that the
textmatches the pattern ofxs:short, and that the number is within the range ofxs:short.See: https://www.w3.org/TR/xmlschema-2/#short
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:short
- aas_core3_2.verification.is_xs_byte(text: str) bool[source]
Check that
textis a validxs:byte.We check that the
textmatches the pattern ofxs:byte, and that the number is within the range ofxs:byte.See: https://www.w3.org/TR/xmlschema-2/#byte
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:byte
- aas_core3_2.verification.is_xs_unsigned_long(text: str) bool[source]
Check that
textis a validxs:unsignedLong.We check that the
textmatches the pattern ofxs:unsignedLong, and that the number is within the range ofxs:unsignedLong.See: https://www.w3.org/TR/xmlschema-2/#unsignedLong
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:unsignedLong
- aas_core3_2.verification.is_xs_unsigned_int(text: str) bool[source]
Check that
textis a validxs:unsignedInt.We check that the
textmatches the pattern ofxs:unsignedInt, and that the number is within the range ofxs:unsignedInt.See: https://www.w3.org/TR/xmlschema-2/#unsignedInt
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:unsignedInt
- aas_core3_2.verification.is_xs_unsigned_short(text: str) bool[source]
Check that
textis a validxs:unsignedShort.We check that the
textmatches the pattern ofxs:unsignedShort, and that the number is within the range ofxs:unsignedShort.See: https://www.w3.org/TR/xmlschema-2/#unsignedShort
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:unsignedShort
- aas_core3_2.verification.is_xs_unsigned_byte(text: str) bool[source]
Check that
textis a validxs:unsignedByte.We check that the
textmatches the pattern ofxs:unsignedByte, and that the number is within the range ofxs:unsignedByte.See: https://www.w3.org/TR/xmlschema-2/#unsignedByte
- Parameters
text¶ – Text to be checked
- Returns
True if the
textis a validxs:unsignedByte
- aas_core3_2.verification.value_consistent_with_xsd_type(value: str, value_type: DataTypeDefXSD) bool[source]
Check that the
valueconforms to itsvalue_type.
- aas_core3_2.verification.is_model_reference_to(reference: Reference, expected_type: KeyTypes) bool[source]
Check that the target of the model reference matches the
expected_type.
- aas_core3_2.verification.is_model_reference_to_referable(reference: Reference) bool[source]
Check that the target of the reference matches a
constants.AAS_REFERABLES.
- aas_core3_2.verification.id_shorts_are_unique(referables: Sequence[Referable]) bool[source]
Check that the
types.Referable.id_short’s among thereferablesare unique in their namespace.
- aas_core3_2.verification.id_shorts_of_variables_are_unique(input_variables: Optional[Sequence[OperationVariable]], output_variables: Optional[Sequence[OperationVariable]], inoutput_variables: Optional[Sequence[OperationVariable]]) bool[source]
Check that the
types.Referable.id_short’s among all theinput_variables,output_variablesandinoutput_variablesare unique.
- aas_core3_2.verification.specific_asset_id_name_matches_global_asset_id(name: str) bool[source]
Check whether
nameis the reserved global asset ID key.
- aas_core3_2.verification.submodel_element_has_template_qualifier_in_tree(element: SubmodelElement) bool[source]
Check whether
elementor its descendants have template qualifiers.
- aas_core3_2.verification.submodel_elements_have_no_template_qualifiers(elements: Sequence[SubmodelElement]) bool[source]
Check that
elementshave no template qualifiers in their trees.
- aas_core3_2.verification.submodel_element_lists_have_exactly_one_element_in_tree(element: SubmodelElement) bool[source]
Recursively check that submodel element lists have exactly one child.
- aas_core3_2.verification.submodel_element_lists_in_submodel_elements_have_exactly_one_element(elements: Sequence[SubmodelElement]) bool[source]
Check that all submodel element lists among
elementshave one item.
- aas_core3_2.verification.submodel_element_lists_in_operation_variables_have_exactly_one_element(input_variables: Optional[Sequence[OperationVariable]], output_variables: Optional[Sequence[OperationVariable]], inoutput_variables: Optional[Sequence[OperationVariable]]) bool[source]
Check that submodel element lists in operation variables have one item.
- aas_core3_2.verification.extension_names_are_unique(extensions: Sequence[Extension]) bool[source]
Check that the extension names are unique.
- aas_core3_2.verification.submodel_elements_have_identical_semantic_ids(elements: Sequence[SubmodelElement]) bool[source]
Check that all semantic IDs are identical, if specified.
- aas_core3_2.verification.submodel_element_is_of_type(element: SubmodelElement, element_type: AASSubmodelElements) bool[source]
Check that the run-time type of the
elementcoincides withelement_type.
- aas_core3_2.verification.properties_or_ranges_have_value_type(elements: Sequence[SubmodelElement], value_type: DataTypeDefXSD) bool[source]
Check that all the
elementshave thevalue_type.
- aas_core3_2.verification.reference_key_values_equal(that: Reference, other: Reference) bool[source]
Check that the two references are equal by comparing their key values.
- aas_core3_2.verification.data_specification_iec_61360s_for_property_or_value_have_appropriate_data_type(embedded_data_specifications: Sequence[EmbeddedDataSpecification]) bool[source]
Check that the
types.DataSpecificationIEC61360.data_typeis defined appropriately for all data specifications whose content is given as IEC 61360.
- aas_core3_2.verification.data_specification_iec_61360s_for_reference_have_appropriate_data_type(embedded_data_specifications: Sequence[EmbeddedDataSpecification]) bool[source]
Check that the
types.DataSpecificationIEC61360.data_typeis defined appropriately for all data specifications whose content is given as IEC 61360.
- aas_core3_2.verification.data_specification_iec_61360s_for_document_have_appropriate_data_type(embedded_data_specifications: Sequence[EmbeddedDataSpecification]) bool[source]
Check that the
types.DataSpecificationIEC61360.data_typeis defined appropriately for all data specifications whose content is given as IEC 61360.
- aas_core3_2.verification.data_specification_iec_61360s_have_data_type(embedded_data_specifications: Sequence[EmbeddedDataSpecification]) bool[source]
Check that the
types.DataSpecificationIEC61360.data_typeis defined for all data specifications whose content is given as IEC 61360.
- aas_core3_2.verification.data_specification_iec_61360s_have_value(embedded_data_specifications: Sequence[EmbeddedDataSpecification]) bool[source]
Check that the
types.DataSpecificationIEC61360.valueis defined for all data specifications whose content is given as IEC 61360.
- aas_core3_2.verification.data_specification_iec_61360s_have_definition_at_least_in_english(embedded_data_specifications: Sequence[EmbeddedDataSpecification]) bool[source]
Check that the
types.DataSpecificationIEC61360.definitionis defined for all data specifications whose content is given as IEC 61360 at least in English.
- aas_core3_2.verification.is_bcp_47_for_english(text: str) bool[source]
Check that the
textcorresponds to a BCP47 code for english.
- aas_core3_2.verification.matches_path_item(text: str) bool[source]
Check that
textis a valid idShortPath.An idShortPath is a chain of idShorts or SubmodelElementList-indexes which points to an element within a hierarchy of elements, e.g.,
sme1.sme2[0].p1.
- aas_core3_2.verification.matches_field_identifier(text: str) bool[source]
Check that
textis a valid field identifier of the query language.A field identifier starts with a root (
$aas,$sm,$sme,$cd,$aasdescor$smdesc), optionally followed by an idShortPath in case of$sme, and ends with an attribute declaration after#, e.g.,$sme.someCollection.someProperty#value.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_fragment_field_identifier(text: str) bool[source]
Check that
textis a valid fragment field identifier.A fragment field identifier points to the part of the returned data which should be filtered, e.g.,
$aas#assetInformation.specificAssetIds[]or$sme.someCollection.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_hex_literal(text: str) bool[source]
Check that
textis a valid hexadecimal literal of the query language.A hexadecimal literal is prefixed with
16#, e.g.,16#1F.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_date_time_literal(text: str) bool[source]
Check that
textis a valid date-time literal of the query language.A date-time literal is a valid calendar date, followed by an optional
Tseparator, the time and an optional time zone, e.g.,2024-02-29T12:00:00Z.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_time_literal(text: str) bool[source]
Check that
textis a valid time literal of the query language.A time literal is given as
HH:MM,HH:MM:SS, optionally with fractional seconds and an optional time zone, e.g.,12:00:00+01:00.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.matches_reference_identifier(text: str) bool[source]
Check that
textis a valid reference identifier.A reference identifier points to an attribute of a specific instance given by its identifier, e.g.,
$sm("https://example.com/sm")#idShortor$sme("https://example.com/sm").someProperty#value. A quotation mark and a reverse solidus in the identifier are escaped as\"and\\, respectively.- Parameters
text¶ – Text to be checked
- Returns
True if the
textconforms to the pattern
- aas_core3_2.verification.are_equality_comparable(left: Union[FieldOperand, StringLiteral, StringCast, AttributeOperand, NumberLiteral, NumberCast, DayOfWeek, DayOfMonth, Month, Year, HexLiteral, HexCast, BooleanLiteral, BooleanCast, DateTimeLiteral, DateTimeCast, TimeLiteral, TimeCast], right: Union[FieldOperand, StringLiteral, StringCast, AttributeOperand, NumberLiteral, NumberCast, DayOfWeek, DayOfMonth, Month, Year, HexLiteral, HexCast, BooleanLiteral, BooleanCast, DateTimeLiteral, DateTimeCast, TimeLiteral, TimeCast]) bool[source]
Check that
leftandrightcan be compared for (in)equality.Following the normative JSON schema of the query language, the two operands need to be of the same type: a string, a number, a hexadecimal, a boolean, a date-time or a time. A field is implicitly cast to the type of the other operand, and can hence be compared with an operand of any type. A global attribute giving a date and time (
LOCALNOW,UTCNOWorCLIENTNOW) can be used both as a string and as a date-time.See: https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.2/query-language.html#_json_schema
- aas_core3_2.verification.are_order_comparable(left: Union[FieldOperand, StringLiteral, StringCast, AttributeOperand, NumberLiteral, NumberCast, DayOfWeek, DayOfMonth, Month, Year, HexLiteral, HexCast, BooleanLiteral, BooleanCast, DateTimeLiteral, DateTimeCast, TimeLiteral, TimeCast], right: Union[FieldOperand, StringLiteral, StringCast, AttributeOperand, NumberLiteral, NumberCast, DayOfWeek, DayOfMonth, Month, Year, HexLiteral, HexCast, BooleanLiteral, BooleanCast, DateTimeLiteral, DateTimeCast, TimeLiteral, TimeCast]) bool[source]
Check that
leftandrightcan be compared by order.The operands need to be comparable for (in)equality (see
are_equality_comparable), but booleans can not be ordered.See: https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.2/query-language.html#_json_schema
- aas_core3_2.verification.verify(that: Class) Iterator[Error][source]
Verify the constraints of
thatrecursively.- Parameters
that¶ – instance whose constraints we want to verify
- Yield
constraint violations
- aas_core3_2.verification.verify_xml_serializable_string(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_non_empty_xml_serializable_string(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_date_time_utc(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_date_time(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_duration(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_blob_type(that: bytes) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_identifier(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_value_type_iec_61360(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_name_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_version_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_revision_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_label_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_message_topic_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_bcp_47_language_tag(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_content_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_path_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_qualifier_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_value_data_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_id_short_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_string_uom(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_identifier_uom(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_non_negative_integer(that: int) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_code_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_short_id_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_locator_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_text_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_scheme_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_path_item(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_field_identifier(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_fragment_field_identifier(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_standard_string(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_hex_literal_type(that: str) Iterator[Error][source]
Verify the constraints of
that.
- aas_core3_2.verification.verify_date_time_literal_type(that: str) Iterator[Error][source]
Verify the constraints of
that.