return null;
}
private static AttributeMetaData[] selectCommonAttributes(final ReportElement[] elements)
{
final AttributeMap attributes = new AttributeMap();
final ArrayList<AttributeMetaData> selectedArrays = new ArrayList<AttributeMetaData>();
for (int elementCount = 0; elementCount < elements.length; elementCount++)
{
final ReportElement element = elements[elementCount];
final AttributeMetaData[] datas = element.getMetaData().getAttributeDescriptions();
for (int j = 0; j < datas.length; j++)
{
final AttributeMetaData data = datas[j];
final String name = data.getName();
final String namespace = data.getNameSpace();
if (data.isHidden())
{
attributes.setAttribute(namespace, name, Boolean.FALSE);
continue;
}
final Object attribute = attributes.getAttribute(namespace, name);
if (Boolean.TRUE.equals(attribute))
{
// fine, we already have a value for it.
}
else if (attribute == null)
{
// add it ..
if (elementCount == 0)
{
attributes.setAttribute(namespace, name, Boolean.TRUE);
}
else
{
attributes.setAttribute(namespace, name, Boolean.FALSE);
}
}
}
}
final String[] namespaces = attributes.getNameSpaces();
for (int nsIdx = 0; nsIdx < namespaces.length; nsIdx++)
{
final String namespace = namespaces[nsIdx];
final String[] names = attributes.getNames(namespace);
for (int namesIdx = 0; namesIdx < names.length; namesIdx++)
{
final String name = names[namesIdx];
final Object attribute = attributes.getAttribute(namespace, name);
if (Boolean.TRUE.equals(attribute))
{
selectedArrays.add(find(elements[0].getMetaData().getAttributeDescriptions(), namespace, name));
}
}