Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In short, you can't do this. Blank nodes are just another type of resource. Blank nodes act as existential variables in RDF; use of a blank node in a graph says that <em>some</em> resource exists and stands in certain relationships to other. For instance, the graph (with no blank nodes):</p> <pre><code>:x :hasPhoneNumber :phoneNumberList . :phoneNumbeList rdf:value "phone number 1", "phone number 2" . </code></pre> <p><em>entails</em> the following graph (with blank nodes):</p> <pre><code>:x :hasPhoneNumber [ rdf:value "phone number 1", "phone number 2" ] . </code></pre> <p>For more about this treatment, see <a href="http://www.w3.org/TR/rdf-mt/#unlabel" rel="nofollow">1.5. Blank Nodes as Existential Variables</a> from the W3C recommendation, <a href="http://www.w3.org/TR/rdf-mt/" rel="nofollow">RDF Semantics</a>.</p> <p>At the RDF and RDFS level, (where you'd be defining domains and ranges of properties) to distinguish whether a resource is a URI resource or a blank node. It's not really clear what it would <em>mean</em> either, if you could. By saying that</p> <pre><code>:p rdfs:domain :C ; rdfs:range :D . </code></pre> <p>what you're saying is that any time you see a use of <code>:p</code>, e.g., </p> <pre><code>:a :p :b . </code></pre> <p>that you can add the following triples to the graph:</p> <pre><code>:a rdf:type :C . :b rdf:type :D . </code></pre> <p>Notice since <code>rdfs:domain</code> and <code>rdfs:range</code> are about adding more triples to the graph, it doesn't really matter whether the subject and object of a triple using <code>:p</code> (<code>:a</code> and <code>:b</code> in this case) are blank nodes or URI nodes.</p> <p>If you want to have more than one phone number for a person, you could just use multiple triples, and have something like:</p> <pre><code>:p :hasPhoneNumber :phoneNumber1 , :phoneNumber2, :phoneNumber3 . </code></pre> <p>which is the three triples:</p> <pre><code>:p :hasPhoneNumber :phoneNumber1 . :p :hasPhoneNumber :phoneNumber2 . :p :hasPhoneNumber :phoneNumber3 . </code></pre> <p>Alternatively, if you want to model that a person can have some collection of phone numbers, you might use an RDF container. E.g., with an <code>rdf:List</code>:</p> <pre><code>:p :hasPhoneNumber ( :phoneNumber1 :phoneNumber2 :phoneNumber3 ) . </code></pre> <p>which can be written in full as </p> <pre><code>:p :hasPhoneNumber [ rdf:first :phoneNumber1 ; rdf:rest [ rdf:first :phoneNumber2 ; rdf:rest [ rdf:first :phoneNumber3 ; rdf:rest rdf:nil ] ] ] . </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload