CoreProperties.h

00001 //
00002 //  Copyright (c) 2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 //  $Header: //DWF/Development/Components/Internal/DWF Toolkit/v7.6/develop/global/src/dwf/opc/CoreProperties.h#1 $
00019 //  $DateTime: 2008/02/20 08:38:28 $
00020 //  $Author: appacsviewers $
00021 //  $Change: 84992 $
00022 //  $Revision: #1 $
00023 //
00024 //
00025 
00026 #ifndef _DWFTK_OPCCOREPROPERTIES_H
00027 #define _DWFTK_OPCCOREPROPERTIES_H
00028 
00029 #include "dwf/opc/XMLPart.h"
00030 #include "dwf/opc/reader/CorePropertiesReader.h"
00031 
00032 namespace DWFToolkit
00033 {
00034 
00035 class OPCCoreProperties : public OPCXMLPart
00036                         , public OPCCorePropertiesReader
00037 {
00038 
00039 public:
00040 
00044     typedef     std::pair<DWFString, DWFString>         tNameValuePair;
00048     typedef     DWFCachingIterator<tNameValuePair>      tPropertyIterator;
00049 
00050 public:
00051 
00055     static const char* const kzName;
00056 
00057 public:
00058 
00062     _DWFTK_API
00063     OPCCoreProperties()
00064         throw();
00065 
00066     _DWFTK_API
00067     virtual ~OPCCoreProperties()
00068         throw();
00069 
00076     _DWFTK_API
00077     const DWFString& getSchemaID()
00078         throw();
00079 
00080     _DWFTK_API
00081     void setPropertyKeywords( const DWFString& zValue )
00082         throw();
00083 
00084     _DWFTK_API
00085     DWFString keywords() const
00086         throw();
00087 
00088     _DWFTK_API
00089     void setPropertyContentType( const DWFString& zValue )
00090         throw();
00091 
00092     _DWFTK_API
00093     DWFString contentType() const
00094         throw();
00095 
00096     _DWFTK_API
00097     void setPropertyCategory( const DWFString& zValue )
00098         throw();
00099 
00100     _DWFTK_API
00101     DWFString category() const
00102         throw();
00103 
00104     _DWFTK_API
00105     void setPropertyVersion( const DWFString& zValue )
00106         throw();
00107 
00108     _DWFTK_API
00109     DWFString version() const
00110         throw();
00111 
00112     _DWFTK_API
00113     void setPropertyRevision( const DWFString& zValue )
00114         throw();
00115 
00116     _DWFTK_API
00117     DWFString revision() const
00118         throw();
00119 
00120     _DWFTK_API
00121     void setPropertyLastModifiedBy( const DWFString& zValue )
00122         throw();
00123 
00124     _DWFTK_API
00125     DWFString lastModifiedBy() const
00126         throw();
00127 
00128     _DWFTK_API
00129     void setPropertyLastPrinted( const DWFString& zValue )
00130         throw();
00131 
00132     _DWFTK_API
00133     DWFString lastPrinted() const
00134         throw();
00135 
00136     _DWFTK_API
00137     void setPropertyContentStatus( const DWFString& zValue )
00138         throw();
00139 
00140     _DWFTK_API
00141     DWFString contentStatus() const
00142         throw();
00143 
00144     _DWFTK_API
00145     void setPropertyCreator( const DWFString& zValue )
00146         throw();
00147 
00148     _DWFTK_API
00149     DWFString creator() const
00150         throw();
00151 
00152     _DWFTK_API
00153     void setPropertyIdentifier( const DWFString& zValue )
00154         throw();
00155 
00156     _DWFTK_API
00157     DWFString identifier() const
00158         throw();
00159 
00160     _DWFTK_API
00161     void setPropertyTitle( const DWFString& zValue )
00162         throw();
00163 
00164     _DWFTK_API
00165     DWFString title() const
00166         throw();
00167 
00168     _DWFTK_API
00169     void setPropertySubject( const DWFString& zValue )
00170         throw();
00171 
00172     _DWFTK_API
00173     DWFString subject() const
00174         throw();
00175 
00176     _DWFTK_API
00177     void setPropertyDescription( const DWFString& zValue )
00178         throw();
00179 
00180     _DWFTK_API
00181     DWFString description() const
00182         throw();
00183 
00184     _DWFTK_API
00185     void setPropertyLanguage( const DWFString& zValue )
00186         throw();
00187 
00188     _DWFTK_API
00189     DWFString language() const
00190         throw();
00191 
00192     _DWFTK_API
00193     void setPropertyCreated( int nYear, int nMonth, int nDay )
00194         throw( DWFException );
00195 
00196     _DWFTK_API
00197     void setPropertyCreated( const DWFString& zValue )
00198         throw();
00199 
00200     _DWFTK_API
00201     DWFString created() const
00202         throw();
00203 
00204     _DWFTK_API
00205     void setPropertyModified( int nYear, int nMonth, int nDay )
00206         throw( DWFException );
00207 
00208     _DWFTK_API
00209     void setPropertyModified( const DWFString& zValue )
00210         throw();
00211 
00212     _DWFTK_API
00213     DWFString modified() const
00214         throw();
00215 
00223     _DWFTK_API
00224     OPCCoreProperties::tPropertyIterator* properties() const
00225         throw();
00226 
00235     _DWFTK_API
00236     OPCCoreProperties::tPropertyIterator* propertiesInOPCNamespace() const
00237         throw();
00238 
00247     _DWFTK_API
00248     OPCCoreProperties::tPropertyIterator* propertiesInDCNamespace() const
00249         throw();
00250 
00259     _DWFTK_API
00260     OPCCoreProperties::tPropertyIterator* propertiesInDCTermsNamespace() const
00261         throw();
00262 
00263 public:
00264 
00268     _DWFTK_API
00269     virtual DWFString provideKeywords( const DWFString& zValue )
00270         throw();
00271 
00275     _DWFTK_API
00276     virtual DWFString provideContentType( const DWFString& zValue )
00277         throw();
00278 
00282     _DWFTK_API
00283     virtual DWFString provideCategory( const DWFString& zValue )
00284         throw();
00285 
00289     _DWFTK_API
00290     virtual DWFString provideVersion( const DWFString& zValue )
00291         throw();
00292 
00296     _DWFTK_API
00297     virtual DWFString provideRevision( const DWFString& zValue )
00298         throw();
00299 
00303     _DWFTK_API
00304     virtual DWFString provideLastModifiedBy( const DWFString& zValue )
00305         throw();
00306 
00310     _DWFTK_API
00311     virtual DWFString provideLastPrinted( const DWFString& zValue )
00312         throw();
00313 
00317     _DWFTK_API
00318     virtual DWFString provideContentStatus( const DWFString& zValue )
00319         throw();
00320 
00324     _DWFTK_API
00325     virtual DWFString provideCreator( const DWFString& zValue )
00326         throw();
00327 
00331     _DWFTK_API
00332     virtual DWFString provideIdentifier( const DWFString& zValue )
00333         throw();
00334 
00338     _DWFTK_API
00339     virtual DWFString provideTitle( const DWFString& zValue )
00340         throw();
00341 
00345     _DWFTK_API
00346     virtual DWFString provideSubject( const DWFString& zValue )
00347         throw();
00348 
00352     _DWFTK_API
00353     virtual DWFString provideDescription( const DWFString& zValue )
00354         throw();
00355 
00359     _DWFTK_API
00360     virtual DWFString provideLanguage( const DWFString& zValue )
00361         throw();
00362 
00366     _DWFTK_API
00367     virtual DWFString provideCreated( const DWFString& zValue )
00368         throw();
00369 
00373     _DWFTK_API
00374     virtual DWFString provideModified( const DWFString& zValue )
00375         throw();
00376 
00377 public:
00378 
00379 #ifndef DWFTK_READ_ONLY
00380 
00384     _DWFTK_API
00385     void serializeXML( DWFXMLSerializer& rSerializer )
00386         throw( DWFException );
00387 
00388 #endif
00389 
00390 private:
00391 
00392     typedef std::map<DWFString, DWFString>      _tPropertyMap;
00393 
00394     _tPropertyMap           _oOPCProperties;
00395     _tPropertyMap           _oDCProperties;
00396     _tPropertyMap           _oDCTermsProperties;
00397 
00398 private:
00399 
00400     DWFString _getProperty( const _tPropertyMap& rMap,
00401                             const DWFString& zKey ) const
00402         throw();
00403 
00404     DWFString _getDateString( int nYear, int nMonth, int nDay ) const
00405         throw( DWFException );
00406 
00407 private:
00408 
00409     //
00410     // Not implemented
00411     //
00412     OPCCoreProperties( const OPCCoreProperties& );
00413     OPCCoreProperties& operator=( const OPCCoreProperties& );
00414 
00415 };
00416 
00417 //
00418 // required for win32 dll external linkage
00419 //
00420 #ifdef  _DWFCORE_WIN32_SYSTEM
00421 #ifndef DWFTK_STATIC
00422 
00423 //DNT_START
00424 
00425 _declspec(selectany) const char* const OPCCoreProperties::kzName = "CoreProperties.xml";
00426 
00427 //DNT_END
00428 
00429 #endif
00430 #endif
00431 
00432 }
00433 
00434 #endif

Generated on Tue Jan 6 22:40:02 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5