00001 #ifndef Impala_Persistency_FoldLocator_h
00002 #define Impala_Persistency_FoldLocator_h
00003
00004 #include "Basis/Quids.h"
00005 #include "Persistency/Locator.h"
00006
00007 namespace Impala
00008 {
00009 namespace Persistency
00010 {
00011
00012
00013 class FoldLocator : public Locator
00014 {
00015 public:
00016
00017 FoldLocator()
00018 {
00019 }
00020
00021 FoldLocator(CString protocolAndHost, CString dataSet, int quidClass,
00022 CString conceptSet, CString keyword, CString foldType,
00023 int foldNr)
00024 : Locator(protocolAndHost, dataSet)
00025 {
00026 mQuidClass = quidClass;
00027 mConceptSet = conceptSet;
00028 mKeyword = keyword;
00029 mFoldType = foldType;
00030 mName = keyword + "_fold_" + MakeString(foldNr);
00031 }
00032
00033 FoldLocator(CString dataSet, int quidClass, CString conceptSet,
00034 CString keyword, CString foldType, int foldNr,
00035 CmdOptions& options)
00036 : Locator(dataSet, options)
00037 {
00038 mQuidClass = quidClass;
00039 mConceptSet = conceptSet;
00040 mKeyword = keyword;
00041 mFoldType = foldType;
00042 mName = keyword + "_fold_" + MakeString(foldNr);
00043 }
00044
00045 FoldLocator(const Locator& base, int quidClass, CString conceptSet,
00046 CString keyword, CString foldType, int foldNr)
00047 : Locator(base.GetProtocol(), base.GetHost(), base.GetDataSet())
00048 {
00049 mQuidClass = quidClass;
00050 mConceptSet = conceptSet;
00051 mKeyword = keyword;
00052 mFoldType = foldType;
00053 mName = keyword + "_fold_" + MakeString(foldNr);
00054 }
00055
00056 virtual
00057 ~FoldLocator()
00058 {
00059 }
00060
00061 int
00062 GetQuidClass() const
00063 {
00064 return mQuidClass;
00065 }
00066
00067 String
00068 GetQuidClassString() const
00069 {
00070 return QuidClassToString(mQuidClass);
00071 }
00072
00073 String
00074 GetConceptSet() const
00075 {
00076 return mConceptSet;
00077 }
00078
00079 String
00080 GetKeyword() const
00081 {
00082 return mKeyword;
00083 }
00084
00085 String
00086 GetFoldType() const
00087 {
00088 return mFoldType;
00089 }
00090
00091 String
00092 GetName() const
00093 {
00094 return mName;
00095 }
00096
00097 String
00098 ToString() const
00099 {
00100 return "FoldLocator(" + GetProtocol() + "," + GetHost()
00101 + "," + GetDataSet() + "," + GetQuidClassString() + ","
00102 + GetConceptSet() + "," + GetFoldType() + "," + GetName() + ")";
00103 }
00104
00105 private:
00106
00107 int mQuidClass;
00108 String mConceptSet;
00109 String mKeyword;
00110 String mFoldType;
00111 String mName;
00112
00113 ILOG_VAR_DEC;
00114 };
00115
00116 ILOG_VAR_INIT(FoldLocator, Impala.Persistency);
00117
00118 std::ostream&
00119 operator<< (std::ostream& os, const FoldLocator& loc)
00120 {
00121 os << loc.ToString();
00122 return os;
00123 }
00124
00125 }
00126 }
00127
00128 #endif