Exemplo n.º 1
0
        public MultiValuedItemConfigViewModel(ExperimentViewModel parentExperiment, MultiValuedConfigViewModel parent
                                              , XmlNode definitionNode, string parentXPath, XmlNode configNode = null)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            m_parent    = parent;
            m_className = definitionNode.Attributes[XMLTags.classAttribute].Value;

            switch (m_className)
            {
            case XMLTags.integerNodeTag: children.Add(new IntegerValueConfigViewModel(parentExperiment, this, definitionNode, m_xPath, configNode)); break;

            case XMLTags.boolNodeTag: children.Add(new BoolValueConfigViewModel(parentExperiment, this, definitionNode, m_xPath, configNode)); break;

            case XMLTags.doubleNodeTag: children.Add(new DoubleValueConfigViewModel(parentExperiment, this, definitionNode, m_xPath, configNode)); break;

            case XMLTags.stringNodeTag: children.Add(new StringValueConfigViewModel(parentExperiment, this, definitionNode, m_xPath, configNode)); break;

            case XMLTags.filePathNodeTag: children.Add(new FilePathValueConfigViewModel(parentExperiment, this, definitionNode, m_xPath, configNode)); break;

            case XMLTags.dirPathNodeTag: children.Add(new DirPathValueConfigViewModel(parentExperiment, this, definitionNode, m_xPath, configNode)); break;

            case XMLTags.stateVarRefTag: children.Add(new WorldVarRefValueConfigViewModel(parentExperiment, WorldVarType.StateVar, parent, definitionNode, parentXPath, configNode)); break;

            case XMLTags.actionVarRefTag: children.Add(new WorldVarRefValueConfigViewModel(parentExperiment, WorldVarType.ActionVar, parent, definitionNode, parentXPath, configNode)); break;

            default:
                XmlNode classDefinition = parentExperiment.GetClassDefinition(m_className);
                if (classDefinition != null)
                {
                    childrenInit(parentExperiment, parentExperiment.GetClassDefinition(m_className), m_xPath, configNode);
                }
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor called when loading an experiment config file
        /// </summary>
        /// <param name="parentExperiment"></param>
        /// <param name="parentNode"></param>
        /// <param name="classDefinition">Class of the node in app definitions</param>
        /// <param name="parentXPath"></param>
        /// <param name="configNode">Node in simion.exp file with the configuration for a node class</param>
        public LinkedNodeViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parentNode,
                                   XmlNode classDefinition, XmlNode configNode = null)
        {
            m_parentExperiment = parentExperiment;
            nodeDefinition     = classDefinition;
            m_parent           = parentNode;

            foreach (XmlNode configChildNode in configNode)
            {
                if (configChildNode.Name.Equals(XMLTags.linkedNodeTag) &&
                    configChildNode.Attributes[XMLTags.nameAttribute].Value
                    .Equals(classDefinition.Attributes[XMLTags.nameAttribute].Value))
                {
                    OriginName = configChildNode.Attributes[XMLTags.originNodeAttribute].Value;
                    if (configChildNode.Attributes[XMLTags.aliasAttribute] != null)
                    {
                        OriginAlias = configChildNode.Attributes[XMLTags.aliasAttribute].Value;
                    }
                }
            }

            name       = nodeDefinition.Attributes[XMLTags.nameAttribute].Value;
            LinkedNode = getInstance(parentExperiment, parentNode, classDefinition,
                                     parentExperiment.AppName, configNode);
        }
Exemplo n.º 3
0
        public NeuralNetworkProblemDescriptionConfigViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent,
                                                              XmlNode definitionNode, string parentXPath, XmlNode configNode = null)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            if (configNode == null || configNode[name] == null)
            {
                //default init

                //Using default attribute makes no sense here I think
                //content = definitionNode.Attributes[XMLTags.defaultAttribute].Value;
                textColor = XMLTags.colorInvalidValue;
            }
            else
            {
                //init from config file
                if (configNode[name].InnerXml != "")
                {
                    var mwvm = new NeuralNetwork.Windows.MainWindowViewModel();
                    mwvm.Import(configNode[name].InnerXml);
                    m_problemViewModel = mwvm.Problem;
                    content            = configNode[name].InnerXml;
                }
            }
        }
        public ChoiceConfigViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent,
                                     XmlNode definitionNode, string parentXPath, XmlNode configNode = null, bool initChildren = true)
        {
            string choiceElementName;

            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            if (configNode != null)
            {
                configNode = configNode[name];
            }

            if (initChildren)
            {
                foreach (XmlNode choiceElement in definitionNode.ChildNodes)
                {
                    choiceElementName = choiceElement.Attributes[XMLTags.nameAttribute].Value;

                    m_choiceNames.Add(choiceElementName);

                    if (configNode != null && choiceElementName == configNode.ChildNodes[0].Name)
                    {
                        loadSelectedChoiceElement(choiceElementName, configNode);
                    }
                }
            }
        }
Exemplo n.º 5
0
        protected void childrenInit(ExperimentViewModel parentExperiment, XmlNode classDefinition,
                                    string parentXPath, XmlNode configNode = null)
        {
            ConfigNodeViewModel childNode;
            XmlNode             forkNode;

            if (classDefinition != null)
            {
                foreach (XmlNode child in classDefinition.ChildNodes)
                {
                    forkNode = getForkChild(child.Attributes[XMLTags.nameAttribute].Value, configNode);
                    if (forkNode != null)
                    {
                        children.Add(new ForkedNodeViewModel(parentExperiment, this, child, forkNode));
                    }
                    else if (IsLinked(child.Attributes[XMLTags.nameAttribute].Value, configNode))
                    {
                        children.Add(new LinkedNodeViewModel(parentExperiment, this, child, configNode));
                    }
                    else
                    {
                        childNode = getInstance(parentExperiment, this, child, parentXPath, configNode);
                        if (childNode != null)
                        {
                            children.Add(childNode);
                        }
                    }
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        ///     Close a tab (experiment view) and removes it from experiments list.
        /// </summary>
        /// <param name="e">The experiment to be removed</param>
        public void Close(ExperimentViewModel e)
        {
            ExperimentViewModels.Remove(e);
            CheckEmptyExperimentList();

            CanLaunchExperiment = (m_bIsExperimentListNotEmpty);
        }
        public MultiValuedConfigViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent
                                          , XmlNode definitionNode, string parentXPath, XmlNode configNode = null, bool initChildren = true)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            m_className = definitionNode.Attributes[XMLTags.classAttribute].Value;
            if (definitionNode.Attributes.GetNamedItem(XMLTags.optionalAttribute) != null)
            {
                m_bOptional = definitionNode.Attributes[XMLTags.optionalAttribute].Value == "true";
            }
            else
            {
                m_bOptional = false;
            }

            if (configNode != null)
            {
                foreach (XmlNode configChild in configNode.ChildNodes)
                {
                    if (configChild.Name == name)
                    {
                        children.Add(new MultiValuedItemConfigViewModel(parentExperiment, this, definitionNode, m_xPath, configChild));
                    }
                }
            }
            else //default initialization
            {
                if (initChildren && !m_bOptional)
                {
                    children.Add(new MultiValuedItemConfigViewModel(parentExperiment, this, definitionNode, m_xPath));
                }
            }
        }
Exemplo n.º 8
0
 //constructor called when loading a fork from a .badger file
 public ForkValueViewModel(ExperimentViewModel parentExperiment, XmlNode classDefinition,
                           ConfigNodeViewModel parentNode, XmlNode configNode)
 {
     name = configNode.Attributes[XMLTags.nameAttribute].Value;
     //not sure how to do this in a more elegant way
     this.configNode = getInstance(parentExperiment, parentNode,
                                   classDefinition, parentNode.xPath, configNode);
     this.configNode.bCanBeForked = false; //already belongs to a fork
 }
Exemplo n.º 9
0
        /// <summary>
        /// Loads an experimental unit on the Editor tab. This method can be used from any child window to load
        /// experimental units (i.e, from the ReportViewer)
        /// </summary>
        /// <param name="experimentalUnitConfigFile">The experimental unit file.</param>
        public void LoadExperimentalUnit(string experimentalUnitConfigFile)
        {
            ExperimentViewModel newExperiment =
                Files.LoadExperiment(appDefinitions, experimentalUnitConfigFile);

            if (newExperiment != null)
            {
                ExperimentViewModels.Add(newExperiment);

                SelectedExperiment = newExperiment;
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// Constructor used from the experiment editor
        /// </summary>
        /// <param name="parentExperiment"></param>
        /// <param name="originNode"></param>
        /// <param name="targetNode"></param>
        public LinkedNodeViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel originNode,
                                   ConfigNodeViewModel targetNode)
        {
            m_parent           = targetNode.parent;
            m_parentExperiment = parentExperiment;
            Origin             = originNode;

            nodeDefinition = targetNode.nodeDefinition;
            name           = targetNode.name;
            comment        = nodeDefinition.Attributes[XMLTags.commentAttribute].Value;
            content        = originNode.content;

            CreateLinkedNode();
        }
Exemplo n.º 11
0
        public IntegerValueConfigViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent, XmlNode definitionNode, string parentXPath, XmlNode configNode = null)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            if (configNode == null || configNode[name] == null)
            {
                //default init
                content   = definitionNode.Attributes[XMLTags.defaultAttribute].Value;
                textColor = XMLTags.colorDefaultValue;
            }
            else
            {
                //init from config file
                content = configNode[name].InnerText;
            }
        }
Exemplo n.º 12
0
        /// <summary>
        /// Creates a new experiment and adds it to the Editor tab
        /// </summary>
        public void NewExperiment()
        {
            if (m_selectedAppName == null)
            {
                return;
            }

            string xmlDefinitionFile          = appDefinitions[m_selectedAppName];
            ExperimentViewModel newExperiment = new ExperimentViewModel(xmlDefinitionFile, null, "New");

            ExperimentViewModels.Add(newExperiment);
            NotifyOfPropertyChange(() => ExperimentViewModels);
            CheckEmptyExperimentList();

            CanLaunchExperiment = m_bIsExperimentListNotEmpty;

            SelectedExperiment = newExperiment;
        }
Exemplo n.º 13
0
        public WireConnectionViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent, XmlNode definitionNode, string parentXPath, XmlNode configNode = null)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            //the possible values taken by this world variable
            m_parentExperiment.GetWireNames(ref m_wireNames);
            NotifyOfPropertyChange(() => WireNames);

            if (configNode != null)
            {
                configNode   = configNode[name];
                SelectedWire = configNode.InnerText;
                parentExperiment.AddWire(SelectedWire);
            }

            m_parentExperiment.RegisterDeferredLoadStep(Update);
            m_parentExperiment.RegisterWireConnection(Update);
        }
        public WorldVarRefValueConfigViewModel(ExperimentViewModel parentExperiment, WorldVarType varType, ConfigNodeViewModel parent, XmlNode definitionNode, string parentXPath, XmlNode configNode = null)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            m_varType = varType;

            //if the list is already loaded, get it
            m_variables.Clear();
            foreach (string var in m_parentExperiment.GetWorldVarNameList(m_varType))
            {
                m_variables.Add(var);
            }
            NotifyOfPropertyChange(() => Variables);

            if (configNode != null)
            {
                configNode = configNode[name];
                //is the world variable wired?
                XmlNode wireConfigNode = configNode.FirstChild;
                if (wireConfigNode != null && wireConfigNode.Name == XMLTags.WireTag)
                {
                    content = wireConfigNode.InnerText;

                    if (wireConfigNode.Attributes[XMLTags.minValueAttribute] != null &&
                        wireConfigNode.Attributes[XMLTags.maxValueAttribute] != null)
                    {
                        double min = double.Parse(wireConfigNode.Attributes[XMLTags.minValueAttribute].Value);
                        double max = double.Parse(wireConfigNode.Attributes[XMLTags.maxValueAttribute].Value);
                        m_parentExperiment.AddWire(content, min, max);
                    }
                    else
                    {
                        m_parentExperiment.AddWire(content);
                    }
                }
                else
                {
                    content = configNode.InnerText;
                }
            }

            m_parentExperiment.RegisterWorldVarRef(Update);
            m_parentExperiment.RegisterDeferredLoadStep(Update);
        }
Exemplo n.º 15
0
        public EnumeratedValueConfigViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent,
                                              XmlNode definitionNode, string parentXPath, XmlNode configNode = null)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            m_class         = definitionNode.Attributes[XMLTags.classAttribute].Value;
            enumeratedNames = m_parentExperiment.GetEnumeratedType(m_class);

            if (configNode == null || configNode[name] == null)
            {
                content   = m_default;
                textColor = XMLTags.colorDefaultValue;
            }
            else
            {
                //init from config file
                content = configNode[name].InnerText;
            }
        }
        public ChoiceElementConfigViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent, XmlNode definitionNode
                                            , string parentXPath, XmlNode configNode = null)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            m_className = definitionNode.Attributes[XMLTags.classAttribute].Value;
            if (definitionNode.Attributes.GetNamedItem(XMLTags.windowAttribute) != null)
            {
                m_window = definitionNode.Attributes[XMLTags.windowAttribute].Value;
            }
            else
            {
                m_window = "";
            }
            if (definitionNode.Attributes.GetNamedItem(XMLTags.optionalAttribute) != null)
            {
                m_bOptional = definitionNode.Attributes[XMLTags.optionalAttribute].Value == "true";
            }
            else
            {
                m_bOptional = false;
            }
            if (definitionNode.Attributes.GetNamedItem(XMLTags.badgerMetadataAttribute) != null)
            {
                //BadgerMetadata="World=Wind-turbine"
                string metadata = definitionNode.Attributes[XMLTags.badgerMetadataAttribute].Value;
                if (metadata.StartsWith("World="))
                {
                    m_selectWorld = metadata.Remove(0, "World=".Length);
                }

                m_parentExperiment.SelectWorld(m_selectWorld);
            }


            if (configNode != null)
            {
                configNode = configNode[name];
            }
            //we allow an undefined class ("", most likely) and we just ignore children
            childrenInit(parentExperiment, parentExperiment.GetClassDefinition(m_className, true)
                         , m_xPath, configNode);
        }
Exemplo n.º 17
0
        //Initialization stuff common to all types of configuration nodes
        protected void CommonInitialization(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent,
                                            XmlNode definitionNode, string parentXPath)
        {
            name = definitionNode.Attributes[XMLTags.nameAttribute].Value;

            m_parent           = parent;
            m_parentExperiment = parentExperiment;
            nodeDefinition     = definitionNode;

            xPath = parentXPath + "/" + name;
            if (definitionNode.Attributes.GetNamedItem(XMLTags.defaultAttribute) != null)
            {
                m_default = definitionNode.Attributes[XMLTags.defaultAttribute].Value;
            }
            if (definitionNode.Attributes.GetNamedItem(XMLTags.commentAttribute) != null)
            {
                comment = definitionNode.Attributes[XMLTags.commentAttribute].Value;
            }
        }
Exemplo n.º 18
0
        /// <summary>
        /// Shows a dialog window where the user can select an experiment or project for loading
        /// </summary>
        public void LoadExperimentOrProject()
        {
            string extension = Files.ProjectDescription;
            string filter    = Files.ExperimentOrProjectFilter;

            List <string> filenames = Files.OpenFileDialogMultipleFiles(extension, filter);

            foreach (string filename in filenames)
            {
                string fileExtension = Herd.Utils.GetExtension(filename, 2);
                if (fileExtension == Extensions.Experiment)
                {
                    ExperimentViewModel newExperiment =
                        Files.LoadExperiment(appDefinitions, filename);

                    if (newExperiment != null)
                    {
                        ExperimentViewModels.Add(newExperiment);

                        SelectedExperiment = newExperiment;
                    }
                }
                else if (fileExtension == Extensions.Project)
                {
                    BindableCollection <ExperimentViewModel> newExperiments = new BindableCollection <ExperimentViewModel>();
                    Files.LoadExperiments(ref newExperiments, appDefinitions
                                          , MainWindowViewModel.Instance.LogToFile
                                          , filename);
                    ExperimentViewModels.AddRange(newExperiments);

                    if (ExperimentViewModels.Count > 0)
                    {
                        SelectedExperiment = ExperimentViewModels[0];
                    }
                }
            }

            CheckEmptyExperimentList();

            CanLaunchExperiment = m_bIsExperimentListNotEmpty;
        }
Exemplo n.º 19
0
        public BranchConfigViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent
                                     , XmlNode definitionNode, string parentXPath, XmlNode configNode = null, bool initChildren = true)
        {
            CommonInitialization(parentExperiment, parent, definitionNode, parentXPath);

            m_className = definitionNode.Attributes[XMLTags.classAttribute].Value;
            if (definitionNode.Attributes.GetNamedItem(XMLTags.windowAttribute) != null)
            {
                m_window = definitionNode.Attributes[XMLTags.windowAttribute].Value;
            }
            else
            {
                m_window = "";
            }
            if (definitionNode.Attributes.GetNamedItem(XMLTags.optionalAttribute) != null)
            {
                bIsOptional = bool.Parse(definitionNode.Attributes[XMLTags.optionalAttribute].Value);
            }
            else
            {
                bIsOptional = false;
            }

            if (configNode != null)
            {
                configNode = configNode[name];
                if (configNode != null && bIsOptional)
                {
                    bIsUsed = true;
                }
            }
            else if (bIsOptional)
            {
                bIsUsed = true;
            }

            if (initChildren)
            {
                childrenInit(parentExperiment, parentExperiment.GetClassDefinition(m_className), m_xPath, configNode);
            }
        }
Exemplo n.º 20
0
        //Constructor used from the experiment editor
        public ForkedNodeViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel forkedNode)
        {
            m_parent = forkedNode.parent;

            ForkValueViewModel newForkValue = new ForkValueViewModel("Value-0", this, forkedNode);

            children.Add(newForkValue);

            selectedForkValue = newForkValue;

            m_parentExperiment = parentExperiment;
            nodeDefinition     = forkedNode.nodeDefinition;
            name = forkedNode.name;
            NotifyOfPropertyChange(() => selectedForkValue);

            //register this fork
            m_parentExperiment.forkRegistry.Add(this);

            //we set the alias AFTER adding the fork to the registry to make sure that validation is properly done
            alias = forkedNode.name;
        }
Exemplo n.º 21
0
        //Constructor called when loading an experiment config file
        public ForkedNodeViewModel(ExperimentViewModel parentExperiment, ConfigNodeViewModel parentNode,
                                   XmlNode classDefinition, XmlNode configNode = null, bool initChildren = true)
        {
            //configNode must be non-null since no ForkedNodeVM can be created from the app defintion
            m_parentExperiment = parentExperiment;
            nodeDefinition     = classDefinition;
            m_parent           = parentNode;
            name = configNode.Attributes[XMLTags.nameAttribute].Value;

            if (initChildren)
            {
                foreach (XmlNode forkValueConfig in configNode.ChildNodes)
                {
                    children.Add(new ForkValueViewModel(parentExperiment, classDefinition, this, forkValueConfig));
                }
            }
            //notify changes
            if (children.Count > 0)
            {
                selectedForkValue = children[0] as ForkValueViewModel;
            }
            NotifyOfPropertyChange(() => children);

            //register this fork
            m_parentExperiment.forkRegistry.Add(this);

            //we set the alias AFTER adding the fork to the registry to make sure that validation is properly done
            if (configNode.Attributes.GetNamedItem(XMLTags.aliasAttribute) != null)
            {
                alias = configNode.Attributes.GetNamedItem(XMLTags.aliasAttribute).Value;
            }
            else
            {
                alias = name;
            }
        }
Exemplo n.º 22
0
 public WiresViewModel(ExperimentViewModel parent)
 {
     m_parent = parent;
 }
Exemplo n.º 23
0
 /// <summary>
 ///     Shows the wires defined in the current experiment
 /// </summary>
 /// <param name="experiment">The selected experiment</param>
 public void ShowWires(ExperimentViewModel experiment)
 {
     experiment.ShowWires();
 }
Exemplo n.º 24
0
 /// <summary>
 ///     Runs locally the experiment with its currently selected parameters
 /// </summary>
 /// <param name="experiment">The experiment to be run</param>
 public void RunExperimentalUnitLocallyWithCurrentParameters(ExperimentViewModel experiment)
 {
     experiment.RunLocallyCurrentConfiguration();
 }
Exemplo n.º 25
0
        //FACTORY
        public static ConfigNodeViewModel getInstance(ExperimentViewModel parentExperiment, ConfigNodeViewModel parent,
                                                      XmlNode definitionNode, string parentXPath, XmlNode configNode = null)
        {
            switch (definitionNode.Name)
            {
            case XMLTags.WireTag:
                return(new WireConnectionViewModel(parentExperiment, parent, definitionNode, parentXPath, configNode));

            case XMLTags.neuralNetworkNodeTag:
                return(new NeuralNetworkProblemDescriptionConfigViewModel(parentExperiment, parent, definitionNode,
                                                                          parentXPath, configNode));

            case XMLTags.integerNodeTag:
                return(new IntegerValueConfigViewModel(parentExperiment, parent, definitionNode,
                                                       parentXPath, configNode));

            case XMLTags.boolNodeTag:
                return(new BoolValueConfigViewModel(parentExperiment, parent, definitionNode,
                                                    parentXPath, configNode));

            case XMLTags.doubleNodeTag:
                return(new DoubleValueConfigViewModel(parentExperiment, parent, definitionNode,
                                                      parentXPath, configNode));

            case XMLTags.stringNodeTag:
                return(new StringValueConfigViewModel(parentExperiment, parent, definitionNode,
                                                      parentXPath, configNode));

            case XMLTags.filePathNodeTag:
                return(new FilePathValueConfigViewModel(parentExperiment, parent, definitionNode,
                                                        parentXPath, configNode));

            case XMLTags.dirPathNodeTag:
                return(new DirPathValueConfigViewModel(parentExperiment, parent, definitionNode,
                                                       parentXPath, configNode));

            case XMLTags.stateVarRefTag:
                return(new WorldVarRefValueConfigViewModel(parentExperiment, WorldVarType.StateVar,
                                                           parent, definitionNode, parentXPath, configNode));

            case XMLTags.actionVarRefTag:
                return(new WorldVarRefValueConfigViewModel(parentExperiment, WorldVarType.ActionVar,
                                                           parent, definitionNode, parentXPath, configNode));

            case XMLTags.branchNodeTag:
                return(new BranchConfigViewModel(parentExperiment, parent, definitionNode, parentXPath,
                                                 configNode));

            case XMLTags.choiceNodeTag:
                return(new ChoiceConfigViewModel(parentExperiment, parent, definitionNode, parentXPath,
                                                 configNode));

            case XMLTags.choiceElementNodeTag:
                return(new ChoiceElementConfigViewModel(parentExperiment, parent, definitionNode,
                                                        parentXPath, configNode));

            case XMLTags.enumNodeTag:
                return(new EnumeratedValueConfigViewModel(parentExperiment, parent, definitionNode,
                                                          parentXPath, configNode));

            case XMLTags.multiValuedNodeTag:
                return(new MultiValuedConfigViewModel(parentExperiment, parent, definitionNode,
                                                      parentXPath, configNode));

            default:
                return(null);
            }
        }