Aspose::Pdf::Metadata Class Referencefinal

Provides access to XMP metadata stream. More...

Inherits System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

Public Member Functions

bool get_IsFixedSize ()
 Checks if colleciton has fixed size. More...
 
bool get_IsReadOnly () const
 Checks if collection is read-only. More...
 
System::SharedPtr< System::Collections::Generic::ICollection< System::String > > get_Keys () const
 Gets collection of metadata keys. More...
 
System::SharedPtr< System::Collections::Generic::ICollection< System::SharedPtr< XmpValue > > > get_Values () const
 Gets values in the metadata. More...
 
System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::SharedPtr< XmpPdfAExtensionSchema > > > get_ExtensionFields ()
 Gets the dictionary of extension fields. More...
 
int32_t get_Count () const
 Gets count of elements in the collection. More...
 
bool get_IsSynchronized ()
 Checks if collection is synchronized. More...
 
System::SharedPtr< System::Objectget_SyncRoot ()
 Gets collection synchronization object. More...
 
void RegisterNamespaceUri (System::String prefix, System::String namespaceUri)
 Registers namespace URI. More...
 
void RegisterNamespaceUri (System::String prefix, System::String namespaceUri, System::String schemaDescription)
 Registers namespace URI. More...
 
System::String GetNamespaceUriByPrefix (System::String prefix)
 Returns namespace URI by prefix. More...
 
System::String GetPrefixByNamespaceUri (System::String namespaceUri)
 Returns prefix by namespace URI. More...
 
void Add (System::String const &key, System::SharedPtr< XmpValue > const &value)
 Adds value to metadata. More...
 
void Add (System::String const &key, System::SharedPtr< System::Object > const &value)
 Adds value to metadata. More...
 
void Add (System::String const &prefix, System::SharedPtr< XmpPdfAExtensionObject > const &value)
 Adds pdf extension to metadata. More...
 
void Clear ()
 Clears metadata. More...
 
bool Contains (System::String const &key) const
 Checks does key is contained in metadata. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue > > > > GetEnumerator ()
 Returns dictionary enumerator. More...
 
bool Remove (System::String const &key)
 Removes entry from metadata. More...
 
System::SharedPtr< XmpValueidx_get (System::String const &key) const
 Gets data from metadata. More...
 
void idx_set (System::String const &key, System::SharedPtr< XmpValue > value)
 Sets data from metadata. More...
 
void CopyTo (System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >>> array, int32_t index)
 Copies elements of the collection into array. More...
 
bool ContainsKey (System::String const &key) const
 Determines does this dictionary contasins specified key. More...
 
bool TryGetValue (System::String const &key, System::SharedPtr< XmpValue > &value)
 Tries to find key in the dictionary and retreives value if found. More...
 
void Add (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &item)
 Adds pair with key and value into the dictionary. More...
 
bool Contains (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &item) const
 Checks does specified key-value pair is contained in the dictionary. More...
 
bool Remove (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &item)
 Removes key/value pair from the colleciton. More...
 
- Public Member Functions inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >
bool get_IsFixedSize () const
 
bool get_IsSynchronized () const
 
SharedPtr< Objectget_SyncRoot ()
 
virtual void CopyTo (ArrayPtr< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >> arr, int index) override
 
virtual System::SharedPtr< Aspose::Pdf::XmpValueGetValueOrDefault (const System::String &key) const
 Returns value if found; or Value() otherwise. More...
 
virtual System::SharedPtr< Aspose::Pdf::XmpValueGetValueOrDefault (const System::String &key, const System::SharedPtr< Aspose::Pdf::XmpValue > &defaultValue) const
 Returns value if found; or defaultValue otherwise. More...
 
virtual System::SharedPtr< Aspose::Pdf::XmpValueGetValueOrNull (const System::String &key) const
 Returns value if found; or null otherwise, make sense only for reference types. More...
 
- Public Member Functions inherited from System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
virtual void Add (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > &item)=0
 
virtual bool Contains (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > &item) const=0
 
virtual bool Remove (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > &item)=0
 
virtual void CopyTo (System::ArrayPtr< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > array, int arrayIndex)=0
 
ICollectionoperator= (ICollection &&)
 
ICollectionoperator= (const ICollection &)
 
 ICollection ()
 Default constructor. More...
 
 ICollection (const ICollection &)
 Copy constructor. More...
 
 ICollection (ICollection &&)
 Move constructor. More...
 
virtual ~ICollection ()
 Destructor. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Protected Member Functions

System::SharedPtr< System::Collections::Generic::ICollection< System::String > > get_KeysInternal () const
 Implementation of get_Keys() method. More...
 
System::SharedPtr< System::Collections::Generic::ICollection< System::SharedPtr< XmpValue > > > get_ValuesInternal () const
 Implementation of get_Values() method. More...
 
 Metadata (System::SharedPtr< System::IO::Stream > stream)
 Constructor of the Metadata. More...
 
 Metadata (System::SharedPtr< Engine::Data::XMP::XmpDataCollection > _data)
 
 Metadata ()
 Creates empty metadata object. More...
 
System::SharedPtr< Engine::Data::XMP::XmpDataCollection > getData ()
 Returns XmpDataCollection object. More...
 

Additional Inherited Members

- Public Types inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >
typedef ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > BaseType
 Base interface type. More...
 
typedef KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > KeyValuePairType
 Key value pair type. More...
 
- Public Types inherited from System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
typedef KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > ValueType
 Value type name. More...
 
typedef ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
typedef IEnumerator< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > IEnumeratorType
 Enumerator type. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

Provides access to XMP metadata stream.

Constructor & Destructor Documentation

◆ Metadata() [1/3]

Aspose::Pdf::Metadata::Metadata ( System::SharedPtr< System::IO::Stream stream)
protected

Constructor of the Metadata.

Parameters
stream

◆ Metadata() [2/3]

Aspose::Pdf::Metadata::Metadata ( System::SharedPtr< Engine::Data::XMP::XmpDataCollection >  _data)
protected

◆ Metadata() [3/3]

Aspose::Pdf::Metadata::Metadata ( )
protected

Creates empty metadata object.

Member Function Documentation

◆ Add() [1/4]

void Aspose::Pdf::Metadata::Add ( System::String const &  key,
System::SharedPtr< XmpValue > const &  value 
)
virtual

Adds value to metadata.

Parameters
keyThe key to add.
valueValue which will be added.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ Add() [2/4]

void Aspose::Pdf::Metadata::Add ( System::String const &  key,
System::SharedPtr< System::Object > const &  value 
)

Adds value to metadata.

Parameters
keyThe key to add.
valueValue which will be added.

◆ Add() [3/4]

void Aspose::Pdf::Metadata::Add ( System::String const &  prefix,
System::SharedPtr< XmpPdfAExtensionObject > const &  value 
)

Adds pdf extension to metadata.

Parameters
prefixThe prefix of extension.
valueValue which will be added.

◆ Add() [4/4]

void Aspose::Pdf::Metadata::Add ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &  item)

Adds pair with key and value into the dictionary.

Parameters
itemItem to be added.

◆ Clear()

◆ Contains() [1/2]

bool Aspose::Pdf::Metadata::Contains ( System::String const &  key) const

Checks does key is contained in metadata.

Parameters
keyThe key of entry to find.
Returns
True if key is contained in the metadata.

◆ Contains() [2/2]

bool Aspose::Pdf::Metadata::Contains ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &  item) const

Checks does specified key-value pair is contained in the dictionary.

Parameters
itemKey-value pair.
Returns
true if this pauir was found.

◆ ContainsKey()

bool Aspose::Pdf::Metadata::ContainsKey ( System::String const &  key) const
virtual

Determines does this dictionary contasins specified key.

Parameters
keyKey to search in the dictionary.
Returns
true if key is found.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ CopyTo()

void Aspose::Pdf::Metadata::CopyTo ( System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >>>  array,
int32_t  index 
)

Copies elements of the collection into array.

Parameters
arrayDestination array.
indexStarting index.

◆ get_Count()

int32_t Aspose::Pdf::Metadata::get_Count ( ) const
virtual

◆ get_ExtensionFields()

Gets the dictionary of extension fields.

◆ get_IsFixedSize()

bool Aspose::Pdf::Metadata::get_IsFixedSize ( )

Checks if colleciton has fixed size.

◆ get_IsReadOnly()

bool Aspose::Pdf::Metadata::get_IsReadOnly ( ) const
virtual

◆ get_IsSynchronized()

bool Aspose::Pdf::Metadata::get_IsSynchronized ( )

Checks if collection is synchronized.

◆ get_Keys()

◆ get_KeysInternal()

◆ get_SyncRoot()

System::SharedPtr<System::Object> Aspose::Pdf::Metadata::get_SyncRoot ( )

Gets collection synchronization object.

◆ get_Values()

◆ get_ValuesInternal()

◆ getData()

System::SharedPtr<Engine::Data::XMP::XmpDataCollection> Aspose::Pdf::Metadata::getData ( )
protected

Returns XmpDataCollection object.

Returns
Metadata object.

◆ GetEnumerator()

◆ GetNamespaceUriByPrefix()

System::String Aspose::Pdf::Metadata::GetNamespaceUriByPrefix ( System::String  prefix)

Returns namespace URI by prefix.

Parameters
prefixThe value of prefix.
Returns
The value of namespace URI.

◆ GetPrefixByNamespaceUri()

System::String Aspose::Pdf::Metadata::GetPrefixByNamespaceUri ( System::String  namespaceUri)

Returns prefix by namespace URI.

Parameters
namespaceUriNamespace URI.
Returns
The value of prefix.

◆ idx_get()

System::SharedPtr<XmpValue> Aspose::Pdf::Metadata::idx_get ( System::String const &  key) const
virtual

Gets data from metadata.

Parameters
keyThe key name.
Returns
Metadata object.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ idx_set()

void Aspose::Pdf::Metadata::idx_set ( System::String const &  key,
System::SharedPtr< XmpValue value 
)
virtual

Sets data from metadata.

Parameters
keyThe key name.
valueMetadata object.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ RegisterNamespaceUri() [1/2]

void Aspose::Pdf::Metadata::RegisterNamespaceUri ( System::String  prefix,
System::String  namespaceUri 
)

Registers namespace URI.

Parameters
prefixThe value of prefix.
namespaceUriThe value of namespace URI.

◆ RegisterNamespaceUri() [2/2]

void Aspose::Pdf::Metadata::RegisterNamespaceUri ( System::String  prefix,
System::String  namespaceUri,
System::String  schemaDescription 
)

Registers namespace URI.

Parameters
prefixThe value of prefix.
namespaceUriThe value of namespace URI.
schemaDescriptionThe value of schema description.

◆ Remove() [1/2]

bool Aspose::Pdf::Metadata::Remove ( System::String const &  key)
virtual

Removes entry from metadata.

Parameters
keyThe key of entry to remove.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ Remove() [2/2]

bool Aspose::Pdf::Metadata::Remove ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &  item)

Removes key/value pair from the colleciton.

Parameters
itemKey/value pair to be removed.
Returns
true if pair was found and removed.

◆ TryGetValue()

bool Aspose::Pdf::Metadata::TryGetValue ( System::String const &  key,
System::SharedPtr< XmpValue > &  value 
)
virtual

Tries to find key in the dictionary and retreives value if found.

Parameters
keyKey to search in the dictionary.
valueRetreived value.
Returns
true if key was found.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.