Skip to content

Commit

Permalink
Merge pull request #158 from elf-pavlik/from
Browse files Browse the repository at this point in the history
DataFactory methods to create from existing term and quad | closes #137
  • Loading branch information
elf-pavlik authored Apr 15, 2019
2 parents 57e79c7 + 5be9dfc commit b277e3a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ <h3><dfn>DataFactory</dfn> interface</h3>
Variable variable(string value);
DefaultGraph defaultGraph();
Quad quad(Term subject, Term predicate, Term object, optional Term? graph);
Term fromTerm(Term original);
Quad fromQuad(Quad original);
};
</pre>

Expand Down Expand Up @@ -408,6 +410,15 @@ <h3><dfn>DataFactory</dfn> interface</h3>
If <code>graph</code> is <code>undefined</code> or <code>null</code>
it MUST set <code>graph</code> to a <code>DefaultGraph</code>.
</p>
<p>
<dfn>fromTerm()</dfn> returns a new instance of the specific <code>Term</code> subclass given by <code>original.termType</code>
(e.g., <code>NamedNode</code>, <code>BlankNode</code>, <code>Literal</code>, etc.),
such that <code>newObject.equals(original)</code> returns <code>true</code>.
</p>
<p>
<dfn>fromQuad()</dfn> returns a new instance of <code>Quad</code>,
such that <code>newObject.equals(original)</code> returns <code>true</code>.
</p>
</section>
</section>
</body>
Expand Down

0 comments on commit b277e3a

Please sign in to comment.