Beispiel #1
0
        public static FormInstance subDataModel(TreeElement top)
        {
            TreeElement newTop = top.shallowCopy();

            newTop.setMult(0);
            return(new FormInstance(newTop));
        }
Beispiel #2
0
        public static void mergeDataModel(FormInstance parent, FormInstance child, TreeReference parentRef)
        {
            TreeElement parentNode = parent.resolveReference(parentRef);

            //ugly
            if (parentNode == null)
            {
                parentRef  = parent.addNode(parentRef);
                parentNode = parent.resolveReference(parentRef);
            }
            TreeElement childNode = child.getRoot();

            int mult = parentNode.getChildMultiplicity(childNode.getName());

            childNode.setMult(mult);

            parentNode.addChild(childNode);
        }