= RepresentationType _(enum)_
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.

== API

[source,java]
.RepresentationType.java
----
enum RepresentationType {
  HOME_PAGE
  USER
  VERSION
  HEALTH
  LIST
  DOMAIN_OBJECT
  OBJECT_PROPERTY
  OBJECT_COLLECTION
  OBJECT_ACTION
  ACTION_RESULT
  TYPE_LIST
  DOMAIN_TYPE
  LAYOUT
  OBJECT_LAYOUT
  IMAGE
  MENUBARS
  PROPERTY_DESCRIPTION
  COLLECTION_DESCRIPTION
  ACTION_DESCRIPTION
  ACTION_PARAMETER_DESCRIPTION
  TYPE_ACTION_RESULT
  ERROR
  GENERIC
  String getName()
  MediaType getJsonMediaType()
  MediaType getXmlMediaType()
  MediaType getJsonElseXmlMediaType()
  MediaType getMediaType(String parameter, String paramValue)     // <.>
  MediaType getJsonMediaType(Map<String, String> mediaTypeParams)
  MediaType getXmlMediaType(Map<String, String> mediaTypeParams)
  String getMediaTypeProfile()
  Class<? extends JsonRepresentation> getRepresentationClass()
  RepresentationType lookup(String name)
  RepresentationType lookup(MediaType mediaType)
  boolean matches(MediaType mediaType)
  boolean matchesXmlProfile(MediaType mediaType)
  boolean matchesJsonProfile(MediaType mediaType)
  MediaType matchesXmlProfileWithParameter(List<MediaType> mediaTypes, String parameterKey)     // <.>
  MediaType matchesJsonProfileWithParameter(List<MediaType> mediaTypes, String parameterKey)     // <.>
  Parser<RepresentationType> parser()
}
----

<.> xref:#getMediaType_String_String[getMediaType(String, String)]
+
--
Clones the (immutable) _#getJsonMediaType() media type_ , adding in one additional parameter value.
--
<.> xref:#matchesXmlProfileWithParameter_List_String[matchesXmlProfileWithParameter(List, String)]
+
--
whether any of the xref:refguide:viewer:index/restfulobjects/applib/RepresentationType.adoc[RepresentationType] s matches any (accept header) XML _MediaType_ with specified parameter.
--
<.> xref:#matchesJsonProfileWithParameter_List_String[matchesJsonProfileWithParameter(List, String)]
+
--
whether any of the xref:refguide:viewer:index/restfulobjects/applib/RepresentationType.adoc[RepresentationType] s matches any (accept header) JSON _MediaType_ with specified parameter.
--

== Members

[#getMediaType_String_String]
=== getMediaType(String, String)

Clones the (immutable) _#getJsonMediaType() media type_ , adding in one additional parameter value.

[#matchesXmlProfileWithParameter_List_String]
=== matchesXmlProfileWithParameter(List, String)

whether any of the xref:refguide:viewer:index/restfulobjects/applib/RepresentationType.adoc[RepresentationType] s matches any (accept header) XML _MediaType_ with specified parameter.

[#matchesJsonProfileWithParameter_List_String]
=== matchesJsonProfileWithParameter(List, String)

whether any of the xref:refguide:viewer:index/restfulobjects/applib/RepresentationType.adoc[RepresentationType] s matches any (accept header) JSON _MediaType_ with specified parameter.
