Class ContentType


  • public final class ContentType
    extends java.lang.Object
    Simple class wrapping content type information. At this moment only TEXT_TAB, TEXT_XML, TEXT_PLAIN are useful content types. InterMine decides which output format use according to the parameters in request and not according to the content type header.
    • Field Detail

      • TEXT_XML

        public static final ContentType TEXT_XML
        A ContentType constant that describes the generic text/xml content type.
      • MULTI_PART_FORM

        public static final ContentType MULTI_PART_FORM
        Content type for multi-part form requests.
      • TEXT_TAB

        public static final ContentType TEXT_TAB
        A ContentType constant that describes the generic text/plain content type.
      • TEXT_COUNT

        public static final ContentType TEXT_COUNT
        A ContentType constant that describes the generic text/plain content type when requesting counts.
      • TEXT_PLAIN

        public static final ContentType TEXT_PLAIN
        A ContentType constant that describes the generic text/plain content type.
      • APPLICATION_JSON

        public static final ContentType APPLICATION_JSON
        A ContentType constant that describes the JSON content type.
      • APPLICATION_JSON_OBJ

        public static final ContentType APPLICATION_JSON_OBJ
        A Content type that describes the JSON objects content type.
      • APPLICATION_JSON_ROW

        public static final ContentType APPLICATION_JSON_ROW
        A Content type that describes the JSON rows content type.
    • Method Detail

      • toString

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

        public java.lang.String getType()
        Returns:
        type
      • setType

        public void setType​(java.lang.String type)
        Sets main content type.
        Parameters:
        type - content type
      • getSubType

        public java.lang.String getSubType()
        Returns:
        sub type
      • setSubType

        public void setSubType​(java.lang.String subType)
        Parameters:
        subType - content type sub type
      • getCharSet

        public java.lang.String getCharSet()
        Returns:
        character set of this content type.
      • setCharSet

        public void setCharSet​(java.lang.String charSet)
        Sets character set of this content type.
        Parameters:
        charSet - character set