If there was a way to create variable relationships (built on unknown fields) that could be used to join to entities of Unknown or Variable relationship. ex:

from the vivo project (vivoweb.org)

  • You have foaf:Person, core:Role, core:Grant
  • People are related to entities of type Role through several object properties core:PrincipleInvestigatorIn, core:CoPrincipleInvestigatorIn, core:InvestigatorIn (these are not specifically the properties just genrally thier names)
  • Roles are related to grants through just one path RoleOf
  • instead of specifying each of the possible connections from a person to a role as optional you want to define a variable property, then define the types of role and person

    the end resulting query would look like
    select ?personName
    where {
    ?person rdfs:label ?personName;
    rdf:type foaf:person;
    ?p_to_r ?role.
    ?role rdf:type core:Role;
    core:roleIn ?grant.
    ?grant rdfs:label "VIVO: Enabling National Networking of Scientists"

  • Comments

    svwilliams’s picture

    Priority: Normal » Minor

    While this might be something to include in the user interface later, this seems to already be handled by the system. You just create a Sparql View Resoure Field where the rdf mapping is a variable.

    Anonymous’s picture

    Clever solution, thanks for posting it!

    netsensei’s picture

    I'm wondering if this approach could solve [http://drupal.org/node/1111702] for me...

    Is it possible to elaborate a little bit more? I'm a bit puzzled here. I've created an entity resource, added a few fields with an RDF mapping and created a view. Do I have to add an extra field to my resource without a mapping to a vocabulary? And use that in my view?

    Anonymous’s picture

    IIRC, he created a mapping that was just "?p". This mean that he could return all objects for a subject.