/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM V2 SCHEMA ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <see cref="ProcessStepCore"/> class. /// </summary> /// <param name="parent"> /// The parent. /// </param> /// <param name="process"> /// The process. /// </param> /// <exception cref="SdmxSemmanticException"> /// Throws Validate exception. /// </exception> public ProcessStepCore( INameableObject parent, Org.Sdmx.Resources.SdmxMl.Schemas.V20.structure.ProcessStepType process) : base( process, SdmxStructureType.GetFromEnum(SdmxStructureEnumType.ProcessStep), process.id, default(Uri), process.Name, process.Description, process.Annotations, parent) { this.input = new List<IInputOutputObject>(); this.output = new List<IInputOutputObject>(); this.transitions = new List<ITransition>(); this.processSteps = new List<IProcessStepObject>(); if (process.Input != null) { LOG.Warn("Input items not supported for SDMX V2.0. These items will be discarded"); } if (process.Output != null) { LOG.Warn("Input items not supported for SDMX V2.0. These items will be discarded"); } if (process.Computation != null) { this.computation = new ComputationCore(this, process); } if (process.ProcessStep != null) { foreach ( Org.Sdmx.Resources.SdmxMl.Schemas.V20.structure.ProcessStepType processStep in process.ProcessStep) { this.processSteps.Add(new ProcessStepCore(this, processStep)); } } if (process.Transition != null) { foreach (Org.Sdmx.Resources.SdmxMl.Schemas.V20.structure.TransitionType trans in process.Transition) { ITransition transitionCore = new TransitionCore(trans, this); this.transitions.Add(transitionCore); } } try { this.Validate(); } catch (SdmxSemmanticException e) { throw new SdmxSemmanticException(e, ExceptionCode.FailValidation, this); } }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM V2.1 SCHEMA ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <see cref="ProcessStepCore"/> class. /// </summary> /// <param name="parent"> /// The parent. /// </param> /// <param name="process"> /// The process. /// </param> /// <exception cref="SdmxSemmanticException"> /// Throws Validate exception. /// </exception> public ProcessStepCore(INameableObject parent, ProcessStepType process) : base(process, SdmxStructureType.GetFromEnum(SdmxStructureEnumType.ProcessStep), parent) { this.input = new List<IInputOutputObject>(); this.output = new List<IInputOutputObject>(); this.transitions = new List<ITransition>(); this.processSteps = new List<IProcessStepObject>(); if (process.Input != null) { foreach (InputOutputType currentIo in process.Input) { this.input.Add(new InputOutputCore(this, currentIo)); } } if (process.Output != null) { foreach (InputOutputType currentIo0 in process.Output) { this.output.Add(new InputOutputCore(this, currentIo0)); } } if (process.Computation != null) { this.computation = new ComputationCore(this, process.Computation); } if (process.ProcessStep != null) { foreach (ProcessStepType processStep in process.ProcessStep) { this.processSteps.Add(new ProcessStepCore(this, processStep)); } } if (process.Transition != null) { foreach (TransitionType trans in process.Transition) { ITransition transitionCore = new TransitionCore(trans, this); this.transitions.Add(transitionCore); } } try { this.Validate(); } catch (SdmxSemmanticException e) { throw new SdmxSemmanticException(e, ExceptionCode.FailValidation, this); } }