Skip to content
Snippets Groups Projects
Verified Commit 904e2748 authored by Jan Loewe's avatar Jan Loewe :speech_balloon:
Browse files

feat(dcc v2.2.0): upgrade to dcc v2.2.0

parent c182c47b
No related branches found
No related tags found
No related merge requests found
import { AdministrativeData } from "./AdministrativeData"; import { AdministrativeData } from "./AdministrativeData";
import { XMLElement } from "./XMLElement"; import { XMLElement } from "./XMLElement";
import { MeasurementResults } from "./MeasurementResults"; import { MeasurementResults } from "./MeasurementResults";
import { ByteData } from "./Types";
export class DigitalCalibrationCertificate extends XMLElement { export class DigitalCalibrationCertificate extends XMLElement {
administrativeData: AdministrativeData; administrativeData: AdministrativeData;
measurementResults: MeasurementResults; measurementResults: MeasurementResults;
comments: XMLElement; comments?: XMLElement;
document?: ByteData;
constructor(options: Partial<DigitalCalibrationCertificate> = {}) { constructor(options: Partial<DigitalCalibrationCertificate> = {}) {
super(options); super(options);
this._attr = { this._attr = {
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"xsi:schemaLocation": "https://ptb.de/dcc https://ptb.de/dcc/v2.1.0/dcc.xsd", "xsi:schemaLocation": "https://ptb.de/dcc https://ptb.de/dcc/v2.2.0/dcc.xsd",
"xmlns:dcc": "https://ptb.de/dcc", "xmlns:dcc": "https://ptb.de/dcc",
"xmlns:si": "https://ptb.de/si/smartcom/d-si/v1_0_1", "xmlns:si": "https://ptb.de/si",
...options._attr, ...options._attr,
}; };
this.administrativeData = new AdministrativeData(options.administrativeData); this.administrativeData = new AdministrativeData(options.administrativeData);
this.measurementResults = new MeasurementResults(options.measurementResults); this.measurementResults = new MeasurementResults(options.measurementResults);
if (options.comments) if (options.comments)
this.comments = new XMLElement(options.comments); this.comments = new XMLElement(options.comments);
if (options.document)
this.document = new ByteData(options.document);
} }
} }
...@@ -5,6 +5,9 @@ import { TextBlock } from "./TextBlock"; ...@@ -5,6 +5,9 @@ import { TextBlock } from "./TextBlock";
export class Contact extends XMLElement { export class Contact extends XMLElement {
name: TextBlock; name: TextBlock;
eMail: XMLElement; eMail: XMLElement;
phone?: XMLElement;
fax?: XMLElement;
location: Location; location: Location;
constructor(options: Partial<Contact> = {}) { constructor(options: Partial<Contact> = {}) {
...@@ -12,6 +15,13 @@ export class Contact extends XMLElement { ...@@ -12,6 +15,13 @@ export class Contact extends XMLElement {
this.name = new TextBlock(options.name); this.name = new TextBlock(options.name);
this.eMail = new XMLElement(options.eMail); this.eMail = new XMLElement(options.eMail);
if (options.phone)
this.phone = new XMLElement(options.phone);
if (options.fax)
this.fax = new XMLElement(options.fax);
this.location = new Location(options.location); this.location = new Location(options.location);
} }
} }
...@@ -5,6 +5,9 @@ import { Location } from "./Location"; ...@@ -5,6 +5,9 @@ import { Location } from "./Location";
export class ContactNotStrict extends XMLElement { export class ContactNotStrict extends XMLElement {
name: TextBlock; name: TextBlock;
eMail?: XMLElement; eMail?: XMLElement;
phone?: XMLElement;
fax?: XMLElement;
location?: Location; location?: Location;
constructor(options: Partial<ContactNotStrict> = {}) { constructor(options: Partial<ContactNotStrict> = {}) {
...@@ -15,6 +18,12 @@ export class ContactNotStrict extends XMLElement { ...@@ -15,6 +18,12 @@ export class ContactNotStrict extends XMLElement {
if (options.eMail) if (options.eMail)
this.eMail = new XMLElement(options.eMail); this.eMail = new XMLElement(options.eMail);
if (options.phone)
this.phone = new XMLElement(options.phone);
if (options.fax)
this.fax = new XMLElement(options.fax);
if (options.location) if (options.location)
this.location = new Location(options.location); this.location = new Location(options.location);
} }
......
import { XMLElement } from "../XMLElement";
import { TextBlock } from "./TextBlock";
export class Hash extends XMLElement {
reference: TextBlock;
referenceID: XMLElement;
procedure: XMLElement;
value: XMLElement;
linkedReport?: Hash;
constructor(options: Partial<Hash> = {}) {
super(options);
this.reference = new TextBlock(options.reference);
this.referenceID = new XMLElement(options.referenceID);
this.procedure = new XMLElement(options.procedure);
this.value = new XMLElement(options.value);
if (options.linkedReport)
this.linkedReport = new Hash(options.linkedReport);
}
}
\ No newline at end of file
import { XMLElement } from "../XMLElement";
export class Limit extends XMLElement {
si_real?: any;
si_hybrid?: any;
constructor(options: Partial<Limit> = {}) {
super(options);
if (options.si_real)
this.si_real = options.si_real;
else if (options.si_hybrid)
this.si_hybrid = options.si_hybrid;
}
}
\ No newline at end of file
import { TextBlock } from "./TextBlock";
import { XMLElement } from "../XMLElement";
import { ByteData } from "./ByteData";
import { ContactNotStrict } from "./ContactNotStrict";
import { Identifications } from "./Identifications";
import { Hash } from "./Hash";
export class MeasuringEquipment extends XMLElement {
// TODO: Add missing types
name: TextBlock;
equipmentClass?: any;
description: TextBlock;
descriptionData?: ByteData;
certificate?: Hash;
manufacturer?: ContactNotStrict;
model?: XMLElement;
identifications?: Identifications;
constructor(options?: Partial<MeasuringEquipment>) {
super(options);
this.name = new TextBlock(options.name);
if (options.equipmentClass)
this.equipmentClass = options.equipmentClass;
this.description = new TextBlock(options.description);
if (options.descriptionData)
this.descriptionData = new ByteData(options.descriptionData);
if (options.certificate)
this.certificate = new Hash(options.certificate);
if (options.manufacturer)
this.manufacturer = new ContactNotStrict(options.manufacturer);
if (options.model)
this.model = new XMLElement(options.model);
if (options.identifications)
this.identifications = new Identifications(options.identifications);
}
}
import { XMLElement } from "../XMLElement";
import { ensureArray } from "../Util";
import { MeasuringEquipment } from "./MeasuringEquipment";
export class MeasuringEquipments extends XMLElement {
measuringEquipment: MeasuringEquipment[];
constructor(options: Partial<MeasuringEquipments> = {}) {
super(options);
this.measuringEquipment = ensureArray(options.measuringEquipment).map(x => new MeasuringEquipment(x));
}
}
...@@ -4,6 +4,7 @@ import { UsedMethods } from "./UsedMethods"; ...@@ -4,6 +4,7 @@ import { UsedMethods } from "./UsedMethods";
import { UsedSoftware } from "./UsedSoftware"; import { UsedSoftware } from "./UsedSoftware";
import { InfluenceConditions } from "./InfluenceConditions"; import { InfluenceConditions } from "./InfluenceConditions";
import { MeasurementMetaData } from "./MeasurementMetaData"; import { MeasurementMetaData } from "./MeasurementMetaData";
import { ToleranceOneDim } from "./ToleranceOneDim";
export class Quantity extends XMLElement { export class Quantity extends XMLElement {
name?: TextBlock; name?: TextBlock;
...@@ -19,6 +20,7 @@ export class Quantity extends XMLElement { ...@@ -19,6 +20,7 @@ export class Quantity extends XMLElement {
// end choice // end choice
toleranceOneDim?: ToleranceOneDim;
usedMethods?: UsedMethods; usedMethods?: UsedMethods;
usedSoftware?: UsedSoftware; usedSoftware?: UsedSoftware;
influenceConditions?: InfluenceConditions; influenceConditions?: InfluenceConditions;
...@@ -43,6 +45,9 @@ export class Quantity extends XMLElement { ...@@ -43,6 +45,9 @@ export class Quantity extends XMLElement {
// end choice // end choice
if (options.toleranceOneDim)
this.toleranceOneDim = new ToleranceOneDim(options.toleranceOneDim);
if (options.usedMethods) if (options.usedMethods)
this.usedMethods = new UsedMethods(options.usedMethods); this.usedMethods = new UsedMethods(options.usedMethods);
......
import { TextBlock } from "./TextBlock"; import { TextBlock } from "./TextBlock";
import { Location } from "./Location";
import { XMLElement } from "../XMLElement"; import { XMLElement } from "../XMLElement";
import { XMLBoolean } from "../XMLBoolean"; import { XMLBoolean } from "../XMLBoolean";
import { ContactNotStrict } from "./ContactNotStrict";
export class RespPerson extends XMLElement { export class RespPerson extends XMLElement {
person: XMLElement; person: ContactNotStrict;
mainSigner?: XMLBoolean; mainSigner?: XMLBoolean;
cryptElectronicSeal?: XMLBoolean; cryptElectronicSeal?: XMLBoolean;
cryptElectronicSignature?: XMLBoolean; cryptElectronicSignature?: XMLBoolean;
cryptElectronicTimeStamp?: XMLBoolean; cryptElectronicTimeStamp?: XMLBoolean;
eMailPerson?: XMLElement; description?: TextBlock;
furtherInfoPerson?: TextBlock;
location?: Location;
constructor(options?: Partial<RespPerson>) { constructor(options?: Partial<RespPerson>) {
super(options); super(options);
this.person = new XMLElement(options.person); this.person = new ContactNotStrict(options.person);
if (options.mainSigner) if (options.mainSigner)
this.mainSigner = new XMLBoolean(options.mainSigner); this.mainSigner = new XMLBoolean(options.mainSigner);
...@@ -30,13 +28,7 @@ export class RespPerson extends XMLElement { ...@@ -30,13 +28,7 @@ export class RespPerson extends XMLElement {
if (options.cryptElectronicTimeStamp) if (options.cryptElectronicTimeStamp)
this.cryptElectronicTimeStamp = new XMLBoolean(options.cryptElectronicTimeStamp); this.cryptElectronicTimeStamp = new XMLBoolean(options.cryptElectronicTimeStamp);
if (options.eMailPerson) if (options.description)
this.eMailPerson = new XMLElement(options.eMailPerson); this.description = new TextBlock(options.description);
if (options.furtherInfoPerson)
this.furtherInfoPerson = new TextBlock(options.furtherInfoPerson);
if (options.location)
this.location = new Location(options.location);
} }
} }
import { XMLElement } from "../XMLElement";
import { Limit } from "./Limit";
export class ToleranceOneDim extends XMLElement {
lowerLimit?: Limit;
upperLimit?: Limit;
constructor(options: Partial<ToleranceOneDim> = {}) {
super(options);
if (options.lowerLimit)
this.lowerLimit = new Limit(options.lowerLimit);
if (options.upperLimit)
this.upperLimit = new Limit(options.upperLimit);
}
}
\ No newline at end of file
export * from "./ByteData";
export * from "./CalibrationLaboratory"; export * from "./CalibrationLaboratory";
export * from "./CalibrationLaboratory"; export * from "./CalibrationLaboratory";
export * from "./CalibrationLocation"; export * from "./CalibrationLocation";
export * from "./Condition";
export * from "./Contact"; export * from "./Contact";
export * from "./ContactNotStrict"; export * from "./ContactNotStrict";
export * from "./CoreData"; export * from "./CoreData";
export * from "./Data";
export * from "./DccSoftware"; export * from "./DccSoftware";
export * from "./ElementString"; export * from "./ElementString";
export * from "./ElementStringWithLang"; export * from "./ElementStringWithLang";
export * from "./Formula";
export * from "./Hash";
export * from "./Identification"; export * from "./Identification";
export * from "./Identifications"; export * from "./Identifications";
export * from "./Condition";
export * from "./InfluenceConditions"; export * from "./InfluenceConditions";
export * from "./Item"; export * from "./Item";
export * from "./Items"; export * from "./Items";
export * from "./Limit";
export * from "./List";
export * from "./Location"; export * from "./Location";
export * from "./MeasurementMetaData";
export * from "./MeasuringEquipment";
export * from "./MeasuringEquipments";
export * from "./Quantity";
export * from "./RespPerson"; export * from "./RespPerson";
export * from "./RespPersons"; export * from "./RespPersons";
export * from "./Result"; export * from "./Result";
...@@ -22,12 +32,7 @@ export * from "./Software"; ...@@ -22,12 +32,7 @@ export * from "./Software";
export * from "./Statement"; export * from "./Statement";
export * from "./Statements"; export * from "./Statements";
export * from "./TextBlock"; export * from "./TextBlock";
export * from "./ToleranceOneDim";
export * from "./UsedMethod"; export * from "./UsedMethod";
export * from "./UsedMethods"; export * from "./UsedMethods";
export * from "./UsedSoftware"; export * from "./UsedSoftware";
export * from "./Data";
export * from "./Formula";
export * from "./ByteData";
export * from "./MeasurementMetaData";
export * from "./Quantity";
export * from "./List";
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<dcc:digitalCalibrationCertificate <dcc:digitalCalibrationCertificate
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://ptb.de/dcc https://ptb.de/dcc/v2.1.1/dcc.xsd" xsi:schemaLocation="https://ptb.de/dcc https://ptb.de/dcc/v2.2.0/dcc.xsd"
xmlns:dcc="https://ptb.de/dcc" xmlns:dcc="https://ptb.de/dcc"
xmlns:si="https://ptb.de/si/smartcom/d-si/v1_0_1"> xmlns:si="https://ptb.de/si">
<!-- <!--
Copyright (c) 2019 - Physikalisch-Technische Bundesanstalt, alle Rechte vorbehalten - all rights reserved Copyright (c) 2019 - Physikalisch-Technische Bundesanstalt, alle Rechte vorbehalten - all rights reserved
...@@ -167,24 +167,34 @@ ...@@ -167,24 +167,34 @@
<dcc:respPersons> <dcc:respPersons>
<dcc:respPerson id="Responsible"> <dcc:respPerson id="Responsible">
<dcc:person>Vorname1 Name1</dcc:person> <dcc:person>
<dcc:name>
<dcc:content>Vorname1 Name1</dcc:content>
</dcc:name>
<dcc:eMail>vorname1.name1@ptb.de</dcc:eMail>
</dcc:person>
<dcc:mainSigner>true</dcc:mainSigner> <dcc:mainSigner>true</dcc:mainSigner>
<dcc:eMailPerson>vorname1.name1@ptb.de</dcc:eMailPerson>
</dcc:respPerson> </dcc:respPerson>
<dcc:respPerson id="Technician"> <dcc:respPerson id="Technician">
<dcc:person>Vorname2 Name2</dcc:person> <dcc:person>
<dcc:eMailPerson>vorname2.name2@ptb.de</dcc:eMailPerson> <dcc:name>
<dcc:content>Vorname2 Name2</dcc:content>
</dcc:name>
<dcc:eMail>vorname2.name2@ptb.de</dcc:eMail>
</dcc:person>
</dcc:respPerson> </dcc:respPerson>
<dcc:respPerson id="Signature"> <dcc:respPerson id="Signature">
<dcc:person>Vorname3 Name3</dcc:person> <dcc:person>
<dcc:cryptElectronicSignature>true</dcc:cryptElectronicSignature> <dcc:name>
<dcc:eMailPerson>vorname3.name3@ptb.de</dcc:eMailPerson> <dcc:content>Vorname3 Name3</dcc:content>
<dcc:furtherInfoPerson> </dcc:name>
<dcc:eMail>vorname3.name3@ptb.de</dcc:eMail>
</dcc:person>
<dcc:description>
<dcc:content lang="de">Signaturstelle</dcc:content> <dcc:content lang="de">Signaturstelle</dcc:content>
<dcc:content lang="en">Signaturemember</dcc:content> <dcc:content lang="en">Signaturemember</dcc:content>
</dcc:furtherInfoPerson> </dcc:description>
<dcc:cryptElectronicSignature>true</dcc:cryptElectronicSignature>
</dcc:respPerson> </dcc:respPerson>
</dcc:respPersons> </dcc:respPersons>
...@@ -362,9 +372,11 @@ ...@@ -362,9 +372,11 @@
<si:real> <si:real>
<si:value>20.775</si:value> <si:value>20.775</si:value>
<si:unit>\degreeCelsius</si:unit> <si:unit>\degreeCelsius</si:unit>
<si:uncertainty>0.020</si:uncertainty> <si:expandedUnc>
<si:coverageFactor>2</si:coverageFactor> <si:uncertainty>0.020</si:uncertainty>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
<dcc:quantity> <dcc:quantity>
...@@ -375,9 +387,11 @@ ...@@ -375,9 +387,11 @@
<si:real> <si:real>
<si:value>20.778</si:value> <si:value>20.778</si:value>
<si:unit>\degreeCelsius</si:unit> <si:unit>\degreeCelsius</si:unit>
<si:uncertainty>0.020</si:uncertainty> <si:expandedUnc>
<si:coverageFactor>2</si:coverageFactor> <si:uncertainty>0.020</si:uncertainty>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
</dcc:list> </dcc:list>
...@@ -395,9 +409,11 @@ ...@@ -395,9 +409,11 @@
<si:real> <si:real>
<si:value>46.8</si:value> <si:value>46.8</si:value>
<si:unit>\percent</si:unit> <si:unit>\percent</si:unit>
<si:uncertainty>1.0</si:uncertainty> <si:expandedUnc>
<si:coverageFactor>2</si:coverageFactor> <si:uncertainty>1.0</si:uncertainty>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
<dcc:quantity> <dcc:quantity>
...@@ -408,9 +424,11 @@ ...@@ -408,9 +424,11 @@
<si:real> <si:real>
<si:value>47.4</si:value> <si:value>47.4</si:value>
<si:unit>\percent</si:unit> <si:unit>\percent</si:unit>
<si:uncertainty>1.0</si:uncertainty> <si:expandedUnc>
<si:coverageFactor>2</si:coverageFactor> <si:uncertainty>1.0</si:uncertainty>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
</dcc:list> </dcc:list>
...@@ -428,9 +446,11 @@ ...@@ -428,9 +446,11 @@
<si:real> <si:real>
<si:value>1007.38</si:value> <si:value>1007.38</si:value>
<si:unit>\hecto\pascal</si:unit> <si:unit>\hecto\pascal</si:unit>
<si:uncertainty>0.06</si:uncertainty> <si:expandedUnc>
<si:coverageFactor>2</si:coverageFactor> <si:uncertainty>0.06</si:uncertainty>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
<dcc:quantity> <dcc:quantity>
...@@ -441,9 +461,11 @@ ...@@ -441,9 +461,11 @@
<si:real> <si:real>
<si:value>1007.42</si:value> <si:value>1007.42</si:value>
<si:unit>\hecto\pascal</si:unit> <si:unit>\hecto\pascal</si:unit>
<si:uncertainty>0.06</si:uncertainty> <si:expandedUnc>
<si:coverageFactor>2</si:coverageFactor> <si:uncertainty>0.06</si:uncertainty>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
</dcc:list> </dcc:list>
...@@ -454,12 +476,6 @@ ...@@ -454,12 +476,6 @@
<dcc:results> <dcc:results>
<!-- <dcc:name>
<dcc:content lang="de">Messergebnisse</dcc:content>
<dcc:content lang="en">Measurement results</dcc:content>
</dcc:name>
-->
<dcc:result> <dcc:result>
<dcc:name> <dcc:name>
<dcc:content lang="de">Masse</dcc:content> <dcc:content lang="de">Masse</dcc:content>
...@@ -498,12 +514,14 @@ ...@@ -498,12 +514,14 @@
<dcc:content lang="en" id="mass_uncertaincy_column_4">uncertainty</dcc:content> <dcc:content lang="en" id="mass_uncertaincy_column_4">uncertainty</dcc:content>
</dcc:name> </dcc:name>
<si:real> <si:real>
<si:label>1 kg + 78,41 mg</si:label>
<si:value>1.00007841</si:value> <si:value>1.00007841</si:value>
<si:unit>\kilogram</si:unit> <si:unit>\kilogram</si:unit>
<si:label>1 kg + 78,41 mg</si:label> <si:expandedUnc>
<si:uncertainty>0.00000005</si:uncertainty> <si:uncertainty>0.00000005</si:uncertainty>
<si:coverageFactor>2</si:coverageFactor> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
</dcc:list> </dcc:list>
...@@ -550,9 +568,11 @@ ...@@ -550,9 +568,11 @@
<si:real> <si:real>
<si:value>431.055119</si:value> <si:value>431.055119</si:value>
<si:unit>\centi\metre\tothe{3}</si:unit> <si:unit>\centi\metre\tothe{3}</si:unit>
<si:uncertainty>0.000018</si:uncertainty> <si:expandedUnc>
<si:coverageFactor>2</si:coverageFactor> <si:uncertainty>0.000018</si:uncertainty>
<si:coverageProbability>0.95</si:coverageProbability> <si:coverageFactor>2</si:coverageFactor>
<si:coverageProbability>0.95</si:coverageProbability>
</si:expandedUnc>
</si:real> </si:real>
</dcc:quantity> </dcc:quantity>
</dcc:list> </dcc:list>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment