Query-Solid icon indicating copy to clipboard operation
Query-Solid copied to clipboard

.properties should return compacted properties

Open matthieu-fesselier opened this issue 5 years ago • 3 comments

When using the function properties on a resource or a container, I get a list of expanded properties (example)

Shouldn't it be compacted? It seems like LDFlex is doing it, and we already have the predicates function which returns expanded properties (example)

matthieu-fesselier avatar Sep 24 '19 10:09 matthieu-fesselier

Indeed; this depended on https://github.com/rubensworks/jsonld-context-parser.js/issues/21, which now seems to be done. Upgrading the JSON-LD context parser should do the trick.

RubenVerborgh avatar Sep 24 '19 10:09 RubenVerborgh

Don't you think that somewhere in query-ldflex code the parsedContext setting is missing ?

For instance, with LDFlex, this code returns compacted properties :

 const pathProxy = new PathProxy({ handlers });
    person = pathProxy.createPath({
      queryEngine,
      parsedContext: new ContextParser().parse(context),
    }, { subject });

and this code does not :

 const pathProxy = new PathProxy({ handlers });
    person = pathProxy.createPath({
      queryEngine
    }, { subject });

jblemee avatar Sep 24 '19 12:09 jblemee

Interesting; will need to have a look.

RubenVerborgh avatar Sep 24 '19 13:09 RubenVerborgh