{
if (nm instanceof BioPAXNode)
{
BioPAXNode node = (BioPAXNode) nm;
Representable data = node.getRepresentableData(type);
/* UK: in-house fix for differentiating proteins from other physicalEntities.
* Could, and perhaps should, be done in a better way...
* */
boolean isProt = false;
if (node instanceof Actor){
Actor a = (Actor) node;
EntityHolder holder = a.getEntity();
isProt = holder.l3pe.getClass().toString().contains("tein");
}
if (data == null)
{
/* UK: "If entity is a protein and has no experimental data: use light blue."
* This is interesting in terms of proteomics as we can not get any data on other types of molecules,
* and thus what's interesting to see, immediately, is which proteins are there and which ones are modified.
*
* A good way to implement this feature "cleanly" would be to add a visibility filter for different types of
* physicalEntities, such as proteins. */
if(isProt)
node.setColor(noDataC_Protein);
else
node.setColor(noDataC);
node.setTooltipText(noDataText);
node.setTextColor(Actor.DEFAULT_TEXT_COLOR);
}
else
{
if (data.alterNodeColor()) node.setColor(data.getNodeColor());
if (data.alterTextColor()) node.setTextColor(data.getTextColor());
if (data.alterToolTipText()) node.setTooltipText(data.getToolTipText());
}
}
}
}