org.exolab.castor.xml.schema

Class ContentType

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

public class ContentType
extends java.lang.Object
implements java.io.Serializable

An XML Schema ContentType
Version:
$Revision: 1.2 $ $Date: 2003/03/03 18:08:27 $
Author:
Keith Visco
See Also:
Serialized Form

Field Summary

static short
ANY
static short
ELEMENT_ONLY
static short
EMPTY
static short
MIXED
static short
SIMPLE
static short
TEXT_ONLY
static ContentType
any
static ContentType
elemOnly
static ContentType
empty
static ContentType
mixed
static ContentType
textOnly

Constructor Summary

ContentType(short type)
Creates a new ContentType.

Method Summary

short
getType()
Returns the type of this ContentType
String
toString()
Returns the String representation of this ContentType
static ContentType
valueOf(String contentType)
Creates a new ContentType based on the given String

Field Details

ANY

public static final short ANY
Field Value:
3

ELEMENT_ONLY

public static final short ELEMENT_ONLY
Field Value:
0

EMPTY

public static final short EMPTY
Field Value:
2

MIXED

public static final short MIXED
Field Value:
1

SIMPLE

public static final short SIMPLE
Field Value:
4

TEXT_ONLY

public static final short TEXT_ONLY
Field Value:
5

any

public static final ContentType any

elemOnly

public static final ContentType elemOnly

empty

public static final ContentType empty

mixed

public static final ContentType mixed

textOnly

public static final ContentType textOnly

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
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

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com