ResourceQuery.java

/*
 * Copyright (c) 2007-2026 MetaSolutions AB
 *
 * 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 org.entrystore.rest.springboot.model.api;

import org.springframework.http.MediaType;

/**
 * The parts of a GET on a resource URI that select the representation: the Accept header and every query parameter
 * except {@code download}, which only affects Content-Disposition and stays in the controller. A non-null
 * {@code syndication} asks for a feed of the given ROME feed type instead of the resource itself; {@code urlTemplate}
 * names a configured feed-link template and {@code feedTitle} overrides the feed title, both null when not given.
 * The RDF format of a Graph or List resource follows {@code format}, then {@code rdfFormat}, then the Accept header.
 */
public record ResourceQuery(MediaType format,
							MediaType rdfFormat,
							String acceptHeader,
							String syndication,
							String language,
							int feedSize,
							String urlTemplate,
							String feedTitle,
							ListFilter listFilter) {
}