Skip to content

Commit 52c631d

Browse files
committed
DataFactory methods to create from existing term and quad | closes #137
1 parent 28385a7 commit 52c631d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ <h3><dfn>DataFactory</dfn> interface</h3>
337337
Variable variable(string value);
338338
DefaultGraph defaultGraph();
339339
Quad quad(Term subject, Term predicate, Term object, optional Term? graph);
340+
Term fromTerm(Term original);
341+
Quad fromQuad(Quad original);
340342
};
341343
</pre>
342344

@@ -369,6 +371,14 @@ <h3><dfn>DataFactory</dfn> interface</h3>
369371
If <code>graph</code> is <code>undefined</code> or <code>null</code>
370372
it MUST set <code>graph</code> to a <code>DefaultGraph</code>.
371373
</p>
374+
<p>
375+
<dfn>fromTerm()</dfn> returns a new instance of specific <code>Term</code> subclass,
376+
which passed to <code>original.equals()</code> returns <code>true</code>
377+
</p>
378+
<p>
379+
<dfn>fromQuad()</dfn> returns a new instance of <code>Quad</code>,
380+
which passed to <code>original.equals()</code> returns <code>true</code>
381+
</p>
372382
</section>
373383
</section>
374384

0 commit comments

Comments
 (0)