com.arsdigita.persistence.metadata
Class CompoundType

java.lang.Object
  extended bycom.arsdigita.persistence.metadata.Element
      extended bycom.arsdigita.persistence.metadata.ModelElement
          extended bycom.arsdigita.persistence.metadata.DataType
              extended bycom.arsdigita.persistence.metadata.CompoundType
Direct Known Subclasses:
ObjectType

public abstract class CompoundType
extends DataType

The CompoundType class represents types that are built up from SimpleTypes and other CompoundTypes. A CompoundType has a set of properties. Each property contained in a CompoundType has an associated DataType.

Version:
$Revision: #14 $ $Date: 2004/04/07 $
Author:
rhs@mit.edu

Field Summary
static String versionId
           
 
Constructor Summary
CompoundType(ObjectType obj)
          Constructs a new and empty CompoundType with the given name.
 
Method Summary
abstract  Iterator getProperties()
          Returns an iterator containing all the Properties this CompoundType contains.
abstract  Property getProperty(String name)
          Gets a property that this CompoundType contains.
abstract  boolean hasProperty(String name)
          Returns true if and only if this CompoundType has a property with the given name.
 boolean isCompound()
          This method will always return true.
 
Methods inherited from class com.arsdigita.persistence.metadata.DataType
getName, getQualifiedName, isSimple
 
Methods inherited from class com.arsdigita.persistence.metadata.ModelElement
getModel
 
Methods inherited from class com.arsdigita.persistence.metadata.Element
equals, getColumnNumber, getFilename, getLineNumber, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

CompoundType

public CompoundType(ObjectType obj)
Constructs a new and empty CompoundType with the given name. In order to do anything useful with the type you must add any properties it may have.

Method Detail

getProperty

public abstract Property getProperty(String name)
Gets a property that this CompoundType contains. Returns null if no such property exists.

Parameters:
name - The name of the property.
Returns:
The property with name name, or null if no such property exists.

hasProperty

public abstract boolean hasProperty(String name)
Returns true if and only if this CompoundType has a property with the given name.

Parameters:
name - The name of the property for which to check existence.
Returns:
True if this CompoundType has a property with the given name. False otherwise.

getProperties

public abstract Iterator getProperties()
Returns an iterator containing all the Properties this CompoundType contains.

Returns:
An iterator containing all the Properties this CompoundType contains.
See Also:
Property

isCompound

public boolean isCompound()
This method will always return true. It is the implementation of the abstract method that appears in DataType.

Overrides:
isCompound in class DataType
Returns:
true


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC