Changeset 3852

Show
Ignore:
Timestamp:
09/27/11 07:08:12 (8 months ago)
Author:
theuer
Message:

merged my local version with online; legends blockchanges, need to test and review

Location:
print/trunk/src/main/java/org
Files:
15 modified

Legend:

Unmodified
Added
Removed
  • print/trunk/src/main/java/org/ho/yaml/CustomBeanWrapper.java

    r3789 r3852  
    4343            if (prop == null) { 
    4444                LOGGER.warn(type.getSimpleName() + ": unknown field '" + name + "' with value '" + value + "'"); 
    45                 PropertyDescriptor prop2 = ReflectionUtil.getPropertyDescriptor(type, name); 
     45                //PropertyDescriptor prop2 = ReflectionUtil.getPropertyDescriptor(type, name); 
     46                ReflectionUtil.getPropertyDescriptor(type, name); 
    4647                return; 
    4748            } 
  • print/trunk/src/main/java/org/mapfish/print/InvalidJsonValueException.java

    r3789 r3852  
    2626 */ 
    2727public class InvalidJsonValueException extends PrintException { 
    28     public InvalidJsonValueException(PJsonElement element, String key, Object value) { 
     28    /** 
     29         *  
     30         */ 
     31        private static final long serialVersionUID = 1L; 
     32 
     33        public InvalidJsonValueException(PJsonElement element, String key, Object value) { 
    2934        this(element, key, value, null); 
    3035    } 
  • print/trunk/src/main/java/org/mapfish/print/InvalidValueException.java

    r3789 r3852  
    2424 */ 
    2525public class InvalidValueException extends PrintException { 
    26     public InvalidValueException(String name, String value) { 
     26    /** 
     27         *  
     28         */ 
     29        private static final long serialVersionUID = 1L; 
     30 
     31        public InvalidValueException(String name, String value) { 
    2732        this(name, value, null); 
    2833    } 
  • print/trunk/src/main/java/org/mapfish/print/JsonMissingException.java

    r3789 r3852  
    2626 */ 
    2727public class JsonMissingException extends PrintException { 
    28     public JsonMissingException(PJsonElement pJsonObject, String key) { 
     28    /** 
     29         *  
     30         */ 
     31        private static final long serialVersionUID = 1L; 
     32 
     33        public JsonMissingException(PJsonElement pJsonObject, String key) { 
    2934        super("attribute [" + pJsonObject.getPath(key) + "] missing"); 
    3035    } 
  • print/trunk/src/main/java/org/mapfish/print/PrintException.java

    r3789 r3852  
    2424 */ 
    2525public class PrintException extends RuntimeException { 
    26     public PrintException(String message) { 
     26    /** 
     27         *  
     28         */ 
     29        private static final long serialVersionUID = 1L; 
     30 
     31        public PrintException(String message) { 
    2732        super(message); 
    2833    } 
  • print/trunk/src/main/java/org/mapfish/print/ShellMapPrinter.java

    r3789 r3852  
    107107            } else { 
    108108                final InputStream inFile = getInputStream(); 
    109                 final PJsonObject jsonSpec = printer.parseSpec(FileUtilities.readWholeTextStream(inFile, "UTF-8")); 
     109                //final PJsonObject jsonSpec = printer.parseSpec(FileUtilities.readWholeTextStream(inFile, "UTF-8")); 
     110                final PJsonObject jsonSpec = MapPrinter.parseSpec(FileUtilities.readWholeTextStream(inFile, "UTF-8")); 
    110111                final OutputFormat outputFormat = OutputFactory.create(printer.getConfig(), jsonSpec); 
    111112                outFile = getOutputStream(jsonSpec.optString("outputFormat", "pdf")); 
  • print/trunk/src/main/java/org/mapfish/print/config/layout/ColumnDefs.java

    r3789 r3852  
    3030public class ColumnDefs extends HashMap<String, ColumnDef> { 
    3131    /** 
     32         *  
     33         */ 
     34        private static final long serialVersionUID = 1L; 
     35 
     36        /** 
    3237     * Called just after the config has been loaded to check it is valid. 
    3338     * 
  • print/trunk/src/main/java/org/mapfish/print/config/layout/Exceptions.java

    r3789 r3852  
    2929@SuppressWarnings({"RawUseOfParameterizedType"}) 
    3030public class Exceptions extends ArrayList<CellException> { 
    31     public static class Wrapper extends DefaultCollectionWrapper { 
    32         public Wrapper(Class type) { 
     31    /** 
     32         *  
     33         */ 
     34        private static final long serialVersionUID = 1L; 
     35 
     36        public static class Wrapper extends DefaultCollectionWrapper { 
     37        public Wrapper(Class<?> type) { 
    3338            super(type); 
    3439        } 
    3540 
    36         public Class componentType() { 
     41        public Class<CellException> componentType() { 
    3742            return CellException.class; 
    3843        } 
  • print/trunk/src/main/java/org/mapfish/print/config/layout/LegendsBlock.java

    r3831 r3852  
    136136            } 
    137137        } 
     138        result.add(name); 
     139 
    138140        final PdfPCell cell = new PdfPCell(result); 
    139141        cell.setBorder(PdfPCell.NO_BORDER); 
  • print/trunk/src/main/java/org/mapfish/print/map/readers/KaMapCacheMapReader.java

    r3789 r3852  
    7070        TileCacheLayerInfo.ResolutionInfo resolution = tileCacheLayerInfo.getNearestResolution(targetResolution); 
    7171 
    72         int tileX = Math.round((minGeoX - tileCacheLayerInfo.getMinX()) / (resolution.value * w)); 
    73         int tileY = Math.round((minGeoY - tileCacheLayerInfo.getMinY()) / (resolution.value * h)); 
     72        //int tileX = Math.round((minGeoX - tileCacheLayerInfo.getMinX()) / (resolution.value * w)); 
     73        Math.round((minGeoX - tileCacheLayerInfo.getMinX()) / (resolution.value * w)); 
     74        //int tileY = Math.round((minGeoY - tileCacheLayerInfo.getMinY()) / (resolution.value * h)); 
     75        Math.round((minGeoY - tileCacheLayerInfo.getMinY()) / (resolution.value * h)); 
    7476 
    7577        // scale, calculated from units used 
  • print/trunk/src/main/java/org/mapfish/print/map/readers/KaMapMapReader.java

    r3789 r3852  
    6464        TileCacheLayerInfo.ResolutionInfo resolution = tileCacheLayerInfo.getNearestResolution(targetResolution); 
    6565 
    66         int tileX = Math.round((minGeoX - tileCacheLayerInfo.getMinX()) / (resolution.value * w)); 
    67         int tileY = Math.round((minGeoY - tileCacheLayerInfo.getMinY()) / (resolution.value * h)); 
     66        Math.round((minGeoX - tileCacheLayerInfo.getMinX()) / (resolution.value * w)); 
     67        Math.round((minGeoY - tileCacheLayerInfo.getMinY()) / (resolution.value * h)); 
    6868 
    6969        StringBuilder path = new StringBuilder(); 
  • print/trunk/src/main/java/org/mapfish/print/map/readers/OsmLayerInfo.java

    r3789 r3852  
    2020package org.mapfish.print.map.readers; 
    2121 
    22 import org.mapfish.print.InvalidValueException; 
    2322import org.mapfish.print.utils.PJsonArray; 
    24  
    25 import java.util.Arrays; 
    26 import java.util.regex.Matcher; 
    27 import java.util.regex.Pattern; 
    2823 
    2924/** 
  • print/trunk/src/main/java/org/mapfish/print/map/readers/WMSMapReader.java

    r3829 r3852  
    2020package org.mapfish.print.map.readers; 
    2121 
    22 import org.apache.batik.bridge.UserAgent; 
    23 import org.apache.batik.bridge.UserAgentAdapter; 
    2422import org.mapfish.print.RenderingContext; 
    2523import org.mapfish.print.Transformer; 
     
    192190                         */ 
    193191                        if (maxW / maxH < width / height) { 
     192                                //LOGGER.warn("before width="+width+" height="+height); 
    194193                                divisor = width / maxW; 
    195194                                width = maxW; 
    196195                                height = height / divisor; 
     196                                //LOGGER.warn("after width="+width+" height="+height); 
    197197                        } else { 
     198                                //LOGGER.warn("before width="+width+" height="+height); 
    198199                                divisor = height / maxH; 
    199200                                height = maxH; 
    200201                                width = width / divisor; 
     202                                //LOGGER.warn("after width="+width+" height="+height); 
    201203                        } 
    202204                } 
  • print/trunk/src/main/java/org/mapfish/print/map/readers/google/GoogleMapTileReader.java

    r3789 r3852  
    2222import java.io.UnsupportedEncodingException; 
    2323import java.net.*; 
    24 import java.security.InvalidKeyException; 
    25 import java.security.NoSuchAlgorithmException; 
    2624import java.text.DecimalFormat; 
    2725import java.util.HashMap; 
  • print/trunk/src/main/java/org/mapfish/print/utils/DistanceUnit.java

    r3789 r3852  
    181181 
    182182    public static class Wrapper extends EnumWrapper { 
    183         public Wrapper(Class type) { 
     183        public Wrapper(Class type) { // do not "fix" this eclipse warning, because it breaks things, Tim 
    184184            super(type); 
    185185        }