/// /// <summary> * } getAudits - get all audits with attributes and partMap /// * </summary> /// * <param name="typ"> type of the audit to take </param> /// * <param name="mAttributes"> attribute map to filter the audits </param> /// * <param name="vParts"> the partmap vector - note that not all audits legally have parts </param> /// * <returns> VElement - all elements, that matches the filter /// * /// * default: getAudits(null, null, null) </returns> /// public virtual VElement getAudits(JDFAudit.EnumAuditType typ, JDFAttributeMap mAttributes, VJDFAttributeMap vParts) { VJDFAttributeMap vPartsLocal = vParts; string strAuditType = null; if (typ != null) { strAuditType = typ.getName(); } VElement vElem = getPoolChildrenGeneric(strAuditType, mAttributes, null); if (vPartsLocal != null && vPartsLocal.Count == 0) { vPartsLocal = null; } for (int i = vElem.Count - 1; i >= 0; i--) { // remove known comments - this would be aught in the next check but // we avoid the exception if (!(vElem[i] is JDFAudit)) { vElem.RemoveAt(i); continue; // look at next element } JDFAudit audit = (JDFAudit)vElem[i]; if (vPartsLocal != null && !vPartsLocal.Equals(audit.getPartMapVector())) { vElem.RemoveAt(i); continue; // look at next element } } return(vElem); }
public virtual VElement getQueueEntryVector(JDFAttributeMap attMap, VJDFAttributeMap parts) { VElement v = getChildElementVector(ElementName.QUEUEENTRY, null, attMap, true, -1, true); if (parts != null) { for (int i = v.Count - 1; i >= 0; i--) { JDFQueueEntry qe = (JDFQueueEntry)v[i]; if (!parts.Equals(qe.getPartMapVector())) { v.RemoveAt(i); } } } return((v == null || v.Count == 0) ? null : v); }
public virtual VString findQueueEntries(string strJobID, string strJobPartID, VJDFAttributeMap vamParts, EnumQueueEntryStatus status) { VString vsQEntryIDs = new VString(); int entryCount = getEntryCount(); for (int i = 0; i < entryCount; i++) { JDFQueueEntry entry = getQueueEntry(i); string strQEJobID = entry.getJobID(); string strQEJobPartID = entry.getJobPartID(); VJDFAttributeMap vamQEParts = entry.getPartMapVector(); EnumQueueEntryStatus statusQE = entry.getQueueEntryStatus(); if (strJobID.Equals(strQEJobID) && strJobPartID.Equals(strQEJobPartID) && vamParts.Equals(vamQEParts)) { if ((status == null) || (status.Equals(statusQE))) { vsQEntryIDs.appendUnique(entry.getQueueEntryID()); } } } return(vsQEntryIDs); }