org.n52.faroe.Validation.notNull()方法的使用及代码示例

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

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

Validation.notNull介绍

暂无

代码示例

代码示例来源: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

@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

@Setting(ProcedureDescriptionSettings.ENRICH_WITH_OFFERINGS)
public void setEnrichWithOfferings(final boolean enrichWithOfferings) {
  Validation.notNull(ENRICH_WITH_OFFERINGS, enrichWithOfferings);
  this.enrichWithOfferings = enrichWithOfferings;
}

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

@Setting(ProcedureDescriptionSettings.ENRICH_WITH_FEATURES)
public void setEnrichWithFeatures(final boolean enrichWithFeatures) {
  Validation.notNull(ENRICH_WITH_FEATURES, enrichWithFeatures);
  this.enrichWithFeatures = enrichWithFeatures;
}

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

@Setting(ProcedureDescriptionSettings.ENRICH_WITH_DISCOVERY_INFORMATION)
public void setEnrichWithDiscoveryInformation(final boolean enrichWithDiscoveryInformation) {
  Validation.notNull(ENRICH_WITH_DISCOVERY_INFORMATION, enrichWithDiscoveryInformation);
  this.enrichWithDiscoveryInformation = enrichWithDiscoveryInformation;
}

代码示例来源: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: 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: org.n52.iceland/iceland

@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

@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: 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: 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: org.n52.iceland/iceland

@Setting(ServiceSettings.SERVICE_URL)
public void setServiceURL(final URI serviceURL)
    throws ConfigurationError {
  this.serviceURL = Validation.notNull("Service URL", serviceURL);
}

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

@Setting(MiscSettings.HTTP_STATUS_CODE_USE_IN_KVP_POX_BINDING)
public void setUseHttpStatusCodesInKvpAndPoxBinding(final boolean useHttpStatusCodesInKvpAndPoxBinding) {
  Validation.notNull(MiscSettings.HTTP_STATUS_CODE_USE_IN_KVP_POX_BINDING, useHttpStatusCodesInKvpAndPoxBinding);
  this.useHttpStatusCodesInKvpAndPoxBinding = useHttpStatusCodesInKvpAndPoxBinding;
}

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

@Setting(ProcedureDescriptionSettings.CLASSIFIER_PROCEDURE_TYPE_DEFINITION)
public void setClassifierProcedureTypeDefinition(final String classifierProcedureTypeDefinition) {
  Validation.notNull(CLASSIFIER_PROCEDURE_TYPE_DEFINITION, classifierProcedureTypeDefinition);
  this.classifierProcedureTypeDefinition = classifierProcedureTypeDefinition;
}

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

@Setting(ProcedureDescriptionSettings.USE_SERVICE_CONTACT_AS_PROCEDURE_CONTACT)
public void setUseServiceContactAsProcedureContact(final boolean useServiceContactAsProcedureContact) {
  Validation.notNull(USE_SERVICE_CONTACT_AS_PROCEDURE_CONTACT, useServiceContactAsProcedureContact);
  this.useServiceContactAsProcedureContact = useServiceContactAsProcedureContact;
}

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

@Setting(FeatureQuerySettingsProvider.AUTHORITY)
public GeometryHandler setAuthority(final String authority) {
  Validation.notNull("The CRS authority", authority);
  this.authority = authority;
  return this;
}

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

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

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

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

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

@Setting(OwsServiceIdentificationFactorySettings.ABSTRACT)
public void setAbstract(Object description) throws ConfigurationError {
  Validation.notNull("Service Identification Abstract", description);
  if (description instanceof MultilingualString) {
    this.abstrakt = (MultilingualString) description;
  } else if (description instanceof String) {
    this.abstrakt = createFromString(description);
  } else {
    throw new ConfigurationError(
        String.format("%s is not supported as abstract!", description.getClass().getName()));
  }
  setRecreate();
}

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

@Setting(OwsServiceIdentificationFactorySettings.TITLE)
public void setTitle(Object title) throws ConfigurationError {
  Validation.notNull("Service Identification Title", title);
  if (title instanceof MultilingualString) {
    this.title = (MultilingualString) title;
  } else if (title instanceof String) {
    this.title = createFromString(title);
  } else {
    throw new ConfigurationError(
        String.format("%s is not supported as title!", title.getClass().getName()));
  }
  setRecreate();
}

相关文章