initialize
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in ComponentType
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class ComponentTypeMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType get(ComponentType itacComponentType)
|
||||
{
|
||||
if (itacComponentType == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType asmComponentType = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType();
|
||||
mapItac2Asm(asmComponentType, itacComponentType);
|
||||
return asmComponentType;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType asmComponentType, ComponentType itacComponentType)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ComponentType
|
||||
asmComponentType.Id = itacComponentType.Id;
|
||||
asmComponentType.Name = itacComponentType.Name;
|
||||
asmComponentType.PackForm = itacComponentType.PackForm;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType[] get(ComponentType[] itacComponentType)
|
||||
{
|
||||
if (itacComponentType == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType[] asmComponentType = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType[itacComponentType.Length];
|
||||
for (int i = 0; i < itacComponentType.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmComponentType[i] = ComponentTypeMapper.get(itacComponentType[i]);
|
||||
}
|
||||
return asmComponentType;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType> getList(ComponentType[] asmComponentType)
|
||||
{
|
||||
if (asmComponentType == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType> itacComponentType = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType>();
|
||||
for (int i = 0; i < asmComponentType.Length; i++)
|
||||
{
|
||||
itacComponentType.Add(ComponentTypeMapper.get(asmComponentType[i]));
|
||||
}
|
||||
return itacComponentType;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static ComponentType get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType asmComponentType)
|
||||
{
|
||||
if (asmComponentType == null) { return null; }
|
||||
ComponentType itacComponentType = new ComponentType();
|
||||
mapAsm2Itac(asmComponentType, itacComponentType);
|
||||
return itacComponentType;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType asmComponentType, ComponentType itacComponentType)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ComponentType
|
||||
itacComponentType.Id = asmComponentType.Id;
|
||||
itacComponentType.Name = asmComponentType.Name;
|
||||
itacComponentType.PackForm = asmComponentType.PackForm;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static ComponentType[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType> asmComponentType)
|
||||
{
|
||||
if (asmComponentType == null) { return null; }
|
||||
ComponentType[] itacComponentType = new ComponentType[asmComponentType.Count];
|
||||
for (int i = 0; i < asmComponentType.Count; i++)
|
||||
{
|
||||
itacComponentType[i] = ComponentTypeMapper.get(asmComponentType[i]);
|
||||
}
|
||||
return itacComponentType;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static ComponentType[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ComponentType[] asmComponentType)
|
||||
{
|
||||
if (asmComponentType == null) { return null; }
|
||||
ComponentType[] itacComponentType = new ComponentType[asmComponentType.Length];
|
||||
for (int i = 0; i < asmComponentType.Length; i++)
|
||||
{
|
||||
itacComponentType[i] = ComponentTypeMapper.get(asmComponentType[i]);
|
||||
}
|
||||
return itacComponentType;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in Consumption
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class ConsumptionMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption get(Consumption itacConsumption)
|
||||
{
|
||||
if (itacConsumption == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption asmConsumption = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption();
|
||||
mapItac2Asm(asmConsumption, itacConsumption);
|
||||
return asmConsumption;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption asmConsumption, Consumption itacConsumption)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Consumption
|
||||
asmConsumption.AccessTotal = itacConsumption.AccessTotal;
|
||||
asmConsumption.PackagingUID = itacConsumption.PackagingUID;
|
||||
asmConsumption.RejectIdent = itacConsumption.RejectIdent;
|
||||
asmConsumption.RejectVacuum = itacConsumption.RejectVacuum;
|
||||
asmConsumption.TrackEmpty = itacConsumption.TrackEmpty;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption[] get(Consumption[] itacConsumption)
|
||||
{
|
||||
if (itacConsumption == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption[] asmConsumption = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption[itacConsumption.Length];
|
||||
for (int i = 0; i < itacConsumption.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmConsumption[i] = ConsumptionMapper.get(itacConsumption[i]);
|
||||
}
|
||||
return asmConsumption;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption> getList(Consumption[] asmConsumption)
|
||||
{
|
||||
if (asmConsumption == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption> itacConsumption = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption>();
|
||||
for (int i = 0; i < asmConsumption.Length; i++)
|
||||
{
|
||||
itacConsumption.Add(ConsumptionMapper.get(asmConsumption[i]));
|
||||
}
|
||||
return itacConsumption;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static Consumption get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption asmConsumption)
|
||||
{
|
||||
if (asmConsumption == null) { return null; }
|
||||
Consumption itacConsumption = new Consumption();
|
||||
mapAsm2Itac(asmConsumption, itacConsumption);
|
||||
return itacConsumption;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption asmConsumption, Consumption itacConsumption)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Consumption
|
||||
itacConsumption.AccessTotal = asmConsumption.AccessTotal;
|
||||
itacConsumption.PackagingUID = asmConsumption.PackagingUID;
|
||||
itacConsumption.RejectIdent = asmConsumption.RejectIdent;
|
||||
itacConsumption.RejectVacuum = asmConsumption.RejectVacuum;
|
||||
itacConsumption.TrackEmpty = asmConsumption.TrackEmpty;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static Consumption[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption> asmConsumption)
|
||||
{
|
||||
if (asmConsumption == null) { return null; }
|
||||
Consumption[] itacConsumption = new Consumption[asmConsumption.Count];
|
||||
for (int i = 0; i < asmConsumption.Count; i++)
|
||||
{
|
||||
itacConsumption[i] = ConsumptionMapper.get(asmConsumption[i]);
|
||||
}
|
||||
return itacConsumption;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static Consumption[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Consumption[] asmConsumption)
|
||||
{
|
||||
if (asmConsumption == null) { return null; }
|
||||
Consumption[] itacConsumption = new Consumption[asmConsumption.Length];
|
||||
for (int i = 0; i < asmConsumption.Length; i++)
|
||||
{
|
||||
itacConsumption[i] = ConsumptionMapper.get(asmConsumption[i]);
|
||||
}
|
||||
return itacConsumption;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in ErrorCodes
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class ErrorCodesMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes get(ErrorCodes itacErrorCodes)
|
||||
{
|
||||
if (itacErrorCodes == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes asmErrorCodes = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes();
|
||||
mapItac2Asm(asmErrorCodes, itacErrorCodes);
|
||||
return asmErrorCodes;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes asmErrorCodes, ErrorCodes itacErrorCodes)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ErrorCodes
|
||||
// complex property ErrorCodesList, isArray:True, isGeneric:False
|
||||
asmErrorCodes.ErrorCodesList = com.itac.oib.traceability.contracts.data.ErrorStructMapper.get( itacErrorCodes.ErrorCodesList);
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes[] get(ErrorCodes[] itacErrorCodes)
|
||||
{
|
||||
if (itacErrorCodes == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes[] asmErrorCodes = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes[itacErrorCodes.Length];
|
||||
for (int i = 0; i < itacErrorCodes.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmErrorCodes[i] = ErrorCodesMapper.get(itacErrorCodes[i]);
|
||||
}
|
||||
return asmErrorCodes;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes> getList(ErrorCodes[] asmErrorCodes)
|
||||
{
|
||||
if (asmErrorCodes == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes> itacErrorCodes = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes>();
|
||||
for (int i = 0; i < asmErrorCodes.Length; i++)
|
||||
{
|
||||
itacErrorCodes.Add(ErrorCodesMapper.get(asmErrorCodes[i]));
|
||||
}
|
||||
return itacErrorCodes;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static ErrorCodes get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes asmErrorCodes)
|
||||
{
|
||||
if (asmErrorCodes == null) { return null; }
|
||||
ErrorCodes itacErrorCodes = new ErrorCodes();
|
||||
mapAsm2Itac(asmErrorCodes, itacErrorCodes);
|
||||
return itacErrorCodes;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes asmErrorCodes, ErrorCodes itacErrorCodes)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ErrorCodes
|
||||
// array mapping
|
||||
itacErrorCodes.ErrorCodesList = ErrorStructMapper.getArray(asmErrorCodes.ErrorCodesList);
|
||||
// complex asm property ErrorCodesList
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static ErrorCodes[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes> asmErrorCodes)
|
||||
{
|
||||
if (asmErrorCodes == null) { return null; }
|
||||
ErrorCodes[] itacErrorCodes = new ErrorCodes[asmErrorCodes.Count];
|
||||
for (int i = 0; i < asmErrorCodes.Count; i++)
|
||||
{
|
||||
itacErrorCodes[i] = ErrorCodesMapper.get(asmErrorCodes[i]);
|
||||
}
|
||||
return itacErrorCodes;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static ErrorCodes[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorCodes[] asmErrorCodes)
|
||||
{
|
||||
if (asmErrorCodes == null) { return null; }
|
||||
ErrorCodes[] itacErrorCodes = new ErrorCodes[asmErrorCodes.Length];
|
||||
for (int i = 0; i < asmErrorCodes.Length; i++)
|
||||
{
|
||||
itacErrorCodes[i] = ErrorCodesMapper.get(asmErrorCodes[i]);
|
||||
}
|
||||
return itacErrorCodes;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in ErrorStruct
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class ErrorStructMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct get(ErrorStruct itacErrorStruct)
|
||||
{
|
||||
if (itacErrorStruct == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct asmErrorStruct = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct();
|
||||
mapItac2Asm(asmErrorStruct, itacErrorStruct);
|
||||
return asmErrorStruct;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct asmErrorStruct, ErrorStruct itacErrorStruct)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ErrorStruct
|
||||
asmErrorStruct.ErrorLevel = itacErrorStruct.ErrorLevel;
|
||||
// complex property ErrorReasons, isArray:True, isGeneric:False
|
||||
asmErrorStruct.ErrorReasons = com.itac.oib.traceability.contracts.data.ReasonStructMapper.get( itacErrorStruct.ErrorReasons);
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct[] get(ErrorStruct[] itacErrorStruct)
|
||||
{
|
||||
if (itacErrorStruct == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct[] asmErrorStruct = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct[itacErrorStruct.Length];
|
||||
for (int i = 0; i < itacErrorStruct.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmErrorStruct[i] = ErrorStructMapper.get(itacErrorStruct[i]);
|
||||
}
|
||||
return asmErrorStruct;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct> getList(ErrorStruct[] asmErrorStruct)
|
||||
{
|
||||
if (asmErrorStruct == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct> itacErrorStruct = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct>();
|
||||
for (int i = 0; i < asmErrorStruct.Length; i++)
|
||||
{
|
||||
itacErrorStruct.Add(ErrorStructMapper.get(asmErrorStruct[i]));
|
||||
}
|
||||
return itacErrorStruct;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static ErrorStruct get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct asmErrorStruct)
|
||||
{
|
||||
if (asmErrorStruct == null) { return null; }
|
||||
ErrorStruct itacErrorStruct = new ErrorStruct();
|
||||
mapAsm2Itac(asmErrorStruct, itacErrorStruct);
|
||||
return itacErrorStruct;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct asmErrorStruct, ErrorStruct itacErrorStruct)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ErrorStruct
|
||||
itacErrorStruct.ErrorLevel = asmErrorStruct.ErrorLevel;
|
||||
// array mapping
|
||||
itacErrorStruct.ErrorReasons = ReasonStructMapper.getArray(asmErrorStruct.ErrorReasons);
|
||||
// complex asm property ErrorReasons
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static ErrorStruct[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct> asmErrorStruct)
|
||||
{
|
||||
if (asmErrorStruct == null) { return null; }
|
||||
ErrorStruct[] itacErrorStruct = new ErrorStruct[asmErrorStruct.Count];
|
||||
for (int i = 0; i < asmErrorStruct.Count; i++)
|
||||
{
|
||||
itacErrorStruct[i] = ErrorStructMapper.get(asmErrorStruct[i]);
|
||||
}
|
||||
return itacErrorStruct;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static ErrorStruct[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ErrorStruct[] asmErrorStruct)
|
||||
{
|
||||
if (asmErrorStruct == null) { return null; }
|
||||
ErrorStruct[] itacErrorStruct = new ErrorStruct[asmErrorStruct.Length];
|
||||
for (int i = 0; i < asmErrorStruct.Length; i++)
|
||||
{
|
||||
itacErrorStruct[i] = ErrorStructMapper.get(asmErrorStruct[i]);
|
||||
}
|
||||
return itacErrorStruct;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in Job
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class JobMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job get(Job itacJob)
|
||||
{
|
||||
if (itacJob == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job asmJob = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job();
|
||||
mapItac2Asm(asmJob, itacJob);
|
||||
return asmJob;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job asmJob, Job itacJob)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Job
|
||||
asmJob.BoardName = itacJob.BoardName;
|
||||
asmJob.BoardSide = itacJob.BoardSide;
|
||||
asmJob.OrderID = itacJob.OrderID;
|
||||
asmJob.Recipe = itacJob.Recipe;
|
||||
asmJob.Setup = itacJob.Setup;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job[] get(Job[] itacJob)
|
||||
{
|
||||
if (itacJob == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job[] asmJob = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job[itacJob.Length];
|
||||
for (int i = 0; i < itacJob.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmJob[i] = JobMapper.get(itacJob[i]);
|
||||
}
|
||||
return asmJob;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job> getList(Job[] asmJob)
|
||||
{
|
||||
if (asmJob == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job> itacJob = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job>();
|
||||
for (int i = 0; i < asmJob.Length; i++)
|
||||
{
|
||||
itacJob.Add(JobMapper.get(asmJob[i]));
|
||||
}
|
||||
return itacJob;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static Job get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job asmJob)
|
||||
{
|
||||
if (asmJob == null) { return null; }
|
||||
Job itacJob = new Job();
|
||||
mapAsm2Itac(asmJob, itacJob);
|
||||
return itacJob;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job asmJob, Job itacJob)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Job
|
||||
itacJob.BoardName = asmJob.BoardName;
|
||||
itacJob.BoardSide = asmJob.BoardSide;
|
||||
itacJob.OrderID = asmJob.OrderID;
|
||||
itacJob.Recipe = asmJob.Recipe;
|
||||
itacJob.Setup = asmJob.Setup;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static Job[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job> asmJob)
|
||||
{
|
||||
if (asmJob == null) { return null; }
|
||||
Job[] itacJob = new Job[asmJob.Count];
|
||||
for (int i = 0; i < asmJob.Count; i++)
|
||||
{
|
||||
itacJob[i] = JobMapper.get(asmJob[i]);
|
||||
}
|
||||
return itacJob;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static Job[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Job[] asmJob)
|
||||
{
|
||||
if (asmJob == null) { return null; }
|
||||
Job[] itacJob = new Job[asmJob.Length];
|
||||
for (int i = 0; i < asmJob.Length; i++)
|
||||
{
|
||||
itacJob[i] = JobMapper.get(asmJob[i]);
|
||||
}
|
||||
return itacJob;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in Location
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class LocationMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location get(Location itacLocation)
|
||||
{
|
||||
if (itacLocation == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location asmLocation = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location();
|
||||
mapItac2Asm(asmLocation, itacLocation);
|
||||
return asmLocation;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location asmLocation, Location itacLocation)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Location
|
||||
asmLocation.Loc = itacLocation.Loc;
|
||||
// complex property Positions, isArray:True, isGeneric:False
|
||||
asmLocation.Positions = com.itac.oib.traceability.contracts.data.PositionMapper.get( itacLocation.Positions);
|
||||
asmLocation.Station = itacLocation.Station;
|
||||
asmLocation.TableID = itacLocation.TableID;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location[] get(Location[] itacLocation)
|
||||
{
|
||||
if (itacLocation == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location[] asmLocation = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location[itacLocation.Length];
|
||||
for (int i = 0; i < itacLocation.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmLocation[i] = LocationMapper.get(itacLocation[i]);
|
||||
}
|
||||
return asmLocation;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location> getList(Location[] asmLocation)
|
||||
{
|
||||
if (asmLocation == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location> itacLocation = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location>();
|
||||
for (int i = 0; i < asmLocation.Length; i++)
|
||||
{
|
||||
itacLocation.Add(LocationMapper.get(asmLocation[i]));
|
||||
}
|
||||
return itacLocation;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static Location get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location asmLocation)
|
||||
{
|
||||
if (asmLocation == null) { return null; }
|
||||
Location itacLocation = new Location();
|
||||
mapAsm2Itac(asmLocation, itacLocation);
|
||||
return itacLocation;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location asmLocation, Location itacLocation)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Location
|
||||
itacLocation.Loc = asmLocation.Loc;
|
||||
// array mapping
|
||||
itacLocation.Positions = PositionMapper.getArray(asmLocation.Positions);
|
||||
// complex asm property Positions
|
||||
itacLocation.Station = asmLocation.Station;
|
||||
itacLocation.TableID = asmLocation.TableID;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static Location[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location> asmLocation)
|
||||
{
|
||||
if (asmLocation == null) { return null; }
|
||||
Location[] itacLocation = new Location[asmLocation.Count];
|
||||
for (int i = 0; i < asmLocation.Count; i++)
|
||||
{
|
||||
itacLocation[i] = LocationMapper.get(asmLocation[i]);
|
||||
}
|
||||
return itacLocation;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static Location[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Location[] asmLocation)
|
||||
{
|
||||
if (asmLocation == null) { return null; }
|
||||
Location[] itacLocation = new Location[asmLocation.Length];
|
||||
for (int i = 0; i < asmLocation.Length; i++)
|
||||
{
|
||||
itacLocation[i] = LocationMapper.get(asmLocation[i]);
|
||||
}
|
||||
return itacLocation;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in PackagingUnit
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class PackagingUnitMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit get(PackagingUnit itacPackagingUnit)
|
||||
{
|
||||
if (itacPackagingUnit == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit asmPackagingUnit = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit();
|
||||
mapItac2Asm(asmPackagingUnit, itacPackagingUnit);
|
||||
return asmPackagingUnit;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit asmPackagingUnit, PackagingUnit itacPackagingUnit)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in PackagingUnit
|
||||
asmPackagingUnit.Active = itacPackagingUnit.Active;
|
||||
asmPackagingUnit.BatchId = itacPackagingUnit.BatchId;
|
||||
// complex property BatchQuantity, isArray:False, isGeneric:True
|
||||
// itacPackagingUnit.BatchQuantity = asmPackagingUnit.BatchQuantity;
|
||||
asmPackagingUnit.Comment = itacPackagingUnit.Comment;
|
||||
asmPackagingUnit.ComponentBarcode = itacPackagingUnit.ComponentBarcode;
|
||||
asmPackagingUnit.ComponentTypeId = itacPackagingUnit.ComponentTypeId;
|
||||
asmPackagingUnit.ExpiryDate = itacPackagingUnit.ExpiryDate;
|
||||
asmPackagingUnit.Extra1 = itacPackagingUnit.Extra1;
|
||||
asmPackagingUnit.Extra2 = itacPackagingUnit.Extra2;
|
||||
asmPackagingUnit.Extra3 = itacPackagingUnit.Extra3;
|
||||
asmPackagingUnit.Id = itacPackagingUnit.Id;
|
||||
asmPackagingUnit.ManufactureDate = itacPackagingUnit.ManufactureDate;
|
||||
asmPackagingUnit.Manufacturer = itacPackagingUnit.Manufacturer;
|
||||
asmPackagingUnit.MsdLevel = itacPackagingUnit.MsdLevel;
|
||||
asmPackagingUnit.MsdOpenDate = itacPackagingUnit.MsdOpenDate;
|
||||
asmPackagingUnit.Operator = itacPackagingUnit.Operator;
|
||||
asmPackagingUnit.OriginalQuantity = itacPackagingUnit.OriginalQuantity;
|
||||
asmPackagingUnit.PackagingId = itacPackagingUnit.PackagingId;
|
||||
// complex property Quantity, isArray:False, isGeneric:True
|
||||
itacPackagingUnit.Quantity = asmPackagingUnit.Quantity;
|
||||
asmPackagingUnit.Serial = itacPackagingUnit.Serial;
|
||||
asmPackagingUnit.Supplier = itacPackagingUnit.Supplier;
|
||||
asmPackagingUnit.VerifiedDate = itacPackagingUnit.VerifiedDate;
|
||||
asmPackagingUnit.BrightnessClass = itacPackagingUnit.BrightnessClass;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit[] get(PackagingUnit[] itacPackagingUnit)
|
||||
{
|
||||
if (itacPackagingUnit == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit[] asmPackagingUnit = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit[itacPackagingUnit.Length];
|
||||
for (int i = 0; i < itacPackagingUnit.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmPackagingUnit[i] = PackagingUnitMapper.get(itacPackagingUnit[i]);
|
||||
}
|
||||
return asmPackagingUnit;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit> getList(PackagingUnit[] asmPackagingUnit)
|
||||
{
|
||||
if (asmPackagingUnit == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit> itacPackagingUnit = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit>();
|
||||
for (int i = 0; i < asmPackagingUnit.Length; i++)
|
||||
{
|
||||
itacPackagingUnit.Add(PackagingUnitMapper.get(asmPackagingUnit[i]));
|
||||
}
|
||||
return itacPackagingUnit;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static PackagingUnit get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit asmPackagingUnit)
|
||||
{
|
||||
if (asmPackagingUnit == null) { return null; }
|
||||
PackagingUnit itacPackagingUnit = new PackagingUnit();
|
||||
mapAsm2Itac(asmPackagingUnit, itacPackagingUnit);
|
||||
return itacPackagingUnit;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit asmPackagingUnit, PackagingUnit itacPackagingUnit)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in PackagingUnit
|
||||
itacPackagingUnit.Active = asmPackagingUnit.Active;
|
||||
itacPackagingUnit.BatchId = asmPackagingUnit.BatchId;
|
||||
// maps ASM list 2 iTAC array
|
||||
// implicit mapping primitive type with optional !!!
|
||||
// itacPackagingUnit.BatchQuantity = asmPackagingUnit.BatchQuantity;
|
||||
itacPackagingUnit.Comment = asmPackagingUnit.Comment;
|
||||
itacPackagingUnit.ComponentBarcode = asmPackagingUnit.ComponentBarcode;
|
||||
itacPackagingUnit.ComponentTypeId = asmPackagingUnit.ComponentTypeId;
|
||||
itacPackagingUnit.ExpiryDate = asmPackagingUnit.ExpiryDate;
|
||||
itacPackagingUnit.Extra1 = asmPackagingUnit.Extra1;
|
||||
itacPackagingUnit.Extra2 = asmPackagingUnit.Extra2;
|
||||
itacPackagingUnit.Extra3 = asmPackagingUnit.Extra3;
|
||||
itacPackagingUnit.Id = asmPackagingUnit.Id;
|
||||
itacPackagingUnit.ManufactureDate = asmPackagingUnit.ManufactureDate;
|
||||
itacPackagingUnit.Manufacturer = asmPackagingUnit.Manufacturer;
|
||||
itacPackagingUnit.MsdLevel = asmPackagingUnit.MsdLevel;
|
||||
itacPackagingUnit.MsdOpenDate = asmPackagingUnit.MsdOpenDate;
|
||||
itacPackagingUnit.Operator = asmPackagingUnit.Operator;
|
||||
itacPackagingUnit.OriginalQuantity = asmPackagingUnit.OriginalQuantity;
|
||||
itacPackagingUnit.PackagingId = asmPackagingUnit.PackagingId;
|
||||
// maps ASM list 2 iTAC array
|
||||
// implicit mapping primitive type with optional !!!
|
||||
itacPackagingUnit.Quantity = asmPackagingUnit.Quantity;
|
||||
itacPackagingUnit.Serial = asmPackagingUnit.Serial;
|
||||
itacPackagingUnit.Supplier = asmPackagingUnit.Supplier;
|
||||
itacPackagingUnit.VerifiedDate = asmPackagingUnit.VerifiedDate;
|
||||
itacPackagingUnit.BrightnessClass = asmPackagingUnit.BrightnessClass;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static PackagingUnit[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit> asmPackagingUnit)
|
||||
{
|
||||
if (asmPackagingUnit == null) { return null; }
|
||||
PackagingUnit[] itacPackagingUnit = new PackagingUnit[asmPackagingUnit.Count];
|
||||
for (int i = 0; i < asmPackagingUnit.Count; i++)
|
||||
{
|
||||
itacPackagingUnit[i] = PackagingUnitMapper.get(asmPackagingUnit[i]);
|
||||
}
|
||||
return itacPackagingUnit;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static PackagingUnit[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PackagingUnit[] asmPackagingUnit)
|
||||
{
|
||||
if (asmPackagingUnit == null) { return null; }
|
||||
PackagingUnit[] itacPackagingUnit = new PackagingUnit[asmPackagingUnit.Length];
|
||||
for (int i = 0; i < asmPackagingUnit.Length; i++)
|
||||
{
|
||||
itacPackagingUnit[i] = PackagingUnitMapper.get(asmPackagingUnit[i]);
|
||||
}
|
||||
return itacPackagingUnit;
|
||||
}
|
||||
// maps c# list to iTAC c# array
|
||||
public static Int32[] getArray(List<System.Int32> value)
|
||||
{
|
||||
if (value == null) { return null; }
|
||||
Int32[] result = new Int32[value.Count];
|
||||
for (int i = 0; i < value.Count; i++)
|
||||
{
|
||||
result[i] = value[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// maps c# list to iTAC c# array
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in Panel
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class PanelMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel get(Panel itacPanel)
|
||||
{
|
||||
if (itacPanel == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel asmPanel = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel();
|
||||
mapItac2Asm(asmPanel, itacPanel);
|
||||
return asmPanel;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel asmPanel, Panel itacPanel)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Panel
|
||||
asmPanel.Omit = itacPanel.Omit;
|
||||
// complex property Packagings, isArray:True, isGeneric:False
|
||||
asmPanel.Packagings = com.itac.oib.traceability.contracts.data.PanelPackagingMapper.get( itacPanel.Packagings);
|
||||
asmPanel.PanelID = itacPanel.PanelID;
|
||||
asmPanel.PanelName = itacPanel.PanelName;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel[] get(Panel[] itacPanel)
|
||||
{
|
||||
if (itacPanel == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel[] asmPanel = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel[itacPanel.Length];
|
||||
for (int i = 0; i < itacPanel.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmPanel[i] = PanelMapper.get(itacPanel[i]);
|
||||
}
|
||||
return asmPanel;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel> getList(Panel[] asmPanel)
|
||||
{
|
||||
if (asmPanel == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel> itacPanel = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel>();
|
||||
for (int i = 0; i < asmPanel.Length; i++)
|
||||
{
|
||||
itacPanel.Add(PanelMapper.get(asmPanel[i]));
|
||||
}
|
||||
return itacPanel;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static Panel get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel asmPanel)
|
||||
{
|
||||
if (asmPanel == null) { return null; }
|
||||
Panel itacPanel = new Panel();
|
||||
mapAsm2Itac(asmPanel, itacPanel);
|
||||
return itacPanel;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel asmPanel, Panel itacPanel)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Panel
|
||||
itacPanel.Omit = asmPanel.Omit;
|
||||
// array mapping
|
||||
itacPanel.Packagings = PanelPackagingMapper.getArray(asmPanel.Packagings);
|
||||
// complex asm property Packagings
|
||||
itacPanel.PanelID = asmPanel.PanelID;
|
||||
itacPanel.PanelName = asmPanel.PanelName;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static Panel[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel> asmPanel)
|
||||
{
|
||||
if (asmPanel == null) { return null; }
|
||||
Panel[] itacPanel = new Panel[asmPanel.Count];
|
||||
for (int i = 0; i < asmPanel.Count; i++)
|
||||
{
|
||||
itacPanel[i] = PanelMapper.get(asmPanel[i]);
|
||||
}
|
||||
return itacPanel;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static Panel[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Panel[] asmPanel)
|
||||
{
|
||||
if (asmPanel == null) { return null; }
|
||||
Panel[] itacPanel = new Panel[asmPanel.Length];
|
||||
for (int i = 0; i < asmPanel.Length; i++)
|
||||
{
|
||||
itacPanel[i] = PanelMapper.get(asmPanel[i]);
|
||||
}
|
||||
return itacPanel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in PanelPackaging
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class PanelPackagingMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging get(PanelPackaging itacPanelPackaging)
|
||||
{
|
||||
if (itacPanelPackaging == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging asmPanelPackaging = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging();
|
||||
mapItac2Asm(asmPanelPackaging, itacPanelPackaging);
|
||||
return asmPanelPackaging;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging asmPanelPackaging, PanelPackaging itacPanelPackaging)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in PanelPackaging
|
||||
asmPanelPackaging.PackagingRefID = itacPanelPackaging.PackagingRefID;
|
||||
// complex property ReferenceDesignators, isArray:True, isGeneric:False
|
||||
asmPanelPackaging.ReferenceDesignators = com.itac.oib.traceability.contracts.data.PanelRefDesMapper.get( itacPanelPackaging.ReferenceDesignators);
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging[] get(PanelPackaging[] itacPanelPackaging)
|
||||
{
|
||||
if (itacPanelPackaging == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging[] asmPanelPackaging = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging[itacPanelPackaging.Length];
|
||||
for (int i = 0; i < itacPanelPackaging.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmPanelPackaging[i] = PanelPackagingMapper.get(itacPanelPackaging[i]);
|
||||
}
|
||||
return asmPanelPackaging;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging> getList(PanelPackaging[] asmPanelPackaging)
|
||||
{
|
||||
if (asmPanelPackaging == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging> itacPanelPackaging = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging>();
|
||||
for (int i = 0; i < asmPanelPackaging.Length; i++)
|
||||
{
|
||||
itacPanelPackaging.Add(PanelPackagingMapper.get(asmPanelPackaging[i]));
|
||||
}
|
||||
return itacPanelPackaging;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static PanelPackaging get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging asmPanelPackaging)
|
||||
{
|
||||
if (asmPanelPackaging == null) { return null; }
|
||||
PanelPackaging itacPanelPackaging = new PanelPackaging();
|
||||
mapAsm2Itac(asmPanelPackaging, itacPanelPackaging);
|
||||
return itacPanelPackaging;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging asmPanelPackaging, PanelPackaging itacPanelPackaging)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in PanelPackaging
|
||||
itacPanelPackaging.PackagingRefID = asmPanelPackaging.PackagingRefID;
|
||||
// array mapping
|
||||
itacPanelPackaging.ReferenceDesignators = PanelRefDesMapper.getArray(asmPanelPackaging.ReferenceDesignators);
|
||||
// complex asm property ReferenceDesignators
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static PanelPackaging[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging> asmPanelPackaging)
|
||||
{
|
||||
if (asmPanelPackaging == null) { return null; }
|
||||
PanelPackaging[] itacPanelPackaging = new PanelPackaging[asmPanelPackaging.Count];
|
||||
for (int i = 0; i < asmPanelPackaging.Count; i++)
|
||||
{
|
||||
itacPanelPackaging[i] = PanelPackagingMapper.get(asmPanelPackaging[i]);
|
||||
}
|
||||
return itacPanelPackaging;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static PanelPackaging[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelPackaging[] asmPanelPackaging)
|
||||
{
|
||||
if (asmPanelPackaging == null) { return null; }
|
||||
PanelPackaging[] itacPanelPackaging = new PanelPackaging[asmPanelPackaging.Length];
|
||||
for (int i = 0; i < asmPanelPackaging.Length; i++)
|
||||
{
|
||||
itacPanelPackaging[i] = PanelPackagingMapper.get(asmPanelPackaging[i]);
|
||||
}
|
||||
return itacPanelPackaging;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in PanelRefDes
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class PanelRefDesMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes get(PanelRefDes itacPanelRefDes)
|
||||
{
|
||||
if (itacPanelRefDes == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes asmPanelRefDes = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes();
|
||||
mapItac2Asm(asmPanelRefDes, itacPanelRefDes);
|
||||
return asmPanelRefDes;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes asmPanelRefDes, PanelRefDes itacPanelRefDes)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in PanelRefDes
|
||||
asmPanelRefDes.Name = itacPanelRefDes.Name;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes[] get(PanelRefDes[] itacPanelRefDes)
|
||||
{
|
||||
if (itacPanelRefDes == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes[] asmPanelRefDes = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes[itacPanelRefDes.Length];
|
||||
for (int i = 0; i < itacPanelRefDes.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmPanelRefDes[i] = PanelRefDesMapper.get(itacPanelRefDes[i]);
|
||||
}
|
||||
return asmPanelRefDes;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes> getList(PanelRefDes[] asmPanelRefDes)
|
||||
{
|
||||
if (asmPanelRefDes == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes> itacPanelRefDes = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes>();
|
||||
for (int i = 0; i < asmPanelRefDes.Length; i++)
|
||||
{
|
||||
itacPanelRefDes.Add(PanelRefDesMapper.get(asmPanelRefDes[i]));
|
||||
}
|
||||
return itacPanelRefDes;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static PanelRefDes get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes asmPanelRefDes)
|
||||
{
|
||||
if (asmPanelRefDes == null) { return null; }
|
||||
PanelRefDes itacPanelRefDes = new PanelRefDes();
|
||||
mapAsm2Itac(asmPanelRefDes, itacPanelRefDes);
|
||||
return itacPanelRefDes;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes asmPanelRefDes, PanelRefDes itacPanelRefDes)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in PanelRefDes
|
||||
itacPanelRefDes.Name = asmPanelRefDes.Name;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static PanelRefDes[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes> asmPanelRefDes)
|
||||
{
|
||||
if (asmPanelRefDes == null) { return null; }
|
||||
PanelRefDes[] itacPanelRefDes = new PanelRefDes[asmPanelRefDes.Count];
|
||||
for (int i = 0; i < asmPanelRefDes.Count; i++)
|
||||
{
|
||||
itacPanelRefDes[i] = PanelRefDesMapper.get(asmPanelRefDes[i]);
|
||||
}
|
||||
return itacPanelRefDes;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static PanelRefDes[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.PanelRefDes[] asmPanelRefDes)
|
||||
{
|
||||
if (asmPanelRefDes == null) { return null; }
|
||||
PanelRefDes[] itacPanelRefDes = new PanelRefDes[asmPanelRefDes.Length];
|
||||
for (int i = 0; i < asmPanelRefDes.Length; i++)
|
||||
{
|
||||
itacPanelRefDes[i] = PanelRefDesMapper.get(asmPanelRefDes[i]);
|
||||
}
|
||||
return itacPanelRefDes;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in Position
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class PositionMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position get(Position itacPosition)
|
||||
{
|
||||
if (itacPosition == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position asmPosition = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position();
|
||||
mapItac2Asm(asmPosition, itacPosition);
|
||||
return asmPosition;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position asmPosition, Position itacPosition)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Position
|
||||
asmPosition.Div = itacPosition.Div;
|
||||
asmPosition.Level = itacPosition.Level;
|
||||
// complex property PackagingUnits, isArray:True, isGeneric:False
|
||||
asmPosition.PackagingUnits = com.itac.oib.traceability.contracts.data.PackagingUnitMapper.get( itacPosition.PackagingUnits);
|
||||
asmPosition.Tower = itacPosition.Tower;
|
||||
asmPosition.Track = itacPosition.Track;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position[] get(Position[] itacPosition)
|
||||
{
|
||||
if (itacPosition == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position[] asmPosition = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position[itacPosition.Length];
|
||||
for (int i = 0; i < itacPosition.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmPosition[i] = PositionMapper.get(itacPosition[i]);
|
||||
}
|
||||
return asmPosition;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position> getList(Position[] asmPosition)
|
||||
{
|
||||
if (asmPosition == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position> itacPosition = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position>();
|
||||
for (int i = 0; i < asmPosition.Length; i++)
|
||||
{
|
||||
itacPosition.Add(PositionMapper.get(asmPosition[i]));
|
||||
}
|
||||
return itacPosition;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static Position get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position asmPosition)
|
||||
{
|
||||
if (asmPosition == null) { return null; }
|
||||
Position itacPosition = new Position();
|
||||
mapAsm2Itac(asmPosition, itacPosition);
|
||||
return itacPosition;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position asmPosition, Position itacPosition)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in Position
|
||||
itacPosition.Div = asmPosition.Div;
|
||||
itacPosition.Level = asmPosition.Level;
|
||||
// array mapping
|
||||
itacPosition.PackagingUnits = PackagingUnitMapper.getArray(asmPosition.PackagingUnits);
|
||||
// complex asm property PackagingUnits
|
||||
itacPosition.Tower = asmPosition.Tower;
|
||||
itacPosition.Track = asmPosition.Track;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static Position[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position> asmPosition)
|
||||
{
|
||||
if (asmPosition == null) { return null; }
|
||||
Position[] itacPosition = new Position[asmPosition.Count];
|
||||
for (int i = 0; i < asmPosition.Count; i++)
|
||||
{
|
||||
itacPosition[i] = PositionMapper.get(asmPosition[i]);
|
||||
}
|
||||
return itacPosition;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static Position[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.Position[] asmPosition)
|
||||
{
|
||||
if (asmPosition == null) { return null; }
|
||||
Position[] itacPosition = new Position[asmPosition.Length];
|
||||
for (int i = 0; i < asmPosition.Length; i++)
|
||||
{
|
||||
itacPosition[i] = PositionMapper.get(asmPosition[i]);
|
||||
}
|
||||
return itacPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 23.11.2018 08:02:34
|
||||
// skip property ExtensionDataObject, declared in ReasonStruct
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class ReasonStructMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct get(ReasonStruct itacReasonStruct)
|
||||
{
|
||||
if (itacReasonStruct == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct asmReasonStruct = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct();
|
||||
mapItac2Asm(asmReasonStruct, itacReasonStruct);
|
||||
return asmReasonStruct;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct asmReasonStruct, ReasonStruct itacReasonStruct)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ReasonStruct
|
||||
asmReasonStruct.Reason = itacReasonStruct.Reason;
|
||||
asmReasonStruct.Source = itacReasonStruct.Source;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct[] get(ReasonStruct[] itacReasonStruct)
|
||||
{
|
||||
if (itacReasonStruct == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct[] asmReasonStruct = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct[itacReasonStruct.Length];
|
||||
for (int i = 0; i < itacReasonStruct.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmReasonStruct[i] = ReasonStructMapper.get(itacReasonStruct[i]);
|
||||
}
|
||||
return asmReasonStruct;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct> getList(ReasonStruct[] asmReasonStruct)
|
||||
{
|
||||
if (asmReasonStruct == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct> itacReasonStruct = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct>();
|
||||
for (int i = 0; i < asmReasonStruct.Length; i++)
|
||||
{
|
||||
itacReasonStruct.Add(ReasonStructMapper.get(asmReasonStruct[i]));
|
||||
}
|
||||
return itacReasonStruct;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static ReasonStruct get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct asmReasonStruct)
|
||||
{
|
||||
if (asmReasonStruct == null) { return null; }
|
||||
ReasonStruct itacReasonStruct = new ReasonStruct();
|
||||
mapAsm2Itac(asmReasonStruct, itacReasonStruct);
|
||||
return itacReasonStruct;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct asmReasonStruct, ReasonStruct itacReasonStruct)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in ReasonStruct
|
||||
itacReasonStruct.Reason = asmReasonStruct.Reason;
|
||||
itacReasonStruct.Source = asmReasonStruct.Source;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static ReasonStruct[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct> asmReasonStruct)
|
||||
{
|
||||
if (asmReasonStruct == null) { return null; }
|
||||
ReasonStruct[] itacReasonStruct = new ReasonStruct[asmReasonStruct.Count];
|
||||
for (int i = 0; i < asmReasonStruct.Count; i++)
|
||||
{
|
||||
itacReasonStruct[i] = ReasonStructMapper.get(asmReasonStruct[i]);
|
||||
}
|
||||
return itacReasonStruct;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static ReasonStruct[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.ReasonStruct[] asmReasonStruct)
|
||||
{
|
||||
if (asmReasonStruct == null) { return null; }
|
||||
ReasonStruct[] itacReasonStruct = new ReasonStruct[asmReasonStruct.Length];
|
||||
for (int i = 0; i < asmReasonStruct.Length; i++)
|
||||
{
|
||||
itacReasonStruct[i] = ReasonStructMapper.get(asmReasonStruct[i]);
|
||||
}
|
||||
return itacReasonStruct;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
// created 26.11.2018 13:24:17
|
||||
// skip property ExtensionDataObject, declared in TraceabilityData
|
||||
// skip property SpliceEvent[], property in exclude list
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace com.itac.oib.traceability.contracts.data
|
||||
{
|
||||
// source: assembly 2.3.0.2
|
||||
// source: assembly ASM.AS.OIB.Client
|
||||
public class TraceabilityDataMapper
|
||||
{
|
||||
// used for itac->asm: True
|
||||
// used for asm->itac: True
|
||||
|
||||
// maps iTAC namespace conform type to ASM namespace type
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData get(TraceabilityData itacTraceabilityData)
|
||||
{
|
||||
if (itacTraceabilityData == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData asmTraceabilityData = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData();
|
||||
mapItac2Asm(asmTraceabilityData, itacTraceabilityData);
|
||||
return asmTraceabilityData;
|
||||
}
|
||||
|
||||
public static void mapItac2Asm(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData asmTraceabilityData, TraceabilityData itacTraceabilityData)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in TraceabilityData
|
||||
asmTraceabilityData.Accuracy = itacTraceabilityData.Accuracy;
|
||||
asmTraceabilityData.BaseType = itacTraceabilityData.BaseType;
|
||||
asmTraceabilityData.BoardID = itacTraceabilityData.BoardID;
|
||||
// complex property ComponentTypes, isArray:True, isGeneric:False
|
||||
asmTraceabilityData.ComponentTypes = com.itac.oib.traceability.contracts.data.ComponentTypeMapper.get( itacTraceabilityData.ComponentTypes);
|
||||
asmTraceabilityData.DateBegin = itacTraceabilityData.DateBegin;
|
||||
asmTraceabilityData.DateComplete = itacTraceabilityData.DateComplete;
|
||||
asmTraceabilityData.DateCorrelationBegin = itacTraceabilityData.DateCorrelationBegin;
|
||||
asmTraceabilityData.DateCorrelationEnd = itacTraceabilityData.DateCorrelationEnd;
|
||||
// complex property ErrorCodes, isArray:False, isGeneric:False
|
||||
asmTraceabilityData.ErrorCodes = com.itac.oib.traceability.contracts.data.ErrorCodesMapper.get( itacTraceabilityData.ErrorCodes);
|
||||
asmTraceabilityData.ErrorLabel = itacTraceabilityData.ErrorLabel;
|
||||
// complex property Jobs, isArray:True, isGeneric:False
|
||||
asmTraceabilityData.Jobs = com.itac.oib.traceability.contracts.data.JobMapper.get( itacTraceabilityData.Jobs);
|
||||
asmTraceabilityData.Lane = itacTraceabilityData.Lane;
|
||||
asmTraceabilityData.Line = itacTraceabilityData.Line;
|
||||
// complex property Locations, isArray:True, isGeneric:False
|
||||
asmTraceabilityData.Locations = com.itac.oib.traceability.contracts.data.LocationMapper.get( itacTraceabilityData.Locations);
|
||||
asmTraceabilityData.MachineID = itacTraceabilityData.MachineID;
|
||||
// complex property PackagingUnits, isArray:True, isGeneric:False
|
||||
asmTraceabilityData.PackagingUnits = com.itac.oib.traceability.contracts.data.PackagingUnitMapper.get( itacTraceabilityData.PackagingUnits);
|
||||
// complex property Panels, isArray:True, isGeneric:False
|
||||
asmTraceabilityData.Panels = com.itac.oib.traceability.contracts.data.PanelMapper.get( itacTraceabilityData.Panels);
|
||||
// skip property SpliceEvent[], property in exclude list
|
||||
asmTraceabilityData.Station = itacTraceabilityData.Station;
|
||||
asmTraceabilityData.SubLane = itacTraceabilityData.SubLane;
|
||||
asmTraceabilityData.Version = itacTraceabilityData.Version;
|
||||
// complex property Consumptions, isArray:True, isGeneric:False
|
||||
asmTraceabilityData.Consumptions = com.itac.oib.traceability.contracts.data.ConsumptionMapper.get( itacTraceabilityData.Consumptions);
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace array
|
||||
public static www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData[] get(TraceabilityData[] itacTraceabilityData)
|
||||
{
|
||||
if (itacTraceabilityData == null) { return null; }
|
||||
www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData[] asmTraceabilityData = new www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData[itacTraceabilityData.Length];
|
||||
for (int i = 0; i < itacTraceabilityData.Length; i++)
|
||||
{
|
||||
// to itac array
|
||||
asmTraceabilityData[i] = TraceabilityDataMapper.get(itacTraceabilityData[i]);
|
||||
}
|
||||
return asmTraceabilityData;
|
||||
}
|
||||
|
||||
// maps iTAC namespace conform array to ASM namespace list
|
||||
public static List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData> getList(TraceabilityData[] asmTraceabilityData)
|
||||
{
|
||||
if (asmTraceabilityData == null) { return null; }
|
||||
List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData> itacTraceabilityData = new List<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData>();
|
||||
for (int i = 0; i < asmTraceabilityData.Length; i++)
|
||||
{
|
||||
itacTraceabilityData.Add(TraceabilityDataMapper.get(asmTraceabilityData[i]));
|
||||
}
|
||||
return itacTraceabilityData;
|
||||
}
|
||||
|
||||
// map type from ASM namespace to iTAC namespace
|
||||
public static TraceabilityData get(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData asmTraceabilityData)
|
||||
{
|
||||
if (asmTraceabilityData == null) { return null; }
|
||||
TraceabilityData itacTraceabilityData = new TraceabilityData();
|
||||
mapAsm2Itac(asmTraceabilityData, itacTraceabilityData);
|
||||
return itacTraceabilityData;
|
||||
}
|
||||
|
||||
public static void mapAsm2Itac(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData asmTraceabilityData, TraceabilityData itacTraceabilityData)
|
||||
{
|
||||
// skip property ExtensionDataObject, declared in TraceabilityData
|
||||
itacTraceabilityData.Accuracy = asmTraceabilityData.Accuracy;
|
||||
itacTraceabilityData.BaseType = asmTraceabilityData.BaseType;
|
||||
itacTraceabilityData.BoardID = asmTraceabilityData.BoardID;
|
||||
// array mapping
|
||||
itacTraceabilityData.ComponentTypes = ComponentTypeMapper.getArray(asmTraceabilityData.ComponentTypes);
|
||||
// complex asm property ComponentTypes
|
||||
itacTraceabilityData.DateBegin = asmTraceabilityData.DateBegin;
|
||||
itacTraceabilityData.DateComplete = asmTraceabilityData.DateComplete;
|
||||
itacTraceabilityData.DateCorrelationBegin = asmTraceabilityData.DateCorrelationBegin;
|
||||
itacTraceabilityData.DateCorrelationEnd = asmTraceabilityData.DateCorrelationEnd;
|
||||
itacTraceabilityData.ErrorCodes = com.itac.oib.traceability.contracts.data.ErrorCodesMapper.get(asmTraceabilityData.ErrorCodes);
|
||||
// complex asm property ErrorCodes
|
||||
itacTraceabilityData.ErrorLabel = asmTraceabilityData.ErrorLabel;
|
||||
// array mapping
|
||||
itacTraceabilityData.Jobs = JobMapper.getArray(asmTraceabilityData.Jobs);
|
||||
// complex asm property Jobs
|
||||
itacTraceabilityData.Lane = asmTraceabilityData.Lane;
|
||||
itacTraceabilityData.Line = asmTraceabilityData.Line;
|
||||
// array mapping
|
||||
itacTraceabilityData.Locations = LocationMapper.getArray(asmTraceabilityData.Locations);
|
||||
// complex asm property Locations
|
||||
itacTraceabilityData.MachineID = asmTraceabilityData.MachineID;
|
||||
// array mapping
|
||||
itacTraceabilityData.PackagingUnits = PackagingUnitMapper.getArray(asmTraceabilityData.PackagingUnits);
|
||||
// complex asm property PackagingUnits
|
||||
// array mapping
|
||||
itacTraceabilityData.Panels = PanelMapper.getArray(asmTraceabilityData.Panels);
|
||||
// complex asm property Panels
|
||||
// skip property SpliceEvent[], property in exclude list
|
||||
itacTraceabilityData.Station = asmTraceabilityData.Station;
|
||||
itacTraceabilityData.SubLane = asmTraceabilityData.SubLane;
|
||||
itacTraceabilityData.Version = asmTraceabilityData.Version;
|
||||
// array mapping
|
||||
itacTraceabilityData.Consumptions = ConsumptionMapper.getArray(asmTraceabilityData.Consumptions);
|
||||
// complex asm property Consumptions
|
||||
}
|
||||
|
||||
// maps ASM namespace conform list to iTAC namespace array
|
||||
public static TraceabilityData[] getArray(IList<www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData> asmTraceabilityData)
|
||||
{
|
||||
if (asmTraceabilityData == null) { return null; }
|
||||
TraceabilityData[] itacTraceabilityData = new TraceabilityData[asmTraceabilityData.Count];
|
||||
for (int i = 0; i < asmTraceabilityData.Count; i++)
|
||||
{
|
||||
itacTraceabilityData[i] = TraceabilityDataMapper.get(asmTraceabilityData[i]);
|
||||
}
|
||||
return itacTraceabilityData;
|
||||
}
|
||||
|
||||
// maps ASM namespace conform array to iTAC namespace array
|
||||
public static TraceabilityData[] getArray(www.siplace.com.OIB._2009._03.Traceability.Contracts.Data.TraceabilityData[] asmTraceabilityData)
|
||||
{
|
||||
if (asmTraceabilityData == null) { return null; }
|
||||
TraceabilityData[] itacTraceabilityData = new TraceabilityData[asmTraceabilityData.Length];
|
||||
for (int i = 0; i < asmTraceabilityData.Length; i++)
|
||||
{
|
||||
itacTraceabilityData[i] = TraceabilityDataMapper.get(asmTraceabilityData[i]);
|
||||
}
|
||||
return itacTraceabilityData;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user