Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PyI40AAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lehrstuhl für Informations- und Automatisierungssysteme
PyI40AAS
Commits
c663a5cb
Verified
Commit
c663a5cb
authored
Apr 4, 2020
by
Leon Mauritz Möller
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix/xml_serialization' into feature/xml_deserialization
parents
bfbb7455
6eaf4c7d
No related branches found
No related tags found
1 merge request
!24
adapter: add xml deserialization
Pipeline
#264542
passed
Apr 4, 2020
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
aas/adapter/xml/xml_serialization.py
+8
-2
8 additions, 2 deletions
aas/adapter/xml/xml_serialization.py
with
8 additions
and
2 deletions
aas/adapter/xml/xml_serialization.py
+
8
−
2
View file @
c663a5cb
...
@@ -327,6 +327,12 @@ def concept_description_to_xml(obj: model.ConceptDescription,
...
@@ -327,6 +327,12 @@ def concept_description_to_xml(obj: model.ConceptDescription,
et_data_spec_content
.
append
(
_iec61360_concept_description_to_xml
(
obj
))
et_data_spec_content
.
append
(
_iec61360_concept_description_to_xml
(
obj
))
et_embedded_data_specification
.
append
(
et_data_spec_content
)
et_embedded_data_specification
.
append
(
et_data_spec_content
)
et_concept_description
.
append
(
et_embedded_data_specification
)
et_concept_description
.
append
(
et_embedded_data_specification
)
et_embedded_data_specification
.
append
(
reference_to_xml
(
model
.
Reference
(
tuple
([
model
.
Key
(
model
.
KeyElements
.
GLOBAL_REFERENCE
,
False
,
"
http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0
"
,
model
.
KeyType
.
IRI
)])),
NS_AAS
+
"
dataSpecification
"
))
if
obj
.
is_case_of
:
if
obj
.
is_case_of
:
for
reference
in
obj
.
is_case_of
:
for
reference
in
obj
.
is_case_of
:
et_concept_description
.
append
(
reference_to_xml
(
reference
,
NS_AAS
+
"
isCaseOf
"
))
et_concept_description
.
append
(
reference_to_xml
(
reference
,
NS_AAS
+
"
isCaseOf
"
))
...
@@ -614,9 +620,9 @@ def range_to_xml(obj: model.Range,
...
@@ -614,9 +620,9 @@ def range_to_xml(obj: model.Range,
:return: serialized ElementTree object
:return: serialized ElementTree object
"""
"""
et_range
=
abstract_classes_to_xml
(
tag
,
obj
)
et_range
=
abstract_classes_to_xml
(
tag
,
obj
)
if
obj
.
max
:
if
obj
.
max
is
not
None
:
et_range
.
append
(
_value_to_xml
(
obj
.
max
,
obj
.
value_type
,
tag
=
NS_AAS
+
"
max
"
))
et_range
.
append
(
_value_to_xml
(
obj
.
max
,
obj
.
value_type
,
tag
=
NS_AAS
+
"
max
"
))
if
obj
.
min
:
if
obj
.
min
is
not
None
:
et_range
.
append
(
_value_to_xml
(
obj
.
min
,
obj
.
value_type
,
tag
=
NS_AAS
+
"
min
"
))
et_range
.
append
(
_value_to_xml
(
obj
.
min
,
obj
.
value_type
,
tag
=
NS_AAS
+
"
min
"
))
et_range
.
append
(
_generate_element
(
name
=
NS_AAS
+
"
valueType
"
,
et_range
.
append
(
_generate_element
(
name
=
NS_AAS
+
"
valueType
"
,
text
=
model
.
datatypes
.
XSD_TYPE_NAMES
[
obj
.
value_type
]))
text
=
model
.
datatypes
.
XSD_TYPE_NAMES
[
obj
.
value_type
]))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment