-
-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Description
If in a SALAD schema the jsonldPredicate of a SaladRecordField is set as
- string, the provided URI is not resolved with respect to the provided base URI, instead the predicate URI is not pre-processed in any way
- as object with property
_idthe provided URI is resolved with respect to the provided base URI during pre-processing.
Example
Input schema with directly provided URI string:
$base: "http://www.example.org/basketSchema"
$graph:
- name: Basket
type: record
documentRoot: true
fields:
- name: basket
type:
type: array
items: string
jsonldPredicate: "#hasProducts"
Output JSON-LD Context:
{
"@context": {
"Basket": "http://www.example.org/basketSchema#Basket",
"basket": "#hasProducts"
}
}
Input schema with JsonldPredicate object:
$base: "http://www.example.org/basketSchema"
$graph:
- name: Basket
type: record
documentRoot: true
fields:
- name: basket
type:
type: array
items: string
jsonldPredicate:
_id: "#hasProducts"
Output JSON-LD Context:
{
"@context": {
"Basket": "http://www.example.org/basketSchema#Basket",
"basket": {
"@id": "http://www.example.org/basketSchema#hasProducts"
}
}
}
Intuitively, I would have assumed that the two schemes would be equivalent, but apparently they are not.
Is this observed behavior correct (or a bug) and if so, where is this defined in the current SALAD specification (currently there is some documentation about jsonldPredicate pre-processing in 2.7 Record field annotations, but only for the cases, if the value is an object or @id)?
Metadata
Metadata
Assignees
Labels
No labels