Package com.kheops.jmap.readers
Class DGNReader
java.lang.Object
com.kheops.jmap.readers.SpatialFileReader
com.kheops.jmap.readers.DGNReader
-
Field Summary
Fields inherited from class com.kheops.jmap.readers.SpatialFileReader
geometryTypesFilter, READER_PARAM_FILES, READER_PARAM_LAYERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Frees the resources used by the reader implementation.Gets the metadata associated with the data source.int
String[]
Returns an array of String that defines the layers found in the SpatiaDataSourcegetName()
getNext()
Gets the next element from the data source.String[]
Returns an array of String which defined the file paths used by the reader.long
Gets time stamp of the data file.boolean
hasNext()
Determines if there are any more information to read using thegetNext
method.void
It parses the parameters string to initialize the reader and then it will open the first file that is going to be read.void
reset()
Resets the state of the reader so that the next call togetNext
will return the first element of the first file of the data source.void
setGeometryTypesFilter
(int geometryTypesFilter) Sets the geometry types filter to use while reading a spatial file.Methods inherited from class com.kheops.jmap.readers.SpatialFileReader
getGeometryTypesFilter, getNextColunmName, isColunmNameExists, loadReader, validateMetaData
-
Constructor Details
-
DGNReader
public DGNReader()
-
-
Method Details
-
open
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 classSpatialFileReader
- 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
Resets the state of the reader so that the next call togetNext
will return the first element of the first file of the data source.- Specified by:
reset
in classSpatialFileReader
- Throws:
Exception
-
close
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 classSpatialFileReader
- Throws:
Exception
- if an error occurs while accessing the file.- See Also:
-
hasNext
Determines if there are any more information to read using thegetNext
method.- Specified by:
hasNext
in classSpatialFileReader
- Returns:
- true if there is at least one more element to read, false otherwise
- Throws:
Exception
- See Also:
-
getNext
Gets the next element from the data source. Availability should be checked first using methodhasNext
.- Specified by:
getNext
in classSpatialFileReader
- Returns:
- the next JMapGeoElement object
- Throws:
Exception
- See Also:
-
getAttributeMetaData
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 classSpatialFileReader
- Returns:
- an array of Attribute instance.
- Throws:
Exception
- See Also:
-
getLayers
Returns an array of String that defines the layers found in the SpatiaDataSource- Specified by:
getLayers
in classSpatialFileReader
- Returns:
- an array of String or null if the SpatiaDataSource doesn't support layers
- Throws:
Exception
-
getAvailableGeometryTypes
- Specified by:
getAvailableGeometryTypes
in classSpatialFileReader
- Throws:
Exception
-
getName
- Specified by:
getName
in classSpatialFileReader
-
getVersion
- Specified by:
getVersion
in classSpatialFileReader
-
getParametersParserClassName
- Specified by:
getParametersParserClassName
in classSpatialFileReader
-
getPaths
Returns an array of String which defined the file paths used by the reader.- Specified by:
getPaths
in classSpatialFileReader
- Parameters:
params
- the parameters used to open the SpatialFileDatasource- Returns:
- the file paths used by the reader.
-
getTimeStamp
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 classSpatialFileReader
- 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 classSpatialFileReader
- Parameters:
geometryTypesFilter
- The geometryTypesFilter to set.
-