public ProcessStepObjectBaseCore(IProcessStepObject processStep, IList<IInputOutputObjectBase> inputs, IList<IInputOutputObjectBase> outputs, IComputationObject computation, IList<ITransition> transitions, IList<IProcessStepObjectBase> processSteps) : base(processStep) { this._processStep = processStep; this._inputs = inputs; this._outputs = outputs; this._computation = computation; this._transitions = transitions; this._processSteps = processSteps; }
/// <summary> /// Initializes a new instance of the <see cref="ComputationMutableCore"/> class. /// </summary> /// <param name="objTarget"> /// The obj target. /// </param> public ComputationMutableCore(IComputationObject objTarget) : base(objTarget) { this._descriptions = new List<ITextTypeWrapperMutableObject>(); this._localId = objTarget.LocalId; this._softwareLanguage = objTarget.SoftwareLanguage; this._softwarePackage = objTarget.SoftwarePackage; this._softwareVersion = objTarget.SoftwareVersion; if (objTarget.Description != null) { this._descriptions = new List<ITextTypeWrapperMutableObject>(); foreach (ITextTypeWrapper currentTextType in objTarget.Description) { this._descriptions.Add(new TextTypeWrapperMutableCore(currentTextType)); } } }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////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); } }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM MUTABLE OBJECTS ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #region Constructors and Destructors /// <summary> /// Initializes a new instance of the <see cref="ProcessStepCore"/> class. /// </summary> /// <param name="parent"> /// The parent. /// </param> /// <param name="processStepMutableObject"> /// The iprocess. /// </param> /// <exception cref="SdmxSemmanticException"> /// Throws Validate exception. /// </exception> public ProcessStepCore(IIdentifiableObject parent, IProcessStepMutableObject processStepMutableObject) : base(processStepMutableObject, parent) { this.input = new List<IInputOutputObject>(); this.output = new List<IInputOutputObject>(); this.transitions = new List<ITransition>(); this.processSteps = new List<IProcessStepObject>(); if (processStepMutableObject.Input != null) { foreach (IInputOutputMutableObject currentIo in processStepMutableObject.Input) { this.input.Add(new InputOutputCore(this, currentIo)); } } if (processStepMutableObject.Output != null) { foreach (IInputOutputMutableObject currentIo0 in processStepMutableObject.Output) { this.output.Add(new InputOutputCore(this, currentIo0)); } } if (processStepMutableObject.Computation != null) { this.computation = new ComputationCore(this, processStepMutableObject.Computation); } if (processStepMutableObject.Transitions != null) { foreach (ITransitionMutableObject mutable in processStepMutableObject.Transitions) { this.transitions.Add(new TransitionCore(mutable, this)); } } if (processStepMutableObject.ProcessSteps != null) { foreach (IProcessStepMutableObject mutable1 in processStepMutableObject.ProcessSteps) { this.processSteps.Add(new ProcessStepCore(this, mutable1)); } } try { this.Validate(); } catch (SdmxSemmanticException e) { throw new SdmxSemmanticException(e, ExceptionCode.FailValidation, this); } }