Changeset 30495 in osm for applications/editors/josm


Ignore:
Timestamp:
2014-06-14T14:05:38+02:00 (11 years ago)
Author:
bastik
Message:

update to [josm7248]

Location:
applications/editors/josm/plugins
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/canvec_helper/build.xml

    r30416 r30495  
    44    <property name="commit.message" value="JOSM/Canvec_helper: fixed a crash caused by osm directory being renamed to OSM"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="7001"/>
     6    <property name="plugin.main.version" value="7248"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java

    r29989 r30495  
    1313import org.openstreetmap.josm.gui.MapView;
    1414import org.openstreetmap.josm.io.IllegalDataException;
    15 import org.openstreetmap.josm.io.MirroredInputStream;
     15import org.openstreetmap.josm.io.CachedFile;
    1616import java.awt.Graphics2D;
    1717import java.awt.Polygon;
     
    183183                File download_path = new File(layer.plugin_self.getPluginDir() + File.separator);
    184184                download_path.mkdir();
    185                 MirroredInputStream tile_zip;
    186                 tile_zip = new MirroredInputStream(getDownloadUrl(),download_path.toString());
     185                CachedFile tile_zip = new CachedFile(getDownloadUrl()).setDestDir(download_path.toString());
    187186                return new ZipFile(tile_zip.getFile());
    188187        }
  • applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java

    r29989 r30495  
    99import java.awt.Toolkit;
    1010import java.io.BufferedReader;
     11import java.io.InputStream;
    1112import java.io.InputStreamReader;
    1213import java.io.IOException;
     
    2728import org.openstreetmap.josm.gui.layer.Layer;
    2829import org.openstreetmap.josm.gui.MapView;
    29 import org.openstreetmap.josm.io.MirroredInputStream;
     30import org.openstreetmap.josm.io.CachedFile;
    3031import static org.openstreetmap.josm.tools.I18n.tr;
    3132
     
    5152                        long start = System.currentTimeMillis();
    5253                        Pattern p = Pattern.compile("(\\d\\d\\d)([A-Z]\\d\\d).*");
    53                         MirroredInputStream index = new MirroredInputStream("http://ftp2.cits.rncan.gc.ca/OSM/pub/ZippedOsm.txt");
     54                        InputStream index = new CachedFile("http://ftp2.cits.rncan.gc.ca/OSM/pub/ZippedOsm.txt").getInputStream();
    5455                        BufferedReader br = new BufferedReader(new InputStreamReader(index));
    5556                        String line;
  • applications/editors/josm/plugins/imagery-xml-bounds/build.xml

    r30416 r30495  
    44    <property name="commit.message" value="Commit message"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="7001"/>
     6    <property name="plugin.main.version" value="7248"/>
    77       
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/io/ValidatingImageryReader.java

    r30342 r30495  
    99import javax.xml.validation.SchemaFactory;
    1010
    11 import org.openstreetmap.josm.io.MirroredInputStream;
     11import org.openstreetmap.josm.io.CachedFile;
    1212import org.openstreetmap.josm.io.imagery.ImageryReader;
    1313import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsConstants;
     
    3434        public static void validate(String source) throws SAXException, IOException {
    3535        SchemaFactory factory =  SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    36         Schema schema = factory.newSchema(new StreamSource(new MirroredInputStream(XML_SCHEMA)));
     36        Schema schema = factory.newSchema(new StreamSource(new CachedFile(XML_SCHEMA).getInputStream()));
    3737        schema.newValidator().validate(new StreamSource(source));
    3838        }
  • applications/editors/josm/plugins/mirrored_download/build.xml

    r30416 r30495  
    55    <property name="commit.message" value=""/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="7001"/>
     7    <property name="plugin.main.version" value="7248"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/mirrored_download/src/mirrored_download/UrlSelectionDialog.java

    r30436 r30495  
    2525
    2626import org.openstreetmap.josm.Main;
    27 import org.openstreetmap.josm.io.MirroredInputStream;
     27import org.openstreetmap.josm.io.CachedFile;
    2828
    2929public class UrlSelectionDialog
     
    106106    Collection<String> urls = new ArrayList<String>();
    107107    try (
    108       InputStream in = new MirroredInputStream(src, 24*60*60);
     108      InputStream in = new CachedFile(src).setMaxAge(24*60*60).getInputStream();
    109109      BufferedReader reader = new BufferedReader(new InputStreamReader(in))
    110110    ) {
  • applications/editors/josm/plugins/pbf/build.xml

    r30490 r30495  
    33
    44    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    5     <property name="plugin.main.version" value="7001"/>
     5    <property name="plugin.main.version" value="7248"/>
    66
    77    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfImporter.java

    r30341 r30495  
    99import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    1010import org.openstreetmap.josm.io.IllegalDataException;
    11 import org.openstreetmap.josm.io.MirroredInputStream;
     11import org.openstreetmap.josm.io.CachedFile;
    1212import org.openstreetmap.josm.io.OsmImporter;
    1313import org.openstreetmap.josm.plugins.pbf.PbfConstants;
     
    3030
    3131        protected DataSet parseDataSet(final String source) throws IOException, SAXException, IllegalDataException {
    32         return parseDataSet(new MirroredInputStream(source), NullProgressMonitor.INSTANCE);
     32        return parseDataSet(new CachedFile(source).getInputStream(), NullProgressMonitor.INSTANCE);
    3333        }
    3434}
  • applications/editors/josm/plugins/poly/build.xml

    r30416 r30495  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="7001"/>
     7    <property name="plugin.main.version" value="7248"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/poly/src/poly/PolyImporter.java

    r28755 r30495  
    2020import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    2121import org.openstreetmap.josm.io.IllegalDataException;
    22 import org.openstreetmap.josm.io.MirroredInputStream;
     22import org.openstreetmap.josm.io.CachedFile;
    2323import org.openstreetmap.josm.io.OsmImporter;
    2424import org.openstreetmap.josm.tools.CheckParameterUtil;
     
    3636
    3737    protected DataSet parseDataSet( final String source ) throws IOException, SAXException, IllegalDataException {
    38         return parseDataSet(new MirroredInputStream(source), NullProgressMonitor.INSTANCE);
     38        return parseDataSet(new CachedFile(source).getInputStream(), NullProgressMonitor.INSTANCE);
    3939    }
    4040
  • applications/editors/josm/plugins/roadsigns/build.xml

    r30416 r30495  
    44    <property name="commit.message" value="preset maintenance (Fahrradstraße)"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="7001"/>
     6    <property name="plugin.main.version" value="7248"/>
    77
    88    <!--
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java

    r30438 r30495  
    3030import org.openstreetmap.josm.gui.ExtendedDialog;
    3131import org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog;
    32 import org.openstreetmap.josm.io.MirroredInputStream;
     32import org.openstreetmap.josm.io.CachedFile;
    3333import org.openstreetmap.josm.plugins.Plugin;
    3434import org.openstreetmap.josm.plugins.PluginInformation;
     
    244244        InputStream in = null;
    245245        if (source.startsWith("http://") || source.startsWith("https://") || source.startsWith("ftp://")) {
    246             in = new MirroredInputStream(source);
     246            in = new CachedFile(source).getInputStream();
    247247        } else if (source.startsWith("file:")) {
    248248            in = new URL(source).openStream();
Note: See TracChangeset for help on using the changeset viewer.