Should RDF triple elements always be URIs?

Can a URI be used for object, predicate, and object in RDF, or should a keyword exist in at least one of three, for example:

David <http://www.someuri.com/predicate> <http://www.someuri.com/object>

      

Is it possible to have such a structure in an RDF file or must all triples be in the form of a URI?

For example, if I have a doctor named David, the patient and visit date are in URI form. Let the patient URI be " http://www.hospital.com/patients/ " and the date URI " http://www.hospital.com/dateofvisit/ ". In that case, please tell me how an RDF document should be generated.

+2


source to share


2 answers


The object is either a URI or an empty node.

The predicate is always a URI.



The object is either a URI, an empty node, or a literal.

David

is not a valid URI and not an empty node identifier in any common RDF syntax. You probably want to model it as a URI resource. However it doesn't have to be an HTTP address, however any valid URI will do.

+8


source


Sreenath. In RDF, the parts of a triplet can be either IRI (Unicode Compatible URIs), literals (strings, integers, etc.), or "empty nodes" (a kind of anonymous URLs for temporary links). Your "keyword" sounds like an abbreviated form of IRI - if you are defining a default prefix for your RDF document, then the keyword should be considered relative to that. If node is enclosed in quotes, then it is a letter. The only other option is that your ternary component is an empty node, which is also a resource locator, but only relative to this document. It will look like this. _:David

You can find out more here



+1


source







All Articles