- Timestamp:
- 2017-04-15T16:42:23+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/AbstractReader.java
r10308 r11919 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.io.InputStream; 6 7 import java.util.ArrayList; 7 8 import java.util.Collection; … … 23 24 import org.openstreetmap.josm.data.osm.SimplePrimitiveId; 24 25 import org.openstreetmap.josm.data.osm.Way; 26 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 25 27 26 28 /** … … 202 204 } 203 205 } 206 207 protected abstract DataSet doParseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException; 204 208 } -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r11709 r11919 585 585 } 586 586 587 @Override 587 588 protected DataSet doParseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException { 588 589 if (progressMonitor == null) { -
trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
r11918 r11919 99 99 static final Pattern OUTPUT_FORMAT_STATEMENT = Pattern.compile(".*\\[out:([a-z]{3,})\\].*", Pattern.DOTALL); 100 100 101 static final Map<OverpassOutpoutFormat, Class<? extends OsmReader>> outputFormatReaders = new ConcurrentHashMap<>();101 static final Map<OverpassOutpoutFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>(); 102 102 103 103 final String overpassServer; … … 123 123 * @return the previous value associated with {@code format}, or {@code null} if there was no mapping 124 124 */ 125 public static final Class<? extends OsmReader> registerOverpassOutpoutFormatReader(126 OverpassOutpoutFormat format, Class<? extends OsmReader> readerClass) {125 public static final Class<? extends AbstractReader> registerOverpassOutpoutFormatReader( 126 OverpassOutpoutFormat format, Class<? extends AbstractReader> readerClass) { 127 127 return outputFormatReaders.put(Objects.requireNonNull(format), Objects.requireNonNull(readerClass)); 128 128 } … … 230 230 @Override 231 231 protected DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException { 232 OsmReader reader = null;232 AbstractReader reader = null; 233 233 Matcher m = OUTPUT_FORMAT_STATEMENT.matcher(overpassQuery); 234 234 if (m.matches()) { 235 Class<? extends OsmReader> readerClass = outputFormatReaders.get(OverpassOutpoutFormat.from(m.group(1)));235 Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutpoutFormat.from(m.group(1))); 236 236 if (readerClass != null) { 237 237 try {
Note:
See TracChangeset
for help on using the changeset viewer.