Esempio n. 1
0
        /// <summary>
        /// Quads that are uri's
        /// </summary>
        public static IEnumerable <Quad> IsValueUri(
            this IEnumerable <Quad> self,
            IBasicNodeFactory f, IEnumerable <string> uris)
        {
            var nodes = uris.Select(x => f.Uri(x));

            return(self.Where(x => nodes.Contains(x.Object)));
        }
Esempio n. 2
0
        /// <summary>Quads With a Predicate</summary>
        public static IEnumerable <Quad> With(
            this IEnumerable <Quad> self,
            IBasicNodeFactory f,
            IEnumerable <string> uriValues)
        {
            var nodes = uriValues.Select(x => f.Uri(x));

            return(self.Where(x => nodes.Contains(x.Predicate)));
        }
Esempio n. 3
0
        /// <summary>Quads For a URI Subject(s) </summary>
        public static IEnumerable <Quad> For(
            this IEnumerable <Quad> self,
            IBasicNodeFactory f,
            params string[] uriSubjects)
        {
            var nodes = uriSubjects.Select(x => f.Uri(x));

            return(self.Where(x => nodes.Contains(x.Subject)));
        }
Esempio n. 4
0
 /// <summary>
 /// Create new <see cref="UriNode"/> from <see cref="Uri"/>.
 /// </summary>
 public static UriNode Uri(this IBasicNodeFactory self, Uri uri)
 => self.Uri(uri.ToString());