public class ContentType extends Object
ContentType is the class representing the format of the payload of a DataElement.
| Constructor and Description |
|---|
ContentType()
Simple constructor.
|
ContentType(String mimeType,
List<Parameter> contentTypeParameters)
Instantiates a ContentType by setting the mimetype and the content type parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContentTypeParameters(Parameter... contentTypeParameters)
Sets the content type parameters.
|
ContentType |
clone() |
boolean |
equals(Object obj) |
void |
fromDOM(Element contentTypeElement)
Creates this ContentType from a dom element representing it.
|
protected void |
fromXML(String xml) |
static boolean |
gensupport(ContentType supported,
ContentType ifsupported)
This method implements the generic support consistency level for the ContentTypes.
|
static boolean |
gensupport(List<Parameter> supported,
List<Parameter> ifsupported)
This method implements the generic support consistency level only for the parameters.
|
List<Parameter> |
getContentTypeParameters()
Returns the content type parameters.
|
String |
getMimeType()
Returns the mimetype of the ContentType.
|
int |
hashCode() |
void |
setContentTypeParameters(List<Parameter> contentTypeParameters)
Sets the content type parameters.
|
void |
setMimeType(String mimeType)
Sets the mimetype of the ContentType.
|
static boolean |
support(ContentType supported,
ContentType ifsupported)
This method implements the support consistency level for the ContentTypes.
|
static boolean |
support(List<Parameter> supported,
List<Parameter> ifsupported)
This method implements the support consistency level only for the parameters.
|
static List<Parameter> |
supportAndFillUnbound(List<Parameter> supported,
List<Parameter> ifsupported)
This method fills the unbound parameters of the supported content type parameters if they are supported.
|
void |
toDOM(Element parent) |
String |
toString() |
public List<Parameter> getContentTypeParameters()
public void setContentTypeParameters(List<Parameter> contentTypeParameters)
contentTypeParameters - The content type parameters.public void addContentTypeParameters(Parameter... contentTypeParameters)
contentTypeParameters - The content type parameters.public String getMimeType()
public void setMimeType(String mimeType)
mimeType - The mimetype of the ContentType.public void fromDOM(Element contentTypeElement)
contentTypeElement - The dom element of the content type.public void toDOM(Element parent)
public boolean equals(Object obj)
equals in class Objectobj - The object to be checked.Object.equals(java.lang.Object)public static boolean support(List<Parameter> supported, List<Parameter> ifsupported)
supported - The supported parametersifsupported - The parameters to be checked.public static boolean support(ContentType supported, ContentType ifsupported)
supported - The supported ContentType.ifsupported - The ContentType to be checked.public static boolean gensupport(List<Parameter> supported, List<Parameter> ifsupported)
supported - The supported parametersifsupported - The parameters to be checked.public static boolean gensupport(ContentType supported, ContentType ifsupported)
supported - The supported ContentType.ifsupported - The ContentType to be checked.public String toString()
toString in class ObjectObject.toString()public static List<Parameter> supportAndFillUnbound(List<Parameter> supported, List<Parameter> ifsupported)
supported - The supported parametersifsupported - The parameters to be checked.public int hashCode()
hashCode in class ObjectObject.hashCode()public ContentType clone()
clone in class ObjectObject.clone()Copyright © 2014. All Rights Reserved.