001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.kernel.api.services; 007 008import java.util.stream.Stream; 009 010import org.apache.jena.graph.Triple; 011import org.fcrepo.kernel.api.Transaction; 012import org.fcrepo.kernel.api.models.FedoraResource; 013import org.fcrepo.kernel.api.rdf.LdpTriplePreferences; 014 015/** 016 * Service to call other services to return a desired set of triples. 017 * @author whikloj 018 * @since 6.0.0 019 */ 020public interface ResourceTripleService { 021 022 /** 023 * Return the triples for the resource based on the Prefer: header preferences 024 * @param tx The transaction or null if none. 025 * @param resource the resource to get triples for. 026 * @param preferences the preferences asked for. 027 * @param limit limit on the number of children to display. 028 * @return a stream of triples. 029 */ 030 Stream<Triple> getResourceTriples(final Transaction tx, final FedoraResource resource, 031 final LdpTriplePreferences preferences, final int limit); 032}