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

using template to generate the predicate #26

Open
rickadkins opened this issue Nov 12, 2021 · 0 comments
Open

using template to generate the predicate #26

rickadkins opened this issue Nov 12, 2021 · 0 comments

Comments

@rickadkins
Copy link

I have been trying to generate the predicate using a template. I have not found any documentation or examples, and have tried several ideas but nothing seems to be working.

given
[{ "aDevice":"123", "zDevice":"987","sourceName":"ARPCache"},{ "aDevice":"456", "zDevice":"654","sourceName":"STP"}]

I want to generate:
http://example/Network/Device/123 http://example/Network/hasARPCacheNeighbor http://example/Network/Device/987 .
http://example/Network/Device/456 http://example/Network/hasSTPNeighbor http://example/Network/Device/654 .

I don't want to use multiple logicalsource definitions and hardcode the predicate.
I tried but doesn't seem to work:

rr:predicateObjectMap [
rr:predicateMap [ rml:template "has{$.sourceName}" ];
rr:objectMap [ rml:template "http://example/Network/Device/{$.zDevice}];
];

Is predicateMap even a key word? I see it reference in the rml spec, but never see it used in the way subject map or object map.

Thanks, Rick

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