org.exolab.castor.xml.schema

Class ContentType

public class ContentType extends Object implements Serializable

An XML Schema ContentType

Version: $Revision: 1.2 $ $Date: 2003/03/03 18:08:27 $

Author: Keith Visco

Field Summary
static shortANY
static ContentTypeany
static ContentTypeelemOnly
static ContentTypeempty
static shortELEMENT_ONLY
static shortEMPTY
static ContentTypemixed
static shortMIXED
static shortSIMPLE
static ContentTypetextOnly
static shortTEXT_ONLY
Constructor Summary
protected ContentType(short type)
Creates a new ContentType.
Method Summary
shortgetType()
Returns the type of this ContentType
StringtoString()
Returns the String representation of this ContentType
static ContentTypevalueOf(String contentType)
Creates a new ContentType based on the given String

Field Detail

ANY

public static final short ANY

any

public static final ContentType any

elemOnly

public static final ContentType elemOnly

empty

public static final ContentType empty

ELEMENT_ONLY

public static final short ELEMENT_ONLY

EMPTY

public static final short EMPTY

mixed

public static final ContentType mixed

MIXED

public static final short MIXED

SIMPLE

public static final short SIMPLE

textOnly

public static final ContentType textOnly

TEXT_ONLY

public static final short TEXT_ONLY

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 String toString()
Returns the String representation of this ContentType

Returns: the String representation of this ContentType

valueOf

public static ContentType valueOf(String contentType)
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

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