private Slicing PrepareSlice(Profile.ElementComponent source)
        {
            Slicing slicing = new Slicing();

            slicing.Path          = new Path(source.Path);
            slicing.Discriminator = new Path(source.Slicing.Discriminator);
            return(slicing);
        }
        internal void InjectSlice(Element element)
        {
            Slicing slicing = GetSlicingForElement(element);

            if (slicing != null)
            {
                element.Discriminator = slicing.Discriminator;
                slicing.Count++;
            }
        }
Example #3
0
        private Slicing readSlicing(XPathNavigator node)
        {
            Slicing slicing = new Slicing();

            slicing.Discriminator = new Path(Value(node, "f:slicing/f:discriminator/@value"));
            slicing.Path          = ReadElementPath(node);
            //slicing.Rule = (SlicingRules)Enum.Parse(typeof(SlicingRules), Value(node, "f:slicing/f:rules/@value"));
            //slicing.Ordered = (Value(node, "f:slicing/f:ordered/@value").ToLower() == "true");
            return(slicing);
        }
 public void PrepareSlices(Profile.ProfileStructureComponent source)
 {
     foreach (Profile.ElementComponent e in source.Element)
     {
         if (e.Slicing != null)
         {
             Slicing s = PrepareSlice(e);
             Slicings.Add(s);
         }
     }
 }
Example #5
0
 public void PreReadSlices(Structure structure, XPathNodeIterator xNodes)
 {
     foreach (XPathNavigator node in xNodes)
     {
         if (IsSliceDefinitionNode(node))
         {
             Slicing s = readSlicing(node);
             Slicings.Add(s);
         }
     }
 }
Example #6
0
        public void InjectSlice(Element element, XPathNavigator node)
        {
            Slicing slicing = GetSlicingForElement(element);

            if (slicing != null)
            {
                if (IsSliceDefinitionNode(node))
                {
                    // todo: SlicingRules op de slicing-element-null implementeren
                }
                else
                {
                    element.Discriminator = slicing.Discriminator;
                    element.Slice         = ++slicing.Count;
                }
            }
        }
        internal Slicing GetSlicingForElement(Element element)
        {
            Slicing slicing = Slicings.FirstOrDefault(s => s.Path.Equals(element.Path));

            return(slicing);
        }
 private Slicing readSlicing(XPathNavigator node)
 {
     Slicing slicing = new Slicing();
     slicing.Discriminator = new Path(Value(node, "f:slicing/f:discriminator/@value"));
     slicing.Path = ReadElementPath(node);
     //slicing.Rule = (SlicingRules)Enum.Parse(typeof(SlicingRules), Value(node, "f:slicing/f:rules/@value"));
     //slicing.Ordered = (Value(node, "f:slicing/f:ordered/@value").ToLower() == "true");
     return slicing;
 }
 private Slicing PrepareSlice(Profile.ElementComponent source)
 {
     Slicing slicing = new Slicing();
     slicing.Path = new Path(source.Path);
     slicing.Discriminator = new Path(source.Slicing.Discriminator);
     return slicing;
 }