/// <summary> /// Selects all Triples which meet the criteria of an ISelector from all the Query Triples /// </summary> /// <param name="selector">A Selector on Triples</param> /// <returns></returns> public IEnumerable <Triple> GetTriples(ISelector <Triple> selector) { return(from g in this._graphs from t in g.Triples where selector.Accepts(t) select t); }
/// <summary> /// Selects all Nodes that meet the criteria of a given ISelector from all the Query Triples /// </summary> /// <param name="selector">A Selector on Nodes</param> /// <returns></returns> public IEnumerable <INode> GetNodes(ISelector <INode> selector) { return(from g in this._graphs from n in g.Nodes where selector.Accepts(n) select n); }
/// <summary> /// Selects all Triples where the Subject meets the criteria of an ISelector from all Graphs in the Triple Store /// </summary> /// <param name="selector">A Selector on Nodes</param> /// <returns></returns> public IEnumerable <Triple> GetTriplesWithSubject(ISelector <INode> selector) { return(from g in this._graphs from t in g.Triples where selector.Accepts(t.Subject) select t); }
public override bool TriplesExist(ISelector <Triple> selector) { IEnumerable <Triple> ts = from t in this._triples where selector.Accepts(t) select t; return(ts.Any()); }
public override IEnumerable <INode> GetNodes(ISelector <INode> selector) { IEnumerable <INode> ns = from n in this._nodes where selector.Accepts(n) select n; return(ns); }
public override IEnumerable <Triple> GetTriplesWithObject(ISelector <INode> selector) { IEnumerable <Triple> ts = from t in this._triples where selector.Accepts(t.Object) select t; return(ts); }
/// <summary> /// Internal Helper method for applying a Selector to a subset of the Triples in the Triple Store /// </summary> /// <param name="triples">Subset of Triples</param> /// <param name="selector">Selector Class to perform the Selection</param> /// <returns></returns> private IEnumerable <Triple> GetTriples(IEnumerable <Triple> triples, ISelector <Triple> selector) { IEnumerable <Triple> ts = from t in triples where selector.Accepts(t) select t; return(ts); }
/// <summary> /// Selects all Triples where the Subject meets the criteria of an ISelector from a Subset of Graphs in the Triple Store /// </summary> /// <param name="graphUris">List of the Graph URIs of Graphs you want to select over</param> /// <param name="selector">A Selector on Nodes</param> /// <returns></returns> public IEnumerable <Triple> GetTriplesWithSubject(List <Uri> graphUris, ISelector <INode> selector) { IEnumerable <Triple> ts = from g in this._graphs where graphUris.Contains(g.BaseUri) from t in g.Triples where selector.Accepts(t.Subject) select t; return(ts); }
/// <summary> /// Selects all Nodes that meet the criteria of a given ISelector from a Subset of Graphs in the Triple Store /// </summary> /// <param name="selector">A Selector on Nodes</param> /// <param name="graphUris">List of the Graph URIs of Graphs you want to select over</param> /// <returns></returns> public IEnumerable <INode> GetNodes(List <Uri> graphUris, ISelector <INode> selector) { IEnumerable <INode> ns = from g in this._graphs where graphUris.Contains(g.BaseUri) from n in g.Nodes where selector.Accepts(n) select n; return(ns); }
/// <summary> /// Selects all Nodes that meet the criteria of a given ISelector from all the Query Triples /// </summary> /// <param name="selector">A Selector on Nodes</param> /// <returns></returns> public IEnumerable<INode> GetNodes(ISelector<INode> selector) { return (from g in this._graphs from n in g.Nodes where selector.Accepts(n) select n); }
/// <summary> /// Selects all Triples where the Subject meets the criteria of an ISelector from a Subset of Graphs in the Triple Store /// </summary> /// <param name="graphUris">List of the Graph URIs of Graphs you want to select over</param> /// <param name="selector">A Selector on Nodes</param> /// <returns></returns> public IEnumerable<Triple> GetTriplesWithSubject(List<Uri> graphUris, ISelector<INode> selector) { IEnumerable<Triple> ts = from g in this._graphs where graphUris.Contains(g.BaseUri) from t in g.Triples where selector.Accepts(t.Subject) select t; return ts; }
/// <summary> /// Selects all Nodes that meet the criteria of a given ISelector from a Subset of Graphs in the Triple Store /// </summary> /// <param name="selector">A Selector on Nodes</param> /// <param name="graphUris">List of the Graph URIs of Graphs you want to select over</param> /// <returns></returns> public IEnumerable<INode> GetNodes(List<Uri> graphUris, ISelector<INode> selector) { IEnumerable<INode> ns = from g in this._graphs where graphUris.Contains(g.BaseUri) from n in g.Nodes where selector.Accepts(n) select n; return ns; }
/// <summary> /// Selects all Triples where the Subject meets the criteria of an ISelector from all Graphs in the Triple Store /// </summary> /// <param name="selector">A Selector on Nodes</param> /// <returns></returns> public IEnumerable<Triple> GetTriplesWithSubject(ISelector<INode> selector) { return (from g in this._graphs from t in g.Triples where selector.Accepts(t.Subject) select t); }
/// <summary> /// Selects all Triples which meet the criteria of an ISelector from all the Query Triples /// </summary> /// <param name="selector">A Selector on Triples</param> /// <returns></returns> public IEnumerable<Triple> GetTriples(ISelector<Triple> selector) { return (from g in this._graphs from t in g.Triples where selector.Accepts(t) select t); }
/// <summary> /// Internal Helper method for applying a Selector to a subset of the Triples in the Triple Store /// </summary> /// <param name="triples">Subset of Triples</param> /// <param name="selector">Selector Class to perform the Selection</param> /// <returns></returns> private IEnumerable<Triple> GetTriples(IEnumerable<Triple> triples, ISelector<Triple> selector) { IEnumerable<Triple> ts = from t in triples where selector.Accepts(t) select t; return ts; }
/// <summary> /// Gets all the Nodes according to some arbitrary criteria as embodied in a Selector /// </summary> /// <param name="selector">Selector class which performs the Selection</param> /// <returns>Zero/More Nodes</returns> public override IEnumerable<INode> GetNodes(ISelector<INode> selector) { IEnumerable<INode> ns = from n in this._nodes where selector.Accepts(n) select n; return ns; }
/// <summary> /// Gets all the Triples with an Object matching some arbitrary criteria as embodied in a Selector /// </summary> /// <param name="selector">Selector class which performs the Selection</param> /// <returns>Zero/More Triples</returns> public override IEnumerable<Triple> GetTriplesWithObject(ISelector<INode> selector) { IEnumerable<Triple> ts = from t in this._triples where selector.Accepts(t.Object) select t; return ts; }
/// <summary> /// Checks whether any Triples Exist which match a given Selector /// </summary> /// <param name="selector">Selector Class which performs the Selection</param> /// <returns></returns> public override bool TriplesExist(ISelector<Triple> selector) { IEnumerable<Triple> ts = from t in this._triples where selector.Accepts(t) select t; return ts.Any(); }