Package org.gvsig.gpe.lib.api
Interface GPEManager
public interface GPEManager
- Author:
- Jorge Piera
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if exists a driver that can open the filecreateWriter(String name) Create a new content writer from a namecreateWriterByClass(String prefferredImplClassName) Create a new writer from a class name.createWriterByMimeType(String mimeType) Create a new writer from a mime type.booleangetBooleanProperty(String key) Gets a boolean property.getDefaultProjection(File file) intGets a int propertygetKeys()Returns an iterator with the name of all the properties that has been established.getProperty(String key) Gets a propertygetStringProperty(String key) Gets a String propertyvoidparse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, File file) Method to parse a file.voidparse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, URI uri) Method to parse a file.voidparse(IGPEContentHandler contents, IGPEErrorHandler errors, File file) Method to parse a file.voidparse(IGPEContentHandler contents, IGPEErrorHandler errors, URI uri) Method to parse a file.voidsetProperty(String key, Object value) Sets a property
-
Method Details
-
accept
Return true if exists a driver that can open the file- Parameters:
uri- File to open- Returns:
- true if the driver exists
-
parse
void parse(IGPEContentHandler contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException Method to parse a file. It cannot to throw any exception and it cannot to return any value. In a future it could be implemented like a independent thread- Parameters:
contents- Application ContentHandlererrors- Application ErrorsHandleruri- File to open- Throws:
ParserCreationExceptionException
-
parse
void parse(IGPEContentHandler contents, IGPEErrorHandler errors, File file) throws ParserCreationException Method to parse a file. It cannot to throw any exception and it cannot to return any value. In a future it could be implemented like a independent thread- Parameters:
contents- Application ContentHandlererrors- Application ErrorsHandlerfile- File to open- Throws:
ParserCreationExceptionException
-
parse
void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException Method to parse a file. It cannot to throw any exception and it cannot to return any value. In a future it could be implemented like a independent thread- Parameters:
contents- Application ContentHandlererrors- Application ErrorsHandleruri- File to open- Throws:
ParserCreationExceptionException
-
parse
void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, File file) throws ParserCreationException Method to parse a file. It cannot to throw any exception and it cannot to return any value. In a future it could be implemented like a independent thread- Parameters:
contents- Application ContentHandlererrors- Application ErrorsHandlerfile- File to open- Throws:
ParserCreationExceptionException
-
createWriter
Create a new content writer from a name- Parameters:
name- GPEWriterHandler name GPEParser namecontenHandler- Application contenHandler usett to throw the parsing eventserrorHandler- Application errror handler used to put errors and warnings
-
createWriterByClass
IGPEWriterHandler createWriterByClass(String prefferredImplClassName) throws WriterHandlerCreationException Create a new writer from a class name. This method can be used if the class name is known but, the common method to get a writer is using the mime type. *- Parameters:
prefferredImplClassName- The name of the class that implementsinvalid reference
GPEWriterHandler- Returns:
- A writer for a concrete format.
- Throws:
WriterHandlerCreationException- If it is not possible to create a writer
-
createWriterByMimeType
Create a new writer from a mime type. Each writer has a method namedthat returns the mimetype that the writer can write. One writer only supports one mimetype.invalid reference
GPEWriterHandler#getFormat()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.
- Parameters:
mimeType- The mimetype of the file to write- Returns:
- A writer that can write the mimetype.
- Throws:
WriterHandlerCreationException- If it is not possible to create a writer- See Also:
-
getKeys
Iterator getKeys()Returns an iterator with the name of all the properties that has been established. -
getStringProperty
Gets a String property- Parameters:
key- Property name- Returns:
-
getIntPropertyProperty
Gets a int property- Parameters:
key- Property name- Returns:
- The int property or -1
-
getBooleanProperty
Gets a boolean property. If the property doesn't exist it returns false.- Parameters:
key- Property name- Returns:
- The boolean property or false
-
getProperty
Gets a property- Parameters:
key- Property name- Returns:
-
setProperty
Sets a property- Parameters:
key-value-
-
getDefaultProjection
- Throws:
ParserCreationException
-