public class DefaultGPEManager extends Object implements GPEManager
Constructor and Description |
---|
DefaultGPEManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(URI uri)
Return true if exists a driver that can open the file
|
IGPEWriterHandler |
createWriter(String name)
Create a new content writer from a name
|
IGPEWriterHandler |
createWriterByClass(String prefferredImplClassName)
Create a new writer from a class name.
|
IGPEWriterHandler |
createWriterByMimeType(String mimeType)
Create a new writer from a mime type.
|
boolean |
getBooleanProperty(String key)
Gets a boolean property.
|
String |
getDefaultProjection(File file) |
int |
getIntPropertyProperty(String key)
Gets a int property
|
Iterator |
getKeys()
Returns an iterator with the name of all the properties that
has been established.
|
Object |
getProperty(String key)
Gets a property
|
String |
getStringProperty(String key)
Gets a String property
|
void |
parse(IGPEContentHandler contents,
IGPEErrorHandler errors,
File file)
Method to parse a file.
|
void |
parse(IGPEContentHandler contents,
IGPEErrorHandler errors,
URI uri)
Method to parse a file.
|
void |
parse(IGPEContentHandlerInmGeom contents,
IGPEErrorHandler errors,
File file)
Method to parse a file.
|
void |
parse(IGPEContentHandlerInmGeom contents,
IGPEErrorHandler errors,
URI uri)
Method to parse a file.
|
void |
setProperty(String key,
Object value)
Sets a property
|
public Iterator getKeys()
GPEManager
getKeys
in interface GPEManager
public String getStringProperty(String key)
GPEManager
getStringProperty
in interface GPEManager
key
- Property namepublic int getIntPropertyProperty(String key)
GPEManager
getIntPropertyProperty
in interface GPEManager
key
- Property namepublic boolean getBooleanProperty(String key)
GPEManager
getBooleanProperty
in interface GPEManager
key
- Property namepublic Object getProperty(String key)
GPEManager
getProperty
in interface GPEManager
key
- Property namepublic void setProperty(String key, Object value)
GPEManager
setProperty
in interface GPEManager
public IGPEWriterHandler createWriter(String name) throws WriterHandlerCreationException
GPEManager
createWriter
in interface GPEManager
name
- GPEWriterHandler name
GPEParser nameWriterHandlerCreationException
public IGPEWriterHandler createWriterByClass(String prefferredImplClassName) throws WriterHandlerCreationException
GPEManager
createWriterByClass
in interface GPEManager
prefferredImplClassName
- The name of the class that implements GPEWriterHandler
WriterHandlerCreationException
- If it is not possible to create a writerpublic IGPEWriterHandler createWriterByMimeType(String mimeType) throws WriterHandlerCreationException
GPEManager
GPEWriterHandler#getFormat()
that returns the mimetype
that the writer can write. One writer only supports one mimetype.
This method retrieve all the writers and returns the first one that is able to write the mimetype. If there are more writer that can write the format will not be used.
createWriterByMimeType
in interface GPEManager
mimeType
- The mimetype of the file to writeWriterHandlerCreationException
- If it is not possible to create a writerpublic void parse(IGPEContentHandler contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException
GPEManager
parse
in interface GPEManager
contents
- Application ContentHandlererrors
- Application ErrorsHandleruri
- File to openParserCreationException
public void parse(IGPEContentHandler contents, IGPEErrorHandler errors, File file) throws ParserCreationException
GPEManager
parse
in interface GPEManager
contents
- Application ContentHandlererrors
- Application ErrorsHandlerfile
- File to openParserCreationException
public boolean accept(URI uri)
GPEManager
accept
in interface GPEManager
uri
- File to openpublic void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException
GPEManager
parse
in interface GPEManager
contents
- Application ContentHandlererrors
- Application ErrorsHandleruri
- File to openParserCreationException
public void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, File file) throws ParserCreationException
GPEManager
parse
in interface GPEManager
contents
- Application ContentHandlererrors
- Application ErrorsHandlerfile
- File to openParserCreationException
public String getDefaultProjection(File file) throws ParserCreationException
getDefaultProjection
in interface GPEManager
ParserCreationException