Exemplo n.º 1
0
 /// <summary>
 /// Create new <see cref="PredicateBuilder"/>.
 /// </summary>
 public PredicateBuilder(SubjectBuilder forSubject, UriNode id)
 {
     _owner = forSubject;
     _id    = id;
     _ctx   = this;
 }
Exemplo n.º 2
0
 private static IRdfData Rdf(this SubjectBuilder self) =>
 ((IQuadBuilderContext)self).Rdf;
Exemplo n.º 3
0
 /// <summary>Adds object items as a RDFS list set (return last item)</summary>
 /// <returns><see cref="SubjectBuilder"/> for last list item</returns>
 /// <exception cref="TypeMustNotBeANode"></exception>
 public static SubjectBuilder List <T>(this SubjectBuilder self, params T[] literals) where T : notnull
 => self.List(literals.Select(x => self.Rdf().New(x))
              .Cast <Node>().ToArray()
              );
Exemplo n.º 4
0
 /// <summary>Adds literal items as a RDFS list set (return last item)</summary>
 /// <returns><see cref="SubjectBuilder"/> for last list item</returns>
 public static SubjectBuilder List(this SubjectBuilder self, params string[] literals)
 => self.List(literals.Select(x => self.Rdf().New(x))
              .Cast <Node>().ToArray()
              );
Exemplo n.º 5
0
 /// <summary>Select predicate with Uri.</summary>
 public static PredicateBuilder With(this SubjectBuilder self, string predicate, out UriNode node)
 {
     node = self.Rdf().Uri(predicate);
     return(self.With(node));
 }
Exemplo n.º 6
0
 /// <summary>Select predicate with Uri.</summary>
 public static PredicateBuilder With(this SubjectBuilder self, ReadOnlySpan <char> predicate, out UriNode node)
 {
     node = self.Rdf().Uri(predicate);
     return(self.With(node));
 }