ApplyFilter() 개인적인 메소드

Applies the filter on the column corresponding to the variable in the given datarow
private ApplyFilter ( DataRow row, System.Boolean applyNegation ) : System.Boolean
row System.Data.DataRow
applyNegation System.Boolean
리턴 System.Boolean
        /// <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);
        }
예제 #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);
        }