Inherited by MXADataModel.
Inheritance diagram for IDataModel:
Public Member Functions | |
MXA_SHARED_POINTERS (IDataModel) | |
IDataModel () | |
virtual | ~IDataModel () |
virtual float | getModelVersion ()=0 |
Returns the MXA File version that the model adheres to. | |
virtual void | setModelVersion (float version)=0 |
Sets the File Version of the MXA data file. | |
virtual std::string | getModelType ()=0 |
Returns the type of file, should be MHD or MXA. | |
virtual void | setModelType (const std::string &fileType)=0 |
Returns the file type for the MXA Data File. | |
virtual void | setDefaultTypeAndVersion ()=0 |
This will set the default model version and type. | |
virtual void | setDataRoot (const std::string &dataRoot)=0 |
Sets the Data Root Value. | |
virtual std::string | getDataRoot ()=0 |
Returns the Data Root from the model. | |
virtual void | addDataDimension (IDataDimension::Pointer dimension)=0 |
Adds a Data Dimension to the data model. | |
virtual IDataDimension::Pointer | addDataDimension (std::string name, std::string altName, int32 count, int32 startValue, int32 endValue, int32 increment, int32 uniform)=0 |
Adds a Data Dimension by declaring all the values of the data dimension. | |
virtual int32 | insertDataDimension (IDataDimension::Pointer dimension, int32 index)=0 |
Inserts a Data Dimension at a given index position. If Needed the internal data structure holding the Data Dimenions will be expanded. | |
virtual void | squeezeDataDimensions ()=0 |
This method will remove any NULL Data Dimensions from the internal data structure that holds the list of Data Dimensions. | |
virtual int32 | removeDataDimension (int32 index)=0 |
Removes a Data dimension using the index of the dimension. | |
virtual int32 | moveDataDimension (int32 fromIndex, int32 toIndex)=0 |
moves the data dimension at index 'fromIndex' to another index 'newIndex'. | |
virtual int32 | swapDataDimensions (int32 index1, int32 index2)=0 |
Swaps a pair of Data Dimensions in the index list. | |
virtual IDataDimension::Container & | getDataDimensions ()=0 |
Returns the data dimensions of the Model in a std::vector. | |
virtual IDataDimension::Pointer | getDataDimension (int32 index)=0 |
Returns a specific Data Dimension from the model. | |
virtual IDataDimension::Pointer | getDataDimension (std::string dimName)=0 |
Returns a specific Data Dimension from the model. Technically Data dimensions could have the same names as Data Dimensions are only differentiated by index. This will return the FIRST occurance of a Data Dimension with the given name. | |
virtual int32 | getNumberOfDataDimensions ()=0 |
Returns the number of data dimensions in the model. | |
virtual void | addDataRecord (IDataRecord::Pointer record)=0 |
Adds a data Record to the model. | |
virtual void | addDataRecord (IDataRecord::Pointer record, IDataRecord::Pointer parent)=0 |
Adds a Data record to the model using the given parent argument as the record's parent object. | |
virtual int32 | removeDataRecord (IDataRecord::Pointer record)=0 |
Removes the Data Record from the Model. | |
virtual IDataRecord::Container & | getDataRecords ()=0 |
Returns the Data Records from the model. The natural form of the records is in a Tree structure. | |
virtual IDataRecord::Pointer | getDataRecordByNamedPath (const std::string &path, IDataRecord *parent=NULL)=0 |
Returns a Data Record that is found by giving the full path using the "RecordName" of the data record(s). | |
virtual IDataRecord::Pointer | getDataRecordByInternalPath (const std::string &path, IDataRecord *parent=NULL)=0 |
Returns a Data Record that is found by giving the full path using the internal names of the data record(s). Internal names are given by the LUID value of each data record. | |
virtual MXATypes::MXAError | setRequiredMetaData (std::string researcherName, std::string dateCreated, std::string datasetName, std::string description, std::string distributionRights, std::string releaseNumber, std::string pedigree, std::string derivedSrcFile)=0 |
Sets the Required Meta Data for the Data Model. | |
virtual MXATypes::MXAError | setRequiredMetaData (std::map< std::string, std::string > &metadata)=0 |
Sets the required meta data using a std::map of keys/values. | |
virtual int32 | setRequiredMetaData (IRequiredMetaData::Pointer metaData)=0 |
Sets the required meta data. | |
virtual IRequiredMetaData::Pointer | getRequiredMetaData ()=0 |
Returns the meta data for the data model. | |
virtual void | setUserMetaData (MXAAbstractAttributes &attributes)=0 |
Sets all the user defined meta data for this model. Any previously defined meta data will be erased. | |
virtual MXAAbstractAttributes | getUserMetaData ()=0 |
Returns the Data Structure used to hold the user defined Meta Data. | |
virtual void | addUserMetaData (const std::string &key, IMXAArray::Pointer umd)=0 |
Adds User defined Meta data to the model. | |
virtual void | removeUserMetaData (const std::string &key)=0 |
Removes specific user meta-data entry. | |
virtual IMXAArray::Pointer | getUserMetaData (const std::string &key)=0 |
Returns a specific User meta data item. | |
virtual void | printUserMetaData (std::ostream &os, int32 indent)=0 |
Prints the user meta data from the model. | |
virtual void | addSupportFile (ISupportFile::Pointer supportFile, bool updateIndex=false)=0 |
Adds a SupportFile Reference to the model. | |
virtual ISupportFile::Container | getSupportFiles ()=0 |
Returns the list of SupportFile objects from the model. | |
virtual ISupportFile::Pointer | getSupportFile (int index)=0 |
Returns a specific ISupportFile instance from the model or a NULL wrapped pointer in case nothing was found or index is out of bounds. | |
virtual void | printModel (std::ostream &os, int32 indent)=0 |
Prints the data model in ASCI to the given ostream. | |
virtual void | printDataRecords (std::ostream &os, int32 indent)=0 |
Prints the data record from the model. | |
virtual void | printDataDimensions (std::ostream &os, int32 indent)=0 |
Prints the data dimensions from the model. | |
virtual void | printRequiredMetaData (std::ostream &os, int32 indent)=0 |
prints the required Meta data from the model | |
virtual bool | isValid (std::string &message)=0 |
Performs some basic checks to make sure the model is valid. | |
Private Member Functions | |
IDataModel (const IDataModel &) | |
void | operator= (const IDataModel &) |
IDataModel::IDataModel | ( | ) | [inline] |
virtual IDataModel::~IDataModel | ( | ) | [inline, virtual] |
IDataModel::IDataModel | ( | const IDataModel & | ) | [private] |
IDataModel::MXA_SHARED_POINTERS | ( | IDataModel | ) |
virtual float IDataModel::getModelVersion | ( | ) | [pure virtual] |
Returns the MXA File version that the model adheres to.
Implemented in MXADataModel.
virtual void IDataModel::setModelVersion | ( | float | version | ) | [pure virtual] |
Sets the File Version of the MXA data file.
version | The API Version we are going to write |
Implemented in MXADataModel.
virtual std::string IDataModel::getModelType | ( | ) | [pure virtual] |
virtual void IDataModel::setModelType | ( | const std::string & | fileType | ) | [pure virtual] |
Returns the file type for the MXA Data File.
fileType | The filetype (should be MXA) |
Implemented in MXADataModel.
virtual void IDataModel::setDefaultTypeAndVersion | ( | ) | [pure virtual] |
virtual void IDataModel::setDataRoot | ( | const std::string & | dataRoot | ) | [pure virtual] |
Sets the Data Root Value.
dataRoot | The data root to write to the model |
Implemented in MXADataModel.
virtual std::string IDataModel::getDataRoot | ( | ) | [pure virtual] |
virtual void IDataModel::addDataDimension | ( | IDataDimension::Pointer | dimension | ) | [pure virtual] |
Adds a Data Dimension to the data model.
dimension | The IDataDimension to add to the model |
Implemented in MXADataModel.
virtual IDataDimension::Pointer IDataModel::addDataDimension | ( | std::string | name, | |
std::string | altName, | |||
int32 | count, | |||
int32 | startValue, | |||
int32 | endValue, | |||
int32 | increment, | |||
int32 | uniform | |||
) | [pure virtual] |
Adds a Data Dimension by declaring all the values of the data dimension.
name | Name of the data dimension | |
altName | An Alternate name for the data dimension | |
count | The Number of entries this data dimension will have in the data file | |
startValue | THe starting index of the entries | |
endValue | The ending value (inclusive) of the entries | |
increment | The increment of the index | |
uniform | Are the indices uniform |
Implemented in MXADataModel.
virtual int32 IDataModel::insertDataDimension | ( | IDataDimension::Pointer | dimension, | |
int32 | index | |||
) | [pure virtual] |
Inserts a Data Dimension at a given index position. If Needed the internal data structure holding the Data Dimenions will be expanded.
dimension | The Data Dimension to Insert | |
index | The index to insert the Data Dimension at |
Implemented in MXADataModel.
virtual void IDataModel::squeezeDataDimensions | ( | ) | [pure virtual] |
This method will remove any NULL Data Dimensions from the internal data structure that holds the list of Data Dimensions.
Implemented in MXADataModel.
virtual int32 IDataModel::removeDataDimension | ( | int32 | index | ) | [pure virtual] |
Removes a Data dimension using the index of the dimension.
index | The index of the data dimension to remove |
Implemented in MXADataModel.
virtual int32 IDataModel::moveDataDimension | ( | int32 | fromIndex, | |
int32 | toIndex | |||
) | [pure virtual] |
moves the data dimension at index 'fromIndex' to another index 'newIndex'.
fromIndex | The current index of the data dimension to move | |
toIndex | The new index to place the data dimension at |
Implemented in MXADataModel.
virtual int32 IDataModel::swapDataDimensions | ( | int32 | index1, | |
int32 | index2 | |||
) | [pure virtual] |
Swaps a pair of Data Dimensions in the index list.
index1 | The first Data Dimension | |
index2 | The second Data Dimension to swap with the first |
Implemented in MXADataModel.
virtual IDataDimension::Container& IDataModel::getDataDimensions | ( | ) | [pure virtual] |
virtual IDataDimension::Pointer IDataModel::getDataDimension | ( | int32 | index | ) | [pure virtual] |
Returns a specific Data Dimension from the model.
index | The index to return |
Implemented in MXADataModel.
virtual IDataDimension::Pointer IDataModel::getDataDimension | ( | std::string | dimName | ) | [pure virtual] |
Returns a specific Data Dimension from the model. Technically Data dimensions could have the same names as Data Dimensions are only differentiated by index. This will return the FIRST occurance of a Data Dimension with the given name.
dimName | The name of the data dimension |
Implemented in MXADataModel.
virtual int32 IDataModel::getNumberOfDataDimensions | ( | ) | [pure virtual] |
virtual void IDataModel::addDataRecord | ( | IDataRecord::Pointer | record | ) | [pure virtual] |
Adds a data Record to the model.
record | The record to add to the model |
Implemented in MXADataModel.
virtual void IDataModel::addDataRecord | ( | IDataRecord::Pointer | record, | |
IDataRecord::Pointer | parent | |||
) | [pure virtual] |
Adds a Data record to the model using the given parent argument as the record's parent object.
record | The record to add to the model | |
parent | The parent of the record. Note that this is equivelent to just setting the parnet of the record manually. this is provided for convenience and consistancy. |
Implemented in MXADataModel.
virtual int32 IDataModel::removeDataRecord | ( | IDataRecord::Pointer | record | ) | [pure virtual] |
Removes the Data Record from the Model.
record | The record to remove from the Data model |
Implemented in MXADataModel.
virtual IDataRecord::Container& IDataModel::getDataRecords | ( | ) | [pure virtual] |
Returns the Data Records from the model. The natural form of the records is in a Tree structure.
Implemented in MXADataModel.
virtual IDataRecord::Pointer IDataModel::getDataRecordByNamedPath | ( | const std::string & | path, | |
IDataRecord * | parent = NULL | |||
) | [pure virtual] |
Returns a Data Record that is found by giving the full path using the "RecordName" of the data record(s).
For example, if you have a nested structure of data records with a top level DataRecord having a RecordName of "TopLevel" and child DataRecord with a RecordName of "ChildRecord", then using this method in the following way will retrieve the child DataRecord:
std::string path ("TopLevel/ChildRecord");
IDataRecord::Pointer datarecord = myDataModel.getDataRecordByNamedPath(path);
You can also look at the Unit Testing Code for more examples.
path | The path to the data record to return | |
parent | The parent of the Data Record to return. If this is NULL then the search will start at the top level of the data records. |
Implemented in MXADataModel.
virtual IDataRecord::Pointer IDataModel::getDataRecordByInternalPath | ( | const std::string & | path, | |
IDataRecord * | parent = NULL | |||
) | [pure virtual] |
Returns a Data Record that is found by giving the full path using the internal names of the data record(s). Internal names are given by the LUID value of each data record.
path | The path to the data record to return | |
parent | The parent of the Data Record to return. If this is NULL then the search will start at the top level of the data records. |
Implemented in MXADataModel.
virtual MXATypes::MXAError IDataModel::setRequiredMetaData | ( | std::string | researcherName, | |
std::string | dateCreated, | |||
std::string | datasetName, | |||
std::string | description, | |||
std::string | distributionRights, | |||
std::string | releaseNumber, | |||
std::string | pedigree, | |||
std::string | derivedSrcFile | |||
) | [pure virtual] |
Sets the Required Meta Data for the Data Model.
researcherName | The name of the researcher doing to experiment | |
dateCreated | The date the data was created | |
datasetName | The name of the experiment/dataset | |
description | A short description of the data/experiment | |
distributionRights | How can the data be distributed. | |
releaseNumber | If the data is public, did your organization apply a public release number or identifier to the data | |
pedigree | More detailed information regarding the data, its collection methods, the instrumentation, and the research | |
derivedSrcFile | Is this data derived from another data set or set of data files? |
Implemented in MXADataModel.
virtual MXATypes::MXAError IDataModel::setRequiredMetaData | ( | std::map< std::string, std::string > & | metadata | ) | [pure virtual] |
Sets the required meta data using a std::map of keys/values.
metadata | The meta data |
Implemented in MXADataModel.
virtual int32 IDataModel::setRequiredMetaData | ( | IRequiredMetaData::Pointer | metaData | ) | [pure virtual] |
Sets the required meta data.
metaData | IRequiredMetaData::Pointer object |
Implemented in MXADataModel.
virtual IRequiredMetaData::Pointer IDataModel::getRequiredMetaData | ( | ) | [pure virtual] |
Returns the meta data for the data model.
Implemented in MXADataModel.
virtual void IDataModel::setUserMetaData | ( | MXAAbstractAttributes & | attributes | ) | [pure virtual] |
Sets all the user defined meta data for this model. Any previously defined meta data will be erased.
attributes | Vector of MXAAbstractAttributePtr objects |
Implemented in MXADataModel.
virtual MXAAbstractAttributes IDataModel::getUserMetaData | ( | ) | [pure virtual] |
virtual void IDataModel::addUserMetaData | ( | const std::string & | key, | |
IMXAArray::Pointer | umd | |||
) | [pure virtual] |
Adds User defined Meta data to the model.
key | The attribute key name | |
umd | The Key/Value pair to append to the model |
Implemented in MXADataModel.
virtual void IDataModel::removeUserMetaData | ( | const std::string & | key | ) | [pure virtual] |
Removes specific user meta-data entry.
key | The user meta-data to remove |
Implemented in MXADataModel.
virtual IMXAArray::Pointer IDataModel::getUserMetaData | ( | const std::string & | key | ) | [pure virtual] |
Returns a specific User meta data item.
key | The value of the attribute key |
Implemented in MXADataModel.
virtual void IDataModel::printUserMetaData | ( | std::ostream & | os, | |
int32 | indent | |||
) | [pure virtual] |
Prints the user meta data from the model.
os | The output stream to print to | |
indent | The level of indentation to start with |
Implemented in MXADataModel.
virtual void IDataModel::addSupportFile | ( | ISupportFile::Pointer | supportFile, | |
bool | updateIndex = false | |||
) | [pure virtual] |
Adds a SupportFile Reference to the model.
supportFile | An ISupportFile object or subclass | |
updateIndex | Should the "index" property of the supportFile object be updated |
Implemented in MXADataModel.
virtual ISupportFile::Container IDataModel::getSupportFiles | ( | ) | [pure virtual] |
Returns the list of SupportFile objects from the model.
Implemented in MXADataModel.
virtual ISupportFile::Pointer IDataModel::getSupportFile | ( | int | index | ) | [pure virtual] |
Returns a specific ISupportFile instance from the model or a NULL wrapped pointer in case nothing was found or index is out of bounds.
index | The index (zero based) of the ISupportFile instance to return |
Implemented in MXADataModel.
virtual void IDataModel::printModel | ( | std::ostream & | os, | |
int32 | indent | |||
) | [pure virtual] |
Prints the data model in ASCI to the given ostream.
os | The output stream to print to | |
indent | The level of indentation to start with |
Implemented in MXADataModel.
virtual void IDataModel::printDataRecords | ( | std::ostream & | os, | |
int32 | indent | |||
) | [pure virtual] |
Prints the data record from the model.
os | The output stream to print to | |
indent | The level of indentation to start with |
Implemented in MXADataModel.
virtual void IDataModel::printDataDimensions | ( | std::ostream & | os, | |
int32 | indent | |||
) | [pure virtual] |
Prints the data dimensions from the model.
os | The output stream to print to | |
indent | The level of indentation to start with |
Implemented in MXADataModel.
virtual void IDataModel::printRequiredMetaData | ( | std::ostream & | os, | |
int32 | indent | |||
) | [pure virtual] |
prints the required Meta data from the model
os | The output stream to print to | |
indent | The level of indentation to start with |
Implemented in MXADataModel.
virtual bool IDataModel::isValid | ( | std::string & | message | ) | [pure virtual] |
Performs some basic checks to make sure the model is valid.
message | String to store messages relating to errors/omissions about the model |
Implemented in MXADataModel.
void IDataModel::operator= | ( | const IDataModel & | ) | [private] |