ResultElementBLOBGeneric
Date: 2013-03-24

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

## org.gcube.common.searchservice.searchlibrary.resultset.elements
Class ResultElementBLOBGeneric

    java.lang.Object
      org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase
          org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBLOBBase
              org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBLOBGeneric

    public class ResultElementBLOBGeneric

extends ResultElementBLOBBase

This class acts as a generic placeholder for the records that can be inserted and extracted from the `ResultSet` payload parts

Author:
  UoA

Field Summary
`static java.lang.String` | `RECORD_COLLECTION_NAME` The name of the collection attribute holding the collection value
`static java.lang.String` | `RECORD_ID_NAME` The name of the id attribute holding the identifier value

Constructor Summary
`ResultElementBLOBGeneric()` Default contructor nessecary for the framework
`ResultElementBLOBGeneric(java.lang.String id, java.lang.String collection, java.lang.String payload, java.io.InputStream content)` Creates a new `ResultElementBLOBGeneric`

Method Summary
`void` | `close()` closes underlying structures, streams
`void` | `fromXML(java.lang.String xml)` This method must be able to reconstruct the result elelement from a xml string as returned by `ResultElementBase.toXML()`
`java.io.InputStream` | `getContentOfBLOB()` Retrieves the blob content
`java.lang.String` | `getPayload()` Retrieves the payload
`void` | `setContentOfBLOB(java.io.InputStream content)` sets the blob content
`java.lang.String` | `toXML()` This method must return a valid xml serialization of the result record payload.

Methods inherited from class org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase
`getRecordAttributes, getRecordAttributes, isValid, RS_fromXML, RS_toXML, setRecordAttributes`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RECORD_ID_NAME

    public static final java.lang.String RECORD_ID_NAME

  The name of the id attribute holding the identifier value

  See Also:
    Constant Field Values

### RECORD_COLLECTION_NAME

    public static final java.lang.String RECORD_COLLECTION_NAME

  The name of the collection attribute holding the collection value

  See Also:
    Constant Field Values

Constructor Detail

### ResultElementBLOBGeneric

    public ResultElementBLOBGeneric()

  Default contructor nessecary for the framework

### ResultElementBLOBGeneric

    public ResultElementBLOBGeneric(java.lang.String id,
                                    java.lang.String collection,
                                    java.lang.String payload,
                                    java.io.InputStream content)
                             throws java.lang.Exception

  Creates a new `ResultElementBLOBGeneric`

  Parameters:
    `id` - The value of the id. This cannot be null or an empty string
    `collection` - The collection this id belongs to. This cannot be null or an empty string
    `payload` - The payload of the record
    `content` - the content of the blob
  Throws:
    `java.lang.Exception` - The `ResultElementBLOBGeneric` could not be created

Method Detail

### getPayload

    public java.lang.String getPayload()

  Retrieves the payload

  Returns:
    The payload

### close

    public void close()
               throws java.lang.Exception

  Description copied from class: `ResultElementBLOBBase`
  closes underlying structures, streams

  Specified by:
    `close` in class `ResultElementBLOBBase`
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error occured
  See Also:
    `ResultElementBLOBBase.close()`

### setContentOfBLOB

    public void setContentOfBLOB(java.io.InputStream content)
                          throws java.lang.Exception

  Description copied from class: `ResultElementBLOBBase`
  sets the blob content

  Specified by:
    `setContentOfBLOB` in class `ResultElementBLOBBase`
  Parameters:
    `content` - sets the content of the blob
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error occured
  See Also:
    `ResultElementBLOBBase.setContentOfBLOB(java.io.InputStream)`

### getContentOfBLOB

    public java.io.InputStream getContentOfBLOB()
                                         throws java.lang.Exception

  Description copied from class: `ResultElementBLOBBase`
  Retrieves the blob content

  Specified by:
    `getContentOfBLOB` in class `ResultElementBLOBBase`
  Returns:
    the content of the blob
  Throws:
    `java.lang.Exception` - An uinrecoverablee for the operation error occured
  See Also:
    `ResultElementBLOBBase.getContentOfBLOB()`

### toXML

    public java.lang.String toXML()
                           throws java.lang.Exception

  Description copied from class: `ResultElementBase`
  This method must return a valid xml serialization of the result record payload.

  Specified by:
    `toXML` in class `ResultElementBase`
  Returns:
    The serialized record payload
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error occured
  See Also:
    `ResultElementBase.toXML()`

### fromXML

    public void fromXML(java.lang.String xml)
                 throws java.lang.Exception

  Description copied from class: `ResultElementBase`
  This method must be able to reconstruct the result elelement from a xml string as returned by `ResultElementBase.toXML()`

  Specified by:
    `fromXML` in class `ResultElementBase`
  Parameters:
    `xml` - The serialized string to populate the insance from
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error occured
  See Also:
    `ResultElementBase.fromXML(java.lang.String)`

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