Beispiel #1
0
        public string getPacakgeTag(string packageType)
        {
            string       type         = "unkown";
            FaceTypeEnum faceTypeEnum = parseFaceType(packageType);

            switch (faceTypeEnum)
            {
            case FaceTypeEnum.ConceptualDataModel:
                type = "cdm";
                break;

            case FaceTypeEnum.LogicalDataModel:
                type = "ldm";
                break;

            case FaceTypeEnum.PlatformDataModel:
                type = "pdm";
                break;

            case FaceTypeEnum.UoPModel:
                type = "uopModel";
                break;
            }
            return(type);
        }
Beispiel #2
0
        public string getPackageChildrenElementTypePrefix(string packageType)
        {
            string       type         = "unkown";
            FaceTypeEnum faceTypeEnum = parseFaceType(packageType);

            switch (faceTypeEnum)
            {
            case FaceTypeEnum.ConceptualDataModel:
                type = "conceptual";
                break;

            case FaceTypeEnum.LogicalDataModel:
                type = "logical";
                break;

            case FaceTypeEnum.PlatformDataModel:
                type = "platform";
                break;

            case FaceTypeEnum.UoPModel:
                type = "uop";
                break;
            }
            return(type);
        }
Beispiel #3
0
        public string getElementTag(string elementType)
        {
            string       type         = "element";
            FaceTypeEnum faceTypeEnum = parseFaceType(elementType);

            switch (faceTypeEnum)
            {
            case FaceTypeEnum.MessagePort:
                type = "port";
                break;
            }
            return(type);
        }
Beispiel #4
0
        public string getFaceElementType(String faceType)
        {
            string       type         = "unknow";
            FaceTypeEnum faceTypeEnum = parseFaceType(faceType);

            switch (faceTypeEnum)
            {
            case FaceTypeEnum.PortableComponent:
            case FaceTypeEnum.PlatformSpecificComponent:
            case FaceTypeEnum.MessagePort:
                type = "uop";
                break;
            }
            return(type);
        }
Beispiel #5
0
        public string getElementAttributeTag(string attributeType)
        {
            string       type         = "composition";
            FaceTypeEnum faceTypeEnum = parseFaceType(attributeType);

            switch (faceTypeEnum)
            {
            case FaceTypeEnum.CharacteristicProjection:
                type = "characteristic";
                break;

            case FaceTypeEnum.MessagePort:
                type = "port";
                break;
            }
            return(type);
        }
Beispiel #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Face" /> class.
        /// </summary>
        /// <param name="name">Name of the object used in all simulation engines. Must not contain spaces and use only letters, digits and underscores/dashes. It cannot be longer than 100 characters. (required).</param>
        /// <param name="geometry">Planar Face3D for the geometry. (required).</param>
        /// <param name="faceType">faceType (required).</param>
        /// <param name="boundaryCondition">boundaryCondition (required).</param>
        /// <param name="properties">Extension properties for particular simulation engines (Radiance, EnergyPlus). (required).</param>
        /// <param name="displayName">Display name of the object with no restrictions..</param>
        /// <param name="type">type (default to &quot;Face&quot;).</param>
        /// <param name="apertures">Apertures assigned to this Face. Should be coplanar with this Face and completely within the boundary of the Face to be valid..</param>
        /// <param name="doors">Doors assigned to this Face. Should be coplanar with this Face and completely within the boundary of the Face to be valid..</param>
        /// <param name="indoorShades">Shades assigned to the interior side of this object..</param>
        /// <param name="outdoorShades">Shades assigned to the exterior side of this object (eg. balcony, overhang)..</param>
        public Face(string name, Face3D geometry, FaceTypeEnum faceType, AnyOf <Ground, Outdoors, Adiabatic, Surface> boundaryCondition, FacePropertiesAbridged properties, string displayName = default, string type = "Face", List <Aperture> apertures = default, List <Door> doors = default, List <Shade> indoorShades = default, List <Shade> outdoorShades = default)
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for Face and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // to ensure "geometry" is required (not null)
            if (geometry == null)
            {
                throw new InvalidDataException("geometry is a required property for Face and cannot be null");
            }
            else
            {
                this.Geometry = geometry;
            }

            // to ensure "faceType" is required (not null)
            if (faceType == null)
            {
                throw new InvalidDataException("faceType is a required property for Face and cannot be null");
            }
            else
            {
                this.FaceType = faceType;
            }

            // to ensure "boundaryCondition" is required (not null)
            if (boundaryCondition == null)
            {
                throw new InvalidDataException("boundaryCondition is a required property for Face and cannot be null");
            }
            else
            {
                this.BoundaryCondition = boundaryCondition;
            }

            // to ensure "properties" is required (not null)
            if (properties == null)
            {
                throw new InvalidDataException("properties is a required property for Face and cannot be null");
            }
            else
            {
                this.Properties = properties;
            }

            this.DisplayName = displayName;
            // use default value if no "type" provided
            if (type == null)
            {
                this.Type = "Face";
            }
            else
            {
                this.Type = type;
            }
            this.Apertures     = apertures;
            this.Doors         = doors;
            this.IndoorShades  = indoorShades;
            this.OutdoorShades = outdoorShades;
        }
Beispiel #7
0
        public bool isChildrenElemnt(string pacakgeType)
        {
            FaceTypeEnum faceTypeEnum = parseFaceType(pacakgeType);

            return(faceTypeEnum.Equals(FaceTypeEnum.MessagePort));
        }