Beispiel #1
0
        ///
        ///	 <summary> * get the one and only devCap - note that the spec allows <code>*</code>,
        ///	 * but recommends only one <code>+</code> additional actions.<br>
        ///	 * Also search devCapPool for a matching element to DevCapRef.
        ///	 *  </summary>
        ///	 * <returns> the DevCap </returns>
        ///
        public virtual JDFDevCap getDevCap()
        {
            string dcr = getAttribute(AttributeName.DEVCAPREF, null, null);

            if (dcr != null)
            {
                JDFDevCapPool dcp = getDevCapPool();
                if (dcp == null)
                {
                    return(null);
                }
                return((JDFDevCap)dcp.getChildWithAttribute(ElementName.DEVCAP, AttributeName.ID, null, dcr, 0, true));
            }
            return(getDevCap(0));
        }
Beispiel #2
0
        ///
        ///	 <summary> * getDevCapVector()
        ///	 *  </summary>
        ///	 * <returns> VElement </returns>
        ///
        public VElement getDevCapVector()
        {
            VElement vDevCap = getChildElementVector(ElementName.DEVCAP, null, null, true, 0, false);
            string   dcr     = getAttribute(AttributeName.DEVCAPREF, null, null);

            if (dcr != null)
            {
                JDFDevCapPool dcp = getDevCapPool();
                if (dcp != null)
                {
                    VString v = new VString(StringUtil.tokenize(dcr, " ", false));
                    for (int i = 0; i < v.Count; i++)
                    {
                        string   s    = v.stringAt(i);
                        KElement dcre = dcp.getChildWithAttribute(ElementName.DEVCAP, AttributeName.ID, null, s, 0, true);
                        vDevCap.appendUnique(dcre);
                    }
                }
            }
            return(vDevCap);
        }