public interface GPEProviderManager
Modifier and Type | Method and Description |
---|---|
boolean |
accept(URI uri)
Return true if exists a driver that can open the file
|
void |
addGpeParser(Class clazz)
Adds a new GPE parser
|
void |
addGpeParser(String name,
String description,
Class clazz)
Adds a new GPE parser
|
void |
addGpeWriterHandlerImplementor(Class clazz)
Adds a new GPEWriterHandlerImplementor
|
void |
addGpeWriterHandlerImplementor(String name,
String description,
Class clazz)
Adds a new GPEWriterHandlerImplementor
|
void |
addParsersFile(File file)
It loads the parsers of a parsers file.
|
void |
addWritersFile(File file)
It loads the writers of a writers file.
|
IGPEParser |
createParser(File file)
Gets the parser that can open the file (if it exists)
|
IGPEParser |
createParser(String name)
Create a new parser from a name
|
IGPEParser |
createParser(URI uri)
Gets the parser that can open the file (if it exists)
|
IGPEParser |
createParserByClass(String prefferredImplClassName)
Create a new parser from a name
|
IGPEParser |
createParserByMimeType(String mimeType)
Create a new parser from a mime type.
|
IGPEWriterHandlerImplementor |
createWriterHandlerImplementor(String name)
Create a new content writer from a name
|
IGPEWriterHandlerImplementor |
createWriterHandlerImplementorByClass(String prefferredImplClassName)
Create a new writer from a class name.
|
IGPEWriterHandlerImplementor |
createWriterHandlerImplementorByMimeType(String mimeType)
Create a new writer from a mime type.
|
IGPEParser[] |
getAllParsers() |
ArrayList |
getWriterHandlerByFormat(String format)
Gets all the writers that can write the provided format.
|
void addGpeParser(String name, String description, Class clazz) throws ParserNotRegisteredException
name
- Driver name. It must be written like FORMAT VERSIONdescription
- Driver description. Just a descriptive textclazz
- The parser classParserNotRegisteredException
GPEParserRegisterException
void addGpeParser(Class clazz) throws ParserNotRegisteredException
clazz
- The parser classParserNotRegisteredException
GPEParserRegisterException
void addParsersFile(File file) throws FileNotFoundException, IOException
file
- File that contains the parsers listIOException
FileNotFoundException
ParserNotRegisteredException
void addWritersFile(File file) throws FileNotFoundException, IOException
file
- File that contains the writers listIOException
FileNotFoundException
IGPEParser[] getAllParsers()
void addGpeWriterHandlerImplementor(String name, String description, Class clazz) throws WriterHandlerNotRegisteredException
name
- Driver name. It must be written like FORMAT VERSIONdescription
- Driver description. Just a descriptive textclazz
- The parser classWriterHandlerNotRegisteredException
GPEWriterHandlerRegisterException
void addGpeWriterHandlerImplementor(Class clazz) throws WriterHandlerNotRegisteredException
clazz
- The parser classWriterHandlerNotRegisteredException
GPEWriterHandlerRegisterException
IGPEParser createParser(String name) throws ParserCreationException
name
- GPEParser namecontenHandler
- Application contenHandler usett to throw the parsing eventserrorHandler
- Application errror handler used to put errors and warningsParserCreationException
GPEParserCreationException
IGPEParser createParserByClass(String prefferredImplClassName) throws ParserCreationException
name
- GPEParser namecontenHandler
- Application contenHandler usett to throw the parsing eventserrorHandler
- Application errror handler used to put errors and warningsParserCreationException
GPEParserCreationException
IGPEParser createParserByMimeType(String mimeType) throws ParserCreationException
GPEParser#getFormat()
that returns the mimetype
that the parser can read. One parser only supports one mimetype.
This method retrieve all the parsers and returns the first parser that is able to read the mimetype. If there are more parsers that can open the file will not be used.
mimeType
- The mimetype of the file to openParserCreationException
- If it is not possible to create a parserIGPEParser createParser(URI uri) throws ParserCreationException
uri
- File to openGPEParserCreationException
NoSuchMethodException
InvocationTargetException
IllegalAccessException
InstantiationException
SecurityException
IllegalArgumentException
ParserCreationException
IGPEParser createParser(File file) throws ParserCreationException
file
- File to openGPEParserCreationException
NoSuchMethodException
InvocationTargetException
IllegalAccessException
InstantiationException
SecurityException
IllegalArgumentException
ParserCreationException
IGPEWriterHandlerImplementor createWriterHandlerImplementor(String name) throws WriterHandlerCreationException
name
- GPEWriterHandler name
GPEParser namecontenHandler
- Application contenHandler usett to throw the parsing eventserrorHandler
- Application errror handler used to put errors and warningsGPEWriterHandlerCreationException
WriterHandlerCreationException
IGPEWriterHandlerImplementor createWriterHandlerImplementorByClass(String prefferredImplClassName) throws WriterHandlerCreationException
prefferredImplClassName
- The name of the class that implements GPEWriterHandler
WriterHandlerCreationException
- If it is not possible to create a writerIGPEWriterHandlerImplementor createWriterHandlerImplementorByMimeType(String mimeType) throws WriterHandlerCreationException
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.
mimeType
- The mimetype of the file to writeWriterHandlerCreationException
- If it is not possible to create a writerArrayList getWriterHandlerByFormat(String format)
format
- as a short form (without version). Example: "gml", "kml"boolean accept(URI uri)
uri
- File to open