Show / Hide Table of Contents

Class Ddi32Serializer

Provides methods to serialize a DDI objects to valid DDI 3.2 XML.

Inheritance
object
Ddi32Base
Ddi32Serializer
Ddi33Serializer
Inherited Members
Ddi32Base.NamespacePurlDc
Ddi32Base.NamespacePurlDcTerms
Ddi32Base.NamespaceXhtml
Ddi32Base.NamespaceInstance32
Ddi32Base.NamespaceArchive32
Ddi32Base.NamespaceDataCollection32
Ddi32Base.NamespaceGroup32
Ddi32Base.NamespaceReusable32
Ddi32Base.NamespaceConcept32
Ddi32Base.NamespaceLogical32
Ddi32Base.NamespaceStudyUnit32
Ddi32Base.NamespacePhysicalDataProduct32
Ddi32Base.NamespacePhysicalDataProductProprietary32
Ddi32Base.NamespacePhysicalInstance32
Ddi32Base.NamespaceComparative32
Ddi32Base.NamespaceDataset32
Ddi32Base.NamespaceProfile32
Ddi32Base.NamespaceExtensions32
Ddi32Base.NamespaceInstance33
Ddi32Base.NamespaceArchive33
Ddi32Base.NamespaceDataCollection33
Ddi32Base.NamespaceGroup33
Ddi32Base.NamespaceReusable33
Ddi32Base.NamespaceConcept33
Ddi32Base.NamespaceLogical33
Ddi32Base.NamespaceStudyUnit33
Ddi32Base.NamespacePhysicalDataProduct33
Ddi32Base.NamespacePhysicalDataProductProprietary33
Ddi32Base.NamespacePhysicalInstance33
Ddi32Base.NamespaceComparative33
Ddi32Base.NamespaceDataset33
Ddi32Base.NamespaceProfile33
Ddi32Base.NamespaceExtensions33
Ddi32Base.NamespaceInstance
Ddi32Base.NamespaceArchive
Ddi32Base.NamespaceDataCollection
Ddi32Base.NamespaceGroup
Ddi32Base.NamespaceReusable
Ddi32Base.NamespaceConcept
Ddi32Base.NamespaceLogical
Ddi32Base.NamespaceStudyUnit
Ddi32Base.NamespacePhysicalDataProduct
Ddi32Base.NamespacePhysicalDataProductProprietary
Ddi32Base.NamespacePhysicalInstance
Ddi32Base.NamespaceComparative
Ddi32Base.NamespaceDataset
Ddi32Base.NamespaceProfile
Ddi32Base.NamespaceExtensions
Ddi32Base.XhtmlDiv
Ddi32Base.Set33Namespaces()
Ddi32Base.Set32Namespaces()
Ddi32Base.GetNamespaceManager()
Ddi32Base.SchemaVersion
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Algenta.Colectica.Model.Ddi.Serialization
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public class Ddi32Serializer : Ddi32Base

Constructors

Ddi32Serializer()

Initializes a new instance of the Ddi32Serializer class.

Declaration
public Ddi32Serializer()

Properties

UseConciseBoundedDescription

Gets or sets a value indicating whether to use a concise bounded description for serialization or deserialization.

Declaration
public bool UseConciseBoundedDescription { get; set; }
Property Value
Type Description
bool

true if a concise bounded description should be used; otherwise, false.

Remarks

When a concise bounded description (CBD) is used during serialization, child elements are not included inline. Instead, a reference to the item is written.

Methods

AddCustomFields(XElement, IHasCustomFields)

Add custom fields to an XElement

Declaration
protected void AddCustomFields(XElement element, IHasCustomFields item)
Parameters
Type Name Description
XElement element
IHasCustomFields item

AddVersionDescription(XElement, IVersionable)

Add VersionResponsibility, VersionRationale, and BasedOn to an XML element

Declaration
protected void AddVersionDescription(XElement element, IVersionable item)
Parameters
Type Name Description
XElement element
IVersionable item

GetBinding(Binding)

Get XML representation a Binding

Declaration
protected XElement GetBinding(Binding item)
Parameters
Type Name Description
Binding item
Returns
Type Description
XElement

GetBindings(IEnumerable<Binding>)

Get XML representations of a list of Bindings

Declaration
protected IEnumerable<XElement> GetBindings(IEnumerable<Binding> bindings)
Parameters
Type Name Description
IEnumerable<Binding> bindings
Returns
Type Description
IEnumerable<XElement>

GetCitationType(DublinCore)

Get an XML representation of DublinCode

Declaration
protected XElement GetCitationType(DublinCore item)
Parameters
Type Name Description
DublinCore item
Returns
Type Description
XElement

GetCustomFields(IHasCustomFields, bool)

Get an XML representation of a list of items with custom fields

Declaration
protected IEnumerable<XElement> GetCustomFields(IHasCustomFields item, bool ddi33only)
Parameters
Type Name Description
IHasCustomFields item
bool ddi33only
Returns
Type Description
IEnumerable<XElement>

GetCustomReferenceType(XName, string, Guid, long, string, bool)

Get a XML representation of a DDI reference

Declaration
protected XElement GetCustomReferenceType(XName elementName, string agency, Guid identifier, long version, string typeOfObject, bool latebound = false)
Parameters
Type Name Description
XName elementName
string agency
Guid identifier
long version
string typeOfObject
bool latebound
Returns
Type Description
XElement

GetDynamicText(XName, MultilingualString)

Get a 3.2 dynamic text with div based audiences

Declaration
public virtual IEnumerable<XElement> GetDynamicText(XName elementName, MultilingualString multilingualString)
Parameters
Type Name Description
XName elementName
MultilingualString multilingualString
Returns
Type Description
IEnumerable<XElement>

GetFundingInformations(IEnumerable<FundingInformation>)

Get XElement representations of a list of FundingInformation

Declaration
protected IEnumerable<XElement> GetFundingInformations(IEnumerable<FundingInformation> items)
Parameters
Type Name Description
IEnumerable<FundingInformation> items
Returns
Type Description
IEnumerable<XElement>

GetIdentityElements(IVersionable)

Get the identification elements of a versionable item as XML attributes and elements

Declaration
protected IEnumerable<XObject> GetIdentityElements(IVersionable item)
Parameters
Type Name Description
IVersionable item
Returns
Type Description
IEnumerable<XObject>

GetInternationalString(XName, MultilingualString)

Get an XML representation of a MultilingualString

Declaration
protected XElement GetInternationalString(XName elementName, MultilingualString multilingualString)
Parameters
Type Name Description
XName elementName
MultilingualString multilingualString
Returns
Type Description
XElement

GetItemUrn(IdentifierTriple)

Gets the URN representation of the full identifier.

Declaration
public static string GetItemUrn(IdentifierTriple item)
Parameters
Type Name Description
IdentifierTriple item

The identifier.

Returns
Type Description
string

The DDI 3.2 URN representation of the identifier.

GetOtherMaterialTypes(XName, IEnumerable<OtherMaterial>, IVersionable)

Get a list of XElements for a list of other materials

Declaration
protected IEnumerable<XElement> GetOtherMaterialTypes(XName elementName, IEnumerable<OtherMaterial> items, IVersionable parent)
Parameters
Type Name Description
XName elementName
IEnumerable<OtherMaterial> items
IVersionable parent
Returns
Type Description
IEnumerable<XElement>

GetParameter(XName, Parameter, IVersionable)

Get XML representations a Parameter

Declaration
protected XElement GetParameter(XName name, Parameter item, IVersionable parent = null)
Parameters
Type Name Description
XName name
Parameter item
IVersionable parent
Returns
Type Description
XElement

GetParameters(XName, IEnumerable<Parameter>, IVersionable)

Get XML representations of a list of Parameters

Declaration
protected IEnumerable<XElement> GetParameters(XName name, IEnumerable<Parameter> parameters, IVersionable parent)
Parameters
Type Name Description
XName name
IEnumerable<Parameter> parameters
IVersionable parent
Returns
Type Description
IEnumerable<XElement>

GetReferenceOrInline<T>(IEnumerable<T>, Func<T, XElement>, Func<T, XElement>)

Get a reference or inline representation for a versionable item

Declaration
protected IEnumerable<XElement> GetReferenceOrInline<T>(IEnumerable<T> items, Func<T, XElement> reference, Func<T, XElement> inline) where T : class, IVersionable
Parameters
Type Name Description
IEnumerable<T> items
Func<T, XElement> reference
Func<T, XElement> inline
Returns
Type Description
IEnumerable<XElement>
Type Parameters
Name Description
T

GetReferenceOrInline<T>(T, Func<T, XElement>, Func<T, XElement>)

Get a reference or an inline representation for a versionable item

Declaration
protected IEnumerable<XElement> GetReferenceOrInline<T>(T item, Func<T, XElement> reference, Func<T, XElement> inline) where T : class, IVersionable
Parameters
Type Name Description
T item
Func<T, XElement> reference
Func<T, XElement> inline
Returns
Type Description
IEnumerable<XElement>
Type Parameters
Name Description
T

GetReferenceType(XName, IVersionable, string)

Create a reference

Declaration
public virtual XElement GetReferenceType(XName elementName, IVersionable item, string typeOfObject = null)
Parameters
Type Name Description
XName elementName

reference name

IVersionable item

item to reference

string typeOfObject
Returns
Type Description
XElement

GetReferenceType(XName, TypedIdTriple)

Create a reference

Declaration
public XElement GetReferenceType(XName elementName, TypedIdTriple item)
Parameters
Type Name Description
XName elementName

reference name

TypedIdTriple item

item to reference

Returns
Type Description
XElement

GetResponseCardinalityType(int?, int?)

Get the response cardinaltiy as XML

Declaration
protected XElement GetResponseCardinalityType(int? minimum, int? maximum)
Parameters
Type Name Description
int? minimum
int? maximum
Returns
Type Description
XElement

GetResponseDomainType(ResponseDomain, IVersionable)

Get an XML representation of a reponse domain

Declaration
protected XElement GetResponseDomainType(ResponseDomain responseDomain, IVersionable parent)
Parameters
Type Name Description
ResponseDomain responseDomain
IVersionable parent
Returns
Type Description
XElement
Exceptions
Type Condition
InvalidOperationException

GetStructuredString(XName, MultilingualString)

Get a 3.2 structured string with div based audiences

Declaration
public virtual XElement GetStructuredString(XName elementName, MultilingualString multilingualString)
Parameters
Type Name Description
XName elementName
MultilingualString multilingualString
Returns
Type Description
XElement

GetUserAttributeType(UserAttribute)

Get a UserAttribute as XML

Declaration
protected XElement GetUserAttributeType(UserAttribute item)
Parameters
Type Name Description
UserAttribute item
Returns
Type Description
XElement

GetXmlDecimal(double)

Gets an safe representeation of a double for serialization to an XML decimal. XML decimal does not allow scientific notation, but .NET ToString() on a double will frequently output scientific notation.

Declaration
public string GetXmlDecimal(double value)
Parameters
Type Name Description
double value
Returns
Type Description
string

Serialize(ActionActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ActionActivity item)
Parameters
Type Name Description
ActionActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Archive)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Archive item)
Parameters
Type Name Description
Archive item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Category)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Category item)
Parameters
Type Name Description
Category item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CategoryGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CategoryGroup item)
Parameters
Type Name Description
CategoryGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CategoryScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CategoryScheme item)
Parameters
Type Name Description
CategoryScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CodeList)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CodeList item)
Parameters
Type Name Description
CodeList item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CodeListGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CodeListGroup item)
Parameters
Type Name Description
CodeListGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CodeListScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CodeListScheme item)
Parameters
Type Name Description
CodeListScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Concept)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Concept item)
Parameters
Type Name Description
Concept item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ConceptGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ConceptGroup item)
Parameters
Type Name Description
ConceptGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ConceptScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ConceptScheme item)
Parameters
Type Name Description
ConceptScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ConceptualComponent)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ConceptualComponent item)
Parameters
Type Name Description
ConceptualComponent item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ConceptualVariable)

Serializes the item as a DDI 3.2 XML element.

Declaration
public virtual XElement Serialize(ConceptualVariable item)
Parameters
Type Name Description
ConceptualVariable item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ConceptualVariableGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ConceptualVariableGroup item)
Parameters
Type Name Description
ConceptualVariableGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ConceptualVariableScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ConceptualVariableScheme item)
Parameters
Type Name Description
ConceptualVariableScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ControlConstructGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ControlConstructGroup item)
Parameters
Type Name Description
ControlConstructGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ControlConstructScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public virtual XElement Serialize(ControlConstructScheme item)
Parameters
Type Name Description
ControlConstructScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CustomIfElseActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CustomIfElseActivity item)
Parameters
Type Name Description
CustomIfElseActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CustomLoopActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CustomLoopActivity item)
Parameters
Type Name Description
CustomLoopActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CustomSequenceActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CustomSequenceActivity item)
Parameters
Type Name Description
CustomSequenceActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CustomUntilActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CustomUntilActivity item)
Parameters
Type Name Description
CustomUntilActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(CustomWhileActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(CustomWhileActivity item)
Parameters
Type Name Description
CustomWhileActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(DataCollection)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(DataCollection item)
Parameters
Type Name Description
DataCollection item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(DataCollectionMethodology)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(DataCollectionMethodology item)
Parameters
Type Name Description
DataCollectionMethodology item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(DataRelationship)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(DataRelationship item)
Parameters
Type Name Description
DataRelationship item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(DdiInstance)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(DdiInstance item)
Parameters
Type Name Description
DdiInstance item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(GeneralInstructionCoding)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(GeneralInstructionCoding item)
Parameters
Type Name Description
GeneralInstructionCoding item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(GenerationInstructionCoding)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(GenerationInstructionCoding item)
Parameters
Type Name Description
GenerationInstructionCoding item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(GeographicLocation)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(GeographicLocation item)
Parameters
Type Name Description
GeographicLocation item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(GeographicLocationScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(GeographicLocationScheme item)
Parameters
Type Name Description
GeographicLocationScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Group, XName)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Group item, XName groupElementName = null)
Parameters
Type Name Description
Group item

The item to serialize.

XName groupElementName

Allow writing Group or SubGroup depending on DDI version

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Individual)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Individual item)
Parameters
Type Name Description
Individual item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(InstructionGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(InstructionGroup item)
Parameters
Type Name Description
InstructionGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Instrument)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Instrument item)
Parameters
Type Name Description
Instrument item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(InstrumentGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(InstrumentGroup item)
Parameters
Type Name Description
InstrumentGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(InstrumentScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(InstrumentScheme item)
Parameters
Type Name Description
InstrumentScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(InterviewerInstruction)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(InterviewerInstruction item)
Parameters
Type Name Description
InterviewerInstruction item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(InterviewerInstructionScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(InterviewerInstructionScheme item)
Parameters
Type Name Description
InterviewerInstructionScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(LogicalProduct)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(LogicalProduct item)
Parameters
Type Name Description
LogicalProduct item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ManagedDateTimeRepresentation)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ManagedDateTimeRepresentation item)
Parameters
Type Name Description
ManagedDateTimeRepresentation item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ManagedMissingValuesRepresentation)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ManagedMissingValuesRepresentation item)
Parameters
Type Name Description
ManagedMissingValuesRepresentation item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ManagedNumericRepresentation)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ManagedNumericRepresentation item)
Parameters
Type Name Description
ManagedNumericRepresentation item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ManagedRepresentationGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ManagedRepresentationGroup item)
Parameters
Type Name Description
ManagedRepresentationGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ManagedRepresentationScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ManagedRepresentationScheme item)
Parameters
Type Name Description
ManagedRepresentationScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ManagedScaleRepresentation)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ManagedScaleRepresentation item)
Parameters
Type Name Description
ManagedScaleRepresentation item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ManagedTextRepresentation)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ManagedTextRepresentation item)
Parameters
Type Name Description
ManagedTextRepresentation item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(NCube)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(NCube item)
Parameters
Type Name Description
NCube item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(NCubeGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(NCubeGroup item)
Parameters
Type Name Description
NCubeGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(NCubeScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(NCubeScheme item)
Parameters
Type Name Description
NCubeScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Organization)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Organization item)
Parameters
Type Name Description
Organization item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(OrganizationGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(OrganizationGroup item)
Parameters
Type Name Description
OrganizationGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(OrganizationScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(OrganizationScheme item)
Parameters
Type Name Description
OrganizationScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(PhysicalInstance)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(PhysicalInstance item)
Parameters
Type Name Description
PhysicalInstance item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(PhysicalProduct)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(PhysicalProduct item)
Parameters
Type Name Description
PhysicalProduct item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(PhysicalStructure)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(PhysicalStructure item)
Parameters
Type Name Description
PhysicalStructure item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(PhysicalStructureScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(PhysicalStructureScheme item)
Parameters
Type Name Description
PhysicalStructureScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ProcessingEvent)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ProcessingEvent item)
Parameters
Type Name Description
ProcessingEvent item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ProcessingEventGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ProcessingEventGroup item)
Parameters
Type Name Description
ProcessingEventGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ProcessingEventScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ProcessingEventScheme item)
Parameters
Type Name Description
ProcessingEventScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ProcessingInstructionGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ProcessingInstructionGroup item)
Parameters
Type Name Description
ProcessingInstructionGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ProcessingInstructionScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(ProcessingInstructionScheme item)
Parameters
Type Name Description
ProcessingInstructionScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QualityStandard)

Serializes the item as a DDI 3.2 XML element.

Declaration
public virtual XElement Serialize(QualityStandard item)
Parameters
Type Name Description
QualityStandard item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QualityStatement)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QualityStatement item)
Parameters
Type Name Description
QualityStatement item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QualityStatementGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QualityStatementGroup item)
Parameters
Type Name Description
QualityStatementGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QualityStatementScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QualityStatementScheme item)
Parameters
Type Name Description
QualityStatementScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Question)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Question item)
Parameters
Type Name Description
Question item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QuestionActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QuestionActivity item)
Parameters
Type Name Description
QuestionActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QuestionBlock)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QuestionBlock item)
Parameters
Type Name Description
QuestionBlock item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QuestionGrid)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QuestionGrid item)
Parameters
Type Name Description
QuestionGrid item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QuestionGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QuestionGroup item)
Parameters
Type Name Description
QuestionGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(QuestionScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(QuestionScheme item)
Parameters
Type Name Description
QuestionScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(RecordLayout)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(RecordLayout item)
Parameters
Type Name Description
RecordLayout item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(RecordLayoutScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(RecordLayoutScheme item)
Parameters
Type Name Description
RecordLayoutScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(RepresentedVariable)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(RepresentedVariable item)
Parameters
Type Name Description
RepresentedVariable item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(RepresentedVariableGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(RepresentedVariableGroup item)
Parameters
Type Name Description
RepresentedVariableGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(RepresentedVariableScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(RepresentedVariableScheme item)
Parameters
Type Name Description
RepresentedVariableScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(ResourcePackage)

Serializes the item as a DDI 3.2 XML element.

Declaration
public virtual XElement Serialize(ResourcePackage item)
Parameters
Type Name Description
ResourcePackage item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(StatementActivity)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(StatementActivity item)
Parameters
Type Name Description
StatementActivity item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(StudyUnit)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(StudyUnit item)
Parameters
Type Name Description
StudyUnit item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(SubGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(SubGroup item)
Parameters
Type Name Description
SubGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Universe)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Universe item)
Parameters
Type Name Description
Universe item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(UniverseGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(UniverseGroup item)
Parameters
Type Name Description
UniverseGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(UniverseScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(UniverseScheme item)
Parameters
Type Name Description
UniverseScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(Variable)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(Variable item)
Parameters
Type Name Description
Variable item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(VariableGroup)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(VariableGroup item)
Parameters
Type Name Description
VariableGroup item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(VariableScheme)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(VariableScheme item)
Parameters
Type Name Description
VariableScheme item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(VariableStatistic)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(VariableStatistic item)
Parameters
Type Name Description
VariableStatistic item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize(WeightingMethodology)

Serializes the item as a DDI 3.2 XML element.

Declaration
public XElement Serialize(WeightingMethodology item)
Parameters
Type Name Description
WeightingMethodology item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.2 XML element representing the item.

Serialize33(OtherMaterial)

Serializes the item as a DDI 3.3 XML element.

Declaration
public XElement Serialize33(OtherMaterial item)
Parameters
Type Name Description
OtherMaterial item

The item to serialize.

Returns
Type Description
XElement

The DDI 3.3 XML element representing the item.

SerializeAsFragment(IVersionable)

Serializes the item and all of its referenced items as DDI Fragments inside a FragmentInstance, and returns the root XElement

Declaration
public XElement SerializeAsFragment(IVersionable item)
Parameters
Type Name Description
IVersionable item

The top-level item to serialize.

Returns
Type Description
XElement

The xml for the fragment instance

SerializeFragment(string, FragmentInstance)

Serializes the FragmentInstance, and saves the FragmentInstance to a file.

Declaration
public void SerializeFragment(string fileName, FragmentInstance fragment)
Parameters
Type Name Description
string fileName

The name of the file to which the XML Document will be saved.

FragmentInstance fragment

The fragment instance to serialize.

SerializeFragment(string, IEnumerable<RepositoryItem>, IEnumerable<TypedIdTriple>)

Serializes the FragmentInstance, and saves the FragmentInstance to a file.

Declaration
public void SerializeFragment(string fileName, IEnumerable<RepositoryItem> items, IEnumerable<TypedIdTriple> topLevelItems)
Parameters
Type Name Description
string fileName

The name of the file to which the XML

IEnumerable<RepositoryItem> items

The Repository items to serialize.

IEnumerable<TypedIdTriple> topLevelItems

The identifiers of the top level items.

SerializeFragments(string, IVersionable)

Serializes the item and all of its referenced items as DDI Fragments inside a FragmentInstance, and saves the FragmentInstance to a file.

Declaration
public virtual void SerializeFragments(string fileName, IVersionable item)
Parameters
Type Name Description
string fileName

The name of the file to which the XML Document will be saved.

IVersionable item

The top-level item to serialize.

SerializeGroupBase(IVersionableGroup, XNamespace, string)

Serialize a grouping to an XElement

Declaration
protected XElement SerializeGroupBase(IVersionableGroup item, XNamespace xname, string groupNamePrefix)
Parameters
Type Name Description
IVersionableGroup item
XNamespace xname
string groupNamePrefix
Returns
Type Description
XElement
In this article
Back to top Generated by DocFX