IfcDoc.FormatOWL.WriteMaxCardRestr C# (CSharp) Méthode

WriteMaxCardRestr() private méthode

private WriteMaxCardRestr ( string className, string attrName, int maxCard, bool asEntity ) : string
className string
attrName string
maxCard int
asEntity bool
Résultat string
        private string WriteMaxCardRestr(string className, string attrName, int maxCard, bool asEntity)
        {
            string output = "";
            if (!asEntity) output += " ;\r\n";
            output += "\trdfs:subClassOf" + "\r\n";

            string tab = "\t";
            if (asEntity == true)
            {
                output += "\t\t[" + "\r\n";
                output += "\t\t\trdf:type owl:Restriction ; " + "\r\n";
                output += "\t\t\towl:onProperty " + attrName + " ;\r\n";
                output += "\t\t\towl:allValuesFrom" + "\r\n";
                tab += "\t\t";
            }
            for (int i = 0; i < maxCard - 1; i++)
            {
                tab += "\t";
                output += tab + "[" + "\r\n";
                output += tab + "\trdf:type owl:Restriction ; " + "\r\n";
                output += tab + "\towl:onProperty list:hasNext ; " + "\r\n";
                output += tab + "\towl:allValuesFrom ";
                if (i != maxCard)
                    output += "\r\n";
            }

            tab += "\t";
            output += tab + "[" + "\r\n";
            output += tab + "\trdf:type owl:Restriction ; " + "\r\n";
            output += tab + "\towl:onProperty list:hasNext ; " + "\r\n";
            output += tab + "\towl:onClass " + className + " ;" + "\r\n";
            output += tab + "\towl:qualifiedCardinality \"1\"^^xsd:nonNegativeInteger " + "\r\n";

            tab = tab.Substring(1);
            output += tab + "\t]" + "\r\n";

            for (int i = 0; i < maxCard - 1; i++)
            {
                tab = tab.Substring(1);
                output += tab + "\t]";
                if (i != maxCard)
                    output += "\r\n";
            }
            if (asEntity == true)
                output += "\t\t]";

            return output;
        }