All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aksw.jenax.graphql.sparql.GraphQlToSparqlMappingBuilderBase Maven / Gradle / Ivy

The newest version!
package org.aksw.jenax.graphql.sparql;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;

import graphql.language.Document;
import graphql.language.Value;

public abstract class GraphQlToSparqlMappingBuilderBase
    implements GraphQlToSparqlMappingBuilder
{
    protected GraphQlResolver resolver;
    protected boolean jsonMode;
    protected Document document;
    protected Map>  assignments;

    public GraphQlToSparqlMappingBuilderBase() {
        super();
        this.assignments = new LinkedHashMap<>();
    }

    @Override
    public GraphQlToSparqlMappingBuilder setResolver(GraphQlResolver resolver) {
        this.resolver = resolver;
        return this;
    }

    @Override
    public GraphQlToSparqlMappingBuilder setJsonMode(boolean jsonMode) {
        this.jsonMode = jsonMode;
        return this;
    }

    @Override
    public GraphQlToSparqlMappingBuilder setDocument(Document document) {
        Objects.requireNonNull(document);
        this.document = document;
        return this;
    }

    @Override
    public GraphQlToSparqlMappingBuilder setAssignments(Map>  assignments) {
        if (assignments != null) {
            this.assignments.putAll(assignments);
        }
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy