Package org.fao.geonet.services.thumbnail

Examples of org.fao.geonet.services.thumbnail.Set


     *                  
     */
  private void loadThumbnail (WxSLayerRegistry layer){
        if(log.isDebugEnabled())
            log.debug("  - Creating thumbnail for layer metadata: " + layer.name + " id: " + layer.id);
    Set s = new org.fao.geonet.services.thumbnail.Set ();
   
    try {
      String filename = getMapThumbnail(layer);
     
      if (filename != null) {
                if(log.isDebugEnabled()) log.debug("  - File: " + filename);
       
        Element par = new Element ("request");
        par.addContent(new Element ("id").setText(layer.id));
        par.addContent(new Element ("version").setText("10"));
        par.addContent(new Element ("type").setText("large"));
       
        Element fname = new Element ("fname").setText(filename);
        fname.setAttribute("content-type", "image/png");
        fname.setAttribute("type", "file");
        fname.setAttribute("size", "");
       
        par.addContent(fname);
        par.addContent(new Element ("add").setText("Add"));
        par.addContent(new Element ("createSmall").setText("on"));
        par.addContent(new Element ("smallScalingFactor").setText("180"));
        par.addContent(new Element ("smallScalingDir").setText("width"));
       
        // Call the services
        s.execOnHarvest(par, context, dataMan);

                dataMan.flush();

                result.thumbnails ++;
      } else {
View Full Code Here

TOP

Related Classes of org.fao.geonet.services.thumbnail.Set

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.