Package org.exolab.castor.xml.schema
Class ContentType
- java.lang.Object
-
- org.exolab.castor.xml.schema.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
-
-
Field Summary
Fields Modifier and Type Field Description static ContentType
any
static short
ANY
static short
ELEMENT_ONLY
static ContentType
elemOnly
static ContentType
empty
static short
EMPTY
static ContentType
mixed
static short
MIXED
static short
SIMPLE
static short
TEXT_ONLY
static ContentType
textOnly
-
Constructor Summary
Constructors Modifier Constructor Description protected
ContentType(short type)
Creates a new ContentType.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description short
getType()
Returns the type of this ContentTypejava.lang.String
toString()
Returns the String representation of this ContentTypestatic ContentType
valueOf(java.lang.String contentType)
Creates a new ContentType based on the given String
-
-
-
Field Detail
-
ELEMENT_ONLY
public static final short ELEMENT_ONLY
- See Also:
- Constant Field Values
-
MIXED
public static final short MIXED
- See Also:
- Constant Field Values
-
EMPTY
public static final short EMPTY
- See Also:
- Constant Field Values
-
ANY
public static final short ANY
- See Also:
- Constant Field Values
-
SIMPLE
public static final short SIMPLE
- See Also:
- Constant Field Values
-
TEXT_ONLY
public static final short TEXT_ONLY
- See Also:
- Constant Field Values
-
elemOnly
public static final ContentType elemOnly
-
mixed
public static final ContentType mixed
-
empty
public static final ContentType empty
-
any
public static final ContentType any
-
textOnly
public static final ContentType textOnly
-
-
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 classjava.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
-
-