protected void doGetRestorableStateForAVPair(
     String key, Object value, RestorableSupport rs, RestorableSupport.StateObject context) {
   if (value instanceof URLBuilder) {
     rs.addStateValueAsString(context, "wms.Version", ((URLBuilder) value).wmsVersion);
     rs.addStateValueAsString(context, "wms.Crs", ((URLBuilder) value).crs);
   } else {
     super.doGetRestorableStateForAVPair(key, value, rs, context);
   }
 }
  protected static AVList wmsGetParamsFromDocument(Element domElement, AVList params) {
    if (domElement == null) {
      String message = Logging.getMessage("nullValue.DocumentIsNull");
      Logging.logger().severe(message);
      throw new IllegalArgumentException(message);
    }

    if (params == null) params = new AVListImpl();

    LayerConfiguration.getWMSTiledImageLayerParams(domElement, params);
    BasicTiledImageLayer.getParamsFromDocument(domElement, params);

    params.setValue(AVKey.TILE_URL_BUILDER, new URLBuilder(params));

    return params;
  }