Ejemplo n.º 1
0
 /// <summary>
 /// Create new <see cref="SubjectBuilder"/>.
 /// </summary>
 public SubjectBuilder(GraphBuilder forG, Node <UriOrBlank> id)
 {
     _owner = forG;
     _id    = id;
     _ctx   = forG;
 }
Ejemplo n.º 2
0
 private static Node <UriOrBlank> GraphId(this GraphBuilder self) =>
 ((IQuadBuilderContext)self).GraphNode ??
 throw new Exception($"Expected Graph id for {nameof(GraphBuilder)}.");
Ejemplo n.º 3
0
 private static IRdfData Rdf(this GraphBuilder self) =>
 ((IQuadBuilderContext)self).Rdf;
Ejemplo n.º 4
0
 /// <summary>New blank labeled node subject.</summary>
 public static SubjectBuilder ForBlank(this GraphBuilder self, ReadOnlySpan <char> label, out BlankNode node)
 {
     node = self.Rdf().Blank(self.GraphId(), label);
     return(self.For(node));
 }
Ejemplo n.º 5
0
 /// <summary>New blank labeled node subject.</summary>
 public static SubjectBuilder ForBlank(this GraphBuilder self, string label, out BlankNode node)
 {
     node = self.Rdf().Blank(self.GraphId(), label);
     return(self.For(node));
 }
Ejemplo n.º 6
0
 /// <summary>Select URI subject.</summary>
 public static SubjectBuilder For(this GraphBuilder self, Uri uriSubject, out UriNode node)
 {
     node = self.Rdf().Uri(uriSubject.ToString());
     return(self.For(node));
 }