DataInfo.h
Go to the documentation of this file.
//$$FILE$$
//$$VERSION$$
//$$DATE$$
//$$LICENSE$$
#ifndef DATAINFO_H
#define DATAINFO_H
#include <string>
#include <vector>
#include <iostream>
#include <rcsb/rcsb_types.h>
#include <rcsb/GenString.h>
class DataInfo
{
public:
DataInfo();
virtual ~DataInfo();
virtual void GetVersion(std::string& version) = 0;
virtual const std::vector<std::string>& GetCatNames() = 0;
virtual const std::vector<std::string>& GetItemsNames() = 0;
virtual bool IsCatDefined(const std::string& catName) const = 0;
virtual bool IsItemDefined(const std::string& itemName) = 0;
virtual const std::vector<std::string>&
GetCatKeys(const std::string& catName) = 0;
virtual const std::vector<std::string>&
GetCatAttribute(const std::string& catName,
const std::string& refCatName, const std::string& refAttribName) = 0;
virtual const std::vector<std::string>&
GetItemAttribute(const std::string& itemName,
const std::string& refCatName, const std::string& refAttribName) = 0;
virtual bool AreAllKeyItems(const std::string& catName,
const std::vector<std::string>& attribsNames);
virtual bool IsUnknownValueAllowed(const std::string& catName,
const std::string& attribName);
bool AreItemsValuesValid(const std::string& catName,
const std::vector<std::string>& attribsNames,
const std::vector<unsigned int>& attribsIndices,
const std::vector<bool>& allowedNullAttribs,
const std::vector<std::string>& values,
const Char::eCompareType compareType = Char::eCASE_SENSITIVE);
virtual bool IsKeyItem(const std::string& catName,
const std::string& attribName,
const Char::eCompareType compareType = Char::eCASE_SENSITIVE);
virtual bool MustConvertItem(const std::string& catName,
const std::string& attribName);
virtual void GetItemsTypes(std::vector<eTypeCode>& attribsTypes,
const std::string& catName, const std::vector<std::string>& attribsNames);
virtual void StandardizeEnumItem(std::string& value,
const std::string& catName,
const std::string& attribName);
void GetMandatoryItems(std::vector<std::string>& mandItemsNames,
const std::string& catName);
bool IsItemMandatory(const std::string& catName,
const std::string& attribName);
virtual bool IsItemMandatory(const std::string& itemName);
// VLAD - RESOLVE THIS
virtual bool IsSimpleDataType(const std::string& itemName);
virtual eTypeCode _GetDataType(const std::string& itemName);
const std::vector<std::vector<std::string> >&
GetComboKeys(const std::string& catName);
std::vector<std::vector<std::vector<std::string> > >&
GetChildrenKeys(const std::vector<std::string>& parComboKey);
};
#ifndef VLAD_ATOM_SITES_ALT_ID_IGNORE
extern std::string CIF_ITEM;
#endif
#endif
CIF_ITEM
std::string CIF_ITEM
GenString.h
Char::eCompareType
eCompareType
Definition GenString.h:27
Char::eCASE_SENSITIVE
@ eCASE_SENSITIVE
Definition GenString.h:28
DataInfo::IsSimpleDataType
virtual bool IsSimpleDataType(const std::string &itemName)
DataInfo::GetItemsTypes
virtual void GetItemsTypes(std::vector< eTypeCode > &attribsTypes, const std::string &catName, const std::vector< std::string > &attribsNames)
DataInfo::IsCatDefined
virtual bool IsCatDefined(const std::string &catName) const =0
DataInfo::GetMandatoryItems
void GetMandatoryItems(std::vector< std::string > &mandItemsNames, const std::string &catName)
DataInfo::DataInfo
DataInfo()
DataInfo::GetCatAttribute
virtual const std::vector< std::string > & GetCatAttribute(const std::string &catName, const std::string &refCatName, const std::string &refAttribName)=0
DataInfo::IsItemMandatory
bool IsItemMandatory(const std::string &catName, const std::string &attribName)
DataInfo::GetCatKeys
virtual const std::vector< std::string > & GetCatKeys(const std::string &catName)=0
DataInfo::AreItemsValuesValid
bool AreItemsValuesValid(const std::string &catName, const std::vector< std::string > &attribsNames, const std::vector< unsigned int > &attribsIndices, const std::vector< bool > &allowedNullAttribs, const std::vector< std::string > &values, const Char::eCompareType compareType=Char::eCASE_SENSITIVE)
DataInfo::GetVersion
virtual void GetVersion(std::string &version)=0
DataInfo::GetItemsNames
virtual const std::vector< std::string > & GetItemsNames()=0
DataInfo::GetChildrenKeys
std::vector< std::vector< std::vector< std::string > > > & GetChildrenKeys(const std::vector< std::string > &parComboKey)
DataInfo::IsItemDefined
virtual bool IsItemDefined(const std::string &itemName)=0
DataInfo::MustConvertItem
virtual bool MustConvertItem(const std::string &catName, const std::string &attribName)
DataInfo::IsKeyItem
virtual bool IsKeyItem(const std::string &catName, const std::string &attribName, const Char::eCompareType compareType=Char::eCASE_SENSITIVE)
DataInfo::GetCatNames
virtual const std::vector< std::string > & GetCatNames()=0
DataInfo::IsUnknownValueAllowed
virtual bool IsUnknownValueAllowed(const std::string &catName, const std::string &attribName)
DataInfo::StandardizeEnumItem
virtual void StandardizeEnumItem(std::string &value, const std::string &catName, const std::string &attribName)
DataInfo::GetComboKeys
const std::vector< std::vector< std::string > > & GetComboKeys(const std::string &catName)
DataInfo::IsItemMandatory
virtual bool IsItemMandatory(const std::string &itemName)
DataInfo::GetItemAttribute
virtual const std::vector< std::string > & GetItemAttribute(const std::string &itemName, const std::string &refCatName, const std::string &refAttribName)=0
DataInfo::_GetDataType
virtual eTypeCode _GetDataType(const std::string &itemName)
DataInfo::AreAllKeyItems
virtual bool AreAllKeyItems(const std::string &catName, const std::vector< std::string > &attribsNames)
DataInfo::~DataInfo
virtual ~DataInfo()
rcsb_types.h
eTypeCode
eTypeCode
Definition rcsb_types.h:21