class ParamParser {

    public Map<String, Object> getParameters() throws SemanticError,
            BadFetchError {
        final Collection<Param> paramtags = node.getChildNodes(Param.class);

        final Map<String, Object> parameters =
                new java.util.HashMap<String, Object>();

        for (Param param : paramtags) {
            final String name = param.getName();
            Object value = param.getValue();
            if (value == null) {
                final String expr = param.getExpr();
                if (expr == null) {
                    throw new BadFetchError("Exactly one of \"value\" or "
                            + "\"expr\" must be specified in a param tag!");
                }
                final String unescapedExpr = StringEscapeUtils
                        .unescapeXml(expr);
                value = model.evaluateExpression(unescapedExpr, Object.class);
            } else {
                final ParamValueType valueType = param.getValuetype();
                if (valueType == ParamValueType.REF) {
                    final URI uri;
                    try {
                        uri = new URI(value.toString());
                    } catch (URISyntaxException e) {
                        throw new BadFetchError("'" + value
                                + "' is not a valid URI");
                    }
                    final String type = param.getType();
                    final DocumentDescriptor descriptor =
                            new DocumentDescriptor(uri);
                    value = server.getObject(sessionId, descriptor, type);
                }
            }
            parameters.put(name, value);
        }

        return parameters;
    }

      ParamParser(final VoiceXmlNode vxml, final DataModel dataModel,
            final DocumentServer documentServer, final Session currentSession);

}