/** * Adds an array of events to the calendar. * * @param eventsArray the events to be included in the calendar * @see ERCalendarEvent * @see #addEvent(ERCalendarEvent) */ public void addEventsFromArray (NSArray eventsArray) { events.addObjectsFromArray (eventsArray); }
public DRAttributeGroup(String keyPath, String format, String label, boolean shouldTotal, NSArray attributes, NSDictionary userInfo) { super(keyPath, format, label, shouldTotal, userInfo); if (attributes != null) { _attributes.addObjectsFromArray(attributes); } flatListForAttributeList(); }
public NSArray<ERIAttribute> allAttributes() { NSMutableArray<ERIAttribute> result = new NSMutableArray<>(); for (ERIAttributeGroup group : groups()) { result.addObjectsFromArray(attributes()); } return result; }
public void buildGrandTotal() { DRRecordGroup rg = DRRecordGroup.withCriteriaGroupParent(null, null, null); registerRecordGroupWithCoordinates(rg, new NSDictionary()); rg.recordList().addObjectsFromArray(_records); //OWDebug.println(1, "buildGrandTotal: rg:"+ rg); }
public DRValue valueForAttributeRecord(DRAttribute att, DRRecord rec) { DRValue vl; if (!att.isGroup()) { vl = DRValue.withRecordAttribute(rec, att); _flatValueList.addObject(vl); } else { vl = DRValueGroup.withRecordAttribute(rec, att); NSArray subvls = vl.flatValues(); _flatValueList.addObjectsFromArray(subvls); } return vl; }
@Override protected void processTestElements(NSMutableArray<SeleniumTest.Element> elements) { int includeCount = 0; int i = 0; while (i < elements.count()) { SeleniumTest.Element element = elements.get(i); if (element instanceof SeleniumTest.MetaCommand) { SeleniumTest.MetaCommand metaCommand = (SeleniumTest.MetaCommand)element; if (metaCommand.getName().equals("include")) { if (includeCount >= INCLUDE_LIMIT) { throw new RuntimeException("Too many @include commands (recursive include?)"); } NSArray<SeleniumTest.Element> newElements = getIncludedArguments(metaCommand.argumentsString()); NSArray<SeleniumTest.Element> tailElements = elements.subarrayWithRange(new NSRange(i + 1, elements.count() - i - 1)); elements.removeObjectsInRange(new NSRange(i, elements.count() - i)); elements.addObjectsFromArray(newElements); elements.addObjectsFromArray(tailElements); ++includeCount; } } ++i; } }
protected NSArray _ignoredPackages() { NSBundle bundle; String path, content; NSDictionary dic = null; NSMutableArray<NSBundle> allBundles = new NSMutableArray<>(NSBundle.frameworkBundles()); NSMutableArray<String> ignored = new NSMutableArray<>(); for (Enumeration enumerator = allBundles.objectEnumerator(); enumerator.hasMoreElements(); ) { bundle = (NSBundle) enumerator.nextElement(); path = WOApplication.application().resourceManager().pathForResourceNamed("WOIgnoredPackage.plist",bundle.name(),null); if (path != null) { content = _stringFromFileSafely(path); if (content != null) { dic = (NSDictionary) NSPropertyListSerialization.propertyListFromString(content); if (dic != null && dic.containsKey("ignoredPackages")) { @SuppressWarnings("unchecked") NSArray<String> tmpArray = (NSArray<String>) dic.objectForKey("ignoredPackages"); if (tmpArray != null && tmpArray.count() > 0) { ignored.addObjectsFromArray(tmpArray); } } } } } System.out.println("_ignoredPackages:: "+ignored); return ignored; }
public void flatListForAttribute(DRAttribute att) { //OWDebug.println(1, "att:"+att); if (!att.isGroup()) { //OWDebug.println(1, "att is NOT group"); _flatAttributeList.addObject(att); } else { //OWDebug.println(1, "att IS group"); NSArray subvls = att.flatAttributesWithDepthDictionary(_attributeListDepth, _flatAttributeDepthDict); _flatAttributeList.addObjectsFromArray(subvls); if (att.shouldTotal()) { _flatAttributeList.addObject(att); } } Number dpthKey = Integer.valueOf(_attributeListDepth); //OWDebug.println(1, "dpthKey:"+dpthKey); NSMutableArray lst = (NSMutableArray)_flatAttributeDepthDict.objectForKey(dpthKey); if (lst == null) { lst = new NSMutableArray(); _flatAttributeDepthDict.setObjectForKey(lst, dpthKey); } lst.addObject(att); //OWDebug.println(1, "lst:"+lst); }
protected void flatListForAttributeDepthDictionary(DRAttribute att, int attributeListDepth, NSMutableDictionary flatAttributeDepthDict) { NSMutableArray lst; Number dpthKey; if (!att.isGroup()) { _flatAttributes.addObject(att); } else { NSArray subvls = att.flatAttributesWithDepthDictionary(attributeListDepth, flatAttributeDepthDict); _flatAttributes.addObjectsFromArray(subvls); if (att.shouldTotal()) { _flatAttributes.addObject(att); } } if (flatAttributeDepthDict != null) { dpthKey = Integer.valueOf(attributeListDepth); lst = (NSMutableArray)flatAttributeDepthDict.objectForKey(dpthKey); if (lst == null) { lst = new NSMutableArray(); flatAttributeDepthDict.setObjectForKey(lst, dpthKey); } lst.addObject(att); } }
private void buildSubValues() { NSArray attrs = attribute().attributes(); Enumeration anEnum = attrs.objectEnumerator(); while (anEnum.hasMoreElements()) { DRAttribute att = (DRAttribute)anEnum.nextElement(); DRValue val; if (att.isGroup()) { val = DRValueGroup.withRecordAttribute(record(), att); NSArray vals = val.flatValues(); _flatValues.addObjectsFromArray(vals); } else { val = DRValue.withRecordAttribute(record(), att); _flatValues.addObject(val); } double subtot = val.total(); _total = _total+subtot; _values.addObject(val); } if (attribute().shouldTotal()) { _flatValues.addObject(DRValue.withTotalAttribute(_total, attribute())); } }
config.keys.addObjectsFromArray(keys); for (Enumeration e = config.keys.objectEnumerator(); e.hasMoreElements();) { String key = (String) e.nextElement();
_groups = (NSArray)dict.objectForKey("groups"); _groupDict = (NSDictionary)dict.objectForKey("lookup"); _vList.addObjectsFromArray(_groups); groupAllRecordGroups(); log.debug("ABOUT TO GET flatListForAttributeList");
anArray.addObjectsFromArray(additionalArgumentsAsArray());
fetchAttributes.addObjectsFromArray(_entity.primaryKeyAttributes()); EOSQLExpression sqlExpression = sqlHelper.sqlExpressionForFetchSpecification(editingContext, fetchSpec, 0, -1, fetchAttributes); NSMutableArray<EOAttribute> groupByAttributes = new NSMutableArray<>(); groupByAttributes.addObjectsFromArray(pkAttrs); sqlHelper.addGroupByClauseToExpression(groupByAttributes, sqlExpression); sqlHelper.addHavingCountClauseToExpression(EOQualifier.QualifierOperatorEqual, tagNames.count(), sqlExpression); tagsFetchAttributes.addObjectsFromArray(_entity.primaryKeyAttributes());