In general, there are four ways how it can be approached:
- For types (aka. classes):
- Add a type. To convey that a
schema:Person
is fictional, you could add a ex:FictionalThing
type to that entity.
- Use a sub-type instead. To convey that a
schema:Person
is fictional, you could define ex:FictionalPerson
to be a sub-type of schema:Person
, and only¹ use ex:FictionalPerson
.
- For properties:
- Add a property. To provide a nickname for a
schema:Person
, you could add a ex:nickname
property.²
- Use a sub-property instead. You could define
ex:nickname
to be a sub-property of schema:additionalName
, and only¹ use ex:nickname
.²
It’s a good practice to reuse existing RDF types/properties. If there is no suitable term/vocabulary, define your own.
In your specific case, it seems to me that you need a type for representing a user account, as a schema:Person
could have multiple accounts, and there is probably no user data that is true for all user accounts of that person. So you might want to consider using an entity for representing a user account, and a property to connect such an account with a schema:Person
.
You could, for example, use the property foaf:account
to add a foaf:OnlineAccount
to the schema:Person
:
{
"@context": "http://www.w3.org/2013/json-ld-context/rdfa11",
"@type": "schema:Person",
"schema:name": "Name of the person",
"foaf:account": {
"@type": "foaf:OnlineAccount",
"schema:name": "Name of the online account"
}
}
¹ Or use it in addition to the super-type/super-property, which is typically a good idea if you want to support consumers who don’t read your own vocabulary first.
² You don’t have to add another type next to schema:Person
for this purpose, as you can freely mix types and properties from different vocabularies. Also note that you can define the domain and range of the property, which allows you to "implicitly" add types to the referencing/referenced entities. In the example above, a consumer who knows the FOAF vocabulary will add the type foaf:Agent
to the entitiy with the type schema:Person
, because it’s the domain of the property foaf:account
.