Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataFactory methods to create from existing term and quad | closes #137 #158

Merged
merged 3 commits into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,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 @@ -369,6 +371,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>

Expand Down