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

com.github.ansell.sesamerioextensions.api.RDFFormatExtensions Maven / Gradle / Ivy

Go to download

API module to contain metadata about Sesame Rio Extensions, especially RDFFormat definitions.

The newest version!
/**
 * 
 */
package com.github.ansell.sesamerioextensions.api;

import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Collection;

import org.openrdf.rio.RDFFormat;

/**
 * RDFFormat definitions relevant to Sesame Rio Extensions.
 * 
 * @author Peter Ansell [email protected]
 * 
 */
public class RDFFormatExtensions extends RDFFormat
{
    /**
     * The Talis RDF/JSON file
     * format, an RDF serialization format that supports recording of named graphs.
     * 

* The file extension .rj is recommended for RDF/JSON documents. The media type is * application/rdf+json and the encoding is UTF-8. *

* * NOTE: This format supports both application/json as a content type, and .json as an * extension, in addition to the specification defined in RDFFormat.RDFJSON. * * @see https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-json/index.html */ public static final RDFFormat RDFJSONPREFERRED = new RDFFormat("RDF/JSON-preferred", Arrays.asList( "application/rdf+json", "application/json"), Charset.forName("UTF-8"), Arrays.asList("rj", "json"), false, true); static { RDFFormat.register(RDFFormatExtensions.RDFJSONPREFERRED); } /** * Creates a new RDFFormat object. * * @param name * The name of the RDF file format, e.g. "RDF/XML". * @param mimeTypes * The MIME types of the RDF file format, e.g. application/rdf+xml for the * RDF/XML file format. The first item in the list is interpreted as the default MIME * type for the format. * @param charset * The default character encoding of the RDF file format. Specify null if * not applicable. * @param fileExtensions * The RDF format's file extensions, e.g. rdf for RDF/XML files. The first * item in the list is interpreted as the default file extension for the format. */ public RDFFormatExtensions(final String name, final Collection mimeTypes, final Charset charset, final Collection fileExtensions, final boolean supportsNamespaces, final boolean supportsContexts) { super(name, mimeTypes, charset, fileExtensions, supportsNamespaces, supportsContexts); } /** * Creates a new RDFFormat object. * * @param name * The name of the RDF file format, e.g. "RDF/XML". * @param mimeType * The MIME type of the RDF file format, e.g. application/rdf+xml for the * RDF/XML file format. * @param charset * The default character encoding of the RDF file format. Specify null if * not applicable. * @param fileExtensions * The RDF format's file extensions, e.g. rdf for RDF/XML files. The first * item in the list is interpreted as the default file extension for the format. */ public RDFFormatExtensions(final String name, final String mimeType, final Charset charset, final Collection fileExtensions, final boolean supportsNamespaces, final boolean supportsContexts) { super(name, mimeType, charset, fileExtensions, supportsNamespaces, supportsContexts); } /** * Creates a new RDFFormat object. * * @param name * The name of the RDF file format, e.g. "RDF/XML". * @param mimeType * The MIME type of the RDF file format, e.g. application/rdf+xml for the * RDF/XML file format. * @param charset * The default character encoding of the RDF file format. Specify null if * not applicable. * @param fileExtension * The (default) file extension for the RDF file format, e.g. rdf for * RDF/XML files. */ public RDFFormatExtensions(final String name, final String mimeType, final Charset charset, final String fileExtension, final boolean supportsNamespaces, final boolean supportsContexts) { super(name, mimeType, charset, fileExtension, supportsNamespaces, supportsContexts); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy