#include <librets/MetadataObject.h>
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 OBJECT. | |
virtual std::string | GetId () const |
Returns the ID attribute. | |
std::string | GetObjectType () const |
Return the type of the object. | |
std::string | GetMIMEType () const |
Return the MIME type of the object. | |
std::string | GetVisibleName () const |
Return the Visible Name of the object. | |
std::string | GetDescription () const |
Return the Description of the object. | |
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. | |
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 |
typedef MetadataType Type [inherited] |
enum MetadataType [inherited] |
Metadata types.
virtual bool Equals | ( | const RetsObject * | object | ) | const [virtual, inherited] |
StringVector GetAttributeNames | ( | ) | const [inherited] |
Returns all attirbute names.
bool GetBoolAttribute | ( | std::string | attributeName, | |
bool | defaultValue = false | |||
) | const [inherited] |
Returns the value of an attribute as a boolean.
attributeName | A string containing the name of the attribute. | |
defaultValue | The value to use if the attribute does not exist. |
std::string GetDescription | ( | ) | const |
Return the Description of the object.
virtual std::string GetId | ( | ) | const [virtual] |
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.
Reimplemented from MetadataElement.
int GetIntAttribute | ( | std::string | attributeName, | |
int | defaultValue = 0 | |||
) | const [inherited] |
Returns the value of an attribute as an integer.
attributeName | A string containing the name of the attribute. | |
defaultValue | The value to use if the attribute does not exist. |
std::string GetLevel | ( | ) | const [inherited] |
Returns the level of the current metadata element.
std::string GetMetadataEntryID | ( | ) | const [inherited] |
Returns the MetadataEntryId for the element.
std::string GetMIMEType | ( | ) | const |
Return the MIME type of the object.
std::string GetObjectType | ( | ) | const |
Return the type of the object.
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.
std::string GetStringAttribute | ( | std::string | attributeName, | |
std::string | defaultValue = "" | |||
) | const [inherited] |
Returns the value of an attribute.
attributeName | A string containing the name of the attribute. | |
defaultValue | The value to use if the attribute does not exist. |
virtual MetadataType GetType | ( | ) | const [virtual] |
std::string GetVisibleName | ( | ) | const |
Return the Visible Name of the object.
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.
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.
level | A string containing the level. |
std::string ToString | ( | ) | const [inherited] |
StringMap mAttributes [protected, inherited] |
std::string mLevel [protected, inherited] |