Ejemplo n.º 1
0
        ///
        ///	 <summary> * get the linked resources matching some conditions
        ///	 *  </summary>
        ///	 * <param name="mResAtt"> map of Resource attributes to search for </param>
        ///	 * <param name="bFollowRefs"> true if internal references shall be followed </param>
        ///	 * <returns> VElement vector with all elements matching the conditions
        ///	 *
        ///	 *         default: getLinkedResources(null, true) </returns>
        ///
        public virtual VElement getLinkedResources(JDFAttributeMap mResAtt, bool bFollowRefs)
        {
            VString refs = getHRefs(null, false, true);

            refs.unify();
            VElement v = new VElement();

            for (int i = 0; i < refs.Count; i++)
            {
                KElement e = getTarget(refs[i], AttributeName.ID);
                if (e != null && e.includesAttributes(mResAtt, true))
                {
                    v.Add(e);
                    if (bFollowRefs && (e is JDFElement))
                    {
                        v.appendUnique(((JDFElement)e).getvHRefRes(bFollowRefs, true));
                    }
                }
            }
            return(v);
        }