mergedServices.LexiconLiteral.BuildQueryPart C# (CSharp) Method

BuildQueryPart() public method

returns a string of a part of query generated based on the given literal token and its type of owners
public BuildQueryPart ( ) : string
return string
        public override string BuildQueryPart()
        {
            string literalQueryPart;

            if (typeOfOwner.Count == 1)
            {
                literalQueryPart = "filter( ?" + util.URIToSimpleString(typeOfOwner[0]) + " = <" + this.URI + "> )";
                return literalQueryPart;
            }
            else if (typeOfOwner.Count > 1)
            {
                literalQueryPart = "filter( ?" + util.URIToSimpleString(typeOfOwner[0]) + " = <" + this.URI + ">";

                for (int i = 1; i < typeOfOwner.Count; i++)
                {
                    literalQueryPart += " || ?" + util.URIToSimpleString(typeOfOwner[i]) + " = <" + this.URI + ">";
                }

                literalQueryPart += " )";
                return literalQueryPart;
            }
            else
                return "";
        }