org.exolab.castor.xml.schema
Class SimpleContent

java.lang.Object
  extended by org.exolab.castor.xml.schema.ContentType
      extended by org.exolab.castor.xml.schema.SimpleContent
All Implemented Interfaces:
java.io.Serializable

public class SimpleContent
extends ContentType
implements java.io.Serializable

An extension of the ContentType to support simple content extension and restriction for complexTypes.

Version:
$Revision: 1.1 $ $Date: 2003/03/03 17:44:01 $
Author:
Keith Visco
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.exolab.castor.xml.schema.ContentType
any, ANY, ELEMENT_ONLY, elemOnly, empty, EMPTY, mixed, MIXED, SIMPLE, TEXT_ONLY, textOnly
 
Constructor Summary
SimpleContent()
          Creates a new SimpleContent
SimpleContent(Schema schema, java.lang.String typeName)
          Creates a new SimpleContent
SimpleContent(SimpleContent content)
          Creates a new SimpleContent using the given SimpleContent.
SimpleContent(SimpleType simpleType)
          Creates a new SimpleContent
 
Method Summary
 SimpleContent copy()
          Creates a copy of this SimpleContent
 SimpleType getSimpleType()
          Returns the simpleType that represents that contentType.
 java.lang.String getTypeName()
          Returns the name of the associated type for this SimpleContent
 void setSimpleType(SimpleType simpleType)
          Sets the simpleType that represents that contentType.
 
Methods inherited from class org.exolab.castor.xml.schema.ContentType
getType, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleContent

public SimpleContent()
Creates a new SimpleContent


SimpleContent

public SimpleContent(SimpleContent content)
Creates a new SimpleContent using the given SimpleContent. This constructor will copy from the given SimpleContent.

Parameters:
content - the SimpleContent to copy from

SimpleContent

public SimpleContent(SimpleType simpleType)
Creates a new SimpleContent

Parameters:
simpleType - the simpleType of this SimpleContent

SimpleContent

public SimpleContent(Schema schema,
                     java.lang.String typeName)
Creates a new SimpleContent

Parameters:
schema - the associated parent Schema
typeName - the name of the base simpleType, or complexType (must also be a SimpleContent).
Method Detail

copy

public SimpleContent copy()
Creates a copy of this SimpleContent

Returns:
the new SimpleContent which is a copy of this SimpleContent

getSimpleType

public SimpleType getSimpleType()
Returns the simpleType that represents that contentType. This may be null, if no simpleType has been set.

Returns:
the simpleType that represents that contentType.

getTypeName

public java.lang.String getTypeName()
Returns the name of the associated type for this SimpleContent

Returns:
the associated type name for this SimpleContent.

setSimpleType

public void setSimpleType(SimpleType simpleType)
Sets the simpleType that represents that contentType.

Parameters:
simpleType - the simpleType to set


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