Changeset 28021 in osm for applications/editors


Ignore:
Timestamp:
2012-03-09T13:57:20+01:00 (13 years ago)
Author:
donvip
Message:

opendata: more work on Neptune file support

Location:
applications/editors/josm/plugins/opendata
Files:
1 added
2 edited

Legend:

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

    r28018 r28021  
    107107    <!--
    108108    **********************************************************
     109    ** compile_naptune - compiles Neptune classes
     110    **********************************************************
     111    -->
     112    <target name="compile_neptune" depends="init">
     113        <echo message="compiling Neptune ... "/>
     114        <javac srcdir="includes/neptune" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8" />
     115    </target>
     116    <!--
     117    **********************************************************
    109118    ** compile - compiles the source tree
    110119    **********************************************************
    111120    -->
    112     <target name="compile" depends="init, compile_lang3, compile_poi, compile_jopendoc, compile_geotools">
     121    <target name="compile" depends="init, compile_lang3, compile_poi, compile_jopendoc, compile_geotools, compile_neptune">
    113122        <echo message="compiling sources for  ${plugin.jar} ... "/>
    114123        <javac srcdir="src/org/openstreetmap" debug="true" destdir="${plugin.build.dir}" includeAntRuntime="false">
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/XmlImporter.java

    r28018 r28021  
    1616package org.openstreetmap.josm.plugins.opendata.core.io;
    1717
     18import java.io.InputStream;
     19
     20import javax.xml.bind.JAXBException;
     21
     22import org.openstreetmap.josm.data.osm.DataSet;
     23import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     24import org.openstreetmap.josm.io.IllegalDataException;
     25
    1826public class XmlImporter extends AbstractImporter {
    1927
     
    2129                super(XML_FILE_FILTER);
    2230        }
    23 
     31       
     32        @Override
     33        protected DataSet parseDataSet(InputStream in, ProgressMonitor instance)
     34                        throws IllegalDataException {
     35                try {
     36                        // TODO: check it is a neptune file
     37                        return NeptuneReader.parseDataSet(in, handler, instance);
     38                } catch (JAXBException e) {
     39                        throw new IllegalDataException(e);
     40                }
     41        }
    2442}
Note: See TracChangeset for help on using the changeset viewer.