Enum PMMLVersion

  • All Implemented Interfaces:
    Serializable, Comparable<PMMLVersion>

    public enum PMMLVersion
    extends Enum<PMMLVersion>
    Encapsulates version-specific PMML information. In general, we support reading from previous versions but write to the latest version. We allow setting the current version to write via EngineConfig property. At the moment, we are transitioning from KNIME 2.9 to KNIME 2.10 (and thus switching from PMML 4.1 to 4.2) and so the KNIME client will set the engine config property based on which KNIME version is running.
    • Field Detail

      • PROPERTY

        public static final EngineProperty<String> PROPERTY
        Property controlling PMML version to use when writing PMML
    • Method Detail

      • values

        public static PMMLVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PMMLVersion c : PMMLVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PMMLVersion valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • get

        public static PMMLVersion get​(EngineConfig config)
        Returns the PMML version to use based on the given DR engine config
        Parameters:
        config - the engine config
        Returns:
        the PMML version to use
      • version

        public String version()
        Returns the version number (i.e. '4.2').
        Returns:
        the pmml version number
      • namespace

        public String namespace()
        Returns the pmml namespace for this version
        Returns:
        the pmml namespace for this version
      • find

        public static PMMLVersion find​(String version,
                                       PMMLVersion dflt)
        Finds the PMML version corresponding to the given string.
        Parameters:
        version - the version to find
        dflt - the default version to find if none can be found
        Returns:
        the PMML version
      • schema

        public Schema schema()
        Returns the schema that can be used for validating this PMML version.
        Returns:
        the schema