public class ShapeInstanceReader extends AbstractInstanceReader implements ShapefileConstants
GZipEnabledImport.GZipInputSupplier
AUGMENTED_PROPERTY_FILENAME, DEFAULT_TYPE_NAME, PARAM_TYPENAME, SHAPEFILE_AUGMENT_NS, SHAPEFILE_NS
PARAM_RESOURCE_ID, PARAM_SOURCE
PARAM_CHARSET, PARAM_CONTENT_TYPE
Constructor and Description |
---|
ShapeInstanceReader()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static int |
checkCompatibility(TypeDefinition schemaType,
TypeDefinition dataType)
Determines if the compatibility rating between the two Shapefile type
definitions.
|
protected IOReport |
execute(ProgressIndicator progress,
IOReporter reporter)
Execute the I/O provider.
|
protected Charset |
getDefaultCharset()
Get the default character set.
This implementation returns UTF-8, may be overridden. |
protected String |
getDefaultTypeName()
Get the default type name if no content type is provided
|
InstanceCollection |
getInstances()
Get the instances
|
static Pair<TypeDefinition,Integer> |
getMostCompatibleShapeType(TypeIndex types,
TypeDefinition dataType)
Determine the type out of the the mapping relevant types in the given
type index, that matches the given data type best.
|
boolean |
isCancelable()
States if the execution of the provider is cancelable
|
getCrsProvider, getSourceSchema, setCRSProvider, setSourceSchema, validate
getSource
createReporter, execute, generateResourceId, getResourceIdentifier, setParameter, setSource, storeConfiguration
addSupportedParameter, fail, getCharset, getContentType, getParameter, getSupportedParameters, getTypeName, loadConfiguration, setCharset, setContentType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceIdentifier, getSource, setSource
createReporter, execute, getCharset, getContentType, getParameter, getSupportedParameters, loadConfiguration, setCharset, setContentType, setParameter, storeConfiguration
public boolean isCancelable()
IOProvider
isCancelable
in interface IOProvider
IOProvider.isCancelable()
protected IOReport execute(ProgressIndicator progress, IOReporter reporter) throws IOProviderConfigurationException, IOException
AbstractIOProvider
execute
in class AbstractIOProvider
progress
- the progress indicatorreporter
- the reporter to use for the execution reportIOProviderConfigurationException
- if the I/O provider was not
configured properlyIOException
- if an I/O operation failsAbstractIOProvider.execute(ProgressIndicator, IOReporter)
protected Charset getDefaultCharset()
AbstractIOProvider
getDefaultCharset
in class AbstractIOProvider
public static Pair<TypeDefinition,Integer> getMostCompatibleShapeType(TypeIndex types, TypeDefinition dataType)
types
- the type indexdataType
- the Shapefile data typenull
if there is no type that at least has
one matching propertycheckCompatibility(TypeDefinition, TypeDefinition)
public static int checkCompatibility(TypeDefinition schemaType, TypeDefinition dataType)
schemaType
- the type to test for compatibilitydataType
- the type representing the data to read0
to
100
), where 100
represents an exact
match and 0
no compatibilityprotected String getDefaultTypeName()
AbstractIOProvider
getDefaultTypeName
in class AbstractIOProvider
AbstractIOProvider.getDefaultTypeName()
public InstanceCollection getInstances()
InstanceReader
getInstances
in interface InstanceReader
InstanceReader.getInstances()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a