class FieldFormItem extends AbstractGrammarContainer {

    public int setFormItemVariable(final RecognitionResult result)
            throws SemanticError {
        // Propagate the result to the field's shadow variable container.
        final VoiceXmlInterpreterContext context = getContext();
        final DataModel model = context.getDataModel();
        final String shadowVariableName = getShadowVarContainerName();
        final LastResult lastresult = toLastResult(model, result);
        model.updateVariable(shadowVariableName, lastresult);

        // Check for semantic interpretation
        final Object interpretation = result.getSemanticInterpretation(model);
        if (interpretation == null) {
            final String utterance = result.getUtterance();
            return super.setFormItemVariable(utterance);
        } else {
            // Check if the we need to pick a subproperty of the semantic
            // interpretation
            final String slot = getSlot();
            final String slotPath = "application.lastresult$.interpretation."
                    + slot;
            if (model.existsVariable(slotPath)) {
                final Object value = model.readVariable(slotPath, Object.class);
                return super.setFormItemVariable(value);
            } else {
                return super.setFormItemVariable(interpretation);
            }
        }
    }

    public  FieldFormItem();
    public  FieldFormItem(final VoiceXmlInterpreterContext context,
            final VoiceXmlNode voiceNode);

}