EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.oxm.mappings
Class FixedMimeTypePolicy

java.lang.Object
  extended by org.eclipse.persistence.oxm.mappings.FixedMimeTypePolicy
All Implemented Interfaces:
MimeTypePolicy

public class FixedMimeTypePolicy
extends java.lang.Object
implements MimeTypePolicy


Constructor Summary
FixedMimeTypePolicy()
           
FixedMimeTypePolicy(java.lang.String aMimeTypeParameter)
           
FixedMimeTypePolicy(java.lang.String aMimeTypeParameter, DatabaseMapping mapping)
           
 
Method Summary
 java.lang.String getMimeType()
          Return the default mime type for this policy.
 java.lang.String getMimeType(java.lang.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(java.lang.String aString)
          Set the default mime type for this policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedMimeTypePolicy

public FixedMimeTypePolicy()

FixedMimeTypePolicy

public FixedMimeTypePolicy(java.lang.String aMimeTypeParameter)

FixedMimeTypePolicy

public FixedMimeTypePolicy(java.lang.String aMimeTypeParameter,
                           DatabaseMapping mapping)
Method Detail

getMimeType

public java.lang.String getMimeType(java.lang.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 interface MimeTypePolicy
Parameters:
anObject - - fixed non-dynamic implementors will ignore this parameter
Returns:
String

getMimeType

public java.lang.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(java.lang.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".


EclipseLink 2.4.2, build 'v20130514-5956486' API Reference