MetadataValidationLookup Class Reference

MetadataValidationLookup is an implementation of MetadataElement that represents Validation Lookup metadata. More...

#include <librets/MetadataValidationLookup.h>

Inheritance diagram for MetadataValidationLookup:

MetadataElement RetsObject

List of all members.

Public Types

enum  MetadataType {
  SYSTEM, RESOURCE, CLASS, TABLE,
  UPDATE, UPDATE_TYPE, OBJECT, SEARCH_HELP,
  EDIT_MASK, LOOKUP, LOOKUP_TYPE, UPDATE_HELP,
  VALIDATION_LOOKUP, VALIDATION_LOOKUP_TYPE, VALIDATION_EXTERNAL, VALIDATION_EXTERNAL_TYPE,
  VALIDATION_EXPRESSION, FOREIGN_KEY
}
 Metadata types. More...
typedef MetadataType Type

Public Member Functions

virtual MetadataType GetType () const
 Always returns VALIDATION_LOOKUP.
MetadataValidationLookupTypeListPtr GetValidationLookupTypes () const
 Returns all validation lookup types.
StringVector GetAttributeNames () const
 Returns all attirbute names.
std::string GetStringAttribute (std::string attributeName, std::string defaultValue="") const
 Returns the value of an attribute.
int GetIntAttribute (std::string attributeName, int defaultValue=0) const
 Returns the value of an attribute as an integer.
bool GetBoolAttribute (std::string attributeName, bool defaultValue=false) const
 Returns the value of an attribute as a boolean.
void SetAttribute (std::string attributeName, std::string attributeValue)
 Set the value of an attribute.
virtual std::string GetId () const
 Returns the ID attribute.
std::string GetLevel () const
 Returns the level of the current metadata element.
void SetLevel (std::string level)
 Set the level for the current metadata element.
std::string GetPath () const
 Returns the path of this element.
std::string GetMetadataEntryID () const
 Returns the MetadataEntryId for the element.
virtual std::ostream & Print (std::ostream &outputStream) const
 Prints the attribute in a standard form for debugging and error reporting.
std::string ToString () const
virtual bool Equals (const RetsObject *object) const

Protected Attributes

StringMap mAttributes
std::string mLevel


Detailed Description

MetadataValidationLookup is an implementation of MetadataElement that represents Validation Lookup metadata.

Member Typedef Documentation

typedef MetadataType Type [inherited]


Member Enumeration Documentation

enum MetadataType [inherited]

Metadata types.

Enumerator:
SYSTEM  System metadata.

RESOURCE  Resource metadata.

CLASS  Class metadata.

TABLE  Table metadata.

UPDATE  Update metadata.

UPDATE_TYPE  Update type metadata.

OBJECT  Object metadata.

SEARCH_HELP  Search help metadata.

EDIT_MASK  Edit mask metadata.

LOOKUP  Lookup metadata.

LOOKUP_TYPE  Lookup type metadata.

UPDATE_HELP  Update help metadata.

VALIDATION_LOOKUP  Validation lookup metadata.

VALIDATION_LOOKUP_TYPE  Validation lookup type metadata.

VALIDATION_EXTERNAL  Validation external metadata.

VALIDATION_EXTERNAL_TYPE  Validation external type metadata.

VALIDATION_EXPRESSION  Validation expression metadata.

FOREIGN_KEY  Foreign key metadata.


Member Function Documentation

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

StringVector GetAttributeNames (  )  const [inherited]

Returns all attirbute names.

Returns:
all attribute names

bool GetBoolAttribute ( std::string  attributeName,
bool  defaultValue = false 
) const [inherited]

Returns the value of an attribute as a boolean.

Parameters:
attributeName A string containing the name of the attribute.
defaultValue The value to use if the attribute does not exist.
Returns:
The value of the attribute as a boolean.

virtual std::string GetId (  )  const [virtual, inherited]

Returns the ID attribute.

The ID attribute is a non-empty and unique field used to identify this element within the scope of elements of the same type. Not all metadata elements have an identifying attribute. In these cases, an empty string is returned. The default implementation returns an empty string. Subclasses should override as needed.

Returns:
the ID attribute, if there is one

Reimplemented in MetadataClass, MetadataEditMask, MetadataLookup, MetadataLookupType, MetadataObject, MetadataResource, MetadataSearchHelp, MetadataTable, MetadataUpdate, and MetadataUpdateHelp.

Referenced by MetadataElementIdEqual::operator()().

int GetIntAttribute ( std::string  attributeName,
int  defaultValue = 0 
) const [inherited]

Returns the value of an attribute as an integer.

Parameters:
attributeName A string containing the name of the attribute.
defaultValue The value to use if the attribute does not exist.
Returns:
The value of the attribute as an integer.

std::string GetLevel (  )  const [inherited]

Returns the level of the current metadata element.

Returns:
A string containing the level.

std::string GetMetadataEntryID (  )  const [inherited]

Returns the MetadataEntryId for the element.

Returns:
MetadataEntryId

std::string GetPath (  )  const [inherited]

Returns the path of this element.

The path uniquely identifies this metadata element amongst all elements of the same type. Since this relies on the ID attribute, only those elements with an ID attribute have a non-empty path.

Returns:
the unique path

std::string GetStringAttribute ( std::string  attributeName,
std::string  defaultValue = "" 
) const [inherited]

Returns the value of an attribute.

Parameters:
attributeName A string containing the name of the attribute.
defaultValue The value to use if the attribute does not exist.
Returns:
The value of the attribute as a string.

virtual MetadataType GetType (  )  const [virtual]

Always returns VALIDATION_LOOKUP.

Returns:
VALIDATION_LOOKUP

Implements MetadataElement.

MetadataValidationLookupTypeListPtr GetValidationLookupTypes (  )  const

Returns all validation lookup types.

Returns:
All validation lookup types

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

Prints the attribute in a standard form for debugging and error reporting.

Reimplemented from RetsObject.

void SetAttribute ( std::string  attributeName,
std::string  attributeValue 
) [inherited]

Set the value of an attribute.

Parameters:
attributeName A string containing the name of the attribute.
attributeValue A string containing the value of the attribute.

void SetLevel ( std::string  level  )  [inherited]

Set the level for the current metadata element.

Parameters:
level A string containing the level.

std::string ToString (  )  const [inherited]


Member Data Documentation

StringMap mAttributes [protected, inherited]

std::string mLevel [protected, inherited]


Generated by  doxygen