public abstract class GPEParser extends Object implements IGPEParser
Constructor and Description |
---|
GPEParser()
All the GPE parser must implement an empty constructor
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
accept(File file)
Return if the driver can open the file
|
abstract boolean |
accept(URI uri)
Return if the driver can open the file
|
IGPEContentHandlerInmGeom |
getContentHandler() |
abstract String |
getDescription() |
IGPEErrorHandler |
getErrorHandler() |
abstract String |
getFormat()
Return the format that the driver
is able to read
|
GPEManager |
getGpeManager() |
protected InputStream |
getInputStream() |
URI |
getMainFile() |
abstract String |
getName() |
void |
parse(IGPEContentHandlerInmGeom contents,
IGPEErrorHandler errors,
InputStream is)
Method to parse an InputStream.
|
void |
parse(IGPEContentHandlerInmGeom contents,
IGPEErrorHandler errors,
URI uri)
Method to parse a file.
|
protected abstract void |
parseStream()
Parses the file from an input stream
|
protected abstract void |
parseURI()
Parses the file from a URI
|
void |
setContentHandler(IGPEContentHandlerInmGeom contentHandler) |
void |
setErrorHandler(IGPEErrorHandler errorHandler) |
protected void |
setInputStream(InputStream is)
Deprecated.
to avoid temporal coupling
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProjection
public GPEParser()
public void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, URI uri)
parse
in interface IGPEParser
contents
- Application ContentHandlererrors
- Application ErrorsHandleruri
- File to openException
protected abstract void parseURI()
public void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, InputStream is)
parse
in interface IGPEParser
contents
- Application ContentHandlererrors
- Application ErrorsHandleris
- The input streamException
protected abstract void parseStream()
public abstract boolean accept(URI uri)
accept
in interface IGPEParser
uri
- File to openpublic abstract boolean accept(File file)
uri
- File to openpublic abstract String getFormat()
getFormat
in interface IGPEParser
public IGPEContentHandlerInmGeom getContentHandler()
getContentHandler
in interface IGPEParser
public IGPEErrorHandler getErrorHandler()
getErrorHandler
in interface IGPEParser
public URI getMainFile()
getMainFile
in interface IGPEParser
public abstract String getDescription()
getDescription
in interface IGPEParser
public abstract String getName()
getName
in interface IGPEParser
protected InputStream getInputStream()
protected void setInputStream(InputStream is)
is
- the is to setpublic void setErrorHandler(IGPEErrorHandler errorHandler)
setErrorHandler
in interface IGPEParser
errorHandler
- the errorHandler to setpublic void setContentHandler(IGPEContentHandlerInmGeom contentHandler)
setContentHandler
in interface IGPEParser
contentHandler
- the contentHandler to setpublic GPEManager getGpeManager()