Interface GPEManager


public interface GPEManager
Author:
Jorge Piera
  • Method Details

    • accept

      boolean accept(URI uri)
      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 ContentHandler
      errors - Application ErrorsHandler
      uri - File to open
      Throws:
      ParserCreationException
      Exception
    • 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 ContentHandler
      errors - Application ErrorsHandler
      file - File to open
      Throws:
      ParserCreationException
      Exception
    • 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 ContentHandler
      errors - Application ErrorsHandler
      uri - File to open
      Throws:
      ParserCreationException
      Exception
    • 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 ContentHandler
      errors - Application ErrorsHandler
      file - File to open
      Throws:
      ParserCreationException
      Exception
    • createWriter

      Create a new content writer from a name
      Parameters:
      name - GPEWriterHandler name GPEParser name
      contenHandler - Application contenHandler usett to throw the parsing events
      errorHandler - 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 implements
      invalid reference
      GPEWriterHandler
      Returns:
      A writer for a concrete format.
      Throws:
      WriterHandlerCreationException - If it is not possible to create a writer
    • createWriterByMimeType

      IGPEWriterHandler createWriterByMimeType(String mimeType) throws WriterHandlerCreationException
      Create a new writer from a mime type. Each writer has a method named
      invalid reference
      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.

      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

      String getStringProperty(String key)
      Gets a String property
      Parameters:
      key - Property name
      Returns:
    • getIntPropertyProperty

      int getIntPropertyProperty(String key)
      Gets a int property
      Parameters:
      key - Property name
      Returns:
      The int property or -1
    • getBooleanProperty

      boolean getBooleanProperty(String key)
      Gets a boolean property. If the property doesn't exist it returns false.
      Parameters:
      key - Property name
      Returns:
      The boolean property or false
    • getProperty

      Object getProperty(String key)
      Gets a property
      Parameters:
      key - Property name
      Returns:
    • setProperty

      void setProperty(String key, Object value)
      Sets a property
      Parameters:
      key -
      value -
    • getDefaultProjection

      String getDefaultProjection(File file) throws ParserCreationException
      Throws:
      ParserCreationException