Package org.fao.geonet.domain

Examples of org.fao.geonet.domain.ISODate


        assertNull(allSourceInfo.get(metadata2.getId()));
        assertNotNull(allSourceInfo.get(metadata3.getId()));
    }

    private Metadata updateChangeDate(Metadata metadata, String date) {
        metadata.getDataInfo().setChangeDate(new ISODate(date));
        return metadata;
    }
View Full Code Here


      String modified = record.getChildText("pubDate");
      // modified is using in the form Mon, 04 Feb 2013 10:19:00 +1000
      // it must be converted to ISODate,
      // TODO: does it come in any other form??? Check geoportal stuff?
      Date modDate = sdf.parse(modified);
      modified = new ISODate(modDate.getTime(), false).toString();
      if (modified != null && modified.length() == 0) modified = null;

      if (log.isDebugEnabled())
        log.debug("getRecordInfo: adding "+identif+" with modification date "+modified);
      return new RecordInfo(identif, modified);
View Full Code Here

                // insert metadata
                //
        try {
                    String groupOwner = "1", isTemplate = "n", title = null;
                    int owner = 1;
                    String category = null, createDate = new ISODate().toString(), changeDate = createDate;
                    boolean ufo = false, indexImmediate = false;
                    id = dataMan.insertMetadata(context, schema, md, uuid, owner, groupOwner, params.uuid,
                            isTemplate, docType, category, createDate, changeDate, ufo, indexImmediate);

                }
View Full Code Here

                try {
                    UserDetails userDetails = (UserDetails) e
                            .getAuthentication().getPrincipal();

                    User user = _userRepository.findOneByUsername(userDetails.getUsername());
                    user.setLastLoginDate(new ISODate().toString());
                    _userRepository.save(user);

                } catch (Exception ex) {
                    // TODO: Log exception
                    ex.printStackTrace();
View Full Code Here

      }
    }
   
    if (lastModifiedDate == null) return true;

    String datasetModifiedDate = new ISODate(lastModifiedDate.getTime(), false).toString();
   
    for (RecordInfo localRecord: localRecords) {
      if (localRecord.isOlderThan(datasetModifiedDate)) return true;
    }
   
View Full Code Here


    public WebDavRemoteFile(Sardine sardine, String baseURL, DavResource davResource) {
        this.sardine = sardine;
        path = baseURL + davResource.getPath();
        changeDate = new ISODate(davResource.getModified().getTime(), false);
    }
View Full Code Here

    }

    //---------------------------------------------------------------------------

    public boolean isMoreRecentThan(String localChangeDate) {
        ISODate remoteDate = changeDate;
        ISODate localDate = new ISODate(localChangeDate);
        //--- accept if remote date is greater than local date
        return (remoteDate.timeDifferenceInSeconds(localDate) > 0);
    }
View Full Code Here

  //--------------------------------------------------------------------------

  private boolean updateCondition(String localDate, String remoteDate)
  {
    ISODate local = new ISODate(localDate);
    ISODate remote= new ISODate(remoteDate);

    //--- accept if remote date is greater than local date

    return (remote.timeDifferenceInSeconds(local) > 0);
  }
View Full Code Here

   *
   * @param processId
   */
  public XslProcessingReport(String processId) {
    this.processId = processId;
    this.startDate = new ISODate();
  }
View Full Code Here

    this.startDate = new ISODate();
  }

  public XslProcessingReport() {
    this.processId = null;
    this.startDate = new ISODate();
  }
View Full Code Here

TOP

Related Classes of org.fao.geonet.domain.ISODate

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.