Developer Documentation Library > Data Model > Extending the UNICOM Intelligence Data Model > Creating a Metadata Source Component (MDSC) > Populating the MDM Document > Setting up the Document
 
Setting up the Document
Languages
One of the first things you need to do is to define the base language for the Document. You do this by adding the language to the Document.Languages collection and setting it as the Base language in the collection. If you want to import translations into the Document, you must also add the relevant languages before importing the translations. If the Document will include more than one language, you might want to define alternative languages to be used when translations are unavailable. You do this in the language's LanguageAlternatives collection.
User contexts
User contexts define usages for the metadata. Custom properties and texts are defined for a specific user context. This means that you can define different texts and properties for use in different user environments. The default user contexts are Question (data collection) and Analysis (data analysis), and the MDSC should always create these contexts. However, you can also define other user contexts if necessary. User contexts are defined in the Document.Contexts collection. Set the current user context and set up suitable context alternatives. You should always set up context alternatives for the Question and Analysis contexts, so that standard custom properties and variable and category texts are available in both contexts.
For example, you could define all of the relevant custom properties and texts in the Analysis context and set the Analysis context to be the first context alternative of the Question context. This would make the custom properties and texts you have defined available to UNICOM Intelligence applications that read from the Question context as well as those that read from the Analysis context. Typically you would also define Question to be the first context alternative of the Analysis context, so that if in the future any custom properties or texts are defined in the Question context but not the Analysis context, they will be available to applications that read from the Analysis context.
Label types
Label types define different types of texts. For example, Label (the default) is used for question texts and variable descriptions, and Shortname and Instruction are used in UNICOM Intelligence Interviewer - Paper for short question names and interviewer instructions respectively. Label types are defined in the Document.LabelTypes collection. MDM automatically creates the Label label type, although you can create additional ones if required. For example, if the Document will be used with UNICOM Intelligence Interviewer - Paper, you might want to create and set up Shortname and Instruction label types. Set the current label type and set up suitable context alternatives.
Routing contexts
Routing contexts are used to define different interviewing environments, such as paper, Web, CATI, and so on. Routing contexts are defined in the Document.RoutingContexts collection. You need to create the routing contexts that are required and set the current routing context.
DataSource
Before you can set alias and subalias names and native values, you must create a DataSource object to store information about the case data, add it to the Document.DataSources collection and set the current DataSource.
Versions
The version feature enables you to make a snapshot of the metadata at significant points in its development. Typically, you will create a new version before starting to populate the document, and lock it when the population is complete.
System variables
The UNICOM Intelligence products use a number of system variables for storing information such as respondent serial numbers, the version of the metadata used to collect the data, interviewer ID, and so on. (For a full list, see System variables.) The MDM automatically adds the system variables to the Document if you set Document.IncludeSystemVariables to True.
See also
Setting up basic questions
Setting up elements
Setting up helper fields
Setting up shared category lists
Setting up complex questions
Setting up the routing
Setting up custom properties
Versions
Using the Alias Map component
Visual C++ examples
Populating the MDM Document