esmf-aspect-model-loader 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- esmf_aspect_meta_model_python/__init__.py +88 -0
- esmf_aspect_meta_model_python/base/README.md +48 -0
- esmf_aspect_meta_model_python/base/__init__.py +48 -0
- esmf_aspect_meta_model_python/base/aspect.py +41 -0
- esmf_aspect_meta_model_python/base/base.py +36 -0
- esmf_aspect_meta_model_python/base/bound_definition.py +27 -0
- esmf_aspect_meta_model_python/base/cache_strategy.py +66 -0
- esmf_aspect_meta_model_python/base/characteristics/__init__.py +10 -0
- esmf_aspect_meta_model_python/base/characteristics/characteristic.py +29 -0
- esmf_aspect_meta_model_python/base/characteristics/code.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/collection/__init__.py +10 -0
- esmf_aspect_meta_model_python/base/characteristics/collection/collection.py +29 -0
- esmf_aspect_meta_model_python/base/characteristics/collection/list.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/collection/set.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/collection/sorted_set.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/collection/time_series.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/either.py +31 -0
- esmf_aspect_meta_model_python/base/characteristics/enumeration.py +27 -0
- esmf_aspect_meta_model_python/base/characteristics/quantifiable/__init__.py +10 -0
- esmf_aspect_meta_model_python/base/characteristics/quantifiable/duration.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/quantifiable/measurement.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/quantifiable/quantifiable.py +30 -0
- esmf_aspect_meta_model_python/base/characteristics/single_entity.py +21 -0
- esmf_aspect_meta_model_python/base/characteristics/state.py +26 -0
- esmf_aspect_meta_model_python/base/characteristics/structured_value.py +33 -0
- esmf_aspect_meta_model_python/base/characteristics/trait.py +36 -0
- esmf_aspect_meta_model_python/base/contraints/__init__.py +10 -0
- esmf_aspect_meta_model_python/base/contraints/constraint.py +22 -0
- esmf_aspect_meta_model_python/base/contraints/encoding_constraint.py +26 -0
- esmf_aspect_meta_model_python/base/contraints/fixed_point_constraint.py +32 -0
- esmf_aspect_meta_model_python/base/contraints/language_constraint.py +26 -0
- esmf_aspect_meta_model_python/base/contraints/length_constraint.py +34 -0
- esmf_aspect_meta_model_python/base/contraints/locale_constraint.py +26 -0
- esmf_aspect_meta_model_python/base/contraints/range_constraint.py +45 -0
- esmf_aspect_meta_model_python/base/contraints/regular_expression_constraint.py +25 -0
- esmf_aspect_meta_model_python/base/data_types/__init__.py +10 -0
- esmf_aspect_meta_model_python/base/data_types/abstract_entity.py +29 -0
- esmf_aspect_meta_model_python/base/data_types/complex_type.py +41 -0
- esmf_aspect_meta_model_python/base/data_types/data_type.py +32 -0
- esmf_aspect_meta_model_python/base/data_types/entity.py +22 -0
- esmf_aspect_meta_model_python/base/data_types/scalar.py +27 -0
- esmf_aspect_meta_model_python/base/event.py +29 -0
- esmf_aspect_meta_model_python/base/has_properties.py +28 -0
- esmf_aspect_meta_model_python/base/has_urn.py +31 -0
- esmf_aspect_meta_model_python/base/is_described.py +51 -0
- esmf_aspect_meta_model_python/base/operation.py +34 -0
- esmf_aspect_meta_model_python/base/property.py +82 -0
- esmf_aspect_meta_model_python/base/property_func.py +50 -0
- esmf_aspect_meta_model_python/base/quantity_kind.py +20 -0
- esmf_aspect_meta_model_python/base/structure_element.py +19 -0
- esmf_aspect_meta_model_python/base/unit.py +49 -0
- esmf_aspect_meta_model_python/impl/README.md +132 -0
- esmf_aspect_meta_model_python/impl/__init__.py +46 -0
- esmf_aspect_meta_model_python/impl/base_impl.py +77 -0
- esmf_aspect_meta_model_python/impl/characteristics/__init__.py +10 -0
- esmf_aspect_meta_model_python/impl/characteristics/collection/__init__.py +10 -0
- esmf_aspect_meta_model_python/impl/characteristics/collection/default_collection.py +42 -0
- esmf_aspect_meta_model_python/impl/characteristics/collection/default_list.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/collection/default_set.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/collection/default_sorted_set.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/collection/default_time_series.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_characteristic.py +32 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_code.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_either.py +45 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_enumeration.py +35 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_single_entity.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_state.py +36 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_structured_value.py +42 -0
- esmf_aspect_meta_model_python/impl/characteristics/default_trait.py +49 -0
- esmf_aspect_meta_model_python/impl/characteristics/quantifiable/__init__.py +10 -0
- esmf_aspect_meta_model_python/impl/characteristics/quantifiable/default_duration.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/quantifiable/default_measurement.py +17 -0
- esmf_aspect_meta_model_python/impl/characteristics/quantifiable/default_quantifiable.py +38 -0
- esmf_aspect_meta_model_python/impl/constraints/__init__.py +10 -0
- esmf_aspect_meta_model_python/impl/constraints/default_constraint.py +19 -0
- esmf_aspect_meta_model_python/impl/constraints/default_encoding_constraint.py +27 -0
- esmf_aspect_meta_model_python/impl/constraints/default_fixed_point_constraint.py +38 -0
- esmf_aspect_meta_model_python/impl/constraints/default_language_constraint.py +27 -0
- esmf_aspect_meta_model_python/impl/constraints/default_length_constraint.py +40 -0
- esmf_aspect_meta_model_python/impl/constraints/default_locale_constraint.py +27 -0
- esmf_aspect_meta_model_python/impl/constraints/default_range_constraint.py +55 -0
- esmf_aspect_meta_model_python/impl/constraints/default_regular_expression_constraint.py +27 -0
- esmf_aspect_meta_model_python/impl/data_types/__init__.py +10 -0
- esmf_aspect_meta_model_python/impl/data_types/default_abstract_entity.py +37 -0
- esmf_aspect_meta_model_python/impl/data_types/default_complex_type.py +101 -0
- esmf_aspect_meta_model_python/impl/data_types/default_entity.py +17 -0
- esmf_aspect_meta_model_python/impl/data_types/default_scalar.py +30 -0
- esmf_aspect_meta_model_python/impl/default_aspect.py +69 -0
- esmf_aspect_meta_model_python/impl/default_event.py +34 -0
- esmf_aspect_meta_model_python/impl/default_operation.py +50 -0
- esmf_aspect_meta_model_python/impl/default_property.py +111 -0
- esmf_aspect_meta_model_python/impl/default_quantity_kind.py +17 -0
- esmf_aspect_meta_model_python/impl/default_unit.py +68 -0
- esmf_aspect_meta_model_python/loader/README.md +58 -0
- esmf_aspect_meta_model_python/loader/__init__.py +10 -0
- esmf_aspect_meta_model_python/loader/aspect_loader.py +173 -0
- esmf_aspect_meta_model_python/loader/default_element_cache.py +59 -0
- esmf_aspect_meta_model_python/loader/instantiator/__init__.py +10 -0
- esmf_aspect_meta_model_python/loader/instantiator/abstract_entity_instantiator.py +38 -0
- esmf_aspect_meta_model_python/loader/instantiator/abstract_property_instantiator.py +95 -0
- esmf_aspect_meta_model_python/loader/instantiator/aspect_instantiator.py +46 -0
- esmf_aspect_meta_model_python/loader/instantiator/characteristic_instantiator.py +27 -0
- esmf_aspect_meta_model_python/loader/instantiator/code_instantiator.py +27 -0
- esmf_aspect_meta_model_python/loader/instantiator/collection_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/complex_type_instantiator.py +74 -0
- esmf_aspect_meta_model_python/loader/instantiator/duration_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/either_instantiator.py +30 -0
- esmf_aspect_meta_model_python/loader/instantiator/encoding_constraint_instantiator.py +28 -0
- esmf_aspect_meta_model_python/loader/instantiator/entity_instantiator.py +40 -0
- esmf_aspect_meta_model_python/loader/instantiator/enumeration_instantiator.py +98 -0
- esmf_aspect_meta_model_python/loader/instantiator/event_instantiator.py +27 -0
- esmf_aspect_meta_model_python/loader/instantiator/fixed_point_constraint_instantiator.py +30 -0
- esmf_aspect_meta_model_python/loader/instantiator/language_constraint_instantiator.py +27 -0
- esmf_aspect_meta_model_python/loader/instantiator/length_constraint_instantiator.py +30 -0
- esmf_aspect_meta_model_python/loader/instantiator/list_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/locale_constraint_instantiator.py +27 -0
- esmf_aspect_meta_model_python/loader/instantiator/measurement_instantiator.py +30 -0
- esmf_aspect_meta_model_python/loader/instantiator/operation_instantiator.py +35 -0
- esmf_aspect_meta_model_python/loader/instantiator/property_instantiator.py +135 -0
- esmf_aspect_meta_model_python/loader/instantiator/quantifiable_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/range_constraint_instantiator.py +79 -0
- esmf_aspect_meta_model_python/loader/instantiator/regular_expression_constraint_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/scalar_instantiator.py +24 -0
- esmf_aspect_meta_model_python/loader/instantiator/set_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/single_entity_instantiator.py +27 -0
- esmf_aspect_meta_model_python/loader/instantiator/sorted_set_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/structured_value_instantiator.py +49 -0
- esmf_aspect_meta_model_python/loader/instantiator/time_series_instantiator.py +29 -0
- esmf_aspect_meta_model_python/loader/instantiator/trait_instantiator.py +44 -0
- esmf_aspect_meta_model_python/loader/instantiator/unit_instantiator.py +70 -0
- esmf_aspect_meta_model_python/loader/instantiator_base.py +189 -0
- esmf_aspect_meta_model_python/loader/meta_model_base_attributes.py +186 -0
- esmf_aspect_meta_model_python/loader/model_element_factory.py +151 -0
- esmf_aspect_meta_model_python/loader/rdf_helper.py +90 -0
- esmf_aspect_meta_model_python/resolver/README.md +25 -0
- esmf_aspect_meta_model_python/resolver/__init__.py +10 -0
- esmf_aspect_meta_model_python/resolver/aspect_meta_model_resolver.py +56 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/__init__.py +0 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/download_samm_branch.py +68 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/download_samm_release.py +56 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/github_file.py +29 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/github_folder.py +60 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/1.0.0/characteristic-definitions.ttl +231 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/1.0.0/characteristic-instances.ttl +70 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/1.0.0/characteristic-shapes.ttl +774 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/1.0.0/characteristic-validations.js +179 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.0.0/characteristic-definitions.ttl +256 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.0.0/characteristic-instances.ttl +61 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.0.0/characteristic-shapes.ttl +809 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.0.0/characteristic-validations.js +179 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.1.0/characteristic-definitions.ttl +256 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.1.0/characteristic-instances.ttl +61 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.1.0/characteristic-shapes.ttl +809 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/characteristic/2.1.0/characteristic-validations.js +179 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/1.0.0/FileResource.ttl +34 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/1.0.0/Point3d.ttl +35 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/1.0.0/TimeSeriesEntity.ttl +31 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/2.0.0/FileResource.ttl +31 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/2.0.0/Point3d.ttl +31 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/2.0.0/TimeSeriesEntity.ttl +28 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/2.1.0/FileResource.ttl +31 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/2.1.0/Point3d.ttl +31 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/entity/2.1.0/TimeSeriesEntity.ttl +28 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/1.0.0/aspect-meta-model-definitions.ttl +197 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/1.0.0/aspect-meta-model-shapes.ttl +750 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/1.0.0/prefix-declarations.ttl +67 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/1.0.0/type-conversions.ttl +59 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.0.0/aspect-meta-model-definitions.ttl +243 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.0.0/aspect-meta-model-shapes.ttl +982 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.0.0/prefix-declarations.ttl +67 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.0.0/type-conversions.ttl +59 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.1.0/aspect-meta-model-definitions.ttl +243 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.1.0/aspect-meta-model-shapes.ttl +982 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.1.0/prefix-declarations.ttl +67 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/meta-model/2.1.0/type-conversions.ttl +59 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/scripts/language-registry.js +1 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/unit/1.0.0/units.ttl +19560 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/unit/2.0.0/units.ttl +14828 -0
- esmf_aspect_meta_model_python/samm_aspect_meta_model/samm/unit/2.1.0/units.ttl +14828 -0
- esmf_aspect_meta_model_python/vocabulary/SAMM.py +75 -0
- esmf_aspect_meta_model_python/vocabulary/SAMMC.py +82 -0
- esmf_aspect_meta_model_python/vocabulary/SAMME.py +34 -0
- esmf_aspect_meta_model_python/vocabulary/UNIT.py +27 -0
- esmf_aspect_meta_model_python/vocabulary/__init__.py +10 -0
- esmf_aspect_meta_model_python/vocabulary/namespace.py +35 -0
- esmf_aspect_model_loader-0.1.2.dist-info/METADATA +84 -0
- esmf_aspect_model_loader-0.1.2.dist-info/RECORD +189 -0
- esmf_aspect_model_loader-0.1.2.dist-info/WHEEL +4 -0
- esmf_aspect_model_loader-0.1.2.dist-info/entry_points.txt +4 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from .base import (
|
|
13
|
+
AbstractEntity,
|
|
14
|
+
Aspect,
|
|
15
|
+
Base,
|
|
16
|
+
BoundDefinition,
|
|
17
|
+
Characteristic,
|
|
18
|
+
Code,
|
|
19
|
+
Collection,
|
|
20
|
+
ComplexType,
|
|
21
|
+
Constraint,
|
|
22
|
+
DataType,
|
|
23
|
+
Duration,
|
|
24
|
+
Either,
|
|
25
|
+
EncodingConstraint,
|
|
26
|
+
Entity,
|
|
27
|
+
Enumeration,
|
|
28
|
+
Event,
|
|
29
|
+
FixedPointConstraint,
|
|
30
|
+
LanguageConstraint,
|
|
31
|
+
LengthConstraint,
|
|
32
|
+
List,
|
|
33
|
+
LocaleConstraint,
|
|
34
|
+
Measurement,
|
|
35
|
+
Operation,
|
|
36
|
+
Property,
|
|
37
|
+
Quantifiable,
|
|
38
|
+
QuantityKind,
|
|
39
|
+
RangeConstraint,
|
|
40
|
+
RegularExpressionConstraint,
|
|
41
|
+
Scalar,
|
|
42
|
+
Set,
|
|
43
|
+
SingleEntity,
|
|
44
|
+
SortedSet,
|
|
45
|
+
State,
|
|
46
|
+
StructuredValue,
|
|
47
|
+
TimeSeries,
|
|
48
|
+
Trait,
|
|
49
|
+
Unit,
|
|
50
|
+
)
|
|
51
|
+
from .impl import (
|
|
52
|
+
BaseImpl,
|
|
53
|
+
DefaultAbstractEntity,
|
|
54
|
+
DefaultAspect,
|
|
55
|
+
DefaultCharacteristic,
|
|
56
|
+
DefaultCode,
|
|
57
|
+
DefaultCollection,
|
|
58
|
+
DefaultComplexType,
|
|
59
|
+
DefaultConstraint,
|
|
60
|
+
DefaultDuration,
|
|
61
|
+
DefaultEither,
|
|
62
|
+
DefaultEncodingConstraint,
|
|
63
|
+
DefaultEntity,
|
|
64
|
+
DefaultEnumeration,
|
|
65
|
+
DefaultEvent,
|
|
66
|
+
DefaultFixedPointConstraint,
|
|
67
|
+
DefaultLanguageConstraint,
|
|
68
|
+
DefaultLengthConstraint,
|
|
69
|
+
DefaultList,
|
|
70
|
+
DefaultLocaleConstraint,
|
|
71
|
+
DefaultMeasurement,
|
|
72
|
+
DefaultOperation,
|
|
73
|
+
DefaultProperty,
|
|
74
|
+
DefaultQuantifiable,
|
|
75
|
+
DefaultQuantityKind,
|
|
76
|
+
DefaultRangeConstraint,
|
|
77
|
+
DefaultRegularExpressionConstraint,
|
|
78
|
+
DefaultScalar,
|
|
79
|
+
DefaultSet,
|
|
80
|
+
DefaultSingleEntity,
|
|
81
|
+
DefaultSortedSet,
|
|
82
|
+
DefaultState,
|
|
83
|
+
DefaultStructuredValue,
|
|
84
|
+
DefaultTimeSeries,
|
|
85
|
+
DefaultTrait,
|
|
86
|
+
DefaultUnit,
|
|
87
|
+
)
|
|
88
|
+
from .loader.aspect_loader import AspectLoader
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Base
|
|
2
|
+
This folder contains a minimum definition of the elements in the SAMM. The folder does not include any implementations.
|
|
3
|
+
It can be seen as a contract that establishes a fixed structure and inheritance hierarchy.
|
|
4
|
+
The classes should not be instantiated because they are abstract which is similar to interfaces in Java.
|
|
5
|
+
|
|
6
|
+
# Inheritance hierarchy
|
|
7
|
+
```
|
|
8
|
+
HasUrn
|
|
9
|
+
├───────────────────────────────────────────────── DataType
|
|
10
|
+
└── IsDescribed ├── Scalar
|
|
11
|
+
└── Base HasProperties │
|
|
12
|
+
├── StructureElement <──┘ │
|
|
13
|
+
│ ├── Aspect │
|
|
14
|
+
│ └── ComplexType <──────────────────────┘
|
|
15
|
+
│ ├── AbstractEntity
|
|
16
|
+
│ └── Entity
|
|
17
|
+
├── Characteristic
|
|
18
|
+
│ ├── Code
|
|
19
|
+
│ ├── Collection
|
|
20
|
+
│ │ ├── List
|
|
21
|
+
│ │ ├── Set
|
|
22
|
+
│ │ └── SortedSet
|
|
23
|
+
│ │ └── TimeSeries
|
|
24
|
+
│ ├── Either
|
|
25
|
+
│ ├── Enumeration
|
|
26
|
+
│ │ └── State
|
|
27
|
+
│ ├── SingleEntity
|
|
28
|
+
│ ├── StructuredValue
|
|
29
|
+
│ ├── Quantifiable
|
|
30
|
+
│ │ ├── Duration
|
|
31
|
+
│ │ └── Measurement
|
|
32
|
+
│ └── Trait
|
|
33
|
+
├── Constraint
|
|
34
|
+
│ ├── EncodingConstraint
|
|
35
|
+
│ ├── FixedPointConstraint
|
|
36
|
+
│ ├── LanguageConstraint
|
|
37
|
+
│ ├── LengthConstraint
|
|
38
|
+
│ ├── LocaleConstraint
|
|
39
|
+
│ ├── RangeConstraint
|
|
40
|
+
│ └── RegularExpressionConstraint
|
|
41
|
+
├── Event
|
|
42
|
+
├── Operation
|
|
43
|
+
├── Property
|
|
44
|
+
├── QuantityKind
|
|
45
|
+
└── Unit
|
|
46
|
+
|
|
47
|
+
BoundDefiniton
|
|
48
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from .aspect import Aspect
|
|
13
|
+
from .base import Base
|
|
14
|
+
from .bound_definition import BoundDefinition
|
|
15
|
+
from .characteristics.characteristic import Characteristic
|
|
16
|
+
from .characteristics.code import Code
|
|
17
|
+
from .characteristics.collection.collection import Collection
|
|
18
|
+
from .characteristics.collection.list import List
|
|
19
|
+
from .characteristics.collection.set import Set
|
|
20
|
+
from .characteristics.collection.sorted_set import SortedSet
|
|
21
|
+
from .characteristics.collection.time_series import TimeSeries
|
|
22
|
+
from .characteristics.either import Either
|
|
23
|
+
from .characteristics.enumeration import Enumeration
|
|
24
|
+
from .characteristics.quantifiable.duration import Duration
|
|
25
|
+
from .characteristics.quantifiable.measurement import Measurement
|
|
26
|
+
from .characteristics.quantifiable.quantifiable import Quantifiable
|
|
27
|
+
from .characteristics.single_entity import SingleEntity
|
|
28
|
+
from .characteristics.state import State
|
|
29
|
+
from .characteristics.structured_value import StructuredValue
|
|
30
|
+
from .characteristics.trait import Trait
|
|
31
|
+
from .contraints.constraint import Constraint
|
|
32
|
+
from .contraints.encoding_constraint import EncodingConstraint
|
|
33
|
+
from .contraints.fixed_point_constraint import FixedPointConstraint
|
|
34
|
+
from .contraints.language_constraint import LanguageConstraint
|
|
35
|
+
from .contraints.length_constraint import LengthConstraint
|
|
36
|
+
from .contraints.locale_constraint import LocaleConstraint
|
|
37
|
+
from .contraints.range_constraint import RangeConstraint
|
|
38
|
+
from .contraints.regular_expression_constraint import RegularExpressionConstraint
|
|
39
|
+
from .data_types.abstract_entity import AbstractEntity
|
|
40
|
+
from .data_types.complex_type import ComplexType
|
|
41
|
+
from .data_types.data_type import DataType
|
|
42
|
+
from .data_types.entity import Entity
|
|
43
|
+
from .data_types.scalar import Scalar
|
|
44
|
+
from .event import Event
|
|
45
|
+
from .operation import Operation
|
|
46
|
+
from .property import Property
|
|
47
|
+
from .quantity_kind import QuantityKind
|
|
48
|
+
from .unit import Unit
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC, abstractmethod
|
|
13
|
+
from typing import List
|
|
14
|
+
|
|
15
|
+
from esmf_aspect_meta_model_python.base.event import Event
|
|
16
|
+
from esmf_aspect_meta_model_python.base.operation import Operation
|
|
17
|
+
from esmf_aspect_meta_model_python.base.structure_element import StructureElement
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Aspect(StructureElement, ABC):
|
|
21
|
+
"""Aspect interface class.
|
|
22
|
+
|
|
23
|
+
An aspect is the root class for a digital twin.
|
|
24
|
+
It has a number of properties and operations.
|
|
25
|
+
An Aspect Model is described in RDF Turtle.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
@abstractmethod
|
|
30
|
+
def operations(self) -> List[Operation]:
|
|
31
|
+
"""Operations."""
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
@abstractmethod
|
|
35
|
+
def events(self) -> List[Event]:
|
|
36
|
+
"""Events."""
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def is_collection_aspect(self) -> bool:
|
|
40
|
+
"""Is collection aspect flag."""
|
|
41
|
+
return False
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC, abstractmethod
|
|
13
|
+
from typing import Optional
|
|
14
|
+
|
|
15
|
+
from esmf_aspect_meta_model_python.base.is_described import IsDescribed
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Base(IsDescribed, ABC):
|
|
19
|
+
"""Base interface class.
|
|
20
|
+
|
|
21
|
+
Superclass from which all elements in the Meta Model inherit.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
@abstractmethod
|
|
26
|
+
def parent_elements(self) -> Optional[list["Base"]]:
|
|
27
|
+
"""Parent elements."""
|
|
28
|
+
|
|
29
|
+
@parent_elements.setter
|
|
30
|
+
@abstractmethod
|
|
31
|
+
def parent_elements(self, elements: list["Base"]) -> None:
|
|
32
|
+
"""Parent elements setter."""
|
|
33
|
+
|
|
34
|
+
@abstractmethod
|
|
35
|
+
def append_parent_element(self, element: "Base") -> None:
|
|
36
|
+
"""Add parent element."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
import enum
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@enum.unique
|
|
16
|
+
class BoundDefinition(enum.Enum):
|
|
17
|
+
"""Bound Definition class.
|
|
18
|
+
|
|
19
|
+
Enumeration that holds the specifies the upper or lower boundary rule for a range constraint.
|
|
20
|
+
Possible values are: OPEN, AT_LEAST, GREATER_THAN, LESS_THAN, AT_MOST
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
OPEN = "OPEN"
|
|
24
|
+
AT_LEAST = "AT_LEAST"
|
|
25
|
+
GREATER_THAN = "GREATER_THAN"
|
|
26
|
+
LESS_THAN = "LESS_THAN"
|
|
27
|
+
AT_MOST = "AT_MOST"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC, abstractmethod
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.base import Base
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CacheStrategy(ABC):
|
|
18
|
+
"""Cache Strategy interface class."""
|
|
19
|
+
|
|
20
|
+
@abstractmethod
|
|
21
|
+
def reset(self) -> None:
|
|
22
|
+
"""Reset all cached elements."""
|
|
23
|
+
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def get(self, key: str) -> Base | None:
|
|
26
|
+
"""Gets a Base, and returns the element or undefined.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
key (str): key key of the element.
|
|
30
|
+
|
|
31
|
+
Returns:
|
|
32
|
+
Base | None: Element or undefined if it does not exist.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
@abstractmethod
|
|
36
|
+
def get_by_name(self, name: str) -> list[Base]:
|
|
37
|
+
"""Get element by name.
|
|
38
|
+
|
|
39
|
+
Args:
|
|
40
|
+
name (str): name of the element.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
list[Base]: the found elements or an empty list.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
@abstractmethod
|
|
47
|
+
def resolve_instance(self, model_element: Base) -> Base:
|
|
48
|
+
"""Resolve cached element instance or add the given element to the cache.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
model_element (Base): modelElement element instance to resolve
|
|
52
|
+
|
|
53
|
+
Returns:
|
|
54
|
+
Base: cached element instance.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
@abstractmethod
|
|
58
|
+
def add_element(self, name: str, model_element: Base, overwrite: bool = False) -> None:
|
|
59
|
+
"""Add element explicitly to the cache.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
name (str): name of the element
|
|
63
|
+
model_element (Base): element instance to resolve
|
|
64
|
+
overwrite (_type_, optional): force to overwrite it if an element with the
|
|
65
|
+
name already exists. Defaults to False:bool.
|
|
66
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC, abstractmethod
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.base import Base
|
|
15
|
+
from esmf_aspect_meta_model_python.base.data_types.data_type import DataType
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Characteristic(Base, ABC):
|
|
19
|
+
"""Characteristic interface class.
|
|
20
|
+
|
|
21
|
+
Specifies a property by describing its data type.
|
|
22
|
+
Multiple classes inherit from Characteristic which describe the property in a more specific way
|
|
23
|
+
(e.g. Enumeration or Collection).
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
@abstractmethod
|
|
28
|
+
def data_type(self) -> DataType:
|
|
29
|
+
"""Data type."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.characteristic import Characteristic
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Code(Characteristic, ABC):
|
|
18
|
+
"""Code interface class.
|
|
19
|
+
|
|
20
|
+
Describes a Property which contains any kind of code.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC, abstractmethod
|
|
13
|
+
from typing import Optional
|
|
14
|
+
|
|
15
|
+
from esmf_aspect_meta_model_python.base.characteristics.characteristic import Characteristic
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Collection(Characteristic, ABC):
|
|
19
|
+
"""Collection interface class.
|
|
20
|
+
|
|
21
|
+
Describes a property that has a group of values of the same type.
|
|
22
|
+
It can have a reference to another characteristic which describes an actual value of the collection.
|
|
23
|
+
The values are not ordered and may include duplicates.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
@abstractmethod
|
|
28
|
+
def element_characteristic(self) -> Optional[Characteristic]:
|
|
29
|
+
"""Element characteristic."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.collection.collection import Collection
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class List(Collection, ABC):
|
|
18
|
+
"""List interface class.
|
|
19
|
+
|
|
20
|
+
Collection with ordered elements and allowed duplicates.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.collection.collection import Collection
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Set(Collection, ABC):
|
|
18
|
+
"""Set interface class.
|
|
19
|
+
|
|
20
|
+
Collection with unordered elements and without duplicates.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.collection.collection import Collection
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SortedSet(Collection, ABC):
|
|
18
|
+
"""Sorted Set interface class.
|
|
19
|
+
|
|
20
|
+
Collection with ordered elements and without duplicates.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.collection.sorted_set import SortedSet
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TimeSeries(SortedSet, ABC):
|
|
18
|
+
"""Time Series interface class.
|
|
19
|
+
|
|
20
|
+
Sorted Set that has tuples of timestamps and values.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC, abstractmethod
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.characteristic import Characteristic
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Either(Characteristic, ABC):
|
|
18
|
+
"""Either interface class.
|
|
19
|
+
|
|
20
|
+
Describes a property that has exactly one of two possible values.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def left(self) -> Characteristic:
|
|
26
|
+
"""Left."""
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
@abstractmethod
|
|
30
|
+
def right(self) -> Characteristic:
|
|
31
|
+
"""Right."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC, abstractmethod
|
|
13
|
+
from typing import List
|
|
14
|
+
|
|
15
|
+
from esmf_aspect_meta_model_python.base.characteristics.characteristic import Characteristic
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Enumeration(Characteristic, ABC):
|
|
19
|
+
"""Enumeration interface class.
|
|
20
|
+
|
|
21
|
+
Describes a Property that has exactly one of multiple possible values.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
@abstractmethod
|
|
26
|
+
def values(self) -> List:
|
|
27
|
+
"""Values."""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.quantifiable.quantifiable import Quantifiable
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Duration(Quantifiable, ABC):
|
|
18
|
+
"""Duration interface class.
|
|
19
|
+
|
|
20
|
+
Quantifiable where the unit quantifies time.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
|
|
2
|
+
#
|
|
3
|
+
# See the AUTHORS file(s) distributed with this work for additional
|
|
4
|
+
# information regarding authorship.
|
|
5
|
+
#
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
9
|
+
#
|
|
10
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
|
|
12
|
+
from abc import ABC
|
|
13
|
+
|
|
14
|
+
from esmf_aspect_meta_model_python.base.characteristics.quantifiable.quantifiable import Quantifiable
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Measurement(Quantifiable, ABC):
|
|
18
|
+
"""Measurement interface class.
|
|
19
|
+
|
|
20
|
+
Quantifiable where the unit is required.
|
|
21
|
+
"""
|