org.fcrepo.http.commons.responses.RdfNamespacedStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fcrepo-http-commons Show documentation
Show all versions of fcrepo-http-commons Show documentation
The Fedora Commons repository HTTP commons module: Provides HTTP (JAX-RS) resources and helpers for use in assembling HTTP APIs over the Fedora Commons repository framework.
The newest version!
/*
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree.
*/
package org.fcrepo.http.commons.responses;
import static java.util.Objects.requireNonNull;
import java.util.Map;
import org.fcrepo.kernel.api.RdfStream;
/**
* A simple type to collect an RdfStream and associated Namespace mappings
*
* @author acoburn
* @since 2/13/16
*/
public class RdfNamespacedStream implements AutoCloseable {
public final RdfStream stream;
public final Map namespaces;
/**
* Creates an object to hold an RdfStream and an associated namespace mapping.
*
* @param stream the RdfStream
* @param namespaces the namespace mapping
*/
public RdfNamespacedStream(final RdfStream stream, final Map namespaces) {
requireNonNull(stream);
requireNonNull(namespaces);
this.stream = stream;
this.namespaces = namespaces;
}
@Override
public void close() {
stream.close();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy