-
Notifications
You must be signed in to change notification settings - Fork 15
Basic API
Wouter Beek edited this page Dec 30, 2015
·
1 revision
Observations:
-
rdf_resource/1
does not enumerate all resource-denoting terms. It enumerates the terms that are blank nodes or IRIs and that appear in the subject or object position of some triple. - Enumeration based on positional occurrence (
rdf_subject/1
andrdf_current_predicate/1
) is missing object and node support. - Enumeration based on kind (
rdf_current_literal/1
) is missing support for blank nodes, IRIs and names.
Proposal:
- Remove
rdf_resource/1
. - Enumerate terms:
- Add
rdf_term/1
, uniquely enumerating the current RDF terms.
- Add
- Enumerate terms based on their positional occurrence:
- Keep
rdf_subject/1
as-is. - Rename
rdf_current_predicate/1
→rdf_predicate/1
. - Add
rdf_object/1
to complementrdf_subject/1
andrdf_predicate/1
. - Add
rdf_node/1
, uniquely enumerating terms that occur in either the subject or object position.
- Keep
- Enumerate terms based on their kind:
- Rename
rdf_current_literal/1
→rdf_literal/1
. - Add
rdf_bnode/1
, uniquely enumerating terms that are blank nodes. - Add
rdf_iri/1
, uniquely enumerating terms that are neither blank node nor literal. - Add
rdf_name/1
, uniquely enumerating terms that are either IRI or literal.
- Rename
Observations:
- Blank nodes and nodes are different concepts in RDF 1.1.
Proposal:
- Rename
rdf_bnode/1
→rdf_create_bnode/1
. - Replace
rdf_node/1
by the predicate described in section 2.1.
Observations:
- Kind checking (
rdf_is_bnode/1
andrdf_is_literal/1
) is missing support for IRIs. -
rdf_is_resource/1
does not succeed for all resource-denoting terms.
Proposal:
- Keep
rdf_is_bnode/1
as-is. - Keep
rdf_is_literal/1
as-is. - Rename
rdf_is_resource/1
→rdf_is_iri/1
. - Change
rdf_is_resource/1
/rdf_is_iri/1
to not succeed for non-IRIs.
Proposal:
- Rename and relocate
rdf_md5/2
. Mention in the documentation that this should not be used for security purposes (but there are many other applications where is can be useful).