ObjectDescriptor Class Reference

An ObjectDescriptor represents a single object retrieved from a GetObject transaction. More...

#include <librets/ObjectDescriptor.h>

Inheritance diagram for ObjectDescriptor:

RetsObject

List of all members.

Public Member Functions

 ObjectDescriptor ()
 Default constructor.
std::string GetObjectKey () const
 Returns the object key for this object.
void SetObjectKey (std::string objectKey)
 Sets the object key for this object.
int GetObjectId () const
 Returns the object ID for this object.
void SetObjectId (int objectId)
 Sets the object ID for this object.
std::string GetDescription () const
 Returns the description of this object.
void SetDescription (std::string description)
 Sets the description of this object.
std::string GetLocationUrl () const
 Returns the location URL for this object.
void SetLocationUrl (std::string locationUrl)
 Sets the location URL for this object.
std::string GetContentType () const
 Returns the MIME content type of this object, for example, "image/jpeg".
void SetContentType (std::string contentType)
 Sets the MIME content type of this object.
istreamPtr GetDataStream ()
 Returns an input stream to the object data.
void SetDataStream (istreamPtr dataStream)
 Sets the input stream to the object data.
BinaryDataAPtr GetData ()
 Returns all the object data as a class by reading the input stream until EOF is reached.
int GetRetsReplyCode () const
 Returns an integer representing the RETS Response Code for this object.
void SetRetsReplyCode (int retsResponse)
 Sets the RETS Response Code for this object.
std::string GetRetsReplyText () const
 Returns a string representing the RETS Reply Text.
void SetRetsReplyText (std::string replyText)
 Sets the RETS Reply Text.
bool GetWildIndicator () const
 Returns a boolean indicating whether or not the original object ID was an asterisk.
void SetWildIndicator (bool wild)
 Indicates that the Object ID was originally "*";.
virtual std::ostream & Print (std::ostream &outputStream) const
std::string ToString () const
virtual bool Equals (const RetsObject *object) const


Detailed Description

An ObjectDescriptor represents a single object retrieved from a GetObject transaction.

Constructor & Destructor Documentation

Default constructor.


Member Function Documentation

virtual bool Equals ( const RetsObject object  )  const [virtual, inherited]

std::string GetContentType (  )  const

Returns the MIME content type of this object, for example, "image/jpeg".

Returns:
the MIME content type of this object.

BinaryDataAPtr GetData (  ) 

Returns all the object data as a class by reading the input stream until EOF is reached.

The returned object is not owned by the ObjectDescriptor and must be deleted after use. This method is not of much use to native C++ users, but aids in providing wrappers to other language bindings.

Returns:
All the object data

istreamPtr GetDataStream (  ) 

Returns an input stream to the object data.

This object is owned by this ObjectDescriptor and does not need to be deleted.

Returns:
An input stream to the object data

std::string GetDescription (  )  const

Returns the description of this object.

If no description was provided by the server, an empty string will be returned.

Returns:
The description of this object

std::string GetLocationUrl (  )  const

Returns the location URL for this object.

This returns a non-empty string if and only if location URLs were requested and the server provides location URLs. A server is not requered to provide location URLs, even if it was requested.

Returns:
the location URL for this object

int GetObjectId (  )  const

Returns the object ID for this object.

Returns:
The object ID for this object

std::string GetObjectKey (  )  const

Returns the object key for this object.

It should match one of the resource entities in the request.

Returns:
The object key for this object

int GetRetsReplyCode (  )  const

Returns an integer representing the RETS Response Code for this object.

Returns:
An integer containing the RETS Response Code.

std::string GetRetsReplyText (  )  const

Returns a string representing the RETS Reply Text.

Returns:
A string containing the RETS Reply Text.

bool GetWildIndicator (  )  const

Returns a boolean indicating whether or not the original object ID was an asterisk.

virtual std::ostream& Print ( std::ostream &  outputStream  )  const [virtual, inherited]

void SetContentType ( std::string  contentType  ) 

Sets the MIME content type of this object.

Parameters:
contentType A MIME content type

void SetDataStream ( istreamPtr  dataStream  ) 

Sets the input stream to the object data.

Parameters:
dataStream A shared pointer to an input stream

void SetDescription ( std::string  description  ) 

Sets the description of this object.

Parameters:
description A description

void SetLocationUrl ( std::string  locationUrl  ) 

Sets the location URL for this object.

Parameters:
locationUrl A location URL

void SetObjectId ( int  objectId  ) 

Sets the object ID for this object.

Parameters:
objectId An object ID

void SetObjectKey ( std::string  objectKey  ) 

Sets the object key for this object.

Parameters:
objectKey An object key

void SetRetsReplyCode ( int  retsResponse  ) 

Sets the RETS Response Code for this object.

Parameters:
retsResponse The RETS Response Code.

void SetRetsReplyText ( std::string  replyText  ) 

Sets the RETS Reply Text.

Parameters:
replyText The RETS Reply Text.

void SetWildIndicator ( bool  wild  ) 

Indicates that the Object ID was originally "*";.

Returns:
A boolean indicating whether the original object id was an asterisk.

std::string ToString (  )  const [inherited]


Generated by  doxygen