public interface GPEProviderManager
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.net.URI uri)
Return true if exists a driver that can open the file
|
void |
addGpeParser(java.lang.Class clazz)
Adds a new GPE parser
|
void |
addGpeParser(java.lang.String name,
java.lang.String description,
java.lang.Class clazz)
Adds a new GPE parser
|
void |
addGpeWriterHandlerImplementor(java.lang.Class clazz)
Adds a new GPEWriterHandlerImplementor
|
void |
addGpeWriterHandlerImplementor(java.lang.String name,
java.lang.String description,
java.lang.Class clazz)
Adds a new GPEWriterHandlerImplementor
|
void |
addParsersFile(java.io.File file)
It loads the parsers of a parsers file.
|
void |
addWritersFile(java.io.File file)
It loads the writers of a writers file.
|
IGPEParser |
createParser(java.io.File file)
Gets the parser that can open the file (if it exists)
|
IGPEParser |
createParser(java.lang.String name)
Create a new parser from a name
|
IGPEParser |
createParser(java.net.URI uri)
Gets the parser that can open the file (if it exists)
|
IGPEParser |
createParserByClass(java.lang.String prefferredImplClassName)
Create a new parser from a name
|
IGPEParser |
createParserByMimeType(java.lang.String mimeType)
Create a new parser from a mime type.
|
IGPEWriterHandlerImplementor |
createWriterHandlerImplementor(java.lang.String name)
Create a new content writer from a name
|
IGPEWriterHandlerImplementor |
createWriterHandlerImplementorByClass(java.lang.String prefferredImplClassName)
Create a new writer from a class name.
|
IGPEWriterHandlerImplementor |
createWriterHandlerImplementorByMimeType(java.lang.String mimeType)
Create a new writer from a mime type.
|
IGPEParser[] |
getAllParsers() |
java.util.ArrayList |
getWriterHandlerByFormat(java.lang.String format)
Gets all the writers that can write the provided format.
|
void addGpeParser(java.lang.String name, java.lang.String description, java.lang.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(java.lang.Class clazz) throws ParserNotRegisteredException
clazz
- The parser classParserNotRegisteredException
GPEParserRegisterException
void addParsersFile(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
file
- File that contains the parsers listjava.io.IOException
java.io.FileNotFoundException
ParserNotRegisteredException
void addWritersFile(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
file
- File that contains the writers listjava.io.IOException
java.io.FileNotFoundException
IGPEParser[] getAllParsers()
void addGpeWriterHandlerImplementor(java.lang.String name, java.lang.String description, java.lang.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(java.lang.Class clazz) throws WriterHandlerNotRegisteredException
clazz
- The parser classWriterHandlerNotRegisteredException
GPEWriterHandlerRegisterException
IGPEParser createParser(java.lang.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(java.lang.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(java.lang.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(java.net.URI uri) throws ParserCreationException
uri
- File to openGPEParserCreationException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.SecurityException
java.lang.IllegalArgumentException
ParserCreationException
IGPEParser createParser(java.io.File file) throws ParserCreationException
file
- File to openGPEParserCreationException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.SecurityException
java.lang.IllegalArgumentException
ParserCreationException
IGPEWriterHandlerImplementor createWriterHandlerImplementor(java.lang.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(java.lang.String prefferredImplClassName) throws WriterHandlerCreationException
prefferredImplClassName
- The name of the class that implements GPEWriterHandler
WriterHandlerCreationException
- If it is not possible to create a writerIGPEWriterHandlerImplementor createWriterHandlerImplementorByMimeType(java.lang.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 writerjava.util.ArrayList getWriterHandlerByFormat(java.lang.String format)
format
- as a short form (without version). Example: "gml", "kml"boolean accept(java.net.URI uri)
uri
- File to open