private void MirrorDOCSettingsToUI()
        {
            GatherUserInput();

            cBIV biv = cache.BIVs[selectedBIVName];

            if (biv.DOC != null)
            {
                textboxTagetNamespace.Text = biv.DOC.TargetNamespace;
                textboxPrefix.Text         = biv.DOC.TargetNamespacePrefix;
            }
        }
        private void buttonExport_Click(object sender, RoutedEventArgs e)
        {
            Cursor             = Cursors.Wait;
            textBoxStatus.Text = "Starting to generate XML schemas ...\n\n";
            GatherUserInput();
            cBIV currentBIV = cache.BIVs[selectedBIVName];


            IDocLibrary docl = cctsR.GetDocLibraryById(currentBIV.Id);

            // TODO: xsd generator needs to be adapted - currently all doc libraries are being generated whereas
            // only the ones that are checked should be generated..

            //TODO: currently the wizard just takes the input from the text fields whereas the prefix and the
            // target namespace should be (a) stored in the cache and (b) read from there while generation..

            if (comboboxDocumentModel.SelectedItem.Equals("CCTS"))
            {
                // TODO: check if path is valid
                cDOC document = currentBIV.DOC;
                if (document != null && document.State == CheckState.Checked)
                {
                }
                string targetNamespace   = textboxTagetNamespace.Text;
                string namespacePrefix   = textboxPrefix.Text;
                bool   annotate          = checkboxDocumentationAnnotations.IsChecked == true ? true : false;
                bool   allschemas        = checkboxGenerateCcSchemas.IsChecked == true ? true : false;
                var    generationContext = new GeneratorContext(cctsR, targetNamespace,
                                                                namespacePrefix, annotate, allschemas,
                                                                outputDirectory, docl);
                generationContext.SchemaAdded += HandleSchemaAdded;
                XSDGenerator.GenerateSchemas(generationContext);
            }
            else
            {
                SubsetExporter.ExportSubset(docl, originalXMLSchema, outputDirectory);
            }
            textBoxStatus.Text += "\nGenerating XML schemas completed!";
            Cursor              = Cursors.Arrow;
        }