List of usage examples for java.util Locale ITALY
Locale ITALY
To view the source code for java.util Locale ITALY.
Click Source Link
From source file:org.neo4art.importer.wikipedia.core.listener.WikipediaCVSFilesBatchImporterListener.java
@Override public void process(WikiArticle article, Siteinfo siteinfo) throws IOException { long pages = pageCount.incrementAndGet(); if (pages % 500_000 == 0) { logger.info(NumberFormat.getInstance(Locale.ITALY).format(pages) + " wikipedia pages parsed from dump so far..."); }//from w w w . jav a2s . co m if (StringUtils.isNotBlank(article.getTitle())) { WikipediaElement wikipediaElement = WikipediaElementTransformer.toWikipediaElement(article); FileUtils.writeStringToFile(wikipediaNodesFile, buildWikipediaNodesLine(wikipediaElement), true); if (wikipediaElement.getType() == WikipediaType.REDIRECT_PAGE) { FileUtils.writeStringToFile(wikipediaRedirectsFile, buildWikipediaRedirectLine(wikipediaElement), true); } if (CollectionUtils.isNotEmpty(wikipediaElement.getLinks())) { for (WikipediaElement link : wikipediaElement.getLinks()) { FileUtils.writeStringToFile(wikipediaLinksFile, buildWikipediaLinksLine(wikipediaElement, link), true); } } if (CollectionUtils.isNotEmpty(wikipediaElement.getCategories())) { for (WikipediaElement category : wikipediaElement.getCategories()) { FileUtils.writeStringToFile(wikipediaCategoriesFile, buildWikipediaCategoriesLine(wikipediaElement, category), true); } } } }
From source file:commonSession.PersistAttivitaFacadeBean.java
/** * //from ww w .j ava2s. c om */ public PersistAttivitaFacadeBean() { super(); conf.registerJsonValueProcessor(Timestamp.class, new DateJsonValueProcessor()); conf.registerJsonValueProcessor(Date.class, new DateJsonValueProcessor()); conf.registerJsonValueProcessor(java.sql.Date.class, new DateJsonValueProcessor()); conf.registerJsonValueProcessor(Time.class, new TimeJsonValueProcessor()); ConvertUtils.register(new DateLocaleConverterCustom(Locale.ITALY, "dd.MM.yyyy"), Date.class); ConvertUtils.register(new DoubleLocalConverterCustom(Locale.ITALY), Double.class); ConvertUtils.register(new IntegerLocalConverterCustom(Locale.ITALY), Integer.class); }
From source file:org.geoserver.security.iride.entity.identity.IrideIdentityValidator.java
/** * Constructor.//from w w w .ja v a 2s .c o m */ public IrideIdentityValidator() { this.dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); this.dateFormat.setCalendar(Calendar.getInstance(Locale.ITALY)); this.dateFormat.setLenient(false); }
From source file:org.neo4art.importer.wikipedia.core.listener.WikipediaCVSImportBatchImporterListener.java
/** * @see org.neo4art.importer.wikipedia.core.listener.WikipediaAbstractImporterListener#process(info.bliki.wiki.dump.WikiArticle, * info.bliki.wiki.dump.Siteinfo)//from w w w . ja va2 s .co m */ @Override public void process(WikiArticle article, Siteinfo siteinfo) throws IOException { if (!this.initialized) { throw new IOException("Unable to create CVS files"); } else { long pages = pageCount.incrementAndGet(); if (pages % 500_000 == 0) { logger.info(NumberFormat.getInstance(Locale.ITALY).format(pages) + " wikipedia pages parsed from dump so far..."); } if (StringUtils.isNotBlank(article.getTitle())) { if (this.firstRound) { createNodes(article, siteinfo); } else { createRels(article, siteinfo); } } } }
From source file:it.govpay.web.utils.Utils.java
public static List<Locale> getListaLingueDisponibili() { List<Locale> lst = new ArrayList<Locale>(); List<String> listaLingueAbilitate = ConsoleProperties.getInstance().getLocaleAbilitati(); for (String lingua : listaLingueAbilitate) { lst.add(new Locale(lingua)); }/* w w w . j a v a 2 s .co m*/ if (lst.size() == 0) lst.add(Locale.ITALY); return lst; }
From source file:com.sysdata.demo.accordionview.SampleActivity.java
private String getItemTitle(int position) { return String.format(Locale.ITALY, "Item %d", position + 1); }
From source file:org.neo4art.importer.wikipedia.core.listener.WikipediaAbstractImporterListener.java
@Override public void flush() { long graphElementsCreated = 0; long flushStartDate = Calendar.getInstance().getTimeInMillis(); GraphDatabaseConnectionManager graphDatabaseConnectionManager = GraphDatabaseConnectionManagerFactory .getInstance(GraphDatabaseConnectionType.EMBEDDED_DATABASE); try (GraphDatabaseTransaction tx = graphDatabaseConnectionManager.getTransactionManager()) { for (WikipediaElement wikipediaElement : this.wikipediaElementBuffer) { graphElementsCreated += persist(wikipediaElement); }//from w w w . j a v a 2s.c o m tx.success(); } long flushEndDate = Calendar.getInstance().getTimeInMillis(); this.graphCount.addAndGet(graphElementsCreated); logger.debug(NumberFormat.getInstance(Locale.ITALY).format(graphElementsCreated) + " new graph database elements created for " + NumberFormat.getInstance(Locale.ITALY).format(this.wikipediaElementBuffer.size()) + " wikipedia elements in " + (flushEndDate - flushStartDate) + " ms."); this.wikipediaElementBuffer.clear(); }
From source file:com.sysdata.demo.accordionview.SampleActivity.java
private String getItemDescription(int position) { return String.format(Locale.ITALY, "Hello World, I'm an expandable item!", position); }
From source file:org.eclipsetrader.directaworld.internal.core.connector.SnapshotConnector.java
public SnapshotConnector() { symbolSubscriptions = new HashMap<String, FeedSubscription>(); timeZone = TimeZone.getTimeZone("Europe/Rome"); //$NON-NLS-1$ dateTimeParser = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); //$NON-NLS-1$ dateTimeParser.setTimeZone(timeZone); timeParser = new SimpleDateFormat("HH:mm:ss"); //$NON-NLS-1$ timeParser.setTimeZone(timeZone);//from www .j a v a 2s.com numberFormat = NumberFormat.getInstance(Locale.ITALY); }
From source file:it.simoneloru.ctmdroid.activities.TimetableActivity.java
private String callCtmSite() throws Exception { HttpResponse execute = null;/*from w w w . ja v a 2 s . c o m*/ HttpClient defaultHttpClient = new DefaultHttpClient(); HttpPost request = new HttpPost(); request.setURI(new URI(URI)); request.addHeader("Referer", URI); Cursor codeCursor = ctmDb.getRoad( Long.toString(getIntent().getLongExtra(getPackageName() + ".busStopCodeId", -1)), new String[] { CTMDroidDatabase.KEY_CODE }); String code = codeCursor.getString(0); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("mode", "1")); nameValuePairs.add(new BasicNameValuePair("stopcode", "-1")); nameValuePairs.add(new BasicNameValuePair("stopdescr", code)); nameValuePairs.add(new BasicNameValuePair("linenames", "-1")); nameValuePairs.add(new BasicNameValuePair("ptsearch", "Ricerca")); Calendar now = Calendar.getInstance(); nameValuePairs.add(new BasicNameValuePair("pt_day", Integer.toString(now.get(Calendar.DAY_OF_MONTH)))); nameValuePairs.add(new BasicNameValuePair("pt_month", Integer.toString(now.get(Calendar.MONTH) + 1))); nameValuePairs.add(new BasicNameValuePair("pt_year", Integer.toString(now.get(Calendar.YEAR)))); nameValuePairs.add(new BasicNameValuePair("PT_HH_FROM", Integer.toString(now.get(Calendar.HOUR_OF_DAY)))); Calendar later = new GregorianCalendar(); later.setTime(now.getTime()); later.add(Calendar.HOUR_OF_DAY, 1); nameValuePairs.add(new BasicNameValuePair("PT_HH_TO", Integer.toString(later.get(Calendar.HOUR_OF_DAY)))); nameValuePairs.add(new BasicNameValuePair("PT_MM_FROM", Integer.toString(now.get(Calendar.MINUTE)))); nameValuePairs.add(new BasicNameValuePair("PT_MM_TO", Integer.toString(later.get(Calendar.MINUTE)))); UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(nameValuePairs); request.setEntity(urlEncodedFormEntity); execute = defaultHttpClient.execute(request); resultWebView = (WebView) findViewById(R.id.webview); BasicResponseHandler basicResponseHandler = new BasicResponseHandler(); String handleResponse = basicResponseHandler.handleResponse(execute); if (handleResponse.contains("Dati non disponibili")) { return NODATA; } else { String body = handleResponse.substring(handleResponse.indexOf("<body"), handleResponse.lastIndexOf("</body>")); String homehtm = CTMDroidUtil.LoadFile("home.htm", getResources()); Locale locale = this.getResources().getConfiguration().locale; if (!locale.equals(Locale.ITALY)) { body = CTMDroidUtil.bodyInEnglish(body); } homehtm = homehtm.replace("$placeholder$", body); Log.i("CTM", homehtm); resultWebView.loadDataWithBaseURL("file:///android-asset/", homehtm, "text/html", "utf-8", null); resultWebView.setTag(homehtm); return null; } }