示例#1
0
        public override string WhereRule()
        {
            string baseErr = base.WhereRule();

            if (!Name.HasValue)
            {
                baseErr +=
                    "WR31 Project: The Name attribute has to be provided for the project. It is the short name for the project.\n";
            }
            if (RepresentationContexts.OfType <IfcGeometricRepresentationSubContext>().Count() > 0)
            {
                baseErr +=
                    "WR32 Project: There shall be no instance of IfcGeometricRepresentationSubContext directly included in the set of RepresentationContexts.\n";
            }
            if (Decomposes.Count() != 0)
            {
                baseErr +=
                    "WR33 Project:   The Project represents the root of the any decomposition tree. It shall therefore not be used to decompose any other object definition.\n";
            }
            return(baseErr);
        }
示例#2
0
        public override string WhereRule()
        {
            string baseErr = base.WhereRule();

            if (Decomposes.Count() != 1)
            {
                baseErr +=
                    "WR41 SpatialStructureElement: All spatial structure elements shall be associated with another spatial structure element, or with a Project\n";
            }
            IfcRelDecomposes rel = Decomposes.FirstOrDefault();

            if (!(rel is IfcRelAggregates))
            {
                baseErr +=
                    "WR41 SpatialStructureElement: All spatial structure elements shall be associated using the RelAggregates relationship.\n";
            }
            if (rel != null && !(rel.RelatingObject is IfcProject || rel.RelatingObject is IfcSpatialStructureElement))
            {
                baseErr +=
                    "WR41 SpatialStructureElement: All spatial structure elements shall be associated with another spatial structure element, or with a Project\n";
            }
            return(baseErr);
        }