GISModelWriter (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.ml.maxent.io

## Class GISModelWriter

- java.lang.Object
- - opennlp.tools.ml.model.AbstractModelWriter
  - - opennlp.tools.ml.maxent.io.GISModelWriter

- Direct Known Subclasses:
    BinaryGISModelWriter, QNModelWriter

      public abstract class GISModelWriter
      extends AbstractModelWriter

  Abstract parent class for GISModel writers. It provides the persist method which takes care of the structure of a stored document, and requires an extending class to define precisely how the data should be stored.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GISModelWriter(AbstractModel model)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `persist()` Writes the model to disk, using the `writeX()` methods provided by extending classes.

    - ### Methods inherited from class opennlp.tools.ml.model.AbstractModelWriter

      `close, writeDouble, writeInt, writeUTF`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GISModelWriter

          public GISModelWriter(AbstractModel model)

  - ### Method Detail

    - #### persist

          public void persist()
                       throws IOException

      Writes the model to disk, using the `writeX()` methods provided by extending classes.

      If you wish to create a GISModelWriter which uses a different structure, it will be necessary to override the persist method in addition to implementing the `writeX()` methods.

      Specified by:
        `persist` in class `AbstractModelWriter`
      Throws:
        `IOException`

Copyright © 2026 The Apache Software Foundation. All rights reserved.