* @param nodes the nodes
* @param datamartName the datamart name
*/
public void addEntityNodes(JSONArray nodes, String datamartName) {
int nodeCounter = 0;
FilteredModelStructure filteredModelStructure = new FilteredModelStructure(dataSource.getModelStructure(), getDataSource(), getQbeTreeFilter());
List entities = filteredModelStructure.getRootEntities(datamartName);
Iterator it = entities.iterator();
while(it.hasNext()) {
IModelEntity entity = (IModelEntity)it.next();
addEntityNode(nodes, entity, 1);