#include <DataDescriptor.h>

Public Member Functions | |
| virtual const std::string & | getName () const =0 |
| virtual const std::string & | getType () const =0 |
| virtual DataElement * | getParent () const =0 |
| virtual std::vector< std::string > | getParentDesignator () const =0 |
| virtual void | setClassification (const Classification *pClassification)=0 |
| virtual Classification * | getClassification ()=0 |
| virtual const Classification * | getClassification () const =0 |
| virtual void | setMetadata (const DynamicObject *pMetadata)=0 |
| virtual DynamicObject * | getMetadata ()=0 |
| virtual const DynamicObject * | getMetadata () const =0 |
| virtual void | setProcessingLocation (ProcessingLocation processingLocation)=0 |
| virtual ProcessingLocation | getProcessingLocation () const =0 |
| virtual void | setFileDescriptor (const FileDescriptor *pFileDescriptor)=0 |
| virtual FileDescriptor * | getFileDescriptor ()=0 |
| virtual const FileDescriptor * | getFileDescriptor () const =0 |
| virtual DataDescriptor * | copy () const =0 |
| virtual DataDescriptor * | copy (const std::string &name, DataElement *pParent) const =0 |
| virtual DataDescriptor * | copy (const std::string &name, const std::vector< std::string > &parent) const =0 |
| virtual bool | clone (const DataDescriptor *pDescriptor)=0 |
| virtual void | addToMessageLog (Message *pMessage) const =0 |
Static Public Member Functions | |
| static const std::string & | signalRenamed () |
| static const std::string & | signalParentChanged () |
| static const std::string & | signalProcessingLocationChanged () |
Protected Member Functions | |
| virtual | ~DataDescriptor () |
A data descriptor contains all ancillary data for a DataElement that is not part of the raw data. ModelServices stores elements based on a key that is comprised of a name, type, and parent element, which are all stored here. For this reason, the data descriptor must be created by calling ModelServices::createDataDescriptor() passing in the name, type, and parent element.
After the data descriptor is created the name, type, and parent element cannot be set directly on the data descriptor object to preserve the integrity of the identifying key in ModelServices. After the data descriptor is created call ModelServices::setElementName() to change the name and ModelServices::setElementParent() to change the parent.
The data descriptor also contains the element classification and metadata, a processing location value that indicates how the data was imported and where it is accessed, and a FileDescriptor indicating how the data is stored in a file on disk.
The file descriptor is intended to indicate how a data element was imported and therefore is typically set only by importers and not as a result of creating a new data element or exporting an existing data element. The file descriptor is owned by the data descriptor class.
This subclass of Subject will notify upon the following conditions:
Definition at line 61 of file DataDescriptor.h.
| virtual DataDescriptor::~DataDescriptor | ( | ) | [protected, virtual] |
This should be destroyed by calling ModelServices::destroyDataDescriptor.
Definition at line 445 of file DataDescriptor.h.
| static const std::string& DataDescriptor::signalRenamed | ( | ) | [static] |
Emitted when the descriptor name changes with boost::any<std::string> containing the new name.
Definition at line 68 of file DataDescriptor.h.
| static const std::string& DataDescriptor::signalParentChanged | ( | ) | [static] |
Emitted when the parent data element changes with boost::any<DataElement*> containing a pointer to the new parent element.
Definition at line 75 of file DataDescriptor.h.
| static const std::string& DataDescriptor::signalProcessingLocationChanged | ( | ) | [static] |
Emitted when the processing location changes with boost::any<ProcessingLocation> containing the new processing location.
Definition at line 84 of file DataDescriptor.h.
| virtual const std::string& DataDescriptor::getName | ( | ) | const [pure virtual] |
Returns the name for the data.
This method returns the name that is used along with the type and parent element to uniquely identify a DataElement in ModelServices. To set the name after the data descriptor is created, call ModelServices::setElementName().
| virtual const std::string& DataDescriptor::getType | ( | ) | const [pure virtual] |
Returns the type of the data.
The type is used by ModelServices to determine the kind of element to create and is used along with the name and parent element to uniquely identify a DataElement. This method returns the type that was specified in ModelServices::createDataDescriptor().
| virtual DataElement* DataDescriptor::getParent | ( | ) | const [pure virtual] |
Returns the parent element.
The parent element is typically the data set to which the element is associated. This method returns the parent element that is used along with the name and type to uniquely identify a DataElement in ModelServices. To set the parent after the data descriptor is created, call ModelServices::setElementParent().
| virtual std::vector<std::string> DataDescriptor::getParentDesignator | ( | ) | const [pure virtual] |
Returns the parent element designator.
The parent element designator is a vector of strings such that the first string is the name of a top level element, the second is the name of a child of that element, and so on. This designator identifies the parent element.
| virtual void DataDescriptor::setClassification | ( | const Classification * | pClassification | ) | [pure virtual] |
Sets the element's classification object.
The classification object documents how the data in element is to be handled and/or restricted.
This method performs a deep copy of the given classification object, so it is the responsibility of the calling object to delete the classification object when necessary.
| pClassification | The classification for the element. A deep copy is performed so it is the responsibility of the calling object to delete the given classifcation object when necessary. This method does nothing if NULL is passed in. |
| virtual Classification* DataDescriptor::getClassification | ( | ) | [pure virtual] |
Returns access to the element's classification object.
The classification object documents how the data in element is to be handled and/or restricted.
| virtual const Classification* DataDescriptor::getClassification | ( | ) | const [pure virtual] |
Returns read-only access to the element's classification object.
The classification object documents how the data in element is to be handled and/or restricted.
| virtual void DataDescriptor::setMetadata | ( | const DynamicObject * | pMetadata | ) | [pure virtual] |
Sets the element's metadata.
This method performs a deep copy of the given metadata dynamic object, so it is the responsibility of the calling object to delete the metadata object when necessary.
| pMetadata | The element metadata. Passing in NULL will clear all existing metadata. A deep copy is performed so it is the responsibility of the calling object to delete the given metadata object when necessary. |
| virtual DynamicObject* DataDescriptor::getMetadata | ( | ) | [pure virtual] |
Returns a pointer to the element's metadata values.
Please see Special Metadata for details on special entries in the metadata that the application will attempt to use.
| virtual const DynamicObject* DataDescriptor::getMetadata | ( | ) | const [pure virtual] |
Returns read-only access to the element's metadata values.
Please see Special Metadata for details on special entries in the metadata that the application will attempt to use.
| virtual void DataDescriptor::setProcessingLocation | ( | ProcessingLocation | processingLocation | ) | [pure virtual] |
Specifies the location from where the element data will be accessed.
The processing location specifies how the element data should imported and how it will be accessed after importing. This allows for processing large data sets that cannot be loaded entirely into memory. The default location is IN_MEMORY.
| processingLocation | The processing location for the element data. |
| virtual ProcessingLocation DataDescriptor::getProcessingLocation | ( | ) | const [pure virtual] |
Returns the location for where the element data is processed.
| virtual void DataDescriptor::setFileDescriptor | ( | const FileDescriptor * | pFileDescriptor | ) | [pure virtual] |
Sets a file descriptor to indicate how the data is stored on disk.
By default, the data descriptor contains a NULL file descriptor, which indicates that the data element was not created as a result of an import. By calling this method with a non-NULL value, the data element is marked as having a corresponding file on disk from which the data was imported.
The file descriptor is intended to indicate how a data element was imported and therefore this method should typically be called only by importers and not as a result of creating a new data element or exporting an existing data element.
This method performs a deep copy of the given file descriptor, so it is the responsibility of the calling object to delete the file descriptor when necessary.
| pFileDescriptor | The file descriptor describing how the data is stored on disk. A deep copy is performed so the calling object is responsible for deleting the given file descriptor when necessary. Passing in NULL indicates that the data element was not created as a result of an import. |
| virtual FileDescriptor* DataDescriptor::getFileDescriptor | ( | ) | [pure virtual] |
Returns the file descriptor indicating how the data is stored on disk.
| virtual const FileDescriptor* DataDescriptor::getFileDescriptor | ( | ) | const [pure virtual] |
Returns read-only access to the file descriptor indicating how the data is stored on disk.
| virtual DataDescriptor* DataDescriptor::copy | ( | ) | const [pure virtual] |
Creates a duplicate data descriptor based on this data descriptor.
This is typically used to deep copy a data descriptor when a non-shared copy is required. If the data element for this data descriptor already exists, the created data descriptor should not be used to create a new data element as the element already exists.
NULL if there was an error. The returned data descriptor contains the same classification settings as this data descriptor.| virtual DataDescriptor* DataDescriptor::copy | ( | const std::string & | name, | |
| DataElement * | pParent | |||
| ) | const [pure virtual] |
Creates a new data descriptor based on this data descriptor.
This method creates a new data descriptor by calling ModelServices::createDataDescriptor() and sets the values of the created descriptor to this object's values. Because ModelServices uses the name and parent element as unique identifiers, a new name and/or parent should be passed into this method for the call to ModelServices::createDataDescriptor() to succeed. The type of this descriptor is used as the type for the new descriptor.
| name | The name for the new element that would be created with the returned data descriptor. | |
| pParent | The parent element for the new element that would be created with the returned data descriptor. |
| virtual DataDescriptor* DataDescriptor::copy | ( | const std::string & | name, | |
| const std::vector< std::string > & | parent | |||
| ) | const [pure virtual] |
Creates a new data descriptor based on this data descriptor.
This method creates a new data descriptor by calling ModelServices::createDataDescriptor() and sets the values of the created descriptor to this object's values. Because ModelServices uses the name and parent element as unique identifiers, a new name and/or parent designator should be passed into this method for the call to ModelServices::createDataDescriptor() to succeed. The type of this descriptor is used as the type for the new descriptor.
| name | The name for the new element that would be created with the returned data descriptor. | |
| parent | The designator that identifies the parent element for the created data descriptor. The designator is a vector of element names such that the first name is a top level element, the second name is a child of that element, and so on. |
| virtual bool DataDescriptor::clone | ( | const DataDescriptor * | pDescriptor | ) | [pure virtual] |
Sets all values in this data descriptor to those of another data descriptor.
| pDescriptor | The data descriptor from which to set all data values in this data descriptor. No signal/slot attachments currently defined in pDescriptor are set into this descriptor. This method does nothing and returns false if NULL is passed in. |
true if all values in this data descriptor were successfully set to the values in the given data descriptor; otherwise returns false. Returns false if the type of the given data descriptor does not match the type of this data descriptor.| virtual void DataDescriptor::addToMessageLog | ( | Message * | pMessage | ) | const [pure virtual] |
Adds the current values in this data descriptor to a given message.
This convenience method adds the values in this data descriptor as properties to the given message in a message log.
| pMessage | The message in the message log for which to add this data descriptor's values. |