Class ContentType

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    SimpleContent

    public class ContentType
    extends java.lang.Object
    implements java.io.Serializable
    An XML Schema ContentType
    Version:
    $Revision: 5951 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
    Author:
    Keith Visco
    See Also:
    Serialized Form
    • Constructor Detail

      • ContentType

        protected ContentType​(short type)
        Creates a new ContentType.
    • Method Detail

      • getType

        public short getType()
        Returns the type of this ContentType
        Returns:
        the type of this ContentType
      • toString

        public java.lang.String toString()
        Returns the String representation of this ContentType
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representation of this ContentType
      • valueOf

        public static ContentType valueOf​(java.lang.String contentType)
                                   throws java.lang.IllegalArgumentException
        Creates a new ContentType based on the given String
        Parameters:
        contentType - the type of the ContentType to create.
         The valid values are as follows:
          elemOnly, textOnly, mixed, empty, any, simple
         
        Throws:
        java.lang.IllegalArgumentException - when the given type is not one of the possible valid values