io.telicent.jena.graphql.fetchers.QuadsFetcher Maven / Gradle / Ivy
/**
* Copyright (C) Telicent Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.telicent.jena.graphql.fetchers;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import io.telicent.jena.graphql.schemas.CoreSchema;
import io.telicent.jena.graphql.utils.NodeFilter;
import org.apache.jena.graph.Node;
import org.apache.jena.sparql.core.DatasetGraph;
import org.apache.jena.sparql.core.Quad;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.stream.Collectors;
/**
* A GraphQL Data Fetcher that fetches quads
*/
public class QuadsFetcher implements DataFetcher> {
/**
* Creates a new Quads Fetcher that fetches quads from an underlying RDF dataset
*/
public QuadsFetcher() {
}
@Override
public List