コード例 #1
0
  public WMSTiledImageLayer(String stateInXml) {
    this(wmsRestorableStateToParams(stateInXml));

    RestorableSupport rs;
    try {
      rs = RestorableSupport.parse(stateInXml);
    } catch (Exception e) {
      // Parsing the document specified by stateInXml failed.
      String message = Logging.getMessage("generic.ExceptionAttemptingToParseStateXml", stateInXml);
      Logging.logger().severe(message);
      throw new IllegalArgumentException(message, e);
    }

    this.doRestoreState(rs, null);
  }
コード例 #2
0
  protected static AVList wmsRestorableStateToParams(String stateInXml) {
    if (stateInXml == null) {
      String message = Logging.getMessage("nullValue.StringIsNull");
      Logging.logger().severe(message);
      throw new IllegalArgumentException(message);
    }

    RestorableSupport rs;
    try {
      rs = RestorableSupport.parse(stateInXml);
    } catch (Exception e) {
      // Parsing the document specified by stateInXml failed.
      String message = Logging.getMessage("generic.ExceptionAttemptingToParseStateXml", stateInXml);
      Logging.logger().severe(message);
      throw new IllegalArgumentException(message, e);
    }

    AVList params = new AVListImpl();
    wmsRestoreStateToParams(rs, null, params);
    return params;
  }