JSON-LD @type property
CoreModels applies this translation to any import type and handles the '@type' property accordingly. '@type' is a special property that determines how a JSON-LD object is imported as either a type, element, or a taxonomy in CoreModels.
This is based on how the schema.org importer is originally designed according to the rdfs definition.
If "@type" is set to "rdfs:Class", then it's a type. Here is the code from our sample file.
{
"@id": "sampleType1",
"@type": "rdfs:class",
"rdfs:comment": "This is a sample json-ld object that will be considered
a type due to having the rdfs:class value in the @type property",
"rdfs:label": "Sample Type 1",
"isrequired": "sms:true"
}Once CoreModels proceeds the import, the type will be created with its label Sample Type1.

If "@type" is set to "rdf:property", then it's an element.
{
"@id": "sampleElement1",
"@type": "rdf:property",
"rdfs:comment": "This is a sample json-ld object that will be considered
an element due to having the rdf:property value in the @type property,
it will also connect to sampleType1 due to having the domainIncludes",
"rdfs:label": "Sample Element 1",
"schema:domainIncludes": [{
"@id" : "sampleType1"
}],
"isrequired": "sms:true"
}'sampleElement1' is has a 'domainIncludes' relation to 'sampleType1', therefor it'll appear in the Elements grid of 'Sample Type 1'.

If "@type" is set to "rdfs:Class" AND "rdfs:subClassOf" has "schema:enumeration", then it's a taxonomy.
{
"@id": "sampleTaxonomyParent",
"@type": "rdfs:Class",
"rdfs:comment": "his is a sample json-ld object that will be considered a taxonmy
due to having the rdfs:class value in the @type property
AND the schema Enumeration in the subClassOf",
"rdfs:label": "Sample Taxonomy Parent",
"rdfs:subClassOf": [{
"@id" : "schema:enumeration"
}],
"isrequired": "sms:true"
}
If "@type" is set to any previous taxonomy, then it's a child of that taxonomy.
{
"@id": "sampleTaxonomyChild",
"@type": "sampleTaxonomyParent",
"rdfs:comment": "his is a sample json-ld object that will be considered
a taxonmy due to having the sampleTaxonomy Parent value in the @type property
it will be set by default to be the child of that taxonomy",
"rdfs:label": "Sample Taxonomy Child",
"isrequired": "sms:false"
}CoreModels will automatically establish a relationship between the child taxonomy and 'Sample Taxonomy Parent', thereby creating parent-child relation. Here's how the child taxonomy will look like.

Last updated