Mp7Jrs  2.7.1
IMp7JrsContentAbstractionType Class Reference

Generated interface IMp7JrsContentAbstractionType for class Mp7JrsContentAbstractionType
Located at: mpeg7-v2.xsd, line 2820
Classified: Class
Derived from: ContentDescriptionType (Class)
Abstract class
More...

Inherits IMp7JrsContentDescriptionType.

Inherited by IMp7JrsModelDescriptionType, IMp7JrsSemanticDescriptionType, IMp7JrsSummaryDescriptionType, IMp7JrsVariationDescriptionType, IMp7JrsViewDescriptionType, and Mp7JrsContentAbstractionType.

Public Member Functions

virtual Mp7JrsNodeEnum GetOrCreateFromXPath (const XMLCh *xpath, Mp7JrsClientID client=MP7JRS_UNDEFINED_CLIENT, Mp7JrsXPathCreation flag=MP7JRS_FORCECREATE, Mp7JrsXPathParseContext *context=NULL)=0
 Gets or creates Mp7JrsNodePtr child elements of ContentAbstractionType.
Sequence
virtual
Mp7JrsContentDescriptionType_Affective_CollectionPtr 
GetAffective () const =0
virtual void SetAffective (const Mp7JrsContentDescriptionType_Affective_CollectionPtr &item, Mp7JrsClientID client=MP7JRS_UNDEFINED_CLIENT)=0
virtual
Mp7JrsDescriptionMetadataPtr 
GetDescriptionMetadata () const =0
virtual bool IsValidDescriptionMetadata () const =0
virtual void SetDescriptionMetadata (const Mp7JrsDescriptionMetadataPtr &item, Mp7JrsClientID client=MP7JRS_UNDEFINED_CLIENT)=0
virtual void InvalidateDescriptionMetadata ()=0
virtual
Mp7JrsCompleteDescriptionType_Relationships_CollectionPtr 
GetRelationships () const =0
virtual void SetRelationships (const Mp7JrsCompleteDescriptionType_Relationships_CollectionPtr &item, Mp7JrsClientID client=MP7JRS_UNDEFINED_CLIENT)=0
virtual
Mp7JrsCompleteDescriptionType_OrderingKey_CollectionPtr 
GetOrderingKey () const =0
virtual void SetOrderingKey (const Mp7JrsCompleteDescriptionType_OrderingKey_CollectionPtr &item, Mp7JrsClientID client=MP7JRS_UNDEFINED_CLIENT)=0
Sequence
Sequence
- Public Member Functions inherited from Mp7JrsNode
const char * GetTypeName () const
 Get class type name as string.
const unsigned int GetClassId () const
 Get the class ID of this node (i.e.
void SetContentName (XMLCh *contentname)
 Set the content name of this node.
const XMLCh * GetContentName () const
 Get the content name of this node.
virtual XMLCh * ToText () const =0
 Convert the content to string.
virtual bool Parse (const XMLCh *const txt)=0
 Parse the content of this type.
virtual bool ContentFromString (const XMLCh *const txt)
 Parse the content from a string.
virtual XMLCh * ContentToString () const
virtual void Serialize (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *parent, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement **newElem=NULL)=0
 Serialialize this object to a DOM tree.
virtual bool Deserialize (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *parent, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement **current)=0
 Deserialize this object from a DOM tree.
virtual Mp7JrsNodePtr CreateChild (const XMLCh *const elementname, const XMLCh *const xsitype)
virtual XMLCh * GetXPath () const
 Get the absolute XPath expression describing this node.
Mp7JrsNodePtr NodeFromXPath (const char *xpath) const
 Get the node represented by this xpath.
virtual Mp7JrsNodePtr NodeFromXPath (const XMLCh *xpath) const
Mp7JrsNodeEnum GetOrCreateFromXPath (const char *xpath, Mp7JrsClientID client=MP7JRS_UNDEFINED_CLIENT, Mp7JrsXPathCreation flag=MP7JRS_FORCECREATE)
 Get the node(s) represented by this xpath.
Mp7JrsNodeEnum GetFromXPath (const char *xpath)
 The same like GetOrCreateFromXPath() just read only.
Mp7JrsNodeEnum GetFromXPath (const XMLCh *xpath)
 The same like GetOrCreateFromXPath() just read only.
virtual Mp7JrsNodePtr GetParent () const
 Get the parent of the node.
void SetParent (const Mp7JrsNodePtr &new_parent)
virtual bool Lock (Mp7JrsClientID id, bool receiveNotification=true)
 Request to lock this node for any operation.
virtual bool Lock4Add (Mp7JrsClientID id, bool receiveNotification=true)
 Request to lock this node for add or insert.
virtual void Unlock (Mp7JrsClientID id)
 Unlock this node.
virtual void Register (Mp7JrsClientID id, Mp7JrsNotificationAction action, bool subtree=false)
 Register to receive notifications from this node.
virtual void Unregister (Mp7JrsClientID id, Mp7JrsNotificationAction action)
 Unregister from receiving notifications from this node.

Additional Inherited Members

- Public Attributes inherited from Mp7JrsNode
bool UseTypeAttribute
 Set if xsi:type attribute shall be written when serialising this node (useful for elements having abstract types).
Mp7JrsWeakPtr< Mp7JrsNode > m_myself
- Protected Member Functions inherited from Mp7JrsNode
Mp7JrsNodePtr UpwardWithXPath (const XMLCh *xpath) const
virtual void DeepCopy (const Mp7JrsNodePtr &original)=0
virtual bool IsLocked (Mp7JrsClientID id)
virtual Mp7JrsNodeEnum GetAllChildElements () const =0
virtual Mp7JrsNodePtr GetBaseRoot ()
virtual const Mp7JrsNodePtr GetBaseRoot () const
- Protected Attributes inherited from Mp7JrsNode
Mp7JrsClientID lockOwner
unsigned int m_ClassId
XMLCh * m_ContentName
Mp7JrsWeakPtr< Mp7JrsNode > m_Parent

Detailed Description

Generated interface IMp7JrsContentAbstractionType for class Mp7JrsContentAbstractionType
Located at: mpeg7-v2.xsd, line 2820
Classified: Class
Derived from: ContentDescriptionType (Class)
Abstract class

Member Function Documentation

virtual Mp7JrsNodeEnum IMp7JrsContentAbstractionType::GetOrCreateFromXPath ( const XMLCh *  xpath,
Mp7JrsClientID  client = MP7JRS_UNDEFINED_CLIENT,
Mp7JrsXPathCreation  flag = MP7JRS_FORCECREATE,
Mp7JrsXPathParseContext *  context = NULL 
)
pure virtual

Gets or creates Mp7JrsNodePtr child elements of ContentAbstractionType.

Currently this type contains 4 child elements of type "Mp7JrsNodePtr".

  • DescriptionMetadata
  • urn:mpeg:mpeg7:schema:2004:Relationships
  • urn:mpeg:mpeg7:schema:2004:OrderingKey
  • urn:mpeg:mpeg7:schema:2004:Affective

Supported XPath expressions for GetOrCreateFromXPath

/
  • Get the root of this node.
..
  • This feature is experimental.
  • Get the ancestor (parent node), or an empty list if the node already is the root node.
@A
  • Force creation of a child attribute named A.
  • This is valid only, if the type of attribute is derived from Mp7JrsNodePtr.
  • Evaluating this expression for a plain type like int or string results in an exception.
A
  • Select all child elements named A.
  • In case of no element, create a new one.
  • For collections: all subsequent XPath expressions are applied on all collection items (e.g. A/B query or create, childnodes B of all As).
A[i]
  • Select the ith child element of all A.
  • Please note, that XPath indexes start at 1.
  • If there is no such ith element, try to create a new one at index i.
  • Single elements require i to be 1 otherwise an exception is thrown.
  • For collections, i must not exceed the number of existing items +1 (appending is allowed, filling gaps not).
  • If the index is too high, a MissingElementException is thrown, and you can extract the last valid index. (Example: If a collection contains 2 elements and you are requesting the 4th element).
A[@xsi:type="T"]
  • Select all child elements named A of type T.
  • Currently only typenames without namespace are recognised.
  • If there is no such element, create and append a new one.
A[i][@xsi:type="T"]
  • Select the ith child element named A, which must be of type T.
  • If there is no such element at index i, a new one is created and inserted (appended).
A[@xsi:type="T"][i]
  • Out of all child elements named A of type T, take the ith one.
  • If there is no such element at index i, create and append one.
A[last()]
  • Select the last child element named A.
  • In case of no element, create a new one.
A[last()][@xsi:type="T"]
  • Select the last child element named A, which must be of type T.
  • For collections: in case of no such type, create and append a new one.
  • For single elements: if an element with different type exists, return the empty list.
A[@xsi:type="T"][last()]
  • Out of all child elements named A of type T, take the last one.
  • For collections: in case of no such type, create and append a new one.
  • For single elements: if an element with different type exists, return the empty list.
A[position() > last()]
  • Force creation of a child element named A with its default type.
  • For collections: create and append the default element.
  • For single elements: if any element exists, an exception is thrown.
A[position() > last()][@xsi:type="T"]
  • Force creation of a child element named A of type T.
  • For collections: create and append the element.
  • For single elements: if any element exists, an exception is thrown.
A[@xsi:type="T"][position() > last()]
  • Force creation of a child element named A of type T.
  • Behaves the same way as the previous expression.

Supported XPath expressions for GetFromXPath
The same expressions like GetOrCreateFromXPath plus

A[position() < i]
  • Select all child elements named A at indexes lower than i.
  • i must be greater than -1, otherwise an exception is thrown.
A[position() > i]
  • Select all child elements named A at indexes greater than i.
  • i must be greater than -1, otherwise an exception is thrown.
A[position() > i | position() < j]
  • Select all child elements named A at indexes greater than i and lower than j.
  • i and j must be greater than -1, otherwise an exception is thrown.
  • If i is greater than j then an empty list is returned.

These three expressions can be combined with the @xsi:type attribute to get a more restricted query.

Parameters
xpaththe xpath expression to get or create.
clientthe ID in case of locking.
Returns
the appropriate subelement node list. Can be empty in case of incompatible name/type/index settings.

Implements IMp7JrsContentDescriptionType.

Implemented in IMp7JrsViewDescriptionType, IMp7JrsSemanticDescriptionType, IMp7JrsVariationDescriptionType, IMp7JrsModelDescriptionType, and IMp7JrsSummaryDescriptionType.