diff options
author | Mateusz Gołuchowski <mateusz.goluchowski@nokia.com> | 2020-07-16 11:00:00 +0200 |
---|---|---|
committer | Mateusz Gołuchowski <mateusz.goluchowski@nokia.com> | 2020-07-20 10:57:45 +0200 |
commit | c62f765c1ed65829e126807e1e7a91388bb1c322 (patch) | |
tree | 0bba7d7bd35e8ecdcb00047a0bae1a82e64f35ef /src/main/resources | |
parent | 977a518c680032572f6c5c59879ead71221e460a (diff) |
Adjust pm-mapper to accept new schema.
- Replaced 28.550 schema and template with 28.532 standard
- Adjusted class for new schema
- Adjusted xml files for tests
- validate method will now throw exception when given fileFormatType is not supported
Issue-ID: DCAEGEN2-2308
Change-Id: I375db2004887f1f634adac31d4d1af3675f5911c
Signed-off-by: Mateusz Goluchowski <mateusz.goluchowski@nokia.com>
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/schemas/org.3GPP.28.532#measData (renamed from src/main/resources/schemas/org.3GPP.28.550#measData) | 58 | ||||
-rw-r--r-- | src/main/resources/templates/org.3GPP.28.532#measData (renamed from src/main/resources/templates/org.3GPP.28.550#measData) | 18 |
2 files changed, 38 insertions, 38 deletions
diff --git a/src/main/resources/schemas/org.3GPP.28.550#measData b/src/main/resources/schemas/org.3GPP.28.532#measData index d3a9fef..0b4a8aa 100644 --- a/src/main/resources/schemas/org.3GPP.28.550#measData +++ b/src/main/resources/schemas/org.3GPP.28.532#measData @@ -1,12 +1,12 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8" ?> <!-- - 3GPP TS 28.550 Measurements data XML file format definition + 3GPP TS 28.532 Measurements data XML file format definition data file XML schema measData.xsd --> -<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:md="http://www.3gpp.org/ftp/specs/archive/28_series/28.550#measData" targetNamespace="http://www.3gpp.org/ftp/specs/archive/28_series/28.550#measData" elementFormDefault="qualified"> +<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:md="http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData" targetNamespace="http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData" elementFormDefault="qualified"> <!-- Measurement collection data file root XML element --> - <element name="MeasDataFile"> + <element name="measDataFile"> <complexType> <sequence> <element name="fileHeader"> @@ -14,29 +14,29 @@ <sequence> <element name="fileSender"> <complexType> - <attribute name="senderName" type="string" use="optional"/> - <attribute name="senderType" type="string" use="optional"/> + <attribute name="senderName" type="string" use="optional" /> + <attribute name="senderType" type="string" use="optional" /> </complexType> </element> - <element name="MeasData"> + <element name="measData"> <complexType> - <attribute name="beginTime" type="dateTime" use="required"/> + <attribute name="beginTime" type="dateTime" use="required" /> </complexType> </element> </sequence> - <attribute name="fileFormatVersion" type="string" use="required"/> - <attribute name="vendorName" type="string" use="optional"/> - <attribute name="dnPrefix" type="string" use="optional"/> + <attribute name="fileFormatVersion" type="string" use="required" /> + <attribute name="vendorName" type="string" use="optional" /> + <attribute name="dnPrefix" type="string" use="optional" /> </complexType> </element> <element name="measData" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> - <element name="measuredEntity"> + <element name="measEntity"> <complexType> - <attribute name="userLabel" type="string" use="optional"/> - <attribute name="localDn" type="string" use="optional"/> - <attribute name="swVersion" type="string" use="optional"/> + <attribute name="userLabel" type="string" use="optional" /> + <attribute name="localDn" type="string" use="optional" /> + <attribute name="swVersion" type="string" use="optional" /> </complexType> </element> <element name="measInfo" minOccurs="0" maxOccurs="unbounded"> @@ -44,31 +44,31 @@ <sequence> <element name="job" minOccurs="0"> <complexType> - <attribute name="jobId" type="string" use="required"/> + <attribute name="jobId" type="string" use="required" /> </complexType> </element> <element name="granPeriod"> <complexType> - <attribute name="duration" type="duration" use="required"/> - <attribute name="endTime" type="dateTime" use="required"/> + <attribute name="duration" type="duration" use="required" /> + <attribute name="endTime" type="dateTime" use="required" /> </complexType> </element> <element name="repPeriod" minOccurs="0"> <complexType> - <attribute name="duration" type="duration" use="required"/> + <attribute name="duration" type="duration" use="required" /> </complexType> </element> <choice> <element name="measTypes"> <simpleType> - <list itemType="Name"/> + <list itemType="Name" /> </simpleType> </element> <element name="measType" minOccurs="0" maxOccurs="unbounded"> <complexType> <simpleContent> <extension base="Name"> - <attribute name="p" type="positiveInteger" use="required"/> + <attribute name="p" type="positiveInteger" use="required" /> </extension> </simpleContent> </complexType> @@ -80,26 +80,26 @@ <choice> <element name="measResults"> <simpleType> - <list itemType="md:measResultType"/> + <list itemType="md:measResultType" /> </simpleType> </element> <element name="r" minOccurs="0" maxOccurs="unbounded"> <complexType> <simpleContent> <extension base="md:measResultType"> - <attribute name="p" type="positiveInteger" use="required"/> + <attribute name="p" type="positiveInteger" use="required" /> </extension> </simpleContent> </complexType> </element> </choice> - <element name="suspect" type="boolean" minOccurs="0"/> + <element name="suspect" type="boolean" minOccurs="0" /> </sequence> - <attribute name="measObjLdn" type="string" use="required"/> + <attribute name="measObjLdn" type="string" use="required" /> </complexType> </element> </sequence> - <attribute name="measInfoId" type="string" use="optional"/> + <attribute name="measInfoId" type="string" use="optional" /> </complexType> </element> </sequence> @@ -108,9 +108,9 @@ <element name="fileFooter"> <complexType> <sequence> - <element name="MeasData"> + <element name="measData"> <complexType> - <attribute name="endTime" type="dateTime" use="required"/> + <attribute name="endTime" type="dateTime" use="required" /> </complexType> </element> </sequence> @@ -123,7 +123,7 @@ <union memberTypes="integer float string"> <simpleType> <restriction base="string"> - <enumeration value="NULL"/> + <enumeration value="NULL" /> </restriction> </simpleType> </union> diff --git a/src/main/resources/templates/org.3GPP.28.550#measData b/src/main/resources/templates/org.3GPP.28.532#measData index 653077e..a845cc8 100644 --- a/src/main/resources/templates/org.3GPP.28.550#measData +++ b/src/main/resources/templates/org.3GPP.28.532#measData @@ -19,9 +19,9 @@ ============LICENSE_END========================================================= --> <#compress> -<#assign fileHeader = xml.MeasDataFile.fileHeader> -<#assign fileFooter = xml.MeasDataFile.fileFooter> -<#assign measData = xml.MeasDataFile.measData> +<#assign fileHeader = xml.measDataFile.fileHeader> +<#assign fileFooter = xml.measDataFile.fileFooter> +<#assign measData = xml.measDataFile.measData> <#setting datetime_format="iso"> { "event": { @@ -42,8 +42,8 @@ "sourceName": "${metadata.sourceName}", "reportingEntityName": "", "priority": "Normal", - "startEpochMicrosec": ${fileHeader.MeasData.@beginTime?datetime?long?c}, - "lastEpochMicrosec": ${fileFooter.MeasData.@endTime?datetime?long?c}, + "startEpochMicrosec": ${fileHeader.measData.@beginTime?datetime?long?c}, + "lastEpochMicrosec": ${fileFooter.measData.@endTime?datetime?long?c}, "version": "4.0", "vesEventListenerVersion": "7.1", "timeZoneOffset": "${metadata.timeZoneOffset}" @@ -116,9 +116,9 @@ <#macro measDataCollection> { "granularityPeriod": ${measData.measInfo.granPeriod.@endTime[0]!?datetime?long?c}, - "measuredEntityUserName": "${measData.measuredEntity.@userLabel[0]!}", - "measuredEntityDn": "${measData.measuredEntity.@localDn[0]!}", - "measuredEntitySoftwareVersion": "${measData.measuredEntity.@swVersion[0]!}", + "measuredEntityUserName": "${measData.measEntity.@userLabel[0]!}", + "measuredEntityDn": "${measData.measEntity.@localDn[0]!}", + "measuredEntitySoftwareVersion": "${measData.measEntity.@swVersion[0]!}", "measInfoList": <@measInfoList/> } </#macro> @@ -129,4 +129,4 @@ "measDataCollection": <@measDataCollection/> } </#macro> -</#compress>
\ No newline at end of file +</#compress> |