org.n52.faroe.Validation类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.n52.faroe.Validation类的一些代码示例,展示了Validation类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Validation类的具体详情如下:
包路径:org.n52.faroe.Validation
类名称:Validation

Validation介绍

暂无

代码示例

代码示例来源:origin: org.n52.sensorweb.sos/inspire-code

/**
   * Set the INSPIRE id
   *
   * @param inspireId
   *            the INSPIRE id to set
   */
//    @Setting(InspireSettings.INSPIRE_ID_KEY)
  public void setInspireId(String inspireId) {
    Validation.notNullOrEmpty("The INSPIRE id", inspireId);
    this.inspireId = inspireId;
  }

代码示例来源:origin: org.n52.faroe/faroe-utils

public static String notNullOrEmpty(String name, String val) throws ConfigurationError {
    notNull(name, val);
    if (val.isEmpty()) {
      throw new ConfigurationError(String.format("%s can not be empty!", name));
    }
    return val;
  }
}

代码示例来源:origin: 52North/SOS

@Setting(CACHE_THREAD_COUNT)
public void setCacheThreadCount(int threads) throws ConfigurationError {
  Validation.greaterZero("Cache Thread Count", threads);
  this.cacheThreadCount = threads;
}

代码示例来源:origin: org.n52.iceland/iceland

@Setting(ScheduledContentCacheControllerSettings.CAPABILITIES_CACHE_UPDATE_INTERVAL)
public void setUpdateInterval(int interval) throws ConfigurationError {
  Validation.greaterEqualZero("Cache update interval", interval);
  if (this.updateInterval != interval) {
    this.updateInterval = interval;
    reschedule();
  }
}

代码示例来源:origin: 52North/SOS

/**
   * Set the INSPIRE id
   *
   * @param inspireId
   *            the INSPIRE id to set
   */
//    @Setting(InspireSettings.INSPIRE_ID_KEY)
  public void setInspireId(String inspireId) {
    Validation.notNullOrEmpty("The INSPIRE id", inspireId);
    this.inspireId = inspireId;
  }

代码示例来源:origin: org.n52.wps/service

@Setting(ServiceSettings.SERVICE_URL)
public void setServiceURL(URI serviceURL) {
  Validation.notNull("serviceURL", serviceURL);
  String url = serviceURL.toString();
  if (url.contains("?")) {
    url = url.split("[?]")[0];
  }
  this.serviceURL = url;
}

代码示例来源:origin: 52North/SOS

/**
 * Set storage EPSG code from settings
 *
 * @param epsgCode
 *                 EPSG code from settings
 *
 * @throws ConfigurationError
 *                            If an error occurs
 */
@Setting(FeatureQuerySettingsProvider.STORAGE_EPSG)
public void setStorageEPSG(int epsgCode) throws ConfigurationError {
  Validation.greaterZero("Storage EPSG Code", epsgCode);
  this.storageEPSG = epsgCode;
}

代码示例来源:origin: org.n52.arctic-sea/svalbard-json

private String getLocalId(JsonNode node) throws DecodingException {
  String localId = node.path(AQDJSONConstants.LOCAL_ID).textValue();
  Validation.notNullOrEmpty("Identifier localId", localId);
  return localId;
}

代码示例来源:origin: org.n52.arctic-sea/faroe-utils

public static String notNullOrEmpty(String name, String val) throws ConfigurationError {
    notNull(name, val);
    if (val.isEmpty()) {
      throw new ConfigurationError(String.format("%s can not be empty!", name));
    }
    return val;
  }
}

代码示例来源:origin: 52North/SOS

/**
 * Set storage 3D EPSG code from settings
 *
 * @param epsgCode3D
 *                   3D EPSG code from settings
 *
 * @throws ConfigurationError
 *                            If an error occurs
 */
@Setting(FeatureQuerySettingsProvider.STORAGE_3D_EPSG)
public void setStorage3DEPSG(int epsgCode3D) throws ConfigurationError {
  Validation.greaterZero("Storage 3D EPSG Code", epsgCode3D);
  this.storage3DEPSG = epsgCode3D;
}

代码示例来源:origin: org.n52.arctic-sea/svalbard-json

private String getNamespace(JsonNode node) throws DecodingException {
  String namespace = node.path(AQDJSONConstants.NAMESPACE).textValue();
  Validation.notNullOrEmpty("Identifier namespace", namespace);
  return namespace;
}

代码示例来源:origin: 52North/SOS

@Setting(ProcedureDescriptionSettings.CLASSIFIER_INTENDED_APPLICATION_DEFINITION)
public void setClassifierIntendedApplicationDefinition(final String classifierIntendedApplicationDefinition) {
  Validation.notNull(CLASSIFIER_INTENDED_APPLICATION_DEFINITION, classifierIntendedApplicationDefinition);
  this.classifierIntendedApplicationDefinition = classifierIntendedApplicationDefinition;
}

代码示例来源:origin: 52North/SOS

/**
 * Set default response EPSG code from settings
 *
 * @param epsgCode
 *                 EPSG code from settings
 *
 * @throws ConfigurationError
 *                            If an error occurs
 */
@Setting(FeatureQuerySettingsProvider.DEFAULT_RESPONSE_EPSG)
public void setDefaultResponseEPSG(int epsgCode) throws ConfigurationError {
  Validation.greaterZero("Storage EPSG Code", epsgCode);
  this.defaultResponseEPSG = epsgCode;
}

代码示例来源:origin: org.n52.arctic-sea/svalbard

@Setting(CodingSettings.TOKEN_SEPARATOR)
public void setTokenSeparator(final String separator) throws ConfigurationError {
  Validation.notNullOrEmpty("Token separator", separator);
  tokenSeparator = separator;
}

代码示例来源:origin: 52North/SOS

@Setting(ServiceSettings.SERVICE_URL)
public void setServiceURL(final URI serviceURL)
    throws ConfigurationError {
  Validation.notNull("Service URL", serviceURL);
  String url = serviceURL.toString();
  if (url.contains("?")) {
    url = url.split("[?]")[0];
  }
  this.serviceURL = url;
}

代码示例来源:origin: 52North/SOS

/**
 * Set default response 3D EPSG code from settings
 *
 * @param epsgCode3D
 *                   3D EPSG code from settings
 *
 * @throws ConfigurationError
 *                            If an error occurs
 */
@Setting(FeatureQuerySettingsProvider.DEFAULT_RESPONSE_3D_EPSG)
public void setDefaultResponse3DEPSG(int epsgCode3D) throws ConfigurationError {
  Validation.greaterZero("Storage 3D EPSG Code", epsgCode3D);
  this.defaultResponse3DEPSG = epsgCode3D;
}

代码示例来源:origin: org.n52.arctic-sea/svalbard

@Setting(CodingSettings.TUPLE_SEPARATOR)
public void setTupleSeparator(final String separator) throws ConfigurationError {
  Validation.notNullOrEmpty("Tuple separator", separator);
  tupleSeparator = separator;
}

代码示例来源:origin: org.n52.sensorweb.sos/core-v20

@Setting(ServiceSettings.SERVICE_URL)
public void setServiceURL(final URI serviceURL) throws ConfigurationError {
  Validation.notNull("Service URL", serviceURL);
  String url = serviceURL.toString();
  if (url.contains("?")) {
    url = url.split("[?]")[0];
  }
  this.serviceURL = url;
}

代码示例来源:origin: 52North/SOS

/**
 * Set storage EPSG code from settings
 *
 * @param epsgCode EPSG code from settings
 *
 * @throws ConfigurationError If an error occurs
 */
@Setting(FeatureQuerySettingsProvider.STORAGE_EPSG)
public void setStorageEpsg(int epsgCode) throws ConfigurationError {
  Validation.greaterZero("Storage EPSG Code", epsgCode);
  storageEPSG = epsgCode;
  addToSupportedCrs(epsgCode);
}

代码示例来源:origin: org.n52.sensorweb.sos/hibernate-common

@Setting(ProcedureDescriptionSettings.DESCRIPTION_TEMPLATE)
public void setDescriptionTemplate(String descriptionTemplate) {
  Validation.notNullOrEmpty(DESCRIPTION_TEMPLATE, descriptionTemplate);
  this.descriptionTemplate = descriptionTemplate;
}

相关文章