Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory Class Reference

This factory class allows for the creation of message metadata for meta modelling. More...

Static Public Member Functions

static IMMessage NewMetadata (string name, TopicDataType topicDataType)
 Create a new empty message node for metadata modelling. More...
 
static IMRecord NewRecordMetadata (string name)
 This is a convenience method for creating record metadata of type TopicDataType.RECORD. More...
 
static IMField NewFieldMetadata (MDataType dataType)
 This is a convenience method for constructing a single metadata field. More...
 
static IMField NewCustomFieldMetadata (ICustomFieldHandler handler)
 Create a single custom metadata field. More...
 
static string EncodeAsXml (IMNode metadata)
 Encode metadata as XML. More...
 
static string EncodeAsXml (IMNode metadata, bool format)
 Encode metadata as XML. More...
 
static IMNode DecodeFromXml (string xml)
 Parse metadata from XML. More...
 

Detailed Description

This factory class allows for the creation of message metadata for meta modelling.

Metadata may be modelled for the type of topic data that it is going to represent.

Metadata modelling is not currently supported for all types of topic data.

Member Function Documentation

static IMNode PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory.DecodeFromXml ( string  xml)
static

Parse metadata from XML.

The XML may have been created using EncodeAsXml( IMNode ).

Parameters
xmlThe XML document holding the metadata structure.
Returns
A populated metadata node.
static string PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory.EncodeAsXml ( IMNode  metadata)
static

Encode metadata as XML.

Equivalent to calling EncodeAsXml( message, false ).

Parameters
metadataThe metadata node to encode.
Returns
A string of unformatted XML.
static string PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory.EncodeAsXml ( IMNode  metadata,
bool  format 
)
static

Encode metadata as XML.

Parameters
metadataThe metadata node to encode.
formatRequests that the XML marshaller formats the XML.
Returns
A string of XML.
static IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory.NewCustomFieldMetadata ( ICustomFieldHandler  handler)
static

Create a single custom metadata field.

Parameters
handlerA custom data handler instance.
Returns
The new field.
static IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory.NewFieldMetadata ( MDataType  dataType)
static

This is a convenience method for constructing a single metadata field.

This can only be used for defined data types.

After creating such a field it can be modified, for example to specify an initial value.

Parameters
dataTypeThe field data type.
Returns
The new field metadata.
static IMMessage PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory.NewMetadata ( string  name,
TopicDataType  topicDataType 
)
static

Create a new empty message node for metadata modelling.

Parameters
nameThe message name.
topicDataTypeThe data type for the metadata. The capabilities of the metadata may vary according to the data type.
Returns
A new empty message metadata object.
static IMRecord PushTechnology.DiffusionCore.Messaging.Data.metadata.MetadataFactory.NewRecordMetadata ( string  name)
static

This is a convenience method for creating record metadata of type TopicDataType.RECORD.

This can be used for simple record handling where multiple records per message are not required.

Parameters
name
Returns