Role

Represents additional information about a relationship or property. For example a Role can be used to say that a 'member' role linking some SportsTeam to a player occurred during a particular time period. Or that a Person's 'actor' role in a Movie was for some particular characterName. Such properties can be attached to a Role entity, which is then associated with the main entities using ordinary properties like 'member' or 'actor'.

See also blog post.

Example eg-0203

Without Markup (source lint)

A basic Role example in JSON that
shows how to qualify the 'member' property
by adding an intermediate Role entity.

RDFa (source lint)

<div vocab="https://schema.org/" typeof="Organization">
  <span property="name">Cryptography Users</span>
  <div property="member" typeof="OrganizationRole">
    <div property="member" typeof="Person">
      <span property="name">Alice</span>
    </div>
    <span property="startDate">1977</span>
  </div>
</div>

microdata (source lint)

<div itemscope itemtype="https://schema.org/Organization">
  <span itemprop="name">Cryptography Users</span>
  <div itemprop="member" itemscope
        itemtype="https://schema.org/OrganizationRole">
    <div itemprop="member" itemscope
            itemtype="https://schema.org/Person">
      <span itemprop="name">Alice</span>
    </div>
    <span itemprop="startDate">1977</span>
  </div>
</div>

JSON-LD (source lint)

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Cryptography Users",
  "member": {
    "@type": "OrganizationRole",
    "member": {
    "@type": "Person",
    "name": "Alice"
    },
    "startDate": "1977"
  }
}
</script>

structured

rdf:type schema:Organization
schema:member
rdf:type schema:OrganizationRole
schema:member
rdf:type schema:Person
schema:name Alice
schema:startDate 1977
schema:name Cryptography Users

Example eg-0204

Without Markup (source lint)

A JSON example of an OrganizationRole being used to qualify
the 'alumniOf' property (which is inverseOf 'alumni').

Note that we use startDate to indicate when the alumniOf
situation began, which was the date of leaving the organization.

RDFa (source lint)

<div vocab="https://schema.org/" typeof="Person">
    <span property="name">Delia Derbyshire</span>
    <link property="sameAs" href="http://en.wikipedia.org/wiki/Delia_Derbyshire">
    <div property="alumniOf" typeof="OrganizationRole">
        <div property="alumniOf" typeof="CollegeOrUniversity">
            <span property="name">University of Cambridge</span>
            <link property="sameAs" href="http://en.wikipedia.org/wiki/University_of_Cambridge">
        </div>
        <span property="startDate">1959</span>
    </div>
</div>

microdata (source lint)

<div itemscope itemtype="https://schema.org/Person">
    <span itemprop="name">Delia Derbyshire</span>
    <link itemprop="sameAs" href="http://en.wikipedia.org/wiki/Delia_Derbyshire">
    <div itemprop="alumniOf" itemscope itemtype="https://schema.org/OrganizationRole">
        <div itemprop="alumniOf" itemscope itemtype="https://schema.org/CollegeOrUniversity">
            <span itemprop="name">University of Cambridge</span>
            <link itemprop="sameAs" href="http://en.wikipedia.org/wiki/University_of_Cambridge">
        </div>
        <span itemprop="startDate">1959</span>
    </div>
</div>

JSON-LD (source lint)

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "Person",
    "name": "Delia Derbyshire",
    "sameAs": "http://en.wikipedia.org/wiki/Delia_Derbyshire",
    "alumniOf": {
        "@type": "OrganizationRole",
        "alumniOf": {
            "@type": "CollegeOrUniversity",
            "name": "University of Cambridge",
            "sameAs": "http://en.wikipedia.org/wiki/University_of_Cambridge"
        },
        "startDate": "1959"
    }
}
</script>

structured

rdf:type schema:Person
schema:alumniOf
rdf:type schema:OrganizationRole
schema:alumniOf
rdf:type schema:CollegeOrUniversity
schema:name University of Cambridge
schema:sameAs http://en.wikipedia.org/wiki/University_of_Cambridge
schema:startDate 1959
schema:name Delia Derbyshire
schema:sameAs http://en.wikipedia.org/wiki/Delia_Derbyshire

Example eg-0205

Without Markup (source lint)

A JSON example of a PerformanceRole, in which
the Role represents the acting contribution made by
Bill Murray in the film Ghostbusters. The Role entity
allows us to additional information, such as the
character's name that he played in the film.

RDFa (source lint)

<div vocab="https://schema.org/" typeof="Movie">
  <span property="name">Ghostbusters</span>
  <link property="sameAs" href="http://en.wikipedia.org/wiki/Ghostbusters"/>
  <div property="actor" typeof="PerformanceRole">
    <div property="actor" typeof="Person">
      <span property="name">Bill Murray</span>
    </div>
    <span property="characterName">Dr. Peter Venkman</span>
  </div>
</div>

microdata (source lint)

<div itemscope itemtype="https://schema.org/Movie">
  <span itemprop="name">Ghostbusters</span>
  <link itemprop="sameAs" href="http://en.wikipedia.org/wiki/Ghostbusters"/>
  <div itemprop="actor" itemscope
        itemtype="https://schema.org/PerformanceRole">
    <div itemprop="actor" itemscope
            itemtype="https://schema.org/Person">
      <span itemprop="name">Bill Murray</span>
    </div>
    <span itemprop="characterName">Dr. Peter Venkman</span>
  </div>
</div>

JSON-LD (source lint)

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Movie",
  "name": "Ghostbusters",
  "sameAs": "http://en.wikipedia.org/wiki/Ghostbusters",
  "actor": {
    "@type": "PerformanceRole",
    "actor": {
      "@type": "Person",
      "name": "Bill Murray"
    },
    "characterName": "Dr. Peter Venkman"
  }
}
</script>

structured

rdf:type schema:Movie
schema:actor
rdf:type schema:PerformanceRole
schema:actor
rdf:type schema:Person
schema:name Bill Murray
schema:characterName Dr. Peter Venkman
schema:name Ghostbusters
schema:sameAs http://en.wikipedia.org/wiki/Ghostbusters

Example eg-0206

Without Markup (source lint)

A JSON example of an OrganizationRole, showing information
about a 'member' of a 'SportsTeam', including time qualfiers
(when he began and ended that role).

RDFa (source lint)

<div vocab="https://schema.org/" typeof="SportsTeam">
    <span property="name">San Francisco 49ers</span>
    <div property="member" typeof="OrganizationRole">
        <div property="member" typeof="https://schema.org/Person">
            <span property="name">Joe Montana</span>
        </div>
        <span property="startDate">1979</span>
        <span property="endDate">1992</span>
        <span property="roleName">Quarterback</span>
    </div>
</div>

microdata (source lint)

<div itemscope itemtype="https://schema.org/SportsTeam">
    <span itemprop="name">San Francisco 49ers</span>
    <div itemprop="member" itemscope itemtype="https://schema.org/OrganizationRole">
        <div itemprop="member" itemscope itemtype="https://schema.org/Person">
            <span itemprop="name">Joe Montana</span>
        </div>
        <span itemprop="startDate">1979</span>
        <span itemprop="endDate">1992</span>
        <span itemprop="roleName">Quarterback</span>
    </div>
</div>

JSON-LD (source lint)

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "SportsTeam",
  "name": "San Francisco 49ers",
  "member": {
    "@type": "OrganizationRole",
    "member": {
      "@type": "Person",
      "name": "Joe Montana"
    },
    "startDate": "1979",
    "endDate": "1992",
    "roleName": "Quarterback"
  }
}
</script>

structured

rdf:type schema:SportsTeam
schema:member
rdf:type schema:OrganizationRole
schema:endDate 1992
schema:member
rdf:type schema:Person
schema:name Joe Montana
schema:roleName Quarterback
schema:startDate 1979
schema:name San Francisco 49ers