RDFIsUriFilter represents a filter for Uri values of a variable.
Inheritance: RDFFilter
        /// <summary>
        /// Applies the filter on the column corresponding to the variable in the given datarow
        /// </summary>
        internal override Boolean ApplyFilter(DataRow row, Boolean applyNegation) {
            Boolean keepRow  = true;

            //Check is performed only if the row contains a column named like the filter's variable
            if (row.Table.Columns.Contains(this.Variable.ToString())) {
 
                //Apply a negation logic on result of an "IsUri" filter
                RDFIsUriFilter isUriFilter = new RDFIsUriFilter(this.Variable);
                keepRow      = isUriFilter.ApplyFilter(row, true);

                //Apply the eventual negation
                if (applyNegation) {
                    keepRow  = !keepRow;
                }
            }

            return keepRow;
        }
        /// <summary>
        /// Applies the filter on the column corresponding to the variable in the given datarow
        /// </summary>
        internal override Boolean ApplyFilter(DataRow row, Boolean applyNegation) {
            Boolean keepRow = true;

            //Check is performed only if the row contains a column named like the filter's variable
            if (row.Table.Columns.Contains(this.Variable.ToString())) {
                String variableValue       = row[this.Variable.ToString()].ToString();

                //Apply a blank-checking logic on result of an "IsUri" filter
                RDFIsUriFilter isUriFilter = new RDFIsUriFilter(this.Variable);
                keepRow                    = (isUriFilter.ApplyFilter(row, false) && variableValue.StartsWith("bnode:"));

                //Apply the eventual negation
                if (applyNegation) {
                    keepRow = !keepRow;
                }
            }

            return keepRow;
        }
        /// <summary>
        /// Applies the filter on the column corresponding to the variable in the given datarow
        /// </summary>
        internal override bool ApplyFilter(DataRow row, bool applyNegation)
        {
            bool keepRow = true;

            //Check is performed only if the row contains a column named like the filter's variable
            if (row.Table.Columns.Contains(this.Variable.ToString()))
            {
                //Apply a negation logic on result of an "IsUri" filter
                RDFIsUriFilter isUriFilter = new RDFIsUriFilter(this.Variable);
                keepRow = isUriFilter.ApplyFilter(row, true);

                //Apply the eventual negation
                if (applyNegation)
                {
                    keepRow = !keepRow;
                }
            }

            return(keepRow);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Applies the filter on the column corresponding to the variable in the given datarow
        /// </summary>
        internal override Boolean ApplyFilter(DataRow row, Boolean applyNegation)
        {
            Boolean keepRow = true;

            //Check is performed only if the row contains a column named like the filter's variable
            if (row.Table.Columns.Contains(this.Variable.ToString()))
            {
                String variableValue = row[this.Variable.ToString()].ToString();

                //Apply a blank-checking logic on result of an "IsUri" filter
                RDFIsUriFilter isUriFilter = new RDFIsUriFilter(this.Variable);
                keepRow = (isUriFilter.ApplyFilter(row, false) && variableValue.StartsWith("bnode:"));

                //Apply the eventual negation
                if (applyNegation)
                {
                    keepRow = !keepRow;
                }
            }

            return(keepRow);
        }