-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
get
method always returns null
#258
Comments
Uh, yea, essentially the same problem that was #248. Sorry about that To be honest I'm less sure how I'd want to tackle this. The general idea behind rdfine is to build strong-typed interfaces proxying RDF properties. So instead of Have you seen this on the docs page: https://alcaeus.hydra.how/latest/#/representations/mixins ? |
That is helpful, thanks! Yes - I've seen the entry on mixins. |
If you intend to access the graph in the most generic way then maybe you don't really need the object model that much? rdfine, which sits inside alcaeus works best for closed-world models. The representation of the hydra vocab for example is generated and packaged as For API- and case-specific model you may be working against the grain here. Instead, I could advise an approach where you describe your graphs in SHACL for example and base your code on the properties. A core design of rdfine is that the RDF/JS representation is easily accessible so that you can consume the graph using other tools and not only the OOP models. See below and example where I reworked the example from the docs to use SHACL paths for accessing data inside resource returned from the example API https://runkit.com/embed/g8u373kz6n72 Of course, the returned values are plain RDF/JS objects |
I'm using the current published version of alcaeus (1.3.1). So far I have been unable to fetch property information using the
get
method. The typed helper method all seem to work however. I believe that the issue might stem from the rdfine lib - but I haven't had a chance to check that out yet.EDIT:
On second look, I believe that the issue stems from the implementation of getArray in rdfine which filters out all properties that are not named or blank nodes.
https://github.com/tpluscode/rdfine/blob/377c603b222c30f75e8ecfe1ae6cd7dbfce5ccaf/packages/core/RdfResource.ts#L240
The text was updated successfully, but these errors were encountered: