/// <summary>
        ///
        /// </summary>
        /// <param name="floor"></param>
        /// <param name="buildingStorey"></param>
        /// <returns></returns>
        protected override IfcBuildingStorey Mapping(Floor floor, IfcBuildingStorey buildingStorey)
        {
            buildingStorey.Name            = floor.Name;
            buildingStorey.Description     = floor.Description;
            buildingStorey.CompositionType = IfcElementCompositionEnum.ELEMENT;
            buildingStorey.Elevation       = floor.Elevation;

            #region Categories

            if (floor.Categories != null)
            {
                foreach (var category in floor.Categories)
                {
                    Exchanger.ConvertCategoryToClassification(category, buildingStorey);
                }
            }

            #endregion

            Exchanger.TryCreatePropertySingleValue(buildingStorey, new DecimalAttributeValue {
                Value = floor.Height
            }, "FloorHeightValue", Exchanger.DefaultLinearUnit);

            //write out the spaces
            if (floor.Spaces != null)
            {
                var spaceMapping = Exchanger.GetOrCreateMappings <MappingSpaceToIfcSpace>();
                foreach (var space in floor.Spaces)
                {
                    var ifcSpace = spaceMapping.AddMapping(space, spaceMapping.GetOrCreateTargetObject(space.ExternalId));
                    buildingStorey.AddToSpatialDecomposition(ifcSpace);
                    Exchanger.AddToSpaceMap(ifcSpace);
                }
            }

            #region Attributes

            if (floor.Attributes != null)
            {
                foreach (var attribute in floor.Attributes)
                {
                    Exchanger.ConvertAttributeTypeToIfcObjectProperty(buildingStorey, attribute);
                }
            }
            #endregion

            #region Documents
            if (floor.Documents != null && floor.Documents.Any())
            {
                Exchanger.ConvertDocumentsToDocumentSelect(buildingStorey, floor.Documents);
            }
            #endregion
            return(buildingStorey);
        }
        protected override IfcBuildingStorey Mapping(FloorType floorType, IfcBuildingStorey buildingStorey)
        {
            buildingStorey.Name            = floorType.FloorName;
            buildingStorey.Description     = floorType.FloorDescription;
            buildingStorey.CompositionType = IfcElementCompositionEnum.ELEMENT;
            if (floorType.FloorElevationValue != null && floorType.FloorElevationValue.HasValue())
            {
                buildingStorey.Elevation = floorType.FloorElevationValue.DecimalValue;
            }

            Exchanger.TryCreatePropertySingleValue(buildingStorey, floorType.FloorHeightValue, "FloorHeightValue", Exchanger.DefaultLinearUnit);

            //write out the spaces
            if (floorType.Spaces != null)
            {
                var spaceMapping = Exchanger.GetOrCreateMappings <MappingSpaceTypeToIfcSpace>();
                foreach (var space in floorType.Spaces)
                {
                    var ifcSpace = spaceMapping.AddMapping(space, spaceMapping.GetOrCreateTargetObject(space.externalID));
                    buildingStorey.AddToSpatialDecomposition(ifcSpace);
                    Exchanger.AddToSpaceMap(buildingStorey, ifcSpace);
                }
            }

            #region Attributes

            if (floorType.FloorAttributes != null)
            {
                foreach (var attribute in floorType.FloorAttributes)
                {
                    Exchanger.ConvertAttributeTypeToIfcObjectProperty(buildingStorey, attribute);
                }
            }
            #endregion
            return(buildingStorey);
        }