return;
}
if (reg.getType() == DispelObjectType.PROCESSING_ELEMENT_TYPE)
{
ProcessingElementType peType = (ProcessingElementType)entry.getValue().getObject();
if (peType.getImplementation() != null)
{
LOG.debug("Writing registered composite processing element " + entry.getKey());
Graph component = GraphUtilities.getConnectedComponent(
peType.getImplementation());
String image =
convertToImage(component, variables);
mRegistered.put(reg.name, image);
}
else
{
LOG.debug("Registering processing element type " + entry.getKey());
StringBuilder pe = new StringBuilder();
pe.append("Type ");
pe.append(reg.name);
if (peType.getDescriptor().getSuperType() != null
&& !peType.getDescriptor().getSuperType().isEmpty())
{
pe.append(" is PE<");
pe.append(peType.getDescriptor().getSuperType().iterator().next());
pe.append(">;");
}
else
{
pe.append(" is PE(<");
for (ProcessingElementInputDescriptor input : peType.getDescriptor().getInputs())
{
pe.append("Connection ");
if (input.getIsDataSourceInput())
{
pe.append("locator ");
}
pe.append(input.getName());
pe.append("; ");
}
if (!peType.getDescriptor().getInputs().isEmpty())
{
pe.delete(pe.length()-2, pe.length());
}
pe.append("> => <");
for (ProcessingElementOutputDescriptor output : peType.getDescriptor().getOutputs())
{
pe.append("Connection ");
pe.append(output.getName());
pe.append("; ");
}
if (!peType.getDescriptor().getOutputs().isEmpty())
{
pe.delete(pe.length()-2, pe.length());
}
pe.append(">);");
}