//WRITE EXTRAS private void WriteExtraEntity(URIObject obj) { m_indent = 0; m_writer.Write("inst:" + obj.URI + "\r\n"); m_indent++; string ns = "ifcowl:"; if (obj.ifcowlclass.Equals("INTEGER") || obj.ifcowlclass.Equals("REAL") || obj.ifcowlclass.Equals("DOUBLE") || obj.ifcowlclass.Equals("BINARY") || obj.ifcowlclass.Equals("BOOLEAN") || obj.ifcowlclass.Equals("LOGICAL") || obj.ifcowlclass.Equals("STRING")) ns = "express:"; WriteType(ns + obj.ifcowlclass + ";\r\n"); #if VERBOSE Console.Out.WriteLine("WriteExtraEntity: " + "obj.URI: " + obj.URI + " - xsdtype " + obj.XSDType); #endif WriteLiteralValue(obj.XSDType, obj.encodedvalue); m_writer.Write(".\r\n\r\n"); #if VERBOSE Console.Out.WriteLine("written URIObject: " + "inst:" + obj.URI + " with VALUE " + obj.encodedvalue + " and TYPE " + obj.XSDType); #endif return; }
private URIObject GetURIObject(string domain, string encodedvalue, string XSDType) { #if VERBOSE if (XSDType.Equals("RTFieldInfo", StringComparison.CurrentCultureIgnoreCase)) Console.Out.WriteLine("Warning: Found RTFieldInfo XSDType for encodedvalue: " + encodedvalue); else Console.Out.WriteLine("Found seemingly ok XSDType for encodedvalue : " + encodedvalue + " - " + domain); #endif //WARNING: _VALUE_ and _TYPE_ could be in the other strings string fullObject = domain + "_VALUE_" + encodedvalue + "_TYPE_" + XSDType; URIObject obj; if (!URIObjectExists(fullObject)) { m_nextID++; obj = new URIObject(domain + "_" + m_nextID, domain, encodedvalue, XSDType); m_valueObjects.Add(fullObject, obj); } else { obj = (URIObject)m_valueObjects[fullObject]; } return obj; }