00001 #ifndef Impala_Persistency_Mpeg7DocLocator_h
00002 #define Impala_Persistency_Mpeg7DocLocator_h
00003
00004 #include "Persistency/Locator.h"
00005
00006 namespace Impala
00007 {
00008 namespace Persistency
00009 {
00010
00011
00012 class Mpeg7DocLocator : public Locator
00013 {
00014 public:
00015
00016
00017 static const int MPEG7_PLAIN = 1;
00018 static const int MPEG7_SHOT = 2;
00019 static const int MPEG7_CONCEPT = 3;
00020 static const int MPEG7_ANNOTATION = 4;
00021 static const int MPEG7_FEATURE = 5;
00022
00023 Mpeg7DocLocator()
00024 {
00025 }
00026
00027 Mpeg7DocLocator(CString name)
00028 : Locator("file:", "dot")
00029 {
00030 mDocType = MPEG7_PLAIN;
00031 mContainer = "";
00032 mName = name;
00033 }
00034
00035 Mpeg7DocLocator(CString protocolAndHost, CString dataSet, int docType,
00036 CString container, CString name)
00037 : Locator(protocolAndHost, dataSet)
00038 {
00039 mDocType = docType;
00040 mContainer = container;
00041 mName = name;
00042 }
00043
00044 Mpeg7DocLocator(CString dataSet, int docType, CString container,
00045 CString name, CmdOptions& options)
00046 : Locator(dataSet, options)
00047 {
00048 mDocType = docType;
00049 mContainer = container;
00050 mName = name;
00051 }
00052
00053 Mpeg7DocLocator(const Locator& base, int docType, CString container,
00054 CString name)
00055 : Locator(base.GetProtocol(), base.GetHost(), base.GetDataSet())
00056 {
00057 mDocType = docType;
00058 mContainer = container;
00059 mName = name;
00060 }
00061
00062 virtual
00063 ~Mpeg7DocLocator()
00064 {
00065 }
00066
00067 int
00068 GetDocType() const
00069 {
00070 return mDocType;
00071 }
00072
00073 String
00074 GetContainer() const
00075 {
00076 return mContainer;
00077 }
00078
00079 String
00080 GetName() const
00081 {
00082 return mName;
00083 }
00084
00085 String
00086 ToString() const
00087 {
00088 return "Mpeg7DocLocator(" + GetProtocol() + "," + GetHost()
00089 + "," + GetDataSet() + "," + MakeString(GetDocType()) + ","
00090 + GetContainer() + "," + GetName() + ")";
00091 }
00092
00093 private:
00094
00095 int mDocType;
00096 String mContainer;
00097 String mName;
00098
00099 ILOG_VAR_DEC;
00100 };
00101
00102 ILOG_VAR_INIT(Mpeg7DocLocator, Impala.Persistency);
00103
00104 std::ostream&
00105 operator<< (std::ostream& os, const Mpeg7DocLocator& loc)
00106 {
00107 os << loc.ToString();
00108 return os;
00109 }
00110
00111 }
00112 }
00113
00114 #endif