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

Provide away to make URI/resource nodes from ValueArray strings with prefix expansion. #39

Open
skwlilac opened this issue Apr 1, 2021 · 1 comment

Comments

@skwlilac
Copy link
Contributor

skwlilac commented Apr 1, 2021

In trying to create an array of URI for some 'static' notes I tried the following:

r_auth_notes : "{value('sf-auth-note:').append( value([ 1,2,3,4 ]) ).asRDFNode() }"

without the trailing asRDFNote one is left with a string and for some reason elsewhere template expansion of

<core:note> : "<{r_auth_notes}>"

fails to see sf-auth-note: as a URI prefix rather than a URI scheme. .asRDFNode() will apply prefix expansion but has not been written (in ValueBase) to handle arrays.

[PR with suggested changes to follow]

@skwlilac
Copy link
Contributor Author

skwlilac commented Apr 1, 2021

In prep'ing for a PR is has become apparent that ValueBase.asRDFNode() does not apply prefixes, so it is not appropriate to make the array variant do anything different. Elsewhere I've use GlobalFunctions.asResource to make resource ValueNodes, though it is approriate to make .asRFDNode() 'work' on ValueArrays.

Instead I've added and asResource method to ValueArray although an alternate or additional approach might be to make GlobalFunctions.asResource work for Collection values as well.

skwlilac added a commit that referenced this issue Apr 1, 2021
@skwlilac skwlilac changed the title Update .asRDFNode() to work on ValueArray values. Provide away to make URI/resource nodes from ValueArray strings with prefix expansion. Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant