Example #1
0
 public SparqlTriple(SparqlNode subj, SparqlNode pred, SparqlNode obj)
 {
     Subj = subj;
     Pred = pred;
     Obj  = obj;
     //    this.Graph = graph;
 }
 public static Func <IEnumerable <Action> > spo(PolarTripleStore store, SparqlNode s, SparqlNode p, SparqlNode o)
 {
     return(() => store.Contains(new Triple(s.Value, p.Value, o.Value)) ? new Action[] { (() =>
         {
             Console.WriteLine("sdf");
         }) } : Enumerable.Empty <Action>());
 }
 internal static Func <IEnumerable <Action> > sPO(PolarTripleStore store, SparqlNode sEntityCode, VariableNode pParameter, VariableNode oParameter)
 {
     return(() => store
            .GetTriplesWithSubject(sEntityCode.Value)
            .Select(triple => new Action(() =>
     {
         pParameter.Value = triple.Predicate;
         oParameter.Value = triple.Object;
     })));
 }
 internal static Func <IEnumerable <Action> > sPo(PolarTripleStore store, SparqlNode sEntityCode, VariableNode predicateVariableNode, SparqlNode oEntityCode)
 {
     return(() => store
            .GetTriplesWithSubjectObject(sEntityCode.Value, oEntityCode.Value)
            .Select(triple => triple.Predicate)
            .Select(predicate => new Action(() =>
     {
         predicateVariableNode.Value = predicate;
     })));
 }
 public static Func <IEnumerable <Action> > spD(IStore store, SparqlNode sNode, SparqlNode pNode, VariableNode objectNode)
 {
     return(() => store
            .GetTriplesWithSubjectPredicate(sNode.Value, pNode.Value)
            .Select(triple => triple.Object)
            .Select(node => new Action(() =>
     {
         objectNode.Value = node;
     })));
 }
 internal static Func <IEnumerable <Action> > spO(PolarTripleStore store, SparqlNode subjNode, SparqlNode pEntityCode, VariableNode obj)
 {
     return(() => store
            .GetTriplesWithSubjectPredicate(subjNode.Value, pEntityCode.Value)
            .Select(triple => triple.Object)
            .Select(newObj => new Action(() =>
     {
         obj.Value = newObj;
     })));
 }
 internal static Func <IEnumerable <Action> > Spd(VariableNode sParameter, object pEntityCode, SparqlNode d)
 {
     throw new NotImplementedException();
 }
 internal static Func <IEnumerable <Action> > sPD(IStore store, SparqlNode sEntityCode, VariableNode pParameter, VariableNode oParameter)
 {
     throw new NotImplementedException();
 }
 internal static Func <IEnumerable <Action> > sPd(IStore store, SparqlNode sEntityCode, VariableNode predicate, SparqlNode d)
 {
     throw new NotImplementedException();
 }
 internal static Func <IEnumerable <Action> > SpO(PolarTripleStore store, VariableNode s, SparqlNode pEntityCode, VariableNode o)
 {
     throw new NotImplementedException();
 }
 internal static Func <IEnumerable <Action> > Spo(PolarTripleStore store, VariableNode subj, SparqlNode pEntityCode, SparqlNode oEntityCode)
 {
     return(() => store
            .GetTriplesWithPredicateObject(pEntityCode.Value, oEntityCode.Value)
            .Select(triple => triple.Subject)
            .Select(sub => new Action(() =>
     {
         subj.Value = sub;
     })));
 }
 public static Func <IEnumerable <Action> > spd(SparqlNode subj, SparqlNode pred, SparqlNode d)
 {
     throw new NotImplementedException();
 }
 internal static Func <IEnumerable <Action> > SPO(PolarTripleStore store, VariableNode sParameter, VariableNode pParameter, VariableNode oParameter, SparqlNode graph)
 {
     throw new NotImplementedException();
 }
 internal static Func <IEnumerable <Action> > SPd(short sParameter, short pParameter, SparqlNode d)
 {
     throw new NotImplementedException();
 }