protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); setAttribute(obj, "Source", Source); setAttribute(obj, "Edition", Edition); if (mEditionDate != DateTime.MinValue) { setAttribute(obj, "EditionDate", IfcDate.FormatSTEP(EditionDate)); } setAttribute(obj, "Name", Name); setAttribute(obj, "Description", Description); setAttribute(obj, "Location", Location); if (mReferenceTokens.Count > 0) { obj["ReferenceTokens"] = new JArray(ReferenceTokens); } }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); setAttribute(obj, "Identification", Identification); setAttribute(obj, "Name", Name); setAttribute(obj, "Description", Description); setAttribute(obj, "Location", Location); setAttribute(obj, "Purpose", Purpose); setAttribute(obj, "Revision", Revision); if (mDocumentOwner > 0) { obj["DocumentOwner"] = mDatabase[mDocumentOwner].getJson(this, options); } if (mEditors.Count > 0) { obj["Editors"] = new JArray(mEditors.ToList().ConvertAll(x => mDatabase[x].getJson(this, options))); } if (mCreationTime != DateTime.MinValue) { obj["CreationTime"] = IfcDateTime.FormatSTEP(CreationTime); } if (mLastRevisionTime != DateTime.MinValue) { obj["LastRevisionTime"] = IfcDateTime.FormatSTEP(LastRevisionTime); } setAttribute(obj, "ElectronicFormat", ElectronicFormat); if (mValidFrom != DateTime.MinValue) { obj["ValidFrom"] = IfcDate.FormatSTEP(ValidFrom); } if (mValidUntil != DateTime.MinValue) { obj["ValidUntil"] = IfcDate.FormatSTEP(ValidUntil); } if (mConfidentiality != IfcDocumentConfidentialityEnum.NOTDEFINED) { obj["Confidentiality"] = mConfidentiality.ToString(); } if (mStatus != IfcDocumentStatusEnum.NOTDEFINED) { obj["Status"] = mStatus.ToString(); } }