Class Param<T>

  • Type Parameters:
    T - value type. Should be serializable to string and have a constructor with string param
    All Implemented Interfaces:
    java.io.Serializable

    public class Param<T>
    extends java.lang.Object
    implements java.io.Serializable
    This is a serializable model class for parameters from configuration file.
    Since:
    Apache Tika 1.14
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Param()  
      Param​(java.lang.String name, java.lang.Class<T> type, T value)  
      Param​(java.lang.String name, T value)  
    • Constructor Detail

      • Param

        public Param()
      • Param

        public Param​(java.lang.String name,
                     java.lang.Class<T> type,
                     T value)
      • Param

        public Param​(java.lang.String name,
                     T value)
    • Method Detail

      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • getType

        public java.lang.Class<T> getType()
      • setType

        public void setType​(java.lang.Class<T> type)
      • getTypeString

        public java.lang.String getTypeString()
      • setTypeString

        public void setTypeString​(java.lang.String type)
      • getValue

        public T getValue()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • save

        public void save​(java.io.OutputStream stream)
                  throws javax.xml.transform.TransformerException,
                         TikaException
        Throws:
        javax.xml.transform.TransformerException
        TikaException
      • save

        public void save​(org.w3c.dom.Node node)
      • load

        public static <T> Param<T> load​(java.io.InputStream stream)
                                 throws org.xml.sax.SAXException,
                                        java.io.IOException,
                                        TikaException
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
        TikaException
      • load

        public static <T> Param<T> load​(org.w3c.dom.Node node)