Package org.fao.geonet.kernel.harvest.harvester

Examples of org.fao.geonet.kernel.harvest.harvester.UUIDMapper


    //--- retrieve all local categories and groups
    //--- retrieve harvested uuids for given harvesting node

    localCateg = new CategoryMapper(context);
    localGroups= new GroupMapper(context);
    localUuids = new UUIDMapper(context.getBean(MetadataRepository.class), params.uuid);

        dataMan.flush();

        //-----------------------------------------------------------------------
    //--- remove old metadata
View Full Code Here


      this.log = log;
    log.info("Retrieving metadata fragments for : " + params.name);
       
    //--- collect all existing metadata uuids before we update
        final MetadataRepository metadataRepository = context.getBean(MetadataRepository.class);
        localUuids = new UUIDMapper(metadataRepository, params.uuid);

    //--- parse the xml query from the string - TODO: default should be
    //--- get everything
    Element wfsQuery = null;
   
View Full Code Here

       
    // Clean all before harvest : Remove/Add mechanism
        // If harvest failed (ie. if node unreachable), metadata will be removed, and
        // the node will not be referenced in the catalogue until next harvesting.
        // TODO : define a rule for UUID in order to be able to do an update operation ?
        UUIDMapper localUuids = new UUIDMapper(context.getBean(MetadataRepository.class), params.uuid);


        // Try to load capabilities document
    this.capabilitiesUrl = getBaseUrl(params.url) +
            "SERVICE=" + params.ogctype.substring(0,3) +
            "&VERSION=" + params.ogctype.substring(3) +
            "&REQUEST=" + GETCAPABILITIES
            ;

        if(log.isDebugEnabled()) {
            log.debug("GetCapabilities document: " + this.capabilitiesUrl);
        }
   
        XmlRequest req = context.getBean(GeonetHttpRequestFactory.class).createXmlRequest();
        req.setUrl(new URL(this.capabilitiesUrl));
        req.setMethod(XmlRequest.Method.GET);
        Lib.net.setupProxy(context, req);

        if (params.useAccount) {
            req.setCredentials(params.username, params.password);
        }

        xml = req.execute();

    //-----------------------------------------------------------------------
    //--- remove old metadata
    for (String uuid : localUuids.getUUIDs())
    {
      String id = localUuids.getID (uuid);

            if(log.isDebugEnabled()) log.debug ("  - Removing old metadata before update with id: " + id);

      // Remove thumbnails
      unsetThumbnail (id);
View Full Code Here

    log.info("Retrieving remote metadata information:" + params.uuid);

    Z3950ServerResults serverResults = new Z3950ServerResults();

    // --- Clean all before harvest : Remove/Add mechanism
    localUuids = new UUIDMapper(context.getBean(MetadataRepository.class), params.uuid);

    // --- remove old metadata
    for (String uuid : localUuids.getUUIDs()) {
      String id = localUuids.getID(uuid);
            if(this.log.isDebugEnabled()) log.debug("  - Removing old metadata before update with id: " + id);
View Full Code Here

        List<Element> mdList = result.getChildren("metadata");

    //-----------------------------------------------------------------------
    //--- retrieve local uuids for given site-id

    localUuids = new UUIDMapper(context.getBean(MetadataRepository.class), siteId);

        //-----------------------------------------------------------------------
        //--- remove old metadata

        for (String uuid : localUuids.getUUIDs())
View Full Code Here

TOP

Related Classes of org.fao.geonet.kernel.harvest.harvester.UUIDMapper

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.