3

I know that in RDF subjects can't be literals. However, let's say that I have a few properties and classes (in turtle syntax) already defined like this:

foaf:Organization a owl:Class .

ex:Employee a owl:Class .

foaf:Project a owl:Class .

#links employees to their project
foaf:currentProject a rdf:Property .

#links the employee to the organization they work at 
ex:worksAt a rdf:Property .

#name employees, organization and project
foaf:name a rdf:Property .

Now, let's suppose I want to express with triples the fact that an employee x1 is currently working on a project y1, while an employee x2 is working on a project y2(where x1,y1,x2,y2 are literals, their name), only using the vocabulary and properties defined here. How can I do that?

Plutone11011
  • 127
  • 3
  • 10
  • 2
    Perhaps you need [tag:blank-nodes]: `ex:x1 ex:currentProject [a ex:Project; foaf:name "Project1"]`. – Stanislav Kralin Jun 20 '18 at 19:34
  • 2
    Or rather `[a ex:Employee; foaf:name "John"] ex:currentProject [a ex:Project; foaf:name "Project1"]`. – Stanislav Kralin Jun 21 '18 at 05:31
  • 1
    Thank you so much for the response. Does this work thanks to the fact that using the same label for blank nodes is like referring always to the same one? – Plutone11011 Jun 21 '18 at 09:34
  • 1
    If you're asking about the so-called *blank node labels*, please see [tag info](https://stackoverflow.com/tags/blank-nodes/info). Or do you mean values of `foaf:name`? Roughly speaking, `[a ex:Employee; foaf:name "John"] ex:currentProject [a ex:Project; foaf:name "Project1"], [a ex:Project; foaf:name "Project1"]` means that John is currently working on *two* projects. – Stanislav Kralin Jun 21 '18 at 09:53
  • 1
    You say "an employee x1", then you say that x1 is a name. Is your model saying that employees are strings of characters? Do as Stanislas says: identify your employees (the real employees that work and do stuff, not the sequence of characters that is their name) with URIs, same with projects, and relate them to their names. – Antoine Zimmermann Jul 31 '18 at 06:44

0 Answers0