Package org.fao.geonet.domain

Examples of org.fao.geonet.domain.ISODate


            String styleSheet = getSchemaDir(parentSchema)
                    + Geonet.File.UPDATE_CHILD_FROM_PARENT_INFO;
            Element childForUpdate = Xml.transform(rootEl, styleSheet, params);

            xmlSerializer.update(childId, childForUpdate, new ISODate().toString(), true, null, srvContext);


            // Notifies the metadata change to metatada notifier service
            notifyMetadataChange(childForUpdate, childId);
View Full Code Here


   *            Timestamp field in Lucene index. eg. _changeDate
   */
  public RecencyBoostingQuery(Query q, double multiplier, int maxDaysAgo,
      String dayField) {
    super(q);
    today = new ISODate();
    this.multiplier = multiplier;
    this.maxDaysAgo = maxDaysAgo;
    this.dayField = dayField;
  }
View Full Code Here

    }

    public float customScore(int doc, float subQueryScore, float valSrcScore) {
      BytesRef ret = new BytesRef();
      publishDay.get(doc);
            ISODate d = new ISODate(ret.utf8ToString());
      long daysAgo = today.timeDifferenceInSeconds(d) / SEC_PER_DAY;
      if (daysAgo < maxDaysAgo) {  // skip old document
        float boost = (float) (multiplier * (maxDaysAgo - daysAgo) / maxDaysAgo);
        return (float) (subQueryScore * (1.0 + boost));
      } else {
View Full Code Here

        request.setHits(this.hits);
        request.setIpAddress(this.ip);
        request.setLang(this.language);
        request.setLuceneQuery(this.luceneQuery);
        request.setMetadataType(this.mdType.name());
        request.setRequestDate(new ISODate(this.date.getTime(), false));
        request.setService(this.service);
        request.setSimple(this.isSimpleQuery());
        request.setSortBy(this.sortBy);
        request.setSpatialFilter(this.spatialFilter);
View Full Code Here

    private void storeFileUploadDeleteRequest(ServiceContext context, int metadataId, String fileName) {
        MetadataFileUploadRepository repo = context.getBean(MetadataFileUploadRepository.class);

        try {
            MetadataFileUpload metadataFileUpload = repo.findByMetadataIdAndFileNameNotDeleted(metadataId, fileName);
            metadataFileUpload.setDeletedDate(new ISODate().toString());

            repo.save(metadataFileUpload);

        } catch (org.springframework.dao.EmptyResultDataAccessException ex) {
            Log.warning(Geonet.RESOURCES, "Delete file upload request: No upload request for (metadataid, file): (" + metadataId + "," + fileName + ")");
View Full Code Here

    //--- get metadata info and create an env that works with oai translators
        final Metadata metadata = context.getBean(MetadataRepository.class).findOne(id);
    String schemaDir = sm.getSchemaDir(metadata.getDataInfo().getSchemaId());
        final String baseUrl = context.getBaseUrl();
        final ISODate changeDate = metadata.getDataInfo().getChangeDate();
        final String uuid = metadata.getUuid();
        final String siteURL = context.getBean(SettingManager.class).getSiteURL(context);
        final String siteName = gc.getBean(SettingManager.class).getSiteName();
        Element env = Lib.prepareTransformEnv(uuid, changeDate.getDateAndTime(), baseUrl, siteURL, siteName);

    //--- transform the metadata with the created env and specified stylesheet
    return Lib.transform(schemaDir, env, elMd, styleSheet);
  }
View Full Code Here

        int val = inc.incrementAndGet();
        MetadataFileDownload metadataFileDownload = new MetadataFileDownload();

        metadataFileDownload.setFileName("name" + val);
        metadataFileDownload.setUserName("user" + val);
        metadataFileDownload.setDownloadDate(new ISODate().toString());
        metadataFileDownload.setUserName("user" + val);

        return metadataFileDownload;
    }
View Full Code Here

        metadata.add(iId);
      }
    }
    }

        ISODate changeDate = new ISODate();

    //--- use StatusActionsFactory and StatusActions class to
    //--- change status and carry out behaviours for status changes
    StatusActionsFactory saf = new StatusActionsFactory(gc.getStatusActionsClass());
View Full Code Here

      throw new UnAuthorizedException("Only the owner of the metadata can set the status. User is not the owner of the metadata", null);
    }

    String status = Util.getParam(params, Params.STATUS);
    String changeMessage = Util.getParam(params, Params.CHANGE_MESSAGE);
    ISODate changeDate = new ISODate();

    //--- use StatusActionsFactory and StatusActions class to
    //--- change status and carry out behaviours for status changes
    StatusActionsFactory saf = new StatusActionsFactory(gc.getStatusActionsClass());
View Full Code Here

    String  status = header.getAttributeValue("status");

    //--- store identifier & dateStamp

    identifier = ident.getText();
    dateStamp  = new ISODate(date.getText());
    deleted    = (status != null);

    //--- add set information

    for (Object o : header.getChildren("setSpec", OaiPmh.Namespaces.OAI_PMH))
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.