Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dcc-js
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
D-PTB
DCC
Development
dcc-js
Commits
92987e3e
Verified
Commit
92987e3e
authored
2 years ago
by
Jan Loewe
Browse files
Options
Downloads
Patches
Plain Diff
feat(item): add itemQuantities
parent
0f4caf24
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!4
Update to DCC Schema V3.2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/DCC.ts
+16
-5
16 additions, 5 deletions
src/DCC.ts
with
16 additions
and
5 deletions
src/DCC.ts
+
16
−
5
View file @
92987e3e
...
...
@@ -484,16 +484,15 @@ export class ContactNotStrictType extends DCCXMLElement {
/** List of values which describes the measurement equipment. */
export
class
MeasuringEquipmentQuantityListType
extends
DCCXMLElement
{
measuringEquipmentQuantity
:
MeasuringEquipment
QuantityType
[];
measuringEquipmentQuantity
:
Primitive
QuantityType
[];
constructor
(
el
:
Partial
<
MeasuringEquipmentQuantityListType
>
=
{})
{
super
(
el
);
this
.
measuringEquipmentQuantity
=
ensureArray
(
el
.
measuringEquipmentQuantity
).
map
((
x
)
=>
new
MeasuringEquipment
QuantityType
(
x
));
this
.
measuringEquipmentQuantity
=
ensureArray
(
el
.
measuringEquipmentQuantity
).
map
((
x
)
=>
new
Primitive
QuantityType
(
x
));
}
}
/** Value which describes the measuringEquipment */
export
class
MeasuringEquipmentQuantityType
extends
DCCXMLElement
{
export
class
PrimitiveQuantityType
extends
DCCXMLElement
{
_attr
:
IIdAndRefIdAndRefTypeAttributes
;
name
?:
TextType
;
...
...
@@ -636,7 +635,7 @@ export class MeasuringEquipmentQuantityType extends DCCXMLElement {
// endregion choice
constructor
(
el
:
Partial
<
MeasuringEquipment
QuantityType
>
=
{})
{
constructor
(
el
:
Partial
<
Primitive
QuantityType
>
=
{})
{
super
(
el
);
if
(
el
.
name
)
this
.
name
=
new
TextType
(
el
.
name
);
if
(
el
.
description
)
this
.
description
=
new
RichContentType
(
el
.
description
);
...
...
@@ -662,6 +661,7 @@ export class ItemType extends DCCXMLElement {
manufacturer
:
ContactNotStrictType
;
model
?:
DCCXMLElement
;
identifications
:
IdentificationListType
;
itemQuantities
:
ItemQuantityListType
;
constructor
(
el
:
Partial
<
ItemType
>
=
{})
{
super
(
el
);
...
...
@@ -672,6 +672,17 @@ export class ItemType extends DCCXMLElement {
this
.
manufacturer
=
new
ContactNotStrictType
(
el
.
manufacturer
);
if
(
el
.
model
)
this
.
model
=
new
DCCXMLElement
(
el
.
model
);
this
.
identifications
=
new
IdentificationListType
(
el
.
identifications
);
if
(
el
.
itemQuantities
)
this
.
itemQuantities
=
new
ItemQuantityListType
(
el
.
itemQuantities
);
}
}
/** List of value(s) which belongs to the to be calibrated item. */
export
class
ItemQuantityListType
extends
DCCXMLElement
{
itemQuantity
:
PrimitiveQuantityType
[];
constructor
(
el
:
Partial
<
ItemQuantityListType
>
=
{})
{
super
(
el
);
this
.
itemQuantity
=
ensureArray
(
el
.
itemQuantity
).
map
((
x
)
=>
new
PrimitiveQuantityType
(
x
));
}
}
...
...
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