2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.restconf.nb.rfc8040;
10 import javax.ws.rs.core.MediaType;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
14 * Media types we use in this implementation, in both {@link String} and {@link MediaType} form.
17 public final class MediaTypes {
19 * A {@code String} constant representing {@value #APPLICATION_XRD_XML} media type.
21 * @see <a href="https://datatracker.ietf.org/doc/html/rfc6415#section-2">RFC6415, section 2</a>
23 public static final String APPLICATION_XRD_XML = "application/xrd+xml";
25 * A {@code MediaType} constant representing {@value #APPLICATION_XRD_XML} media type.
27 * @see <a href="https://datatracker.ietf.org/doc/html/rfc6415#section-2">RFC6415, section 2</a>
29 public static final MediaType APPLICATION_XRD_XML_TYPE = MediaType.valueOf(APPLICATION_XRD_XML);
31 * A {@code String} constant representing {@value #APPLICATION_YANG_DATA_XML} media type.
33 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-11.3.1">RFC8040, section 11.3.1</a>
35 public static final String APPLICATION_YANG_DATA_XML = "application/yang-data+xml";
37 * A {@code MediaType} constant representing {@value #APPLICATION_YANG_DATA_XML} media type.
39 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-11.3.1">RFC8040, section 11.3.1</a>
41 public static final MediaType APPLICATION_YANG_DATA_XML_TYPE = MediaType.valueOf(APPLICATION_YANG_DATA_XML);
43 * A {@code String} constant representing {@value #APPLICATION_YANG_DATA_JSON} media type.
45 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-11.3.2">RFC8040, section 11.3.2</a>
47 public static final String APPLICATION_YANG_DATA_JSON = "application/yang-data+json";
49 * A {@code MediaType} constant representing {@value #APPLICATION_YANG_DATA_JSON} media type.
51 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-11.3.2">RFC8040, section 11.3.2</a>
53 public static final MediaType APPLICATION_YANG_DATA_JSON_TYPE = MediaType.valueOf(APPLICATION_YANG_DATA_JSON);
55 * A {@code String} constant representing {@value #APPLICATION_YANG_PATCH_XML} media type.
57 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8072#section-4.2.1">RFC8072, section 4.2.1</a>
59 public static final String APPLICATION_YANG_PATCH_XML = "application/yang-patch+xml";
61 * A {@code MediaType} constant representing {@value #APPLICATION_YANG_PATCH_XML} media type.
63 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8072#section-4.2.1">RFC8072, section 4.2.1</a>
65 public static final MediaType APPLICATION_YANG_PATCH_XML_TYPE = MediaType.valueOf(APPLICATION_YANG_PATCH_XML);
67 * A {@code MediaType} constant representing {@value #APPLICATION_YANG_PATCH_JSON} media type.
69 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8072#section-4.2.1">RFC8072, section 4.2.2</a>
71 public static final String APPLICATION_YANG_PATCH_JSON = "application/yang-patch+json";
73 * A {@code MediaType} constant representing {@value #APPLICATION_YANG_PATCH_JSON} media type.
75 * @see <a href="https://datatracker.ietf.org/doc/html/rfc8072#section-4.2.1">RFC8072, section 4.2.2</a>
77 public static final MediaType APPLICATION_YANG_PATCH_JSON_TYPE = MediaType.valueOf(APPLICATION_YANG_PATCH_JSON);
79 private MediaTypes() {