org.exolab.castor.xml.schema
Class ContentType

java.lang.Object
  extended by 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: 1.2 $ $Date: 2003/03/03 18:08:27 $
Author:
Keith Visco
See Also:
Serialized Form

Field Summary
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
protected ContentType(short type)
          Creates a new ContentType.
 
Method Summary
 short getType()
          Returns the type of this ContentType
 java.lang.String toString()
          Returns the String representation of this ContentType
static ContentType valueOf(java.lang.String contentType)
          Creates a new ContentType based on the given String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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


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