Package java.util

Examples of java.util.Date$StringData


  public static boolean getStatus(Publication p) {
    if (p.getState().equals("P_P"))
      return true;
    if (p.getState().equals("P_D")) {
      Date now = new Date();
      try {
        Date begin =
          new SimpleDateFormat("dd/MM/yyyy").parse(
            p.getMetaData("dateBegin") + "");
        Date end =
          new SimpleDateFormat("dd/MM/yyyy").parse(
            p.getMetaData("dateEnd") + "");
        if (now.after(begin) && now.before(end))
          return true;
      } catch (Exception e) {
View Full Code Here


            } else if(i==8) {
                row.add(new BigInteger(data));
            } else if(i==2) {
                if(!data.equals("0")){ //$NON-NLS-1$
                    try {
                        Date date = DATE_FORMAT.parse(data);
                        row.add(new java.sql.Date(date.getTime()));
                    } catch(ParseException e) {
                        Object[] params = new Object[] { data, e.getMessage() };
                        LogManager.logWarning(LogConstants.CTX_CONNECTOR, YahooPlugin.Util.getString("YahooExecution.Parse_date_error", params)); //$NON-NLS-1$
                        row.add(null);
                    }
                } else{
                    row.add(null);
                }
            } else if(i==3) {
                if(!data.equals("0")){ //$NON-NLS-1$
                    try {
                        Date time = TIME_FORMAT.parse(data);
                        row.add(new java.sql.Time(time.getTime()));
                    } catch(ParseException e) {
                        Object[] params = new Object[] { data, e.getMessage() };
                        LogManager.logWarning(LogConstants.CTX_CONNECTOR, YahooPlugin.Util.getString("YahooExecution.Parse_time_value", params)); //$NON-NLS-1$
                        row.add(null);
                    }
View Full Code Here

                repaint();
                try {
                    thread.sleep(sleepAmount);
                } catch (InterruptedException e) { break; }
                if (MemoryMonitor.dateStampCB.isSelected()) {
                     System.out.println(new Date().toString() + " " + usedStr);
                }
            }
            thread = null;
        }
View Full Code Here

   
    /**
     * @return true if loaded, null if not loaded - but a cm is available, else false
     */
    private Boolean loadMetadata(VDBMetaData vdb, ModelMetaData model, boolean cache, File cacheFile, MetadataStoreGroup vdbStore, ConnectorManagerRepository cmr) {
    String msg = RuntimePlugin.Util.getString("model_metadata_loading", vdb.getName(), vdb.getVersion(), model.getName(), SimpleDateFormat.getInstance().format(new Date())); //$NON-NLS-1$
    model.addError(ModelMetaData.ValidationError.Severity.ERROR.toString(), msg);
    LogManager.logInfo(LogConstants.CTX_RUNTIME, msg);

      String exceptionMessage = null;
      Boolean loaded = false;
View Full Code Here

   * Sets lastModified date in milliseconds.
   *
   * @param lastModified in milliseconds
   */
  public void setLastModified(long d) {
    String dateString = HTTPDateTool.rfc1123Format.format(new Date(d));
    setHeaderValue(HttpHeader.LAST_MODIFIED, dateString);
  }
View Full Code Here

   * Sets date in milliseconds.
   *
   * @param lastModified in milliseconds
   */
  public void setDate(long d) {
    String dateString = HTTPDateTool.rfc1123Format.format(new Date(d));
    setHeaderValue(HttpHeader.DATE, dateString);
  }
View Full Code Here

    StringBuffer progressStr = new StringBuffer();
    progressBar.setValue(size);
    int kB = size / 1024;
    long longsize = size;

    Date current = new Date();

    long millisecs = (current.getTime()-docDownloadStarted.getTime());
    long ratio = 0;
    if (millisecs > 0) {
      ratio = ((longsize*1000)/millisecs);
    } else {
      ratio = 0;
View Full Code Here

    if (status == HttpTool.STATUS_CONNECTING) {
      progressBar.setString("Connecting");
      this.setHttpToolDocSize(0);
    } else if (status == HttpTool.STATUS_CONNECTED) {
      progressBar.setString("Connected");
      docDownloadStarted=new Date();
    } else if (status == HttpTool.STATUS_RETRIEVING) {
      progressBar.setString("Retrieving");
    } else if (status == HttpTool.STATUS_DONE) {
      progressBar.setString("Finished");
    } else if (status == HttpTool.STATUS_DENIEDBYRULE) {
View Full Code Here

    boolean isNotModified = false;
    if (modifyDate != null) {
      HttpHeader lastModifiedHeader = doc.getHttpHeader("Last-Modified");
      if (lastModifiedHeader != null) {
        try {
          Date lastModifiedDate = df.parse(lastModifiedHeader.getValue());
          if (lastModifiedDate.compareTo(modifyDate) <= 0) {
            isNotModified = true;
          }
        } catch (ParseException e) {}
      }
    }
View Full Code Here

        writeToFile(definitions, synapseXML);
    }

    private File createTempDirectoryStructure() throws IOException {
        String tempDirName = "__tmp" + new Date().getTime();
        File tempDirectory = new File(rootDirectory.getParentFile(), tempDirName);

        if (log.isDebugEnabled()) {
            log.debug("Creating temporary files at : " + tempDirectory.getAbsolutePath());
        }
View Full Code Here

TOP

Related Classes of java.util.Date$StringData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.