Class DGNReader


public class DGNReader extends SpatialFileReader
  • Constructor Details

    • DGNReader

      public DGNReader()
  • Method Details

    • open

      public void open(String params) throws Exception
      It parses the parameters string to initialize the reader and then it will open the first file that is going to be read.
      Specified by:
      open in class SpatialFileReader
      Parameters:
      params - Parameters used to open the file. The format of this string is: FILENAMES;POLYGON_AS_LINE;POOL_ID;LAYERS If no layers selected are present, it is assumed that all the layers are selected.
      Throws:
      Exception - if an error occurs while accessing the file or if params is not formatted properly.
      See Also:
    • reset

      public void reset() throws Exception
      Resets the state of the reader so that the next call to getNext will return the first element of the first file of the data source.
      Specified by:
      reset in class SpatialFileReader
      Throws:
      Exception
    • close

      public void close() throws Exception
      Frees the resources used by the reader implementation. Some implementations require that this method be called after use while other implementations don't.
      Specified by:
      close in class SpatialFileReader
      Throws:
      Exception - if an error occurs while accessing the file.
      See Also:
      • invalid reference
        #shouldCloseAfterUse
    • hasNext

      public boolean hasNext() throws Exception
      Determines if there are any more information to read using the getNext method.
      Specified by:
      hasNext in class SpatialFileReader
      Returns:
      true if there is at least one more element to read, false otherwise
      Throws:
      Exception
      See Also:
    • getNext

      public JMapGeoElement getNext() throws Exception
      Gets the next element from the data source. Availability should be checked first using method hasNext.
      Specified by:
      getNext in class SpatialFileReader
      Returns:
      the next JMapGeoElement object
      Throws:
      Exception
      See Also:
    • getAttributeMetaData

      public Attribute[] getAttributeMetaData() throws Exception
      Gets the metadata associated with the data source. The metadata provides information about the descriptive data columns bound to the geometrical data of the data source. N.B: This method has to take care of possible duplicate attribute name.
      Specified by:
      getAttributeMetaData in class SpatialFileReader
      Returns:
      an array of Attribute instance.
      Throws:
      Exception
      See Also:
    • getLayers

      public String[] getLayers() throws Exception
      Returns an array of String that defines the layers found in the SpatiaDataSource
      Specified by:
      getLayers in class SpatialFileReader
      Returns:
      an array of String or null if the SpatiaDataSource doesn't support layers
      Throws:
      Exception
    • getAvailableGeometryTypes

      public int getAvailableGeometryTypes() throws Exception
      Specified by:
      getAvailableGeometryTypes in class SpatialFileReader
      Throws:
      Exception
    • getName

      public String getName()
      Specified by:
      getName in class SpatialFileReader
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in class SpatialFileReader
    • getParametersParserClassName

      public String getParametersParserClassName()
      Specified by:
      getParametersParserClassName in class SpatialFileReader
    • getPaths

      public String[] getPaths(String params)
      Returns an array of String which defined the file paths used by the reader.
      Specified by:
      getPaths in class SpatialFileReader
      Parameters:
      params - the parameters used to open the SpatialFileDatasource
      Returns:
      the file paths used by the reader.
    • getTimeStamp

      public long getTimeStamp() throws Exception
      Gets time stamp of the data file. This time stamp can be used to determine if the data has changed since it was last accessed.
      Specified by:
      getTimeStamp in class SpatialFileReader
      Returns:
      the time stamp (number of milliseconds since Jan. 1st 1970) of the data file or -1 if not supported by the implementation of the reader
      Throws:
      Exception
    • setGeometryTypesFilter

      public void setGeometryTypesFilter(int geometryTypesFilter)
      Description copied from class: SpatialFileReader
      Sets the geometry types filter to use while reading a spatial file.
      Overrides:
      setGeometryTypesFilter in class SpatialFileReader
      Parameters:
      geometryTypesFilter - The geometryTypesFilter to set.