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

Method name is written only if there is one op #38

Open
danaivach opened this issue Jun 21, 2021 · 0 comments
Open

Method name is written only if there is one op #38

danaivach opened this issue Jun 21, 2021 · 0 comments

Comments

@danaivach
Copy link
Collaborator

private void addFormsForInteraction(Resource interactionId, InteractionAffordance interaction) {
for (Form form : interaction.getForms()) {
BNode formId = rdf.createBNode();
graphBuilder.add(interactionId, rdf.createIRI(TD.hasForm), formId);
// Only writes the method name for forms with one operation type (to avoid ambiguity)
if (form.getMethodName().isPresent() && form.getOperationTypes().size() == 1) {
graphBuilder.add(formId, rdf.createIRI(HTV.methodName), form.getMethodName().get());
}

Why does it create ambiguity to add the method name in case there is more than 1 operation types, since the method name is actually provided by the user (i.e. it is not added as a default value)? I am probably missing something.

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