code: function(parentItem, children) {
  			// Note that the Parents property is not available for metadatas retrieved with fetchChildren().
  			var parents = parentItem.Projects ? [] : [parentItem].concat(parentItem.Parents || []);
  			if (this.excludeFiles || this.excludeFolders || this.filteredResources) {
  				var filtered = [];
  				children.forEach(function(child) {
  					var exclude = child.Directory ? this.excludeFolders : this.excludeFiles;
  					if(this.filteredResources && this.filter) {
  						exclude = exclude || this.filter.isFiltered(child.Name);
  					}
  					if (!exclude) {
  						filtered.push(child);
  						child.parent = parentItem;
  						if (!child.Parents) {
  							child.Parents = parents;
  						}
  					}
  				}.bind(this));
  				children = filtered;
  			} else {
  				children.forEach(function(child) {
  					child.parent = parentItem;
  					if (!child.Parents) {
  						child.Parents = parents;
  					}
  				});
  			}
  
  			//link the parent and children together
  			parentItem.children = children;
  
  			// not ideal, but for now, sort here so it's done in one place.
  			// this should really be something pluggable that the UI defines
  			parentItem.children.sort(this.sortChildren);
  			return children;
  		}
docs: /*
  Process the parent and children, doing any filtering or sorting that may be necessary.