AttributeHierarchy ah = result.getAttributeWithSubtypes( property );
// switch operation:
if ( ah == null && newRawValue != null )
{
new CompoundModification().createValue( result.getEntry(), property, newRawValue );
}
else if ( ah != null && newRawValue == null )
{
List<IValue> values = new ArrayList<IValue>();
for ( IAttribute attribute : ah.getAttributes() )
{
for ( IValue value : attribute.getValues() )
{
values.add( value );
}
}
new CompoundModification().deleteValues( values );
}
else if ( ah != null && ah.size() == 1 && ah.getAttribute().getValueSize() == 1 && newRawValue != null )
{
new CompoundModification().modifyValue( ah.getAttribute().getValues()[0], newRawValue );
}
}
}