#include <librets/MetadataForeignKey.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 | ~MetadataForeignKey () |
virtual MetadataType | GetType () const |
Always returns FOREIGN_KEY. | |
std::string | GetID () const |
Return the Foreign Key ID. | |
std::string | GetForeignKeyID () const |
Return the Foreign Key ID. | |
std::string | GetParentResourceID () const |
Return the Parent Resource ID. | |
std::string | GetParentClassID () const |
Return the Parent Class ID. | |
std::string | GetParentSystemName () const |
Return the Parent System Name. | |
std::string | GetChildResourceID () const |
Return the Child Resource ID. | |
std::string | GetChildClassID () const |
Return the Child Class ID. | |
std::string | GetChildSystemName () const |
Return the Child System Name. | |
std::string | GetConditionalParentField () const |
Return the Conditional Parent Field (RETS 1.7 and later). | |
std::string | GetConditionalParentValue () const |
Return the Conditional Parent Value (RETS 1.7 and later). | |
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 |
typedef MetadataType Type [inherited] |
enum MetadataType [inherited] |
Metadata types.
virtual ~MetadataForeignKey | ( | ) | [virtual] |
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 GetChildClassID | ( | ) | const |
Return the Child Class ID.
std::string GetChildResourceID | ( | ) | const |
Return the Child Resource ID.
std::string GetChildSystemName | ( | ) | const |
Return the Child System Name.
std::string GetConditionalParentField | ( | ) | const |
Return the Conditional Parent Field (RETS 1.7 and later).
std::string GetConditionalParentValue | ( | ) | const |
Return the Conditional Parent Value (RETS 1.7 and later).
std::string GetForeignKeyID | ( | ) | const |
Return the Foreign Key ID.
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.
Reimplemented in MetadataClass, MetadataEditMask, MetadataLookup, MetadataLookupType, MetadataObject, MetadataResource, MetadataSearchHelp, MetadataTable, MetadataUpdate, and MetadataUpdateHelp.
Referenced by MetadataElementIdEqual::operator()().
std::string GetID | ( | ) | const |
Return the Foreign Key ID.
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 GetParentClassID | ( | ) | const |
Return the Parent Class ID.
std::string GetParentResourceID | ( | ) | const |
Return the Parent Resource ID.
std::string GetParentSystemName | ( | ) | const |
Return the Parent System Name.
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] |
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] |