protected override void setJSON(JObject obj, BaseClassIfc host, HashSet<int> processed)
{
base.setJSON(obj, host, processed);
setAttribute(obj, "ObjectType", ObjectType);
setAttribute(obj, "LongName", LongName);
setAttribute(obj, "Phase", Phase);
if (mRepresentationContexts.Count > 0)
{
JArray array = new JArray() { };
foreach (IfcRepresentationContext representationContext in RepresentationContexts)
array.Add(representationContext.getJson(this, processed));
obj["RepresentationContexts"] = array;
}
IfcUnitAssignment unitsInContext = UnitsInContext;
if (unitsInContext != null)
obj["UnitsInContext"] = unitsInContext.getJson(this, processed);
//INVERSE
//public List<IfcRelDefinesByProperties> IsDefinedBy { get { return mIsDefinedBy; } }
if (mDeclares.Count > 0)
{
JArray array = new JArray() { };
foreach (IfcRelDeclares declare in Declares)
{
if (declare.RelatedDefinitions.Count > 0)
array.Add(declare.getJson(this, processed));
}
if (array.Count > 0)
obj["Declares"] = array;
}
}
}