/// <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))); }
/// <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))); }
/// <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))); }
/// <summary> /// Create new <see cref="UriNode"/> from <see cref="Uri"/>. /// </summary> public static UriNode Uri(this IBasicNodeFactory self, Uri uri) => self.Uri(uri.ToString());