Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)


Class XMLBinaryDataMapping

  extended by oracle.toplink.mappings.DatabaseMapping
      extended by
          extended by oracle.toplink.ox.mappings.XMLDirectMapping
              extended by oracle.toplink.ox.mappings.XMLBinaryDataMapping
All Implemented Interfaces:, java.lang.Cloneable, oracle.toplink.ox.mappings.XMLMapping, oracle.toplink.ox.mappings.XMLNillableMapping

public class XMLBinaryDataMapping
extends XMLDirectMapping

Purpose:Provide a mapping for binary data that can be treated as either inline or as an attachment.


XMLBinaryDataMapping represents a mapping of binary data in the object model to XML. This can either be written directly as inline binary data (base64) or passed through as an MTOM or SWAREF attachment.

The following typed are allowable to be mapped using an XMLBinaryDataMapping:

Setting the XPath: TopLink XML mappings make use of XPath statements to find the relevant data in an XML document. The XPath statement is relative to the context node specified in the descriptor. The XPath may contain path and positional information; the last node in the XPath forms the local node for the binary mapping. The XPath is specified on the mapping using the setXPath method.

Inline Binary Data: Set this flag if you want to always inline binary data for this mapping. This will disable consideration for attachment handling for this mapping.

SwaRef: Set this flag in order to specify that the target node of this mapping is of type xs:swaref

See Also:
XMLAttachmentMarshaller, XMLAttachmentUnmarshaller, MimeTypePolicy, Serialized Form

Field Summary
Fields inherited from class oracle.toplink.ox.mappings.XMLDirectMapping
Constructor Summary
Method Summary
 MimeTypePolicy getMimeTypePolicy()
 boolean isSwaRef()
 void setMimeType(java.lang.String mimeTypeString)
          Force mapping to set default FixedMimeTypePolicy using the MimeType string as argument
 void setMimeTypePolicy(MimeTypePolicy aPolicy)
          Allow implementer to set the MimeTypePolicy class FixedMimeTypePolicy or AttributeMimeTypePolicy (dynamic)
 void setShouldInlineBinaryData(boolean b)
 void setSwaRef(boolean swaRef)
 void setXPath(java.lang.String xpathString)
          Set the Mapping field name attribute to the given XPath String
 boolean shouldInlineBinaryData()
Methods inherited from class oracle.toplink.ox.mappings.XMLDirectMapping
getXPath, initialize, isCDATA, setAttributeValueInObject, setIsCDATA, setNullPolicy
Methods inherited from class
getAttributeClassification, getConverter, getFieldClassification, getFieldName, getNullValue, hasConverter, isMutable, setAttributeClassification, setConverter, setConverterClassName, setField, setFieldClassification, setFieldType, setIsMutable, setNullValue
Methods inherited from class oracle.toplink.mappings.DatabaseMapping
getAttributeAccessor, getAttributeName, getGetMethodName, getProperty, getReferenceDescriptor, getSetMethodName, isLazy, isOptional, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsLazy, setIsOptional, setIsReadOnly, setProperty, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public XMLBinaryDataMapping()
Method Detail


public boolean shouldInlineBinaryData()


public void setShouldInlineBinaryData(boolean b)


public MimeTypePolicy getMimeTypePolicy()


public void setMimeTypePolicy(MimeTypePolicy aPolicy)
Allow implementer to set the MimeTypePolicy class FixedMimeTypePolicy or AttributeMimeTypePolicy (dynamic)

aPolicy - MimeTypePolicy


public void setMimeType(java.lang.String mimeTypeString)
Force mapping to set default FixedMimeTypePolicy using the MimeType string as argument

mimeTypeString -


public boolean isSwaRef()


public void setSwaRef(boolean swaRef)


public void setXPath(java.lang.String xpathString)
Set the Mapping field name attribute to the given XPath String

setXPath in class XMLDirectMapping
xpathString - String

Copyright © 1998, 2010, Oracle. All Rights Reserved.