Skip to content

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

@danaivach

Description

@danaivach

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions