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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Frees the resources used by the reader implementation.Gets the metadata associated with the data source.intString[]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.longGets time stamp of the data file.booleanhasNext()Determines if there are any more information to read using thegetNextmethod.voidIt parses the parameters string to initialize the reader and then it will open the first file that is going to be read.voidreset()Resets the state of the reader so that the next call togetNextwill return the first element of the first file of the data source.voidsetGeometryTypesFilter(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:
openin 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 togetNextwill return the first element of the first file of the data source.- Specified by:
resetin 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:
closein classSpatialFileReader- Throws:
Exception- if an error occurs while accessing the file.- See Also:
-
hasNext
Determines if there are any more information to read using thegetNextmethod.- Specified by:
hasNextin 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:
getNextin 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:
getAttributeMetaDatain 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:
getLayersin classSpatialFileReader- Returns:
- an array of String or null if the SpatiaDataSource doesn't support layers
- Throws:
Exception
-
getAvailableGeometryTypes
- Specified by:
getAvailableGeometryTypesin classSpatialFileReader- Throws:
Exception
-
getName
- Specified by:
getNamein classSpatialFileReader
-
getVersion
- Specified by:
getVersionin classSpatialFileReader
-
getParametersParserClassName
- Specified by:
getParametersParserClassNamein classSpatialFileReader
-
getPaths
Returns an array of String which defined the file paths used by the reader.- Specified by:
getPathsin 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:
getTimeStampin 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:SpatialFileReaderSets the geometry types filter to use while reading a spatial file.- Overrides:
setGeometryTypesFilterin classSpatialFileReader- Parameters:
geometryTypesFilter- The geometryTypesFilter to set.
-