Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cxf.databinding
Interface DataReader<T>

Type Parameters:
  `T` - The type of the source. Each data binding defines the set of source types that it supports.

    public interface DataReader<T>

The 'read' side of the data binding abstraction of CXF. A DataReader<T> reads objects from a source of type T.

Field Summary
`static java.lang.String` | `ENDPOINT`
`static java.lang.String` | `FAULT`

Method Summary
`java.lang.Object` | `read(MessagePartInfo part, T input)` Read an object from the input, applying additional conventions based on the WSDL message part.
`java.lang.Object` | `read(javax.xml.namespace.QName elementQName, T input, java.lang.Class type)` Read an object from the input.
`java.lang.Object` | `read(T input)` Read an object from the input.
`void` | `setAttachments(java.util.Collection<Attachment> attachments)` Attach a collection of attachments to a binding.
`void` | `setProperty(java.lang.String prop, java.lang.Object value)` Set an arbitrary property on the reader.
`void` | `setSchema(javax.xml.validation.Schema s)` Supply a schema to validate the input.

Field Detail

### FAULT

    static final java.lang.String FAULT

### ENDPOINT

    static final java.lang.String ENDPOINT

Method Detail

### read

    java.lang.Object read(T input)

  Read an object from the input.

  Parameters:
    `input` - input source object.
  Returns:
    item read.

### read

    java.lang.Object read(MessagePartInfo part,
                          T input)

  Read an object from the input, applying additional conventions based on the WSDL message part.

  Parameters:
    `part` - The message part for this item. If null, this API is equivalent to `read(Object)`.
    `input` - input source object.
  Returns:
    item read.

### read

    java.lang.Object read(javax.xml.namespace.QName elementQName,
                          T input,
                          java.lang.Class type)

  Read an object from the input. In the current version of CXF, not all binding support this API, and those that do ignore the element QName parameter.

  Parameters:
    `elementQName` - expected element. Generally ignored.
    `input` - input source object.
    `type` - the type of object required/requested. This is generally used when the caller wants to receive a raw source object and avoid any binding processing. For example, passing javax.xml.transform.Source. The bindings do not necessarily throw if they cannot provide an object of the requested type, and will apply their normal mapping processing, instead.
  Returns:
    item read.

### setSchema

    void setSchema(javax.xml.validation.Schema s)

  Supply a schema to validate the input. Bindings silently ignore this parameter if they do not support schema validation, or the particular form of validation implied by a particular form of Schema.

  Parameters:
    `s` -

### setAttachments

    void setAttachments(java.util.Collection<Attachment> attachments)

  Attach a collection of attachments to a binding. This permits a binding to process the contents of one or more attachments as part of reading from this reader.

  Parameters:
    `attachments` - attachments.

### setProperty

    void setProperty(java.lang.String prop,
                     java.lang.Object value)

  Set an arbitrary property on the reader. `FAULT` and `ENDPOINT` specify two common properties: the Fault object being read and the `Endpoint`.

  Parameters:
    `prop` - Name of the property.
    `value` - Value of the property.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Apache CXF