Problem in AttributeRole
@OverrideWhat is worng in the code??
public void doWork() throws OperatorException
{
File file = getParameterAsFile("example_set_file");
ExampleSet eSet = exampleSetInput.getData();
try
{
Attribute sum = AttributeFactory.createAttribute("sum", Attributes.SPECIAL);
eSet.getExampleTable().addAttribute(sum);
eSet.getAttributes().add(eSet.getAttributes().findRoleByName("id"));
}
catch (IOException e)
{
throw new UserError(this, 303, file, e.getMessage());
}
exampleSetOutput.deliver(eSet);
}
Find more posts tagged with
Sort by:
1 - 3 of
31
what should be the problem with this code? Do you get an error when you are trying to compile it?
Or does it behave unexpectedly?
Best,
Nils