Class FixedMimeTypePolicy
- java.lang.Object
-
- org.eclipse.persistence.oxm.mappings.FixedMimeTypePolicy
-
- All Implemented Interfaces:
org.eclipse.persistence.internal.oxm.mappings.MimeTypePolicy
,MimeTypePolicy
public class FixedMimeTypePolicy extends Object implements MimeTypePolicy
-
-
Constructor Summary
Constructors Constructor Description FixedMimeTypePolicy()
FixedMimeTypePolicy(String aMimeTypeParameter)
FixedMimeTypePolicy(String aMimeTypeParameter, DatabaseMapping mapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMimeType()
Return the default mime type for this policy.String
getMimeType(Object anObject)
The mime type will be obtained from the objects field/property that is mapped to the XML attribute with name "contentType" and namespace URI "http://www.w3.org/2005/05/xmlmime".void
setMimeType(String aString)
Set the default mime type for this policy.
-
-
-
Constructor Detail
-
FixedMimeTypePolicy
public FixedMimeTypePolicy()
-
FixedMimeTypePolicy
public FixedMimeTypePolicy(String aMimeTypeParameter)
-
FixedMimeTypePolicy
public FixedMimeTypePolicy(String aMimeTypeParameter, DatabaseMapping mapping)
-
-
Method Detail
-
getMimeType
public String getMimeType(Object anObject)
The mime type will be obtained from the objects field/property that is mapped to the XML attribute with name "contentType" and namespace URI "http://www.w3.org/2005/05/xmlmime". If this is not set/present then the fixed value will be returned.- Specified by:
getMimeType
in interfaceorg.eclipse.persistence.internal.oxm.mappings.MimeTypePolicy
- Specified by:
getMimeType
in interfaceMimeTypePolicy
- Parameters:
anObject
- - fixed non-dynamic implementors will ignore this parameter- Returns:
- String
-
getMimeType
public String getMimeType()
Return the default mime type for this policy. This mime type will be returned if there is no field/property with a value mapped to an XML attribute with name "contentType" and URI "http://www.w3.org/2005/05/xmlmime".
-
setMimeType
public void setMimeType(String aString)
Set the default mime type for this policy. This mime type will be returned if there is no field/property with a value mapped to an XML attribute with name "contentType" and URI "http://www.w3.org/2005/05/xmlmime".
-
-