dcmi / dcap

DC Tabular Application Profile - supporting materials
28 stars 12 forks source link

Rename "value type" to "node type" #68

Closed kcoyle closed 3 years ago

kcoyle commented 3 years ago

We have tentatively settled on 2 columns that define the type of the value:

value type: one of "Literal, non-literal, URI, BNODE" value datatype: any datatype defined in the xsd list

and then there will be 2 columns that define the constraints on the value (which must be consistent with the type):

value constraint type: to be defined, but necessary to interpret the next column value constraint: the expression of the actual constraint, such as a list of strings, a list of URI stems, a ShEx snippet, a formula, a regex.

I am afraid that "value type" will be confusing on the surface because many will confuse it with "value datatype". The significant meaning of the "value type" column is that it is the node type of the object of the predicate/property in the propertyID column. For this reason I think we should rename this "value type" to reflect the fact that it is an RDF node type, not a datatype. I'm suggesting "node type" but there may be other names that would get that across: "value node type" "RDF node type" etc.

W3C document that defines nodes: https://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#section-rdf-graph

tombaker commented 3 years ago

Could we call it "RDF value type"? People who know RDF would know what this is, while others could simply disregard it. We could bury this somewhere in the documentation where only experts or developers would look.

So: 'value_type' => 'rdfvalue_type' (or maybe even 'rdf_valuetype' or 'rdf_value_type').

tombaker commented 3 years ago

For the same reason (to avoid confusion), 'value_datatype' should perhaps be called 'literal_value_datatype'.

kcoyle commented 3 years ago

@tombaker "anyURI" is an XSD type, so it isn't just literals. However, it now occurs to me that we may need a synonym for "anyURI" = "URI".

philbarker commented 3 years ago

I think I prefer "value RDF type" a) for consistency with all the others that start with value, and b) because its the RDF [node] type of the value.

philbarker commented 3 years ago

I wrote this earlier but then deleted it by accident. Sorry about the repetition.

@kcoyle wrote:

@tombaker "anyURI" is an XSD type, so it isn't just literals. However, it now occurs to me that we may need a synonym for "anyURI" = "URI".

I don't think this is correct. RDF 1.1 Concepts and Abstract Syntax section on datatypes says:

Datatypes are used with RDF literals to represent values such as strings, numbers and dates.

RDF Translator treats

[] sdo:url "https://www.dublincore.org/"^^xsd:anyURI .

as a literal value, using the URL for a JSON-LD @value, whereas

[] sdo:url <https://www.dublincore.org/> .

is treated as a URIRef, using the URL as a JSON-LD @id.

I think it would take more than renaming to clarify this for many users.

tombaker commented 3 years ago

@philbarker Thank you for the clarification.

@all If xsd:anyURI tags a literal after all, would you support renaming value_datatype to literal_value_datatype (or perhaps to datatype for the column heading with "Literal Value Datatype" as its full name)?

kcoyle commented 3 years ago

No, I wouldn't support it because we still need to be able to have URI as a datatype in that column, regardless of this (surprising to me) RDF treatment of xsd:anyURI as a literal. But this isn't the question in this issue, which is the naming of the column that will take RDF node types as values.

kcoyle commented 3 years ago

Opening new issue for URI as datatype in #70

tombaker commented 3 years ago

We went for valueNodeType as per the "simple template" - see diff