Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Malformed TDE produced for a relationship #194

Open
damonfeldman opened this issue Feb 19, 2021 · 0 comments
Open

[BUG] Malformed TDE produced for a relationship #194

damonfeldman opened this issue Feb 19, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@damonfeldman
Copy link

damonfeldman commented Feb 19, 2021

When an Entity is missing an ID configuration, envision produces an invalid TDE template with "undefined" in the mappings.

Workaround is easy - add the missing ID to the Entity in the "Info" section on the "connect" tab.

The effect of this is that the triples are malformed with "undefined" in them, so the "explore" view does not have expected links.

E.g.
"templates": [
{
"context": "./undefined",

and

"val": "sem:iri(fn:replace(fn:concat("exhibit#", fn:string-join((../../undefined,../undefined)[1], ';;')), " ", ""))"

in the "edges" section of the conceptconnectormodel, I have this:
"case-hasnote-exhibit": {
"id": "case-hasnote-exhibit",
"from": "case",
"label": "hasNote",
"to": "exhibit",
"cardinality": "1:Many",
"keyFrom": "caseID",
"keyTo": "caseID",
"smooth": {
"roundness": 0.65
}

the full TDE is this:

{
"template": {
"context": "//:instance/:Exhibit",
"collections": [
"Exhibit"
],
"templates": [
{
"context": "./undefined",
"triples": [
{
"subject": {
"val": "xdmp:node-uri(.)"
},
"predicate": {
"val": "sem:iri("http://www.w3.org/2000/01/rdf-schema#hasLabel")"
},
"object": {
"val": "sem:iri(fn:concat("Exhibit#", xs:string(.)))"
}
},
{
"subject": {
"val": "xdmp:node-uri(.)"
},
"predicate": {
"val": "sem:iri("http://www.w3.org/2000/01/rdf-schema#hasId")"
},
"object": {
"val": "sem:iri(fn:replace(fn:concat("exhibit#", xs:string(.)), " ", ""))"
}
},
{
"subject": {
"val": "sem:iri(fn:replace(fn:concat("exhibit#", xs:string(.)), " ", ""))"
},
"predicate": {
"val": "sem:iri("http://www.w3.org/2000/01/rdf-schema#hasEntityType")"
},
"object": {
"val": ""Exhibit""
}
}
]
},
{
"context": "./caseID",
"triples": [
{
"subject": {
"val": "sem:iri(fn:replace(fn:concat("case#", xs:string(.)), " ", ""))"
},
"predicate": {
"val": "sem:iri("http://www.w3.org/2000/01/rdf-schema#hasNote")"
},
"object": {
"val": "sem:iri(fn:replace(fn:concat("exhibit#", fn:string-join((../../undefined,../undefined)[1], ';;')), " ", ""))"
}
}
]
}
]
}
}

Envision 2.0.4

@damonfeldman damonfeldman added the bug Something isn't working label Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant