org.apache.storm.pmml.runner.jpmml

## Class JpmmlFactory

- java.lang.Object
- - org.apache.storm.pmml.runner.jpmml.JpmmlFactory

-     public class JpmmlFactory
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JpmmlFactory.ModelRunnerFromBlobStore` Creates a `JPmmlModelRunner` writing to the default stream.
    `static class` | `JpmmlFactory.ModelRunnerFromFile`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JpmmlFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InputStream` | `getPmmlModelBlob(String blobKey)` Returns PMML model from Blobstore.
    `static InputStream` | `getPmmlModelBlob(String blobKey, Map<String,Object> config)` Returns PMML model from Blobstore.
    `static org.jpmml.evaluator.Evaluator` | `newEvaluator(File file)` Creates a new `Evaluator` object representing the PMML model defined in the XML `File` specified as argument.
    `static org.jpmml.evaluator.Evaluator` | `newEvaluator(InputStream stream)` Creates a new `Evaluator` object representing the PMML model defined in the XML `File` specified as argument.
    `static org.jpmml.evaluator.Evaluator` | `newEvaluator(org.dmg.pmml.PMML pmml)` Creates a new `Evaluator` object representing the PMML model defined in the `PMML` argument.
    `static org.jpmml.evaluator.Evaluator` | `newEvaluator(String blobKey)` Creates a new `Evaluator` object representing the PMML model uploaded to the Blobstore using the blob key specified as argument.
    `static org.jpmml.evaluator.Evaluator` | `newEvaluator(String blobKey, Map<String,Object> config)` Creates a new `Evaluator` object representing the PMML model uploaded to the Blobstore using the blob key specified as argument.
    `static org.dmg.pmml.PMML` | `newPmml(File file)` Creates a new `PMML` object representing the PMML model defined in the XML `File` specified as argument.
    `static org.dmg.pmml.PMML` | `newPmml(InputStream stream)` Creates a new `PMML` object representing the PMML model defined in the `InputStream` specified as argument.
    `static org.dmg.pmml.PMML` | `newPmml(String blobKey)` Creates a new `PMML` object representing the PMML model uploaded to the Blobstore with key specified as argument.
    `static org.dmg.pmml.PMML` | `newPmml(String blobKey, Map<String,Object> config)` Creates a new `PMML` object representing the PMML model uploaded to the Blobstore with key specified as argument.

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

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

- - ### Constructor Detail

    - #### JpmmlFactory

          public JpmmlFactory()

  - ### Method Detail

    - #### newPmml

          public static org.dmg.pmml.PMML newPmml(File file)
                                           throws JAXBException,
                                                  SAXException,
                                                  IOException

      Creates a new `PMML` object representing the PMML model defined in the XML `File` specified as argument.

      Throws:
        `JAXBException`
        `SAXException`
        `IOException`

    - #### newPmml

          public static org.dmg.pmml.PMML newPmml(InputStream stream)
                                           throws JAXBException,
                                                  SAXException,
                                                  IOException

      Creates a new `PMML` object representing the PMML model defined in the `InputStream` specified as argument.

      Throws:
        `JAXBException`
        `SAXException`
        `IOException`

    - #### newPmml

          public static org.dmg.pmml.PMML newPmml(String blobKey)
                                           throws JAXBException,
                                                  SAXException,
                                                  IOException

      Creates a new `PMML` object representing the PMML model uploaded to the Blobstore with key specified as argument. Uses Storm config as returned by `Utils.readStormConfig()` to get the Blobstore client.

      Throws:
        `JAXBException`
        `SAXException`
        `IOException`

    - #### newPmml

          public static org.dmg.pmml.PMML newPmml(String blobKey,
                                                  Map<String,Object> config)
                                           throws JAXBException,
                                                  SAXException,
                                                  IOException

      Creates a new `PMML` object representing the PMML model uploaded to the Blobstore with key specified as argument. Uses the specified configuration to get the Blobstore client.

      Throws:
        `JAXBException`
        `SAXException`
        `IOException`

    - #### getPmmlModelBlob

          public static InputStream getPmmlModelBlob(String blobKey)

      Returns PMML model from Blobstore. Uses Storm config as returned by `Utils.readStormConfig()`.

      Parameters:
        `blobKey` - key of PMML model in Blobstore

    - #### getPmmlModelBlob

          public static InputStream getPmmlModelBlob(String blobKey,
                                                     Map<String,Object> config)

      Returns PMML model from Blobstore.

      Parameters:
        `blobKey` - key of PMML model in Blobstore
        `config` - Configuration to use to get Blobstore client

    - #### newEvaluator

          public static org.jpmml.evaluator.Evaluator newEvaluator(org.dmg.pmml.PMML pmml)

      Creates a new `Evaluator` object representing the PMML model defined in the `PMML` argument.

    - #### newEvaluator

          public static org.jpmml.evaluator.Evaluator newEvaluator(File file)
                                                            throws IOException,
                                                                   JAXBException,
                                                                   SAXException

      Creates a new `Evaluator` object representing the PMML model defined in the XML `File` specified as argument.

      Throws:
        `IOException`
        `JAXBException`
        `SAXException`

    - #### newEvaluator

          public static org.jpmml.evaluator.Evaluator newEvaluator(InputStream stream)
                                                            throws IOException,
                                                                   JAXBException,
                                                                   SAXException

      Creates a new `Evaluator` object representing the PMML model defined in the XML `File` specified as argument.

      Throws:
        `IOException`
        `JAXBException`
        `SAXException`

    - #### newEvaluator

          public static org.jpmml.evaluator.Evaluator newEvaluator(String blobKey)
                                                            throws IOException,
                                                                   JAXBException,
                                                                   SAXException

      Creates a new `Evaluator` object representing the PMML model uploaded to the Blobstore using the blob key specified as argument. Uses Storm config as returned by `Utils.readStormConfig()` to get the Blobstore client.

      Throws:
        `IOException`
        `JAXBException`
        `SAXException`

    - #### newEvaluator

          public static org.jpmml.evaluator.Evaluator newEvaluator(String blobKey,
                                                                   Map<String,Object> config)
                                                            throws IOException,
                                                                   JAXBException,
                                                                   SAXException

      Creates a new `Evaluator` object representing the PMML model uploaded to the Blobstore using the blob key specified as argument. Uses the specified configuration to get the Blobstore client.

      Throws:
        `IOException`
        `JAXBException`
        `SAXException`

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