Class DDIWorkflowSerializer
Provides methods to serialize a DDI 3 instance to valid DDI 3 XML.
Inherited Members
Namespace: Algenta.Colectica.Model.Ddi.Serialization
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public class DDIWorkflowSerializer : DDIWorkflowBase
Examples
DdiInstance instance = new DdiInstance() { AgencyId = "example.org" };
string fileName = "outputFile.ddi3.xml";
// Make sure the content meets DDI schema cardinality requirements.
// The DDI schemas require some things that might not exist in the model.
DDIWorkflowSerializer.EnsureCompliance(instance);
// Save the DDI 3 instance.
DDIWorkflowSerializer serializer = new DDIWorkflowSerializer();
serializer.UseConciseBoundedDescription = false;
XmlDocument doc = serializer.Serialize(instance);
DDIWorkflowSerializer.SaveXml(fileName, doc);
Methods
AddNamespace(XmlNode, String)
Adds the specified namespace prefix to the provided element.
Declaration
public void AddNamespace(XmlNode element, string prefix)
Parameters
Type | Name | Description |
---|---|---|
XmlNode | element | The element to which the namespace prefix is added. |
System.String | prefix | The prefix to add. |
AddUsedNamespaces(XmlNode)
Adds a namespace prefix for each namespace used in the element and its descendents.
Declaration
public void AddUsedNamespaces(XmlNode element)
Parameters
Type | Name | Description |
---|---|---|
XmlNode | element | The element to which namespaces are added. |
ConvertToSourceIds(XmlDocument)
Converts the official DDI 3.1 identifiers to the potentially non-unique identifiers that were originally imported, and which were stored in the UserID with type "colectica:sourceId". If no such UserID exists for an element, no action is taken.
Declaration
public void ConvertToSourceIds(XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
XmlDocument | doc |
CreateIsoIdentifier(IdentifierTriple)
Creates a composite identifier by joining the agency, identifier, and version together with a ":".
Declaration
public static string CreateIsoIdentifier(IdentifierTriple id)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | id | The composite identifier. |
Returns
Type | Description |
---|---|
System.String |
CreateIsoIdentifier(Guid, Int64, String)
Creates a composite identifier by joining the agency, identifier, and version together with a ":".
Declaration
public static string CreateIsoIdentifier(Guid identifier, long version, string agency)
Parameters
Type | Name | Description |
---|---|---|
Guid | identifier | The identifier portion of the full identifier. |
System.Int64 | version | The version portion of the full identifier. |
System.String | agency | The agency portion of the full identifier. |
Returns
Type | Description |
---|---|
System.String |
DefaultAgencyAndVersion(XmlDocument, String, String)
Assigns a default agency identifier and version number to all appropriate items in the provided XML document.
Declaration
public void DefaultAgencyAndVersion(XmlDocument doc, string agency, string version = "1.0.0")
Parameters
Type | Name | Description |
---|---|---|
XmlDocument | doc | The XML document. |
System.String | agency | The agency identifier to assign. |
System.String | version | The version number to assign. |
EnsureCompliance(DdiInstance)
Checks the provided item for compliance with the DDI 3.1 schemas, and adds required elements as necessary.
Declaration
public static void EnsureCompliance(DdiInstance instance)
Parameters
Type | Name | Description |
---|---|---|
DdiInstance | instance | The item for which DDI 3.1 compliance is ensured. |
EnsureCompliance(Group)
Checks the provided item for compliance with the DDI 3.1 schemas, and adds required elements as necessary.
Declaration
public static void EnsureCompliance(Group group)
Parameters
Type | Name | Description |
---|---|---|
Group | group | The item for which DDI 3.1 compliance is ensured. |
EnsureCompliance(ResourcePackage)
Checks the provided item for compliance with the DDI 3.1 schemas, and adds required elements as necessary.
Declaration
public static void EnsureCompliance(ResourcePackage resourcePackage)
Parameters
Type | Name | Description |
---|---|---|
ResourcePackage | resourcePackage | The item for which DDI 3.1 compliance is ensured. |
EnsureCompliance(StudyUnit)
Checks the provided item for compliance with the DDI 3.1 schemas, and adds required elements as necessary.
Declaration
public static void EnsureCompliance(StudyUnit studyUnit)
Parameters
Type | Name | Description |
---|---|---|
StudyUnit | studyUnit | The item for which DDI 3.1 compliance is ensured. |
EnsureInstrumentListCompliance(IList<Instrument>, ResourcePackage)
Checks the provided items for compliance with the DDI 3.1 schemas, and adds required elements as necessary.
Declaration
public static void EnsureInstrumentListCompliance(IList<Instrument> instrumentList, ResourcePackage resourcePackage)
Parameters
Type | Name | Description |
---|---|---|
IList<Instrument> | instrumentList | The items for which DDI 3.1 compliance is ensured. |
ResourcePackage | resourcePackage | The resource package to which the items belong. |
GetArchive(Archive, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetArchive(Archive item, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
Archive | item | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetCategorySchemeType(CategoryScheme, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetCategorySchemeType(CategoryScheme scheme, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
CategoryScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetCategoryType(Category, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetCategoryType(Category category, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
Category | category | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetCodeSchemeType(CodeList, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetCodeSchemeType(CodeList codes, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
CodeList | codes | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetComputationItemType(ActionActivity, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetComputationItemType(ActionActivity action, XmlDocument doc, Collection<Note> triples)
Parameters
Type | Name | Description |
---|---|---|
ActionActivity | action | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | triples | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetConceptSchemeType(ConceptScheme, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetConceptSchemeType(ConceptScheme scheme, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
ConceptScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetConceptType(Concept, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetConceptType(Concept concept, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
Concept | concept | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetConceptualComponentGroupType(ConceptualComponent, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetConceptualComponentGroupType(ConceptualComponent conceptualComponent, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
ConceptualComponent | conceptualComponent | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetConceptualComponentType(ConceptualComponent, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetConceptualComponentType(ConceptualComponent conceptualComponent, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
ConceptualComponent | conceptualComponent | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetControlConstructSchemeType(ControlConstructScheme, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetControlConstructSchemeType(ControlConstructScheme scheme, XmlDocument doc, Collection<Note> triples)
Parameters
Type | Name | Description |
---|---|---|
ControlConstructScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | triples | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetDataCollectionGroupType(DataCollection, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetDataCollectionGroupType(DataCollection dataCollection, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
DataCollection | dataCollection | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetDataCollectionType(DataCollection, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetDataCollectionType(DataCollection dataCollection, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
DataCollection | dataCollection | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetDataRelationshipType(DataRelationship, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetDataRelationshipType(DataRelationship item, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
DataRelationship | item | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetDdiInstanceType(DdiInstance, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetDdiInstanceType(DdiInstance ddiInstance, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
DdiInstance | ddiInstance | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetGrossRecordStructureType(GrossRecordStructure, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetGrossRecordStructureType(GrossRecordStructure item, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
GrossRecordStructure | item | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetGroupType(Group, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetGroupType(Group group, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
Group | group | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetIfThenElseType(CustomIfElseActivity, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetIfThenElseType(CustomIfElseActivity ifElse, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
CustomIfElseActivity | ifElse | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetInstructionType(InterviewerInstruction, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetInstructionType(InterviewerInstruction instruction, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
InterviewerInstruction | instruction | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetInstrumentType(Instrument, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetInstrumentType(Instrument instrument, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
Instrument | instrument | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetInterviewerInstructionSchemeType(InterviewerInstructionScheme, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetInterviewerInstructionSchemeType(InterviewerInstructionScheme scheme, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
InterviewerInstructionScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetLogicalCodeType(Code, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetLogicalCodeType(Code code, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
Code | code | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetLogicalProductGroupType(LogicalProduct, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetLogicalProductGroupType(LogicalProduct logicalProduct, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
LogicalProduct | logicalProduct | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetLogicalProductType(LogicalProduct, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetLogicalProductType(LogicalProduct logicalProduct, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
LogicalProduct | logicalProduct | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetLoopType(CustomLoopActivity, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetLoopType(CustomLoopActivity loop, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
CustomLoopActivity | loop | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetNamespacesInTree(XmlNode, Collection<String>)
Determines all namespaces that are used in the specified XML node, and adds a prefix for each to the provided collection of prefixes.
Declaration
public void GetNamespacesInTree(XmlNode node, Collection<string> prefixes)
Parameters
Type | Name | Description |
---|---|---|
XmlNode | node | The XML node search for used namespaces. |
Collection<System.String> | prefixes | The collection of prefixes to which namespace prefixes will be added. |
GetNoteType(Note, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetNoteType(Note triple, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
Note | triple | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetOrganizationSchemeType(OrganizationScheme, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetOrganizationSchemeType(OrganizationScheme scheme, XmlDocument doc, Collection<Note> itemNotes)
Parameters
Type | Name | Description |
---|---|---|
OrganizationScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | itemNotes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetOrganizationType(Organization, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetOrganizationType(Organization organization, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
Organization | organization | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetOtherMaterialType(OtherMaterial, XmlDocument, String, String)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetOtherMaterialType(OtherMaterial other, XmlDocument doc, string elementName = "OtherMaterial", string prefix = "d")
Parameters
Type | Name | Description |
---|---|---|
OtherMaterial | other | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
System.String | elementName | The name of the element to write. |
System.String | prefix | The namespace prefix of the element to write. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetPhysicalDataProductGroupType(PhysicalProduct, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetPhysicalDataProductGroupType(PhysicalProduct physicalProduct, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
PhysicalProduct | physicalProduct | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetPhysicalDataProductType(PhysicalProduct, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetPhysicalDataProductType(PhysicalProduct item, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
PhysicalProduct | item | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetPhysicalInstanceType(PhysicalInstance, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetPhysicalInstanceType(PhysicalInstance item, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
PhysicalInstance | item | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetPhysicalStructureSchemeType(PhysicalStructureScheme, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetPhysicalStructureSchemeType(PhysicalStructureScheme scheme, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
PhysicalStructureScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetPhysicalStructureType(PhysicalStructure, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetPhysicalStructureType(PhysicalStructure item, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
PhysicalStructure | item | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetQualityStandardType(QualityStandard, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetQualityStandardType(QualityStandard qualityStandard, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
QualityStandard | qualityStandard | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetQualityStatementSchemeType(QualityStatementScheme, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetQualityStatementSchemeType(QualityStatementScheme scheme, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
QualityStatementScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetQualityStatementType(QualityStatement, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetQualityStatementType(QualityStatement qualityStatement, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
QualityStatement | qualityStatement | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetQuestionConstructType(QuestionActivity, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetQuestionConstructType(QuestionActivity question, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
QuestionActivity | question | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetQuestionItemType(Question, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetQuestionItemType(Question question, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
Question | question | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item.. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetQuestionSchemeType(QuestionScheme, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetQuestionSchemeType(QuestionScheme scheme, XmlDocument doc, Collection<Note> itemNotes)
Parameters
Type | Name | Description |
---|---|---|
QuestionScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | itemNotes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetRecordLayoutSchemeType(RecordLayoutScheme, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetRecordLayoutSchemeType(RecordLayoutScheme scheme, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RecordLayoutScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetRecordLayoutType(RecordLayout, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetRecordLayoutType(RecordLayout item, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RecordLayout | item | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetRepeatUntilType(CustomUntilActivity, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetRepeatUntilType(CustomUntilActivity repeatUntil, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
CustomUntilActivity | repeatUntil | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetRepeatWhileType(CustomWhileActivity, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetRepeatWhileType(CustomWhileActivity repeatWhile, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
CustomWhileActivity | repeatWhile | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetResourcePackageType(ResourcePackage, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetResourcePackageType(ResourcePackage library, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
ResourcePackage | library | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetSequenceType(CustomSequenceActivity, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetSequenceType(CustomSequenceActivity sequence, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
CustomSequenceActivity | sequence | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetStatementItemType(StatementActivity, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetStatementItemType(StatementActivity statement, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
StatementActivity | statement | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetStudyUnitType(StudyUnit, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetStudyUnitType(StudyUnit studyUnit, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
StudyUnit | studyUnit | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetUniverseSchemeType(UniverseScheme, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetUniverseSchemeType(UniverseScheme scheme, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
UniverseScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetUniverseType(Universe, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetUniverseType(Universe universe, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
Universe | universe | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetUserIDType(String, String, XmlDocument)
Serializes a UserID with the specified type and identifier as a DDI 3.1 element.
Declaration
public XmlElement GetUserIDType(string userID, string idType, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | The identifier to serialize. |
System.String | idType | The type of the identifier. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetVariableGroupType(VariableGroup, XmlDocument)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetVariableGroupType(VariableGroup group, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
VariableGroup | group | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetVariableSchemeType(VariableScheme, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetVariableSchemeType(VariableScheme scheme, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
VariableScheme | scheme | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
GetVariableType(Variable, XmlDocument, Collection<Note>)
Serializes the item as a DDI 3.1 element.
Declaration
public XmlElement GetVariableType(Variable variable, XmlDocument doc, Collection<Note> notes)
Parameters
Type | Name | Description |
---|---|---|
Variable | variable | The item to serialize. |
XmlDocument | doc | The top-level XML document. |
Collection<Note> | notes | A collection of notes that apply to the item. |
Returns
Type | Description |
---|---|
XmlElement | The DDI 3.1 XML element representing the item. |
PostProcessReferences(String)
Annotates DDI references with identification information from each referenced item's parent maintainable object, and saves the file.
Declaration
public void PostProcessReferences(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The file to which the XML will be written. |
SaveXml(String, XmlDocument)
Saves the provided XML document to the specified file.
Declaration
public static void SaveXml(string fileName, XmlDocument doc)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The name of the file. |
XmlDocument | doc | The XML document to save. |
Serialize(DdiInstance)
Serializes the DDIInstance as a DDI 3.1 document.
Declaration
public XmlDocument Serialize(DdiInstance instance)
Parameters
Type | Name | Description |
---|---|---|
DdiInstance | instance | The item to serialize. |
Returns
Type | Description |
---|---|
XmlDocument | The DDI 3.1 XML document representing the item. |
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 void SerializeFragments(string fileName, IVersionable item)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The name of the file to which the XML document will be saved. |
IVersionable | item | The top-level item to serialize. |