Package org.fao.geonet.domain

Examples of org.fao.geonet.domain.ISODate


    public synchronized Element toXml() {
        Element xmlReport = new Element("report");
        xmlReport.setAttribute("total", getTotalRecords() + "");

        xmlReport.setAttribute("startDate", startDate.toString());
        xmlReport.setAttribute("reportDate", new ISODate().toString());
        xmlReport.setAttribute("running", String.valueOf(isProcessing()));
        xmlReport.setAttribute("totalRecords", totalRecords + "");
        xmlReport.setAttribute("processedRecords", processedRecords + "");
        xmlReport.setAttribute("nullRecords", nullRecords + "");
View Full Code Here


    else uuid = UUID.randomUUID().toString();

    String uuidAction = Util.getParam(params, Params.UUID_ACTION,
        Params.NOTHING);

    String date = new ISODate().toString();

    final List<String> id = new ArrayList<String>();
    final List<Element> md = new ArrayList<Element>();
    md.add(xml);
   
View Full Code Here

        if (templateMetadata.getDataInfo().getType() == MetadataType.METADATA) {
            xml = updateFixedInfo(schema, Optional.<Integer>absent(), uuid, xml, parentUuid, UpdateDatestamp.NO, context);
        }
        final Metadata newMetadata = new Metadata().setUuid(uuid);
        newMetadata.getDataInfo()
                .setChangeDate(new ISODate())
                .setCreateDate(new ISODate())
                .setSchemaId(schema)
                .setType(MetadataType.lookup(isTemplate));
        newMetadata.getSourceInfo()
                .setGroupOwner(Integer.valueOf(groupOwner))
                .setOwner(owner)
View Full Code Here

        if(StringUtils.isBlank(metadataType)) {
            metadataType = MetadataType.METADATA.codeString;
        }
        final Metadata newMetadata = new Metadata().setUuid(uuid);
        final ISODate isoChangeDate = changeDate != null ? new ISODate(changeDate) : new ISODate();
        final ISODate isoCreateDate = createDate != null ? new ISODate(createDate) : new ISODate();
        newMetadata.getDataInfo()
                .setChangeDate(isoChangeDate)
                .setCreateDate(isoCreateDate)
                .setSchemaId(schema)
                .setDoctype(docType)
View Full Code Here

            }
        }

        // now save the validation status
        try {
            saveValidationStatus(metadataId, valTypeAndStatus, new ISODate().toString());
        } catch (Exception e) {
            e.printStackTrace();
            Log.error(Geonet.DATA_MANAGER, "Could not save validation status on metadata "+metadataId+": "+e.getMessage());
        }
View Full Code Here

            errorReport.addContent(error);
        }

        // Save report in session (invalidate by next update) and db
        try {
            saveValidationStatus(metadataId, valTypeAndStatus, new ISODate().toString());
        } catch (Exception e) {
            e.printStackTrace();
            Log.error(Geonet.DATA_MANAGER, "Could not save validation status on metadata " + metadataId + ": " + e.getMessage());
        }
View Full Code Here

            MetadataValidation metadataValidation = new MetadataValidation()
                .setStatus(MetadataValidationStatus.values()[results[0]])
                .setTested(results[1])
                .setFailed(results[2])
                .setValidationDate(new ISODate(date));
            MetadataValidationId validationId = new MetadataValidationId(Integer.valueOf(id), type);
            metadataValidation.setId(validationId);
            validationRepository.save(metadataValidation);
        }
    }
View Full Code Here

                return root.get(MetadataFileUpload_.deletedDate);
            }
        };

        _applicationContext.getBean(MetadataFileUploadRepository.class).createBatchUpdateQuery(deletedDatePathSpec,
                new ISODate().toString(),
                MetadataFileUploadSpecs.isNotDeletedForMetadata(intId));

        //--- remove metadata
        xmlSerializer.delete(id, context);
    }
View Full Code Here

            Element schemaLoc = new Element("schemaLocation");
            schemaLoc.setAttribute(schemaMan.getSchemaLocation(schema,context));
            env.addContent(schemaLoc);

            if (updateDatestamp == UpdateDatestamp.YES) {
                env.addContent(new Element("changeDate").setText(new ISODate().toString()));
            }
            if(parentUuid != null) {
                env.addContent(new Element("parentUuid").setText(parentUuid));
            }
            if (metadataId.isPresent()) {
View Full Code Here

                    processedMetadata = Xml.transform(processedMetadata, filePath3);

                    dataMan.updateMetadata(context, id, processedMetadata,
                            false, true, true,
                            context.getLanguage(),
                            new ISODate().toString(), true);
                }


                metadata.add(new Integer(id));
            } catch (Exception e) {
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.