Example usage for java.util Locale ENGLISH

List of usage examples for java.util Locale ENGLISH

Introduction

In this page you can find the example usage for java.util Locale ENGLISH.

Prototype

Locale ENGLISH

To view the source code for java.util Locale ENGLISH.

Click Source Link

Document

Useful constant for language.

Usage

From source file:be.dnsbelgium.rdap.jackson.StatusSerializer.java

@Override
public void serialize(Status value, JsonGenerator jgen, SerializerProvider provider) throws IOException {
    if (value == null) {
        jgen.writeNull();/*from   w ww .java 2 s .  co  m*/
    } else if (value.getValue() == null) {
        jgen.writeNull();
    } else {
        jgen.writeString(value.getValue().toLowerCase(Locale.ENGLISH));
    }
}

From source file:io.getlime.security.powerauth.app.server.service.i18n.LocalizationProvider.java

public String getLocalizedErrorMessage(String code) {
    return this.getLocalizedErrorMessage(code, Locale.ENGLISH);
}

From source file:de.unidue.inf.is.ezdl.dlcore.analysis.stopwords.DefaultStopwordFilter.java

public DefaultStopwordFilter() {
    stopwords = HashMultimap.create();//from   w w w.j  a va2  s.  c  o m
    try {
        readStopwordList(Locale.ENGLISH, "/stopwords/english");
        readStopwordList(Locale.GERMAN, "/stopwords/german");
    } catch (IOException e) {
        logger.error(e.getMessage(), e);
    }
}

From source file:org.agorava.twitter.jackson.TimelineDateDeserializer.java

@Override
public Date deserialize(JsonParser jp, DeserializationContext ctxt)
        throws IOException, JsonProcessingException {
    try {// www. j  ava  2 s . com
        return new SimpleDateFormat(TIMELINE_DATE_FORMAT, Locale.ENGLISH).parse(jp.getText());
    } catch (ParseException e) {
        return null;
    }
}

From source file:com.hp.autonomy.frontend.find.core.view.AbstractViewController.java

@ExceptionHandler
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public ModelAndView handleGeneralException(final Exception e, final HttpServletRequest request,
        final HttpServletResponse response) {
    response.reset();/*  w  ww .  ja va 2s . com*/

    final UUID uuid = UUID.randomUUID();
    log.error("Unhandled exception with uuid {}", uuid);
    log.error("Stack trace", e);

    final Locale locale = Locale.ENGLISH;

    return buildErrorModelAndView(request,
            messageSource.getMessage("error.internalServerErrorMain", null, locale),
            messageSource.getMessage("error.internalServerErrorSub", new Object[] { uuid }, locale));
}

From source file:org.springframework.social.weibo.api.impl.json.DateTimeDeserializer.java

@Override
public DateTime deserialize(JsonParser jp, DeserializationContext ctxt)
        throws IOException, JsonProcessingException {
    return DateTimeFormat.forPattern(getDateFormat()).withLocale(Locale.ENGLISH).parseDateTime(jp.getText());
}

From source file:org.springframework.social.bitbucket.api.impl.UTCDateDeserializer.java

@Override
public Date deserialize(JsonParser jp, DeserializationContext ctxt)
        throws IOException, JsonProcessingException {
    try {//  w ww  . jav a2 s  .  com
        SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT, Locale.ENGLISH);
        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
        return dateFormat.parse(jp.getText());
    } catch (ParseException e) {
        throw new JsonParseException("Can't parse date : " + jp.getText(), jp.getCurrentLocation());
    }
}

From source file:com.sample.application.plugin.ApplicationTriggersService.java

public void executeTrigger(String name, Map<String, String> parameters) {
    System.out.println("Executing trigger: " + parameters.get("action"));
    if (parameters.get("action").equals("projectCreated")) {
        eventService.publishAsync(EmailEventContent.create(null).emailType("projectCreated")
                .locale(Locale.ENGLISH).value("test", "test").value("to", "alexdorand@gmail.com").envelop()

        ).toBlocking().last();//from  w ww .j  av  a2s.  c o  m
    }

}

From source file:util.OsValidator.java

/**
 * detect the operating system from the os.name System property and cache
 * the result/* w  w  w . ja  v  a  2s.c  o  m*/
 * 
 * @returns - the operating system detected
 */
public OperatingSystemType getOperatingSystemType() {
    final OperatingSystemType osType;
    String os = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);

    if ((os.indexOf("mac") >= 0) || (os.indexOf("darwin") >= 0)) {
        osType = OperatingSystemType.MAC_OS;
    } else if (os.indexOf("win") >= 0) {
        osType = OperatingSystemType.WINDOWS;
    } else if (os.indexOf("nux") >= 0) {
        osType = OperatingSystemType.LINUX;
    } else {
        osType = OperatingSystemType.OTHER;
    }

    return osType;
}

From source file:com.googlecode.wickedcharts.highcharts.jackson.RgbaColorReferenceSerializer.java

@Override
protected void serializeIfNotNull(final RgbaColor color, final JsonGenerator jgen,
        final SerializerProvider provider) throws IOException, JsonProcessingException {
    if (color.getBrightness() == null) {
        jgen.writeString(String.format(Locale.ENGLISH, RGBA, color.getRed(), color.getGreen(), color.getBlue(),
                color.getAlpha()));/*from ww w  . ja v a 2  s  .c om*/
    } else {
        String colorString = brighten("\"" + String.format(Locale.ENGLISH, RGBA, color.getRed(),
                color.getGreen(), color.getBlue(), color.getAlpha()) + "\"", color.getBrightness());
        jgen.writeRawValue(colorString);
    }

}