Data Model > Extending the UNICOM Intelligence Data Model > Creating a CDSC > Adding registration support to a DSC > Defining the capabilities of a DSC
 
Defining the capabilities of a DSC
The capabilities of a DSC are defined in a subkey under the class name key:
HKEY_CLASSES_ROOT\[Class name]\Description (Default); = [Description]
Title = [Title]
Filter = [Description]|[Extension]
{|[Description]|[Extension]}
DefaultExtension = [Extension]|[ConnectionString]
DocInfoClassName =
CanRead = [1|0]
CanWrite = [1|0]
SourceType = [0|1|2|3]
CanConvert = [1|0]
Title
This is the text that appears in the Metadata Type or Case Data Type list in the Data Link Properties dialog box.
Filter
The Description is used in the Files of Type and Save as Type lists in Open and Save dialog boxes. When the description is selected, only files whose names correspond to the pattern defined in Extension are listed. Extension defines a pattern (typically, but not always, a filename extension) or multiple patterns for the files to be shown.
DefaultExtension
When the SourceType is 0 (file), this specifies the filename extension to be used when the user does not specify one when opening or saving a file (for example, when he or she enters "museum"). When the SourceType is 3 (OLE DB), this specifies the default connection string to be used. For example, the following setting causes the SQL Server provider to be selected by default:
val DefaultExtension = s 'Provider=SQLOLEDB'
DocInfoClassName
The name of the class that exposes the IDocumentInfo interface. Applies to MDSCs only.
CanWrite
Prior to UNICOM Intelligence Data Model 2.5, this applied to CDSCs only. In UNICOM Intelligence Data Model 2.5 and later, this applies to CDSCs and MDSCs. This should be set to True (1) for a CDSC if it can write data and for an MDSC if it implements IMetadataSave.
SourceType
Indicates the type of data source. 0 = file, 1 = directory, 2 = database, 3 = the data is accessed via an OLE DB data link.
CanConvert
New in UNICOM Intelligence Data Model 2.5, this applies to MDSCs only and should be set to True (1) if the MDSC implements IMetadataConvert.
Example
This example is from the UNICOM Intelligence XML CDSC, mrXmlDsc.dll.
HKCR
{
mrXmlDsc.Source.1 = s 'SPSS MR XML CDSC Source Class'
{
CLSID = s '{A94453E0-9DCD-11d4-92AD-0010A4C4B26C}'
}
mrXmlDsc.Source = s 'SPSS MR XML CDSC Source Class'
{
CLSID = s '{A94453E0-9DCD-11d4-92AD-0010A4C4B26C}'
CurVer = s 'mrXmlDsc.Source.1'
Description = s 'SPSS MR XML Data Source Component'
{
val Title = s 'SPSS MR XML File'
val Filter = s 'XML data files|*.xml'
val DefaultExtension = s 'XML'
val CanRead = d 1
val CanWrite = d 1
val SourceType = d 0
}
}
See also
DSC naming conventions
DSC registration component
Creating a CDSC
Can I use the DSC Registration component to return an MDM Document from an .mdd file?
DSC Explorer
Adding registration support to a DSC