Class ContentType

java.lang.Object
org.exolab.castor.xml.schema.ContentType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SimpleContent

public class ContentType extends Object implements 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:
  • Field Details

  • Constructor Details

    • ContentType

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

    • getType

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

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

      public static ContentType valueOf(String contentType) throws 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:
      IllegalArgumentException - when the given type is not one of the possible valid values